Skip to content

Add support for using Python 3.6 interpreters#18454

Merged
zanieb merged 3 commits intoastral-sh:mainfrom
zaniebot:claude/add-python-3.6-support-BsaGJ
Mar 18, 2026
Merged

Add support for using Python 3.6 interpreters#18454
zanieb merged 3 commits intoastral-sh:mainfrom
zaniebot:claude/add-python-3.6-support-BsaGJ

Conversation

@zanieb
Copy link
Copy Markdown
Member

@zanieb zanieb commented Mar 13, 2026

Applies a patch to use Python 3.6 compatible types in our vendored packaging implementation used in the interpreter query script. Adds Python 3.6 and 3.7 test coverage in CI.

Closes #7418

@zanieb zanieb added test:extended Enable extended tests for a pull request build:skip-release Disable building release binaries for a pull request labels Mar 14, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 15, 2026

Merging this PR will not alter performance

✅ 5 untouched benchmarks


Comparing zaniebot:claude/add-python-3.6-support-BsaGJ (09e6298) with main (17afca3)

Open in CodSpeed

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 15, 2026

Merging this PR will degrade performance by 5.65%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 4 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation resolve_warm_jupyter 74.9 ms 79.4 ms -5.65%

Comparing zaniebot:claude/add-python-3.6-support-BsaGJ (da0b202) with main (0507193)

Open in CodSpeed

@zanieb zanieb force-pushed the claude/add-python-3.6-support-BsaGJ branch from da0b202 to 56965c2 Compare March 17, 2026 13:12
Lower the minimum supported Python version check from 3.7 to 3.6,
allowing uv to discover and use system-installed Python 3.6
interpreters. This is relevant for RHEL 8-style distributions that
ship Python 3.6 as their platform-python until 2029.

Add CI system tests for Python 3.6 and 3.7 via the deadsnakes PPA
to ensure these older versions continue to work.
@zanieb zanieb force-pushed the claude/add-python-3.6-support-BsaGJ branch from 56965c2 to e68ba2b Compare March 17, 2026 13:17
@zanieb zanieb changed the title WIP Add support for using Python 3.6 interpreters Mar 17, 2026
@zanieb zanieb marked this pull request as ready for review March 17, 2026 13:30
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.

Drive-by comment without a full review: IMO it's not useful to check this file in, because it carries a risk of diverging from the actual patches to the .py files. I would simply rely on git history and the README (and maybe rephrase the README to emphasize that these are patched versions of the vendored files) and manually cherry-pick the patch when revendoring.

Alternatively, leave this file in, but don't commit the changes to the .py files in source control, and instead apply this file at build time.

Copy link
Copy Markdown
Member Author

@zanieb zanieb Mar 17, 2026

Choose a reason for hiding this comment

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

Hm I'm quite partial to checking it in so it's easy to apply in the future and very clear what changed. I'm pretty hesitant to deal with applying it at build time.

These files rarely change and we're a small team. I think optimizing for strictly preventing drift here is a bit silly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll write a script to perform the vendoring.

@zanieb zanieb force-pushed the claude/add-python-3.6-support-BsaGJ branch from ba45858 to 09e6298 Compare March 17, 2026 22:44
Copy link
Copy Markdown
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

I'm comfortable with this change. Do we have a clear guidance for whether it would constitute a breaking change to undo this in the future, given that it's not in our officially supported version list?

@zanieb
Copy link
Copy Markdown
Member Author

zanieb commented Mar 17, 2026

I would say it is not a breaking change per our policy. I can make that clearer.

@zanieb zanieb merged commit 42c85f6 into astral-sh:main Mar 18, 2026
107 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:skip-release Disable building release binaries for a pull request test:extended Enable extended tests for a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression on tolerance for older Pythons

4 participants