Fix Python 3.9 fastjsonschema compatibility#1678
Merged
Merged
Conversation
sbryngelson
marked this pull request as ready for review
July 25, 2026 23:09
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes MFC’s Python 3.9 toolchain compatibility by preventing fastjsonschema versions that use Python 3.10-only PEP 604 type syntax from being installed on Python 3.9, while keeping Python 3.10+ unconstrained.
Changes:
- Add environment-marked
fastjsonschemarequirements to pin<2.22on Python <3.10. - Keep
fastjsonschemaunpinned for Python >=3.10.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1678 +/- ##
=======================================
Coverage 60.49% 60.49%
=======================================
Files 84 84
Lines 21189 21189
Branches 3134 3134
=======================================
Hits 12819 12819
Misses 6303 6303
Partials 2067 2067 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Description
Constrain
fastjsonschemato versions below 2.22 on Python 3.9 while leaving Python 3.10 and newer unconstrained.fastjsonschema2.22.0 introduced PEP 604 type annotations such asdict | bool, which require Python 3.10, but the release does not declare a correspondingRequires-Pythonconstraint. As a result, MFC's Python 3.9 compatibility job installs 2.22.0 and fails while importingfastjsonschema.Upstream issue: horejsek/python-fastjsonschema#211
Observed MFC failure: https://github.com/MFlowCode/MFC/actions/runs/30178357153/job/89730733375
Type of change (delete unused ones)
Testing
uv pip compile toolchain/pyproject.toml --python-version 3.9resolvesfastjsonschema==2.21.2.uv pip compile toolchain/pyproject.toml --python-version 3.10resolvesfastjsonschema==2.22.0../mfc.sh lint-- 350 tests and 4 subtests passed.Checklist
Check these like this
[x]to indicate which of the below applies.See the developer guide for full coding standards.
GPU changes (expand if you modified
src/simulation/)AI code reviews
Reviews are not retriggered automatically. To request a review, comment on the PR:
@claude full review— Claude full review (also triggers on PR open/reopen/ready)claude-full-review— Claude full review via label