gh-115664: Reorganize versionadded directives for -X options#116304
Conversation
Add the versionadded directives just under the description of the corresponding option.
| .. 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.
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.
|
|
||
| .. 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.
| .. 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. |
hugovk
left a comment
There was a problem hiding this comment.
Thanks, this is an improvement. A couple of questions about keeping info about removals.
| .. 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.
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.
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 versionchanged 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.
| .. versionchanged:: 3.10 | ||
| Added the ``-X warn_default_encoding`` option. | ||
| Removed the ``-X oldparser`` option. |
There was a problem hiding this comment.
Similarly about -X oldparser being removed in 3.10.
|
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/