gh-107954, PEP 741: Add PyConfig_Get() function#123472
gh-107954, PEP 741: Add PyConfig_Get() function#123472vstinner merged 18 commits intopython:mainfrom
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 |
picnixz
left a comment
There was a problem hiding this comment.
I don't have much to say except my usual style nitpicks.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
@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/