Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for python 3.13.0? #125

Closed
blockjon-dd opened this issue Oct 24, 2024 · 4 comments
Closed

Support for python 3.13.0? #125

blockjon-dd opened this issue Oct 24, 2024 · 4 comments

Comments

@blockjon-dd
Copy link

Should this work with python 3.13.0?

When I try to use the new rules_python 0.37.1 and to use Python version 3.13.0, rules_pycross fails with this message:

$ bazel run //services/demohelloworldpython:main
INFO: Invocation ID: 98cd8f79-6766-42d9-b389-a2c703ee34da
ERROR: /home/dev/.cache/bazel/_bazel_dev/155bb1574771dc607335fbe8110386b4/external/rules_python~/python/config_settings/BUILD.bazel: no such target '@@rules_python~//python/config_settings:is_python_3.10.11': target 'is_python_3.10.11' not declared in package 'python/config_settings' defined by /home/dev/.cache/bazel/_bazel_dev/155bb1574771dc607335fbe8110386b4/external/rules_python~/python/config_settings/BUILD.bazel (did you mean is_python_3.11.10, _is_python_3.11.10, is_python_3.10, is_python_3.11, is_python_3.12.7, is_python_3.13.0, is_python_3.8.12, _is_python_3.12.7, _is_python_3.13.0, or is_python_3.12?)
ERROR: /home/dev/.cache/bazel/_bazel_dev/155bb1574771dc607335fbe8110386b4/external/rules_pycross~~toolchains~pycross_toolchains/BUILD.bazel:6:33: errors encountered resolving select() keys for @@rules_pycross~~toolchains~pycross_toolchains//:_interpreter_version
ERROR: /workspaces/myproject/services/demohelloworldpython/BUILD.bazel:3:10: Analysis failed
ERROR: Analysis of target '//services/demohelloworldpython:main' failed; build aborted
INFO: Elapsed time: 1.274s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target
@betaboon
Copy link
Collaborator

betaboon commented Oct 24, 2024

heya. I just stumbled upon this (or something similar) yesterday.

someone on slack helped me debug, and we found a solution/workaround.

add in MODULE.bazel:

python.override(register_all_versions = True)

I haven't yet fully understood the cause tho.

these are my findings:

so it might be that pycross should use PYTHON_VERSIONS instead of TOOL_VERSIONS ?

@betaboon
Copy link
Collaborator

i just noticed something else.

i got the following in my MODULE.bazel:

python.toolchain(
    is_default = True,
    python_version = "3.12",
)

this normally would have caused the latest patch-level to be used (e.g. 3.12.7)
but i can observe that 3.12.0 is being used.

I don't know if that is due to the workaround or something else.

@betaboon
Copy link
Collaborator

@aignas just reported in slack that he found a bug on rules_python's end, which might be the root-cause for this.
bazelbuild/rules_python#2350

@blockjon-dd
Copy link
Author

Thanks @betaboon ... looking forward for the next release of rules_python!

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

No branches or pull requests

2 participants