Skip to content

f-strings in bootstrap template breaks some environments #2709

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

Closed
armandomontanez opened this issue Mar 29, 2025 · 2 comments
Closed

f-strings in bootstrap template breaks some environments #2709

armandomontanez opened this issue Mar 29, 2025 · 2 comments

Comments

@armandomontanez
Copy link
Contributor

🐞 bug report

Affected Rule

bootstrap template (py_binary)

Is this a regression?

Yes, introduced by #2481

Description

Some f-strings accidentally snuck into the bootstrap template, causing some environments to fail.

🔬 Minimal Reproduction

N/A

🔥 Exception or Error


Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
  File "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/pigweed+/pw_rpc/py/plugin_pwpb", line 99
    f"{key}={value!r}",
                     ^
SyntaxError: invalid syntax

🌍 Your Environment

Operating System:

  
Linux
  

Output of bazel version:

  
8.0.1
  

Rules_python version:

  
1.1.0
  

Anything else relevant?

@aignas
Copy link
Collaborator

aignas commented Mar 29, 2025

Thanks for the issue, could you please explain what environment/python version this is causing issues on?

The exception message does not contain that information.

armandomontanez added a commit to armandomontanez/rules_python that referenced this issue Mar 31, 2025
Fixes some f-strings, trailing commas, and out-of-order argument
unpacking to restore compatibility with Python 3.4.x.
@armandomontanez
Copy link
Contributor Author

It's some build bot in the Android ecosystem, it looks like the local Python version is 3.4.3.

github-merge-queue bot pushed a commit that referenced this issue Apr 1, 2025
Fixes some f-strings, trailing commas, and out-of-order argument
unpacking in the bootstrap template to restore compatibility with Python
3.4.x.
@aignas aignas closed this as completed Apr 1, 2025
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