Skip to content

chore: update default Python version to 3.14 - #4023

Draft
rickeylev wants to merge 2 commits into
bazel-contrib:mainfrom
rickeylev:update_default_python_314
Draft

chore: update default Python version to 3.14#4023
rickeylev wants to merge 2 commits into
bazel-contrib:mainfrom
rickeylev:update_default_python_314

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Update the default Python toolchain version from 3.11 to 3.14 to align
with newer Python releases and provide modern defaults out of the box.

This updates the default toolchain version configurations in the module
extension, documentation, and test suites. Additionally, it updates
whl_extract to adjust relative paths in RECORD when unpacking wheel
.data subdirectories to their target installation paths.

Update default Python toolchain version from 3.11 to 3.14 across MODULE.bazel, WORKSPACE, documentation, and tests. Also update whl_extract to adjust RECORD paths when unpacking .data directories.
@rickeylev rickeylev changed the title feat: update default Python version to 3.14 chore: update default Python version to 3.14 Aug 9, 2026

@rickeylev rickeylev left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@aignas Can you double check the logic in python/private/pypi/whl_extract.bzl?

It said that the RECORD file had invalid paths: the original paths in the wheel were present, but its actually supposed to reflect the install path. In this case, we have e.g. https://github.com/bazel-contrib/rules_python/blob/main/tests/repos/whl_with_data1

Up above, L40-50 is where the remap of schemes occurs.

From what I can tell, I think its right. Starting in Python 3.14 it seems that metadata.files() is stricter.

That said, I'm not entirely confident in the rewritten values it gives. e.g. ../data/ ? I guess it's up-referencing up out of the site-packages dir and into the venv? I suppose that's correct.

@rickeylev

Copy link
Copy Markdown
Collaborator Author

I created #4025 to show as a repro for this metadata.files bug. I think this is pre-existing? It might just be that 3.14 got more strict about things.

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.

1 participant