Skip to content

Comments

Allow Python requests to include +gil to require a GIL-enabled interpreter#16537

Merged
zanieb merged 1 commit intomainfrom
zb/gil-request
Nov 3, 2025
Merged

Allow Python requests to include +gil to require a GIL-enabled interpreter#16537
zanieb merged 1 commit intomainfrom
zb/gil-request

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Oct 31, 2025

Addresses #16142 (comment)

Nobody seems to have a good idea about how to spell this. "not free-threaded" would be the most technically correct, but I think "gil" will be more intuitive.

@zanieb zanieb added the enhancement New feature or improvement to existing functionality label Oct 31, 2025
@zanieb zanieb temporarily deployed to uv-test-registries October 31, 2025 15:06 — with GitHub Actions Inactive
@zanieb zanieb force-pushed the zb/gil-request branch 2 times, most recently from 3c08221 to 0a745fa Compare October 31, 2025 15:47
@zanieb zanieb temporarily deployed to uv-test-registries October 31, 2025 15:49 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-registries October 31, 2025 16:20 — with GitHub Actions Inactive
Base automatically changed from zb/suffix to main October 31, 2025 18:11
@zanieb zanieb temporarily deployed to uv-test-registries October 31, 2025 18:22 — with GitHub Actions Inactive
Copy link
Contributor

@geofft geofft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine. I think there is no obviously good syntax for this and we do need something, and this seems like the least annoying one / closest to what we already do.

@jezdez
Copy link

jezdez commented Oct 31, 2025

I'm not sure if that's the best name, since the GIL can be enabled in free-threaded Python during runtime and is enabled when importing C-API extension modules. Maybe +default might be a good name?

@zanieb
Copy link
Member Author

zanieb commented Oct 31, 2025

That's why I said "not free-threaded" would be the most technically correct in the pull request body.

I don't think +default works, it's not specific enough. e.g., imagine a world where the free-threaded builds become the default and there's a legacy GIL-enabled build around. I guess we could have the +default modifier change its meaning depending on the Python version, but that seems questionable.

I'd love a better name, but I can't really think of one and want to ship something to unblock users. I think +gil is the most obvious name that someone would look for, even if there's some technical nuance.

I tried asking the free-threaded development group and didn't really get anywhere.

@zanieb zanieb merged commit 60a811e into main Nov 3, 2025
100 checks passed
@zanieb zanieb deleted the zb/gil-request branch November 3, 2025 19:35
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 10, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.9.7` -> `0.9.8` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.9.8`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#098)

[Compare Source](astral-sh/uv@0.9.7...0.9.8)

Released on 2025-11-07.

##### Enhancements

- Accept multiple packages in `uv export` ([#&#8203;16603](astral-sh/uv#16603))
- Accept multiple packages in `uv sync` ([#&#8203;16543](astral-sh/uv#16543))
- Add a `uv cache size` command ([#&#8203;16032](astral-sh/uv#16032))
- Add prerelease guidance for build-system resolution failures ([#&#8203;16550](astral-sh/uv#16550))
- Allow Python requests to include `+gil` to require a GIL-enabled interpreter ([#&#8203;16537](astral-sh/uv#16537))
- Avoid pluralizing 'retry' for single value ([#&#8203;16535](astral-sh/uv#16535))
- Enable first-class dependency exclusions ([#&#8203;16528](astral-sh/uv#16528))
- Fix inclusive constraints on available package versions in resolver errors ([#&#8203;16629](astral-sh/uv#16629))
- Improve `uv init` error for invalid directory names ([#&#8203;16554](astral-sh/uv#16554))
- Show help on `uv build -h` ([#&#8203;16632](astral-sh/uv#16632))
- Include the Python variant suffix in "Using Python ..." messages ([#&#8203;16536](astral-sh/uv#16536))
- Log most recently modified file for cache-keys ([#&#8203;16338](astral-sh/uv#16338))
- Update Docker builds to use nightly Rust toolchain with musl v1.2.5 ([#&#8203;16584](astral-sh/uv#16584))
- Add GitHub attestations for uv release artifacts ([#&#8203;11357](astral-sh/uv#11357))

##### Configuration

- Expose `UV_NO_GROUP` as an environment variable ([#&#8203;16529](astral-sh/uv#16529))
- Add `UV_NO_SOURCES` as an environment variable ([#&#8203;15883](astral-sh/uv#15883))

##### Bug fixes

- Allow `--check` and `--locked` to be used together in `uv lock` ([#&#8203;16538](astral-sh/uv#16538))
- Allow for unnormalized names in the METADATA file ([#&#8203;16547](astral-sh/uv#16547)) ([#&#8203;16548](astral-sh/uv#16548))
- Fix missing value\_type for `default-groups` in schema ([#&#8203;16575](astral-sh/uv#16575))
- Respect multi-GPU outputs in `nvidia-smi` ([#&#8203;15460](astral-sh/uv#15460))
- Fix DNS lookup errors in Docker containers ([#&#8203;8450](astral-sh/uv#8450))

##### Documentation

- Fix typo in uv tool list doc ([#&#8203;16625](astral-sh/uv#16625))
- Note `uv pip list` name normalization in docs ([#&#8203;13210](astral-sh/uv#13210))

##### Other changes

- Update Rust toolchain to 1.91 and MSRV to 1.89 ([#&#8203;16531](astral-sh/uv#16531))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or improvement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants