Skip to content

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Oct 18, 2025

Also remove it from the debug output:

         if __debug__:
             self._cmd_log_len = 10
             self._cmd_log_idx = 0
             self._cmd_log = {}           # Last '_cmd_log_len' interactions
             if self.debug >= 1:
-                self._mesg('imaplib version %s' % __version__)
                 self._mesg('new IMAP4 connection, tag=%s' % self.tagpre)

@picnixz Or would you prefer to put the Python version here?


📚 Documentation preview 📚: https://cpython-previews--140299.org.readthedocs.build/

@hugovk hugovk changed the title Deprecate __version__ attribute in imaplib gh-76007: Deprecate __version__ attribute in imaplib Oct 18, 2025
@picnixz
Copy link
Member

picnixz commented Oct 18, 2025

I think it is fine to remove it. We anyway have a divergence between 3.13 and 3.14 because 3.14 had a new feature and 3.13 and 3.14 had bugfixes that I addes, so it would only help if we had both the version of Python and the IMAP one.

IMO such debugging information could only be useful if the Python version also included the git commit it is based on but that would be an overkill I think.

from warnings import _deprecated

_deprecated("__version__", remove=(3, 20))
return "2.50" # Do not change
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
return "2.50" # Do not change
return "2.60" # Do not change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants