Skip to content

email.policy.default mypy error #130412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cossor opened this issue Feb 21, 2025 · 2 comments
Closed

email.policy.default mypy error #130412

cossor opened this issue Feb 21, 2025 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@cossor
Copy link

cossor commented Feb 21, 2025

Bug report

Bug description:

i anticipated that this issue would be resolved in Python 3.13.2 because i thought i saw a pull request for it, but that did not happen. (i have had false memories before.) mypy 1.14.0 also reports an error, 1.13.0 does not.

from email import parser, policy

"""
using Python 3.13.2, mypy 1.15.0 emits --
default_policy.py:10: error: Argument "policy" to "Parser" has incompatible type "EmailPolicy[EmailMessage]"; expected "Policy[Message[str, str]]"  [arg-type]
Found 1 error in 1 file (checked 1 source file)
"""


parser.Parser(policy=policy.default)

CPython versions tested on:

3.13

Operating systems tested on:

macOS

@cossor cossor added the type-bug An unexpected behavior, bug, or error label Feb 21, 2025
@picnixz picnixz added the stdlib Python modules in the Lib dir label Feb 21, 2025
@picnixz
Copy link
Member

picnixz commented Feb 21, 2025

Is this a mypy or a CPython issue? if it's a mypy issue, please report it at https://github.com/python/mypy/issues instead (but it could also be a typeshed issue). What would be the non-typing issue? namely can it cause an issue at runtime?

@picnixz picnixz added the pending The issue will be closed if no feedback is provided label Feb 21, 2025
@cossor
Copy link
Author

cossor commented Feb 21, 2025

@picnixz, thanks for your comment/questions. i see that my memory of this issue wasn't false, and will stare at the mypy/typeshed repos to discover how/where i should (re)submit.

@cossor cossor closed this as completed Feb 21, 2025
@picnixz picnixz closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2025
@picnixz picnixz removed type-bug An unexpected behavior, bug, or error pending The issue will be closed if no feedback is provided labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

2 participants