FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-129033: Remove _PyInterpreterState_SetConfig() function by vstinner · Pull Request #129048 · python/cpython · GitHub

/ cpython Public

gh-129033: Remove _PyInterpreterState_SetConfig() function - #129048

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:remove_set_config
Jan 20, 2025
Merged

gh-129033: Remove _PyInterpreterState_SetConfig() function#129048
vstinner merged 2 commits into
python:mainfrom
vstinner:remove_set_config

Conversation

vstinner commented Jan 20, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Remove _PyInterpreterState_GetConfigCopy() and
_PyInterpreterState_SetConfig() private functions. PEP 741 "Python Configuration C API" added a better public C API: PyConfig_Get() and PyConfig_Set().

Remove _PyInterpreterState_GetConfigCopy() and
_PyInterpreterState_SetConfig() private functions. PEP 741 "Python
Configuration C API" added a better public C API: PyConfig_Get() and
PyConfig_Set().

Copy link
Copy Markdown
Member Author

I got impacted by #129060 issue. I rebased my PR on top of it to fix the issue.

Copy link
Copy Markdown
Member Author

Oh, test_py_config_isoloated_per_interpreter() of test_capi.test_misc fails with in Free Threaded build:

ImportError: module _testcapi does not support loading in subinterpreters

vstinner merged commit 8ceb6cb into python:main Jan 20, 2025
vstinner deleted the remove_set_config branch January 20, 2025 15:31
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 21, 2025
…hon#129048)

Remove _PyInterpreterState_GetConfigCopy() and
_PyInterpreterState_SetConfig() private functions. PEP 741 "Python
Configuration C API" added a better public C API: PyConfig_Get() and
PyConfig_Set().
raise unittest.SkipTest("_testinternalcapi required")
config = _testinternalcapi.get_config()
return not _testcapi.config_get('code_debug_ranges')
return not bool(config['code_debug_ranges'])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The return statement added on Line 511 is shadowing this return.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Ooops, well spotted, I created #137379 to remove the dead code.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL