Skip to content

Raise an exception on unsupported Python versions#65

Merged
Rogdham merged 1 commit intomasterfrom
error-on-unsupported-python
Dec 29, 2025
Merged

Raise an exception on unsupported Python versions#65
Rogdham merged 1 commit intomasterfrom
error-on-unsupported-python

Conversation

@Rogdham
Copy link
Owner

@Rogdham Rogdham commented Dec 16, 2025

In some rare cases, the backports.zstd library can be installed on unsupported Python versions despite the requires-python marker).

This PR introduces a crash with an explicit error message in such cases.

Fixes #64 (see that ticket for more details)

@Rogdham
Copy link
Owner Author

Rogdham commented Dec 16, 2025

Confirmed working as expected (i.e. crashing with explicit error message) in the following cases:

  • build time
    • python -m pip install
    • uv pip install
    • python -m build --sdist
    • python -m build --wheel
  • install time (from sdist)
    • python -m pip install
    • uv pip install
  • run time
    • import backports.zstd
    • from backports import zstd
    • from backports.zstd import compress

@Rogdham Rogdham merged commit 5d92e80 into master Dec 29, 2025
27 checks passed
@Rogdham Rogdham deleted the error-on-unsupported-python branch December 29, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show error message when trying to install on unsupported Python version

2 participants