Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bump imaplib to 3.14 #14022

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

Merged
merged 2 commits into from
May 12, 2025
Merged

Bump imaplib to 3.14 #14022

merged 2 commits into from
May 12, 2025

Conversation

donBarbos
Copy link
Contributor

No description provided.

This comment has been minimized.

@donBarbos donBarbos marked this pull request as ready for review May 12, 2025 14:23
@@ -42,11 +42,17 @@ class IMAP4:
PROTOCOL_VERSION: str
def __init__(self, host: str = "", port: int = 143, timeout: float | None = None) -> None: ...
def open(self, host: str = "", port: int = 143, timeout: float | None = None) -> None: ...
if sys.version_info >= (3, 14):
@property
@deprecated("Deprecated in Python 3.14; IMAP4.file is unsupported, can cause errors, and may be removed.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@deprecated("Deprecated in Python 3.14; IMAP4.file is unsupported, can cause errors, and may be removed.")
@deprecated("IMAP4.file is unsupported, can cause errors, and may be removed.")

Type checkers will already emit that it's deprecated, no need to repeat it.

Also I think we should mark this as @deprecated unconditionally, even on old versions, to put people on notice faster that they're using something unsupported.

Copy link
Contributor Author

@donBarbos donBarbos May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this as a prefix because we use this pattern in other places, but I agree with you

About @deprecated for old versions: I wouldn't mind if, but in older versions, file is implemented as an attribute, and the decorator is only suitable for a function like in new versions. and it seems wrong to do it through property if it is an attribute

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could pretend it's a property on all versions but it's fine not to.

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JelleZijlstra JelleZijlstra merged commit 7cb4fe0 into python:main May 12, 2025
64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants