Skip to content

Conversation

rickeylev
Copy link
Collaborator

When the @bazel_tools//python/tools:python_autodetecting toolchain is used, it returns
the Bazel-builtin PyRuntimeInfo provider. Because this provider doesn't support the
additional fields needed for precompiling (pyc_tag, among others), it would result in
an attribute error.

To fix, detect the absence of the pyc_tag attribute and return early, as is done when
the pyc_tag field is empty.

Fixes #2364

@rickeylev rickeylev requested a review from aignas as a code owner November 12, 2024 18:31
@rickeylev rickeylev enabled auto-merge November 12, 2024 18:31
@rickeylev rickeylev added this pull request to the merge queue Nov 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 12, 2024
@aignas aignas added this pull request to the merge queue Nov 12, 2024
Merged via the queue into bazel-contrib:main with commit 2f6ca17 Nov 12, 2024
4 checks passed
@rickeylev rickeylev deleted the fix.precompile.builtin.pyinfo branch November 13, 2024 00:14
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.

Error: 'PyRuntimeInfo' value has no field or method 'pyc_tag' when using platforms

2 participants