Skip to content

Improve error message for abi3 wheels on free-threaded Python#17442

Merged
zanieb merged 5 commits intoastral-sh:mainfrom
zaniebot:claude/abi-wheel-compatibility-35SSt
Jan 15, 2026
Merged

Improve error message for abi3 wheels on free-threaded Python#17442
zanieb merged 5 commits intoastral-sh:mainfrom
zaniebot:claude/abi-wheel-compatibility-35SSt

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Jan 13, 2026

Closes #17406

Unlike #17415, this returns a dedicated error variant instead of adding a downstream special case to handling of Python tag incompatibilities.

When attempting to install an abi3 wheel on free-threaded Python, the
error message previously showed a misleading Python version mismatch
(e.g., "wheel is cp37, you're using cp314"). This was confusing because
abi3 wheels should be forward-compatible with newer Python versions.

The real issue is that free-threaded Python (3.13t+) does not support
the stable ABI (abi3). This change adds a new `IncompatibleTag::AbiFreethreaded`
variant that is detected in the tag compatibility check when an abi3 wheel
is encountered on free-threaded Python.

Changes:
- Add `IncompatibleTag::AbiFreethreaded` variant
- Store `is_freethreaded` in `Tags` struct for detection
- Detect abi3 + free-threaded in `Tags::compatibility` loop
- Handle the new variant in all relevant error message sites
- Add snapshot test for the error message

Fixes astral-sh#17406
@zanieb zanieb force-pushed the claude/abi-wheel-compatibility-35SSt branch 2 times, most recently from a8a9ed4 to 55c7884 Compare January 13, 2026 20:51
@zanieb zanieb force-pushed the claude/abi-wheel-compatibility-35SSt branch from 55c7884 to 841acc6 Compare January 13, 2026 21:04
@zanieb zanieb added bug Something isn't working error messages Messaging when something goes wrong labels Jan 13, 2026
@zanieb zanieb force-pushed the claude/abi-wheel-compatibility-35SSt branch 5 times, most recently from 58cc685 to 2011c2e Compare January 14, 2026 14:19
@zanieb zanieb marked this pull request as ready for review January 14, 2026 14:54
@zanieb zanieb marked this pull request as draft January 14, 2026 14:56
@zanieb zanieb force-pushed the claude/abi-wheel-compatibility-35SSt branch from 2011c2e to 472eebd Compare January 14, 2026 15:11
@zanieb zanieb force-pushed the claude/abi-wheel-compatibility-35SSt branch from e91b479 to 27f77b2 Compare January 14, 2026 16:45
@zanieb zanieb marked this pull request as ready for review January 14, 2026 19:15
Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

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

The new error looks good, but we need to widen the condition to capture the popular unstable C API too

wheel_platform_tags: &[PlatformTag],
) -> TagCompatibility {
// The stable ABI (abi3) is not supported on free-threaded Python
if self.is_freethreaded && wheel_abi_tags.iter().all(|abi| *abi == AbiTag::Abi3) {
Copy link
Member

Choose a reason for hiding this comment

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

That condition looks to restricted, it doesn't cover the unstable API, e.g. cp312-cp312.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mind if I ship that separately so we can get this fix out if I'm still iterating?

Copy link
Member

Choose a reason for hiding this comment

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

Fine by me!

@zanieb zanieb merged commit 73ad74c into astral-sh:main Jan 15, 2026
319 of 402 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jan 17, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.9.24` → `0.9.26` |

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.26`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0926)

[Compare Source](astral-sh/uv@0.9.25...0.9.26)

Released on 2026-01-15.

##### Python

- Add CPython 3.15.0a5

##### Enhancements

- Add a hint to update uv when a managed Python download is not found ([#&#8203;17461](astral-sh/uv#17461))
- Improve cache initialization failure error message ([#&#8203;17469](astral-sh/uv#17469))
- Improve error message for abi3 wheels on free-threaded Python ([#&#8203;17442](astral-sh/uv#17442))
- Add support for `--no-sources-package` ([#&#8203;14910](astral-sh/uv#14910))

##### Preview features

- Add `METADATA.json` and `WHEEL.json` in uv build backend ([#&#8203;15510](astral-sh/uv#15510))
- Add support for GCS request signing ([#&#8203;17474](astral-sh/uv#17474))
- Adjust the process ulimit to the maximum allowed on startup ([#&#8203;17464](astral-sh/uv#17464))

##### Bug fixes

- Lock to avoid concurrent refresh of pyx tokens ([#&#8203;17479](astral-sh/uv#17479))

##### Documentation

- Add linting and formatting instructions to the CONTRIBUTING guide ([#&#8203;17470](astral-sh/uv#17470))
- Avoid rendering `pyproject.toml` examples for more system-level settings ([#&#8203;17462](astral-sh/uv#17462))

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

[Compare Source](astral-sh/uv@0.9.24...0.9.25)

Released on 2026-01-13.

##### Python

- Add CPython 3.15.0a4
- Upgrade Tcl/Tk used by CPython to 9.0

##### Enhancements

- Add `--compile-bytecode` to `uv python install` and `uv python upgrade` to compile the standard library ([#&#8203;17088](astral-sh/uv#17088))
- Allow disabling `exclude-newer` per package ([#&#8203;16854](astral-sh/uv#16854))
- Broadcast `WM_SETTINGCHANGE` on `uv tool update-shell` ([#&#8203;17404](astral-sh/uv#17404))

##### Preview features

- Detect workspace from `uv run` target ([#&#8203;17423](astral-sh/uv#17423))

##### Bug fixes

- Avoid unwrapping size for file responses ([#&#8203;17434](astral-sh/uv#17434))
- Use keyring authentication when retrieving `tool@latest` version ([#&#8203;17448](astral-sh/uv#17448))
- Use latest Pyodide version for each python version ([#&#8203;17372](astral-sh/uv#17372))
- Improve trampoline file handle closing ([#&#8203;17374](astral-sh/uv#17374))
- Fix error message when installing musl python on armv7 ([#&#8203;17213](astral-sh/uv#17213))

</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:eyJjcmVhdGVkSW5WZXIiOiI0Mi44MC4xIiwidXBkYXRlZEluVmVyIjoiNDIuODEuOCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
zanieb added a commit that referenced this pull request Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working error messages Messaging when something goes wrong

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad error message trying to install abi3 wheel on a free threaded venv

3 participants