GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — C API: Remove legacy API functions to configure Python initialization · Issue #105145 · python/cpython

C API: Remove legacy API functions to configure Python initialization #105145

New issue
Copy link
New issue
Copy link
Closed
Closed
C API: Remove legacy API functions to configure Python initialization#105145
Copy link
Labels
topic-C-APItype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@vstinner
vstinner
opened on May 31, 2023
Issue body actions

The following C API functions were deprecated in Python 3.11 by issue #88279:

  • PySys_AddWarnOptionUnicode()
  • PySys_AddWarnOption()
  • PySys_AddXOption()
  • PySys_HasWarnOptions()
  • PySys_SetArgvEx()
  • PySys_SetArgv()
  • PySys_SetPath()
  • Py_SetPath()
  • Py_SetProgramName()
  • Py_SetPythonHome()
  • Py_SetStandardStreamEncoding()
  • _Py_SetProgramFullPath()

IMO it's now time to remove them: the new PyConfig API is available since Python 3.8: https://docs.python.org/dev/c-api/init_config.html

Linked PRs

  • gh-105145: Remove old functions to config Python init #105154
  • gh-105145: Deprecate Py_GetPath() function #105179

Activity

  1. vstinner
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 31, 2023
  2. vstinner
    added 3 commits that reference this issue on May 31, 2023

    pythongh-105145: Remove legacy functions to configure Python init

    e6f05a8

    pythongh-105145: Remove old functions to configure Python init

    8497533

    pythongh-105145: Remove old functions to config Python init

    ed1e2a4
  3. vstinner commented on May 31, 2023

    @vstinner
    vstinner
    on May 31, 2023
    MemberAuthor
    More actions

    Oh no, too bad, I forgot to deprecate PySys_ResetWarnOptions() in Python 3.11.

  4. vstinner commented on May 31, 2023

    @vstinner
    vstinner
    on May 31, 2023
    MemberAuthor
    More actions

    Functions like Py_GetPath() function also be deprecated.

  5. vstinner
    added 6 commits that reference this issue on May 31, 2023

    pythongh-105145: Remove old functions to config Python init

    449b4c8

    pythongh-105145: Remove old functions to config Python init

    c16e3c9

    pythongh-105145: Remove old functions to config Python init

    1453a74

    gh-105145: Remove old functions to config Python init (#105154)

    424049c

    pythongh-105145: Deprecate Py_GetPath() function

    5306a2b

    pythongh-105145: Deprecate Py_GetPath() function

    a335c23
  6. vstinner
    added
    topic-C-API
    on Jun 1, 2023
  7. vstinner
    added a commit that references this issue on Jun 1, 2023

    gh-105145: Deprecate Py_GetPath() function (#105179)

    c67121a
  8. vstinner
    closed this as completedon Jun 1, 2023
  9. encukou commented on Jan 16, 2024

    @encukou
    encukou
    on Jan 16, 2024
    Member
    More actions

    The original issue says:

    I don't propose to schedule the removal of these functions, only mark them as deprecated in the documentation.

    What changed?

  10. vstinner commented on Jan 16, 2024

    @vstinner
    vstinner
    on Jan 16, 2024
    MemberAuthor
    More actions

    What changed?

    Issue gh-88279 was in 2021.

    I wrote it in this issue description in 2023:

    IMO it's now time to remove them: the new PyConfig API is available since Python 3.8: https://docs.python.org/dev/c-api/init_config.html

    What changed in that the PyConfig API is now widely available and is a better API than the deprecated one.

  11. encukou commented on Feb 1, 2024

    @encukou
    encukou
    on Feb 1, 2024
    Member
    More actions

    What changed in that the PyConfig API is now widely available and is a better API than the deprecated one.

    It seems a PEP is needed for a full replacement. You wrote PEP-741, there are objections against the basic concept of PEP-741 :(

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

    topic-C-APItype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.