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.

Co-authored-by: Victor Stinner <vstinner@python.org>
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@hugovk hugovk merged commit 99c3c63 into python:main Oct 20, 2025
49 checks passed
@hugovk hugovk deleted the 3.15-deprecate-__version__-imaplib branch October 20, 2025 12:20
StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
…n#140299)

Co-authored-by: Victor Stinner <vstinner@python.org>
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.

4 participants