-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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-92308: Add Pending Removal section to 3.11 What's New #92309
Changes from 6 commits
11dbba7
e325c15
f8c2144
65cf56e
ed590cc
11ec7a8
0d43d89
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1173,6 +1173,61 @@ Deprecated | |
(Contributed by Serhiy Storchaka in :gh:`91760`.) | ||
|
||
|
||
Pending Removal in Python 3.12 | ||
============================== | ||
|
||
The following APIs have been deprecated in earlier Python releases, and are now | ||
pending removal in Python 3.12. | ||
ezio-melotti marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Python API: | ||
|
||
* :class:`pkgutil.ImpImporter` | ||
* :class:`pkgutil.ImpLoader` | ||
* :envvar:`PYTHONTHREADDEBUG` | ||
* :func:`importlib.find_loader` | ||
* :func:`importlib.util.module_for_loader` | ||
* :func:`importlib.util.set_loader_wrapper` | ||
* :func:`importlib.util.set_package_wrapper` | ||
* :meth:`importlib.abc.Loader.module_repr` | ||
* :meth:`importlib.abc.Loadermodule_repr` | ||
* :meth:`importlib.abc.MetaPathFinder.find_module` | ||
* :meth:`importlib.abc.MetaPathFinder.find_module` | ||
* :meth:`importlib.abc.PathEntryFinder.find_loader` | ||
* :meth:`importlib.abc.PathEntryFinder.find_module` | ||
* :meth:`importlib.machinery.BuiltinImporter.find_module` | ||
* :meth:`importlib.machinery.BuiltinLoader.module_repr` | ||
* :meth:`importlib.machinery.FileFinder.find_loader` | ||
* :meth:`importlib.machinery.FileFinder.find_module` | ||
* :meth:`importlib.machinery.FrozenImporter.find_module` | ||
* :meth:`importlib.machinery.FrozenLoader.module_repr` | ||
* :meth:`importlib.machinery.PathFinder.find_module` | ||
* :meth:`importlib.machinery.WindowsRegistryFinder.find_module` | ||
* :meth:`pathlib.Path.link_to` | ||
* The entire :ref:`distutils namespace <distutils-deprecated>` | ||
* ``cgi.log()`` | ||
* ``sqlite3.OptimizedUnicode`` | ||
* ``sqlite3.enable_shared_cache`` | ||
ezio-melotti marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
C API: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Around Python 3.9, I moved Build Changes and C API changes at the end of the document since most users never write any line of C API. I suggest you to move this list inside the C API Changes section: add a new " Pending Removal in Python 3.12" section there. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah; typically, I'd think if a user actually uses a function, they'd want more details anyway, and if functions don't have clear guidance on why they are deprecated and what to replace them with (or not), then it can be added there. |
||
|
||
* :c:func:`PyUnicode_AS_DATA` | ||
* :c:func:`PyUnicode_AS_UNICODE` | ||
* :c:func:`PyUnicode_AsUnicodeAndSize` | ||
* :c:func:`PyUnicode_AsUnicode` | ||
* :c:func:`PyUnicode_FromUnicode` | ||
* :c:func:`PyUnicode_GET_DATA_SIZE` | ||
* :c:func:`PyUnicode_GET_SIZE` | ||
* :c:func:`PyUnicode_GetSize` | ||
* :c:func:`PyUnicode_IS_COMPACT` | ||
* :c:func:`PyUnicode_IS_READY` | ||
* :c:func:`PyUnicode_READY` | ||
* :c:func:`Py_UNICODE_WSTR_LENGTH` | ||
* :c:func:`_PyUnicode_AsUnicode` | ||
* :c:macro:`PyUnicode_WCHAR_KIND` | ||
* :c:type:`PyUnicodeObject` | ||
* :c:func:`PyUnicode_InternImmortal()` | ||
|
||
|
||
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.
This could be clearer. I'm not sure if it's telling me that they will be removed in 3.12, or if they are marked as "pending removal" (i.e. deprecated?) in 3.12.
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.
Perhaps:
There's the possibility that removal will be delayed, but I think the stronger language is OK as it covers the vast majority of cases (if it isn't, we could go back to "are scheduled for removal in ...")
A
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 prefer to be more explicit: "will be removed in Python 3.12" sounds more concrete. It's ok if one of these function is kept. We can update the Python 3.11 doc if needed.
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.
Agreed with @vstinner ; its much better that users assume they will be removed and update their code accordingly and then the removal be deferred a version than the inverse.