-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-126204: Add a sys._jit_enabled
helper
#126247
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
Conversation
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'm not convinced that pyconfig.h
is the right home for this - it seems like just pulling it from sysconfig
is sufficient.
I'd rather not take the changes in the PC
/PCbuild
directories if we don't have to.
# Temporarily enable ignore_stderr=True to ignore warnings on JIT builds | ||
# See gh-126255 for more information | ||
self.check_all_configs("test_initconfig_api", config, preconfig, | ||
api=API_ISOLATED, ignore_stderr=True) |
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.
That's fun. Due to incorrect assumptions, where JIT is actually enabled or not, this hack is no longer needed. Just setting PYTHON_JIT=0 is enough here.
Py_JIT_ENABLED
variable to pyconfig.h
sys._jit_enabled
helper
Misc/NEWS.d/next/Core_and_Builtins/2024-11-10-04-59-43.gh-issue-126204.ASKDL1.rst
Outdated
Show resolved
Hide resolved
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]>
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.
A final nitpick. And a question: is there a lot of
_PyOptimizerObject* optimizer = _Py_GetOptimizer();
if (optimizer != NULL) {
Py_DECREF(optimizer);
...
}
in the code? if so, we could perhaps have some function that checks if there is an optimizer.
EDIT: Since we are moving to removing the _PyOptimizer
API, it's possible we don't need this.
Co-authored-by: BΓ©nΓ©dikt Tran <[email protected]>
In fact, there are only two uses of |
Superseded by #129194 |
Py_JIT_ENABLED
variable topyconfig.h
Β #126204π Documentation preview π: https://cpython-previews--126247.org.readthedocs.build/