[plugins] generate-responses.py declares Python >=3.10 but requires Python 3.12 f-string syntax
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What issue are you seeing?
The Hugging Face Jobs example script
generate-responses.py
declares:
# requires-python = ">=3.10"
However, the current file cannot be parsed by Python 3.10 or Python 3.11. It
uses a nested f-string containing a backslash inside an outer f-string
expression. That syntax is accepted by Python 3.12 but rejected by the earlier
versions allowed by the script metadata.
I reproduced this against openai/plugins commit
11c74d6ba24d3a6d48f54a194cd00ef3beea18f9.
Results:
- Python 3.10.18:
SyntaxError: f-string expression part cannot include a backslash - Python 3.11.1:
SyntaxError: f-string expression part cannot include a backslash - Python 3.12.11: parses successfully
The parser reports the closing triple quote at line 165; the incompatible
expression is the
max_model_len_used interpolation on line 163.
What steps can reproduce the bug?
- Check out
openai/pluginscommit
11c74d6ba24d3a6d48f54a194cd00ef3beea18f9. - Run the following from the repository root:
$script = 'plugins/hugging-face/skills/jobs/scripts/generate-responses.py'
uv run --python 3.10 python -m py_compile $script
uv run --python 3.11 python -m py_compile $script
uv run --python 3.12 python -m py_compile $script
The first two commands fail during parsing. The Python 3.12 command succeeds.
No Hugging Face token, job submission, network service, or script dependency
installation is required to reproduce the parser failure.
What is the expected behavior?
A script that declares requires-python = ">=3.10" should parse on supported
Python 3.10 and 3.11 runtimes.
Either:
- rewrite the expression so it is valid on Python 3.10+, or
- change the script metadata to
requires-python = ">=3.12"if Python 3.12 is
intentionally required.
The compatibility-preserving option is small: compute the optional
--max-model-len text before the outer multiline f-string and interpolate the
resulting variable. I tested that transformation in memory against the complete
source file; it parsed successfully on Python 3.10.18, 3.11.1, and 3.12.11.
Additional information
The
Jobs skill documents Python 3.12 as the default and shows Python 3.11 as a selectable version.
More importantly, the example script itself advertises Python 3.10 and later
through its PEP 723 metadata.
I searched all-state Issues and PRs in openai/codex and openai/plugins
on 2026-08-23 using these queries:
generate-responses Python 3.11generate-responses.pyrequires-python >=3.10 f-stringf-string expression part cannot include a backslashhugging-face jobs Python 3.10
I did not find an existing report or patch for this failure.
This is being filed in the main Codex tracker because openai/plugins has
Issues disabled. The official Open Source
page directs Codex bug reports and feature requests to the
openai/codex issue tracker.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with plugins/hugging-face/skills/jobs/scripts/generate-responses.py, especially the max_model_len_used interpolation around lines 155-165. Run py_compile with Python 3.10, 3.11, and 3.12 as shown in the issue. Done means the script parses successfully on every runtime declared by its metadata, without requiring a token or network access.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100