Repository navigation
Remove deprecated C API objects slated for removal in 3.15 #133644
Copy link
Copy link
Open
Labels
3.15bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-API
Description
Activity
- addedinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)3.15bugs and security fixesbugs and security fixes
on May 8, 2025 1 remaining item
I think we can cross out
libmpdecimalremoval since it has been deferred to 3.16?Py_UNICODE_WIDE and Py_UNICODE type
Looking at just the top 500 pypi packages (Thanks Victor!), there is still usage in several packages. Do we want to postpone to 3.16?
Looking at just the top 500 pypi packages (Thanks Victor!), there is still usage in several packages. Do we want to postpone to 3.16?
How is it used? How many projects use them?
I think we can cross out libmpdecimal removal since it has been deferred to 3.16?
Right, we should wait for Python 3.16.
- added 4 commits that reference this issue
on Jul 12, 2025 - added 4 commits that reference this issue
on Aug 4, 2025 - added a commit that references this issue
on Sep 24, 2025 For
Py_UNICODE_WIDEI propose soft deprecation instead.
There's been no user warning outside docs, and removing an#ifdefmacro can silently change the value.
Metadata
Metadata
Assignees
Labels
3.15bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-API
Proposal:
This issue serves as a tracker for removing the following parts of the C API:
PyImport_ImportModuleNoBlock: #133655PyWeakref_GetObjectandPyWeakref_GET_OBJECT: #133657PySys_Set*& co)Py_UNICODE_WIDEandPy_UNICODEtypeTracked separately:
vendored copy of(deferred to Python 3.16)libmpdecimal: #115119.PyUnicode_As{Encoded,Decoded}{Object,Unicode}: #133610 cc @StanFromIrelandPySys_ResetWarnOptionsRemove deprecatedPySys_ResetWarnOptionsC-API function #138886 cc @sobolevnI'll take care of doing the other deprecation removals and update
c-api-pending-removal-in-3-15.Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
PyImport_ImportModuleNoBlock#133655PyWeakref_GetObjectandPyWeakref_GET_OBJECT#133657Py_InteractiveFlagdeprecation notice #133749Py_InteractiveFlagdeprecation notice (GH-133749) #133751Py_InteractiveFlagdeprecation notice (GH-133749) #133752PySys_SetArgv*for 3.15 #136277PySys_ResetWarnOptionsC-API function #138887