Skip to content

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

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

Open
3 of 7 tasks
picnixz opened this issue May 8, 2025 · 1 comment
Open
3 of 7 tasks

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

picnixz opened this issue May 8, 2025 · 1 comment
Assignees
Labels
3.15 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-C-API

Comments

@picnixz
Copy link
Member

picnixz commented May 8, 2025

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)

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

@picnixz picnixz self-assigned this May 8, 2025
@picnixz picnixz added interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-C-API 3.15 new features, bugs and security fixes labels May 8, 2025
@skirpichev

This comment has been minimized.

vstinner added a commit to vstinner/cpython that referenced this issue May 8, 2025
Avoid deprecated functions Py_SetProgramName() and
PySys_ResetWarnOptions() in _testembed.c.

* Rename _testembed_Py_InitializeFromConfig() to
  _testembed_initialize().
* Replace _testembed_Py_Initialize() with _testembed_initialize().
vstinner added a commit to vstinner/cpython that referenced this issue May 9, 2025
* Rename _testembed_Py_InitializeFromConfig() to
  _testembed_initialize().
* Replace _testembed_Py_Initialize() with _testembed_initialize().
vstinner pushed a commit that referenced this issue May 9, 2025
…133661)

Remove functions:

* Py_GetExecPrefix()
* Py_GetPath()
* Py_GetPrefix()
* Py_GetProgramFullPath()
* Py_GetProgramName()
* Py_GetPythonHome()
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 9, 2025
…onGH-133749)

(cherry picked from commit 3ed8d6f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 9, 2025
…onGH-133749)

(cherry picked from commit 3ed8d6f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz added a commit that referenced this issue May 9, 2025
…133749) (#133751)

gh-133644: update `Py_InteractiveFlag` deprecation notice (GH-133749)
(cherry picked from commit 3ed8d6f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz added a commit that referenced this issue May 9, 2025
…133749) (#133752)

gh-133644: update `Py_InteractiveFlag` deprecation notice (GH-133749)
(cherry picked from commit 3ed8d6f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
vstinner added a commit that referenced this issue May 9, 2025
)

* Rename _testembed_Py_InitializeFromConfig() to
  _testembed_initialize().
* Replace _testembed_Py_Initialize() with _testembed_initialize().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.15 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-C-API
Projects
None yet
Development

No branches or pull requests

2 participants