-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
gh-107954, PEP 741: Add PyConfig_Get() function #123472
Conversation
Add PyConfig_Get(), PyConfig_GetInt(), PyConfig_Set() and PyConfig_Names() functions to get and set the current runtime Python configuration. _PyConfig_AsDict() now converts PyConfig.xoptions as a dictionary.
(Previous version of the PR, before PEP 741 was accepted: #112609.) |
cc @zooba |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have much to say except my usual style nitpicks.
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
@picnixz: About your suggested changes to replace |
@picnixz: I addressed most of your reviews. |
Sound good to me. Consistency in this case is better so I'm fine. And PEP 7 indeed doesn't say anything on this matter (it just says that the function name must be on its own line I think).
Thank you! |
Update also PyConfig in _PySys_SetIntMaxStrDigits().
Add _PyWideStringList_AsTuple() function.
|
|
@vstinner Seems this PR broke the Linux perf profiler buildbots (and have been broken since) |
@pablogsal do you have some details? |
No other than the buildbot logs |
I can try to look into this once I am back from the core dev sprint since here I don't have a laptop with new enough perf |
I can confirm that the previous commit builds correctly |
Found the problem: #124636 |
Yes, it fixes the issue I raised Thanks! |
But also the real question is: why wasn't this picked up by the GH runners and rely on buildbot builds? |
Because running the minimum Perf in GH runners is close to impossible |
Add PyConfig_Get(), PyConfig_GetInt(), PyConfig_Set() and PyConfig_Names() functions to get and set the current runtime Python configuration.
_PyConfig_AsDict() now converts PyConfig.xoptions as a dictionary.
📚 Documentation preview 📚: https://cpython-previews--123472.org.readthedocs.build/