-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-115664: Reorganize versionadded directives for -X options #116304
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
gh-115664: Reorganize versionadded directives for -X options #116304
Conversation
Add the versionadded directives just under the description of the corresponding option.
Doc/using/cmdline.rst
Outdated
.. versionchanged:: 3.8 | ||
The :class:`io.IOBase` destructor logs ``close()`` exceptions. | ||
|
||
.. versionchanged:: 3.9 | ||
Check the *encoding* and *errors* arguments for string encoding | ||
and decoding operations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about these two. The Python Development Mode is now described in details in Doc/library/devmode.rst, where there are corresponding versionchanged
directives. So perhaps there is no need to duplicate them here. Perhaps they are remnants from the time when it all was described here.
Doc/using/cmdline.rst
Outdated
|
||
.. versionchanged:: 3.8 | ||
The :class:`io.IOBase` destructor logs ``close()`` exceptions. | ||
|
||
.. versionchanged:: 3.9 | ||
Check the *encoding* and *errors* arguments for string encoding | ||
and decoding operations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. versionchanged:: 3.8 | |
The :class:`io.IOBase` destructor logs ``close()`` exceptions. | |
.. versionchanged:: 3.9 | |
Check the *encoding* and *errors* arguments for string encoding | |
and decoding operations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is an improvement. A couple of questions about keeping info about removals.
Doc/using/cmdline.rst
Outdated
.. versionchanged:: 3.9 | ||
Using ``-X dev`` option, check *encoding* and *errors* arguments on | ||
string encoding and decoding operations. | ||
|
||
The ``-X showalloccount`` option has been removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's still useful to know -X showalloccount
was removed in 3.9?
For example, if I'm migrating from 3.8 to 3.9, I might want to know this option has gone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Although it is slightly inconsistent. Either we document an entity (class, method) separately, with versionadded
, and when remove it, nothing is left. Or we document it (function parameters) in the documentation of other entity, with versionc
8000
hanged
for the enclosing entity, and after removing them, we can add a new versionchanged
. There is no strong division by types. Attributes can be documented in both ways, and sometimes methods and even classes are not documented as separate entities.
Doc/using/cmdline.rst
Outdated
.. versionchanged:: 3.10 | ||
Added the ``-X warn_default_encoding`` option. | ||
Removed the ``-X oldparser`` option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly about -X oldparser
being removed in 3.10.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, @serhiy-storchaka, I could not cleanly backport this to
|
Thank you for your review @hugovk. |
…ions (pythonGH-116304) Add the versionadded directives just under the description of the corresponding option. (cherry picked from commit 10f1a26) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
GH-117900 is a backport of this pull request to the 3.12 branch. |
…ythonGH-116304) Add the versionadded directives just under the description of the corresponding option.
Add the versionadded directives just under the description of the corresponding option.
It is an alternative to changes in #116298.
📚 Documentation preview 📚: https://cpython-previews--116304.org.readthedocs.build/