Repository navigation
ci(compat): compile the 3.8-floor util scripts on the 3.8 leg (#2206) - #2214
Merged
Merged
Conversation
Problem: the util floor tests check 3.8 syntax with ast.parse(..., feature_version=(3, 8)), which is best-effort: on 3.14 it accepts parenthesized context managers, relaxed decorators, a[*b] and reused f-string quotes. Fix: `Compile the 3.8-floor util scripts` on Compat Python 3.8 (KTLO) runs `python -m compileall -q` over the scripts those tests hold to 3.8, masked and annotated as `Verify package` is. Its 3.8 gate is an exemption in python-versions.toml. The KTLO annotation scan no longer reads a script that compileall names as one the step runs. The floor tests' docstrings and workflows.rst name that step as the authoritative check. Test: test_compat_util_floor_2206 runs the floor tests with ast.parse recorded and requires the step's list to equal what they parse at 3.8, the gate to hold on the floor leg alone, and a syntax error to fail the step with one annotation. A scanner test covers compileall arguments.
Owner
Author
|
Review: GOOD TO GO at
|
5 tasks done
5 tasks done
Contributor
|
Coverage: 91.56% (unit tier, Python 3.15,
Per-file detail: the |
Owner
Author
|
Ready to merge at
|
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
ci— CI configurationDescription
Closes #2206 (option B).
ast.parse(feature_version=(3, 8))is best-effort on newer interpreters, so a real 3.8 now compiles the 3.8-floorutil/scripts.Compile the 3.8-floor util scriptson theCompat Python 3.8 (KTLO)leg, afterVerify package.ANNOTATION_LEVELannotation,continue-on-errorandLEG.'3.8'literal gets an[[exemptions]]entry in.github/python-versions.toml.test_compat_util_floor_2206.pyfinds everytests/projecttest that parses autil/script atFLOOR. The step's file list must equal that set.python_versions.py, held to 3.11, is left out.test_ktlo_legs_stay_green_1672.commands()treats paths on a-m compileallline as compiled, not run.workflows.rstdescribes the step.origin/main. Dropping one script from the step fails the drift check. The scanner test gives 2 failed against the oldcommands().TestAScriptThatDoesNotCompileFailsTheStep.