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

gh-126204: Add a `sys._jit_enabled` helper by Eclips4 · Pull Request #126247 · python/cpython · GitHub

/ cpython Public

gh-126204: Add a sys._jit_enabled helper - #126247

Closed
Eclips4 wants to merge 32 commits into
python:mainfrom
Eclips4:add-py-jit
Closed

gh-126204: Add a sys._jit_enabled helper#126247
Eclips4 wants to merge 32 commits into
python:mainfrom
Eclips4:add-py-jit

Conversation

Eclips4 commented Oct 31, 2024
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member

Eclips4 marked this pull request as ready for review October 31, 2024 16:49

zooba left a comment

Copy link
Copy Markdown
Member

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

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.

Comment thread Lib/test/test_embed.py
Comment on lines -1785 to -1788
# 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)

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

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.

Eclips4 requested a review from pablogsal November 10, 2024 03:24
Eclips4 marked this pull request as ready for review November 10, 2024 03:24
Eclips4 changed the title gh-126204: Add a Py_JIT_ENABLED variable to pyconfig.h gh-126204: Add a sys._jit_enabled helper Nov 10, 2024
Comment thread Python/pylifecycle.c Outdated
Comment thread Python/pylifecycle.c Outdated
Comment thread Python/pylifecycle.c Outdated
Comment thread Python/sysmodule.c Outdated
Eclips4 and others added 2 commits November 10, 2024 17:26
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Eclips4 requested a review from picnixz November 10, 2024 15:34
Comment thread Doc/whatsnew/3.14.rst Outdated
Comment thread Doc/library/sys.rst
Comment thread Python/pylifecycle.c Outdated
Comment thread Python/pylifecycle.c Outdated
Comment thread Python/sysmodule.c
Eclips4 and others added 3 commits November 10, 2024 18:20
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Comment thread Python/pylifecycle.c Outdated
Comment thread Python/pylifecycle.c Outdated
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

picnixz left a comment
edited
Loading

Copy link
Copy Markdown
Member

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

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.

Comment thread Python/sysmodule.c Outdated
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

Eclips4 commented Nov 11, 2024

Copy link
Copy Markdown
Member Author

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.

In fact, there are only two uses of _Py_GetOptimizer. I'm not sure if we should remove this usage in this PR.

Comment thread Python/pylifecycle.c
Eclips4 requested a review from zooba November 13, 2024 20:56

Eclips4 commented Jan 30, 2025

Copy link
Copy Markdown
Member Author

Superseded by #129194

Eclips4 closed this Jan 30, 2025
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL