Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 2 commits intopython:mainfromvstinner:remove_old_init_funcs
Jun 1, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedMay 31, 2023
edited
Loading

Remove the following old functions to configure the Python initialization, deprecated in Python 3.11:

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

Most of these functions are kept in the stable ABI, except:

  • Py_SetStandardStreamEncoding()
  • _Py_SetProgramFullPath()

Update Doc/extending/embedding.rst and Doc/extending/extending.rst to use the new PyConfig API.

_testembed.c:

  • check_stdio_details() now sets stdio_encoding and stdio_errors of PyConfig.
  • Add definitions of functions removed from the API but kept for the stable ABI.
  • test_init_from_config() and test_init_read_set() now use PyConfig_SetString() instead of PyConfig_SetBytesString().

Remove _Py_ClearStandardStreamEncoding() internal function.

Remove the following old functions to configure the Pythoninitialization, deprecated in Python 3.11:* PySys_AddWarnOptionUnicode()* PySys_AddWarnOption()* PySys_AddXOption()* PySys_HasWarnOptions()* PySys_SetArgvEx()* PySys_SetArgv()* PySys_SetPath()* Py_SetPath()* Py_SetProgramName()* Py_SetPythonHome()* Py_SetStandardStreamEncoding()* _Py_SetProgramFullPath()Most of these functions are kept in the stable ABI, except:* Py_SetStandardStreamEncoding()* _Py_SetProgramFullPath()Update Doc/extending/embedding.rst and Doc/extending/extending.rst touse the new PyConfig API._testembed.c:* check_stdio_details() now sets stdio_encoding and stdio_errors  of PyConfig.* Add definitions of functions removed from the API but kept for the  stable ABI.* test_init_from_config() and test_init_read_set() now use  PyConfig_SetString() instead of PyConfig_SetBytesString().Remove _Py_ClearStandardStreamEncoding() internal function.
@vstinnervstinnerforce-pushed theremove_old_init_funcs branch fromc16e3c9 to1453a74CompareMay 31, 2023 16:11
@vstinner
Copy link
MemberAuthor

It's funny to find such very old comment:

   .. XXX impl. doesn't seem consistent in allowing ``0``/``NULL`` for the params;      check w/ Guido.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@vstinner@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp