GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-133231: Add JIT utilities in `sys._jit` by brandtbucher · Pull Request #133233 · python/cpython

Conversation

@brandtbucher

@brandtbucher brandtbucher commented May 1, 2025 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: Add JIT utilities in sys._jit #133231

📚 Documentation preview 📚: https://cpython-previews--133233.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
brandtbucher added 5 commits April 30, 2025 19:15
@brandtbucher
Add sys._jit
d67c2a7
@brandtbucher
blurb add
ba56202
@brandtbucher
fixup
5a6f11f
@brandtbucher
fixup
5b27d20
@brandtbucher
fixup
080fd51
@brandtbucher brandtbucher added type-feature A feature request or enhancement interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-JIT labels May 1, 2025
@brandtbucher brandtbucher self-assigned this May 1, 2025
@brandtbucher
brandtbucher requested review from ericsnowcurrently and markshannon as code owners May 1, 2025 02:24
@bedevere-app bedevere-app Bot added the awaiting core review label May 1, 2025
@bedevere-app bedevere-app Bot mentioned this pull request May 1, 2025
Add JIT utilities in sys._jit #133231
Closed
AA-Turner
AA-Turner reviewed May 1, 2025
View reviewed changes

@AA-Turner AA-Turner left a comment

Copy link
Copy Markdown
Member

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.

quick doc-only review:

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/sys.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/sys.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/sys.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/using/cmdline.rst
Comment on lines +1284 to +1290
.. envvar:: PYTHON_JIT

On builds where experimental just-in-time compilation is available, this
variable can force the JIT to be disabled (``0``) or enabled (``1``) at
interpreter startup.

.. versionadded:: 3.13

@AA-Turner AA-Turner May 1, 2025

Copy link
Copy Markdown
Member

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.

We should backport this, should it be split out into a different PR for ease?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@brandtbucher brandtbucher May 1, 2025

Copy link
Copy Markdown
Member Author

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.

We can just backport it separately, since I need the ref for this PR's changes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@AA-Turner AA-Turner May 5, 2025

Copy link
Copy Markdown
Member

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.

Is it worth using miss-islington for the backport here?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@brandtbucher brandtbucher May 6, 2025

Copy link
Copy Markdown
Member Author

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'll just do it manually in a bit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

AA-Turner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@brandtbucher
Fix failing test
1b2e511
@brandtbucher

brandtbucher commented May 1, 2025

Copy link
Copy Markdown
Member Author

I just realized that my approach for sys._jit.is_active() will need reworking, since the tail-calling interpreter doesn't have entry_frame handy.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

brandtbucher added 4 commits May 1, 2025 10:24
@brandtbucher
Feedback from code review
775eb32
@brandtbucher
Merge branch 'main' into sys-jit
1c4f440
@brandtbucher
Fix references
db7609f
@brandtbucher
Rework sys._jit.is_active to support the tail-calling interpreter
fc4824b
@brandtbucher

brandtbucher commented May 1, 2025

Copy link
Copy Markdown
Member Author

Okay, reworked to support tail-calling.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brandtbucher
Fix JIT interpreter
b80bdf8
@brandtbucher

brandtbucher commented May 2, 2025

Copy link
Copy Markdown
Member Author

@markshannon, let me know what you think. The bots won't let us merge features without approving review, but I'd like to get something like this in before the freeze.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

brandtbucher added 2 commits May 4, 2025 11:22
@brandtbucher
Catch up with main
cf3613c
@brandtbucher
Clean up the diff
c5104b8
markshannon
markshannon reviewed May 5, 2025
View reviewed changes

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

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.

Looks good.
One small suggestion

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_sys.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@brandtbucher
operator.call -> _testcapi.pyobject_vectorcall
5d85f4f
markshannon
markshannon approved these changes May 5, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 5, 2025
brandtbucher added 3 commits May 5, 2025 10:38
@brandtbucher
Reword (and split up) note
6e90006
@brandtbucher
Merge branch 'main' into sys-jit
614599c
@brandtbucher
Merge branch 'main' into sys-jit
f37bdf5
@brandtbucher
brandtbucher merged commit b1aa515 into python:main May 5, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label May 5, 2025
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
@brandtbucher @Pranjal095
pythonGH-133231: Add JIT utilities in sys._jit (pythonGH-133233)
aeb8e07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AA-Turner AA-Turner AA-Turner left review comments
@markshannon markshannon markshannon approved these changes
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@brandtbucher brandtbucher

Labels

interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-JIT type-feature A feature request or enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@brandtbucher @AA-Turner @markshannon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.