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

GH-134291: Support older macOS deployment targets for JIT builds by brandtbucher · Pull Request #137211 · python/cpython · GitHub

/ cpython Public

GH-134291: Support older macOS deployment targets for JIT builds - #137211

Merged
brandtbucher merged 2 commits into
python:mainfrom
brandtbucher:macos-10-15
Jul 30, 2025
Merged

GH-134291: Support older macOS deployment targets for JIT builds#137211
brandtbucher merged 2 commits into
python:mainfrom
brandtbucher:macos-10-15

Conversation

brandtbucher commented Jul 29, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

This rolls back GH-126196 and adds stricter checks for newer APIs in JIT CI. We don't really need the superpowers of the newer API (rapid flip-flopping permissions on JIT pages) since our JIT doesn't use self-modifying code.

This allows downstream distributors (like uv, CC @zanieb) to ship the JIT for more users.

Copy link
Copy Markdown
Member Author

Performance is neutral. If you squint, startup is slightly faster and JIT-heavy benchmarks are slightly slower, but it's mostly in the noise for this machine.

diegorusso left a comment

Copy link
Copy Markdown
Contributor

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

Instead of removing the support altogether, wouldn't it be nicer to call it only on supported macOS version?

zanieb commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

We chatted about that at PyCon but it sounded like it didn't really seem like the right trade-off because there's not a strong justification for having it in the first place.

Copy link
Copy Markdown
Member Author

Yeah, if we left it in we'd need to test it, etc. It's intended to be a lightweight workaround for JITs with self-modifying code on newer Macs that don't support WX pages, which doesn't apply to us. I think it's cleaner to just pull it out for now.

savannahostrowski 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

Seems reasonable to me - I'm very +1 on wider distribution of JIT builds :)

zanieb commented Jul 30, 2025

Copy link
Copy Markdown
Contributor

This supersedes #134292

diegorusso left a comment

Copy link
Copy Markdown
Contributor

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

OK, if this causes issue, let's merge it. As Brandt said our JIT doesn't really modify the code while executing.

brandtbucher merged commit d591b5e into python:main Jul 30, 2025
68 checks passed

Copy link
Copy Markdown
Member Author

@hugovk, @zanieb, @ned-deily: thoughts on backporting this change? I know we're in RC, but this would allow macOS distributors like uv to ship the JIT (like it does for other platforms) without carrying this patch. The new code is reverting things to the way they worked in 3.13 and part of 3.14 (and Linux) anyways, so I'm personally confident that backporting won't lead to issues.

Copy link
Copy Markdown
Member

thoughts on backporting this change?

I need to test the change first, which I'll do in the next day. But, assuming no problems, it should definitely be backported for 3.14. We've been handwaving about older release support while waiting for this to be fixed.

hugovk commented Jul 31, 2025

Copy link
Copy Markdown
Member

Fine by me when Ned gives the nod.

Copy link
Copy Markdown
Member Author

Should we try to get the backport into the next RC @ned-deily @hugovk?

Copy link
Copy Markdown
Member

Should we try to get the backport into the next RC @ned-deily @hugovk?

I'm looking at it now.

bedevere-app Bot commented Aug 13, 2025

Copy link
Copy Markdown

GH-137701 is a backport of this pull request to the 3.14 branch.

Copy link
Copy Markdown
Member

Looks good for main and for 3.14 as well. There was a minor conflict with backporting to 3.14 so I created a manual backport for it in #137701.

hugovk pushed a commit that referenced this pull request Aug 13, 2025
…ds (GH-137211) (#137701)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86-64 MacOS Intel NoGIL 3.14 (tier-1) has failed when building commit 2392232.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1679/builds/406) and take a look at the build logs.
  4. Check if the failure is related to this commit (2392232) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1679/builds/406

Failed tests:

  • test_largefile
  • test_tools
  • test.test_concurrent_futures.test_process_pool

Failed subtests:

  • test_force_shutdown_workers - test.test_concurrent_futures.test_process_pool.ProcessPoolSpawnProcessPoolExecutorTest.test_force_shutdown_workers

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.14.itamaro-macos-intel-aws.nogil/build/Lib/test/test_concurrent_futures/util.py", line 71, in tearDown
    self.assertLess(dt, 300, "synchronization issue: test lasted too long")
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 352.783409319818 not less than 300 : synchronization issue: test lasted too long

hugovk commented Aug 13, 2025

Copy link
Copy Markdown
Member

Both 3.15 and 3.14 seem to be failing after this change:

https://buildbot.python.org/#/release_status

Is it a genuine failure? Or perhaps something up with the buildbot worker? cc @itamaro just in case.

Copy link
Copy Markdown
Member Author

I doubt it's due to this change, since NoGIL and the JIT can't even be built together.

The failing test name test_largefile seems suspicious, maybe the bot is low on disk/memory?

hugovk commented Aug 14, 2025

Copy link
Copy Markdown
Member

Back to green after second rebuild 👍

https://buildbot.python.org/#/builders/1679/builds/409

kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
…T builds (pythonGH-137211) (python#137701)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
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

Labels

interpreter-core (Objects, Python, Grammar, and Parser dirs) OS-mac topic-JIT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL