Skip to content

Remove deprecated C API objects slated for removal in 3.15 #133644

Description

@picnixz

Proposal:

This issue serves as a tracker for removing the following parts of the C API:

  • Global configuration variables: #133654
  • Process-wide parameters: #133661
  • PyImport_ImportModuleNoBlock: #133655
  • PyWeakref_GetObject and PyWeakref_GET_OBJECT: #133657
  • Functions to configure Python's initialization (PySys_Set* & co)
  • Py_UNICODE_WIDE and Py_UNICODE type

Tracked separately:

I'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

Activity

  1. self-assigned this
    on May 8, 2025
  2. skirpichev commented on May 8, 2025

    @skirpichev
  3. added a commit that references this issue on May 8, 2025
  4. added 3 commits that reference this issue on May 8, 2025
  5. added a commit that references this issue on May 9, 2025
  6. added 2 commits that reference this issue on May 9, 2025
  7. added 2 commits that reference this issue on May 9, 2025
  8. added a commit that references this issue on May 9, 2025
  9. 1 remaining item

  10. StanFromIreland commented on Jul 9, 2025

    @StanFromIreland
    Member

    I think we can cross out libmpdecimal removal since it has been deferred to 3.16?

  11. StanFromIreland commented on Jul 9, 2025

    @StanFromIreland
    Member

    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?

  12. vstinner commented on Jul 11, 2025

    @vstinner
    Member

    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?

  13. vstinner commented on Jul 11, 2025

    @vstinner
    Member

    I think we can cross out libmpdecimal removal since it has been deferred to 3.16?

    Right, we should wait for Python 3.16.

  14. added 4 commits that reference this issue on Jul 12, 2025
  15. added 4 commits that reference this issue on Aug 4, 2025
  16. removed their assignment
    on Sep 14, 2025
  17. added a commit that references this issue on Sep 24, 2025
  18. encukou commented on Feb 27, 2026

    @encukou
    Member

    For Py_UNICODE_WIDE I propose soft deprecation instead.
    There's been no user warning outside docs, and removing an #ifdef macro can silently change the value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)topic-C-API

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions