| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@hugovk, @CAM-Gerlach: Would you mind to review my documentation of this long list of deprecated features? I'm not sure if all of them must be listed under "Pending Removal", since some of them are "incompatible changes" rather than "removals". But it seems like we have this habit in the previous What's New documents as well. So I continued the trend. The phrasing is... minimal. Basically, I copied/pasted error messages from the code which emits DeprecationWarning. Example:
Maybe this entry should be elaborated... a little bit. Or removed. I'm not sure. I had troubles with Sphinx syntax: :func:`~!urllib.parse.splittype` This fails with: WARNING: py:func reference target not found: !urllib.parse.splittype and the Docs job fails. But if I write: :func:`!~urllib.parse.splittype` I get a ~ in the rendered HTML! I gave up and used this syntax: ``splittype()`` I don't want to get a reference to this function... since it's not documented. And it should not be documented, since it's deprecated. I also added "Pending Removals" under the C API Changes section in a previous commit. |
Sorry, something went wrong.
|
I merged my PR to continue the work on the issue #105373. But please, don't hesitate to propose a PR to enhance this documentation, or leave post-merge comments on this PR. |
Sorry, something went wrong.
| * :mod:`typing`: :class:`~typing.ByteString`, deprecated since Python 3.9, | ||
| now causes a :exc:`DeprecationWarning` to be emitted when it is used. | ||
|
|
||
| * :class:`!urllib.parse.Quoter`. |
Sorry, something went wrong.
There was a problem hiding this comment.
I created PR #106675 to elaborate this entry.
Sorry, something went wrong.
| Pending Removal in Python 3.14 | ||
| ------------------------------ | ||
|
|
||
| * :mod:`argparse`: The *type*, *choices*, and *metavar* parameters |
There was a problem hiding this comment.
I like the practice of putting the module name at the start, and listing them alphabetically, makes it easier to find something.
Let's also alphabetise the main "Deprecated" section. (We could add a hidden comment at the top of the sections saying to add new ones alphabetically - see top of whole file for a hidden .. Rules for maintenance: comment).
Sorry, something went wrong.
There was a problem hiding this comment.
Please go ahead if you want to make a similar change in other sections :-)
Sorry, something went wrong.
| * :class:`typing.NamedTuple`: | ||
|
|
||
| * The undocumented keyword argument syntax for creating NamedTuple classes | ||
| (``NT = NamedTuple("NT", x=int)``) is deprecated, and will be disallowed in | ||
| 3.15. Use the class-based syntax or the functional syntax instead. | ||
|
|
||
| * When using the functional syntax to create a NamedTuple class, failing to | ||
| pass a value to the 'fields' parameter (``NT = NamedTuple("NT")``) is | ||
| deprecated. Passing ``None`` to the 'fields' parameter | ||
| (``NT = NamedTuple("NT", None)``) is also deprecated. Both will be | ||
| disallowed in Python 3.15. To create a NamedTuple class with 0 fields, use | ||
| ``class NT(NamedTuple): pass`` or ``NT = NamedTuple("NT", [])``. | ||
|
|
||
| * :class:`typing.TypedDict`: When using the functional syntax to create a | ||
| TypedDict class, failing to pass a value to the 'fields' parameter (``TD = | ||
| TypedDict("TD")``) is deprecated. Passing ``None`` to the 'fields' parameter | ||
| (``TD = TypedDict("TD", None)``) is also deprecated. Both will be disallowed | ||
| in Python 3.15. To create a TypedDict class with 0 fields, use ``class | ||
| TD(TypedDict): pass`` or ``TD = TypedDict("TD", {})``. |
There was a problem hiding this comment.
Hmm, these two are listed in the main "Deprecated" section.
Should they be in both or just one?
Looking at older What's New pages, some (but not all) sections have intro texts saying they're were only for deprecations from earlier versions:
re:
Sorry, something went wrong.
There was a problem hiding this comment.
I put the two items in both sections on purpose. We can just copy/paste the Pending Removal section in the future What's New In Python 3.14, and people reading Pending Removal don't have to read the Deprecation section.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
📚 Documentation preview 📚: https://cpython-previews--106540.org.readthedocs.build/