Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2 #553 +/- ##
==========================================
+ Coverage 99.03% 99.05% +0.01%
==========================================
Files 19 20 +1
Lines 1248 1270 +22
==========================================
+ Hits 1236 1258 +22
Misses 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
These are mostly for code coverage.
dairiki
force-pushed
the
fix.551-python315
branch
from
November 10, 2026 19:44
a5ff1fc to
9c4c68c
Compare
dairiki
marked this pull request as draft
November 11, 2026 18:34
dairiki
marked this pull request as ready for review
November 11, 2026 18:34
This branch has not been deployed
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.
This fixes #551.
This is an alternative to #552.
Here, in order to bypass the restriction forbidding capturing groups in
re.Scannerin Python 3.15, we essentially vendorre.Scannerfrom Python 3.14.The code in
re.Scannerhas been essentially unchanged from Python 2.5 through Python 3.14, modulo changes in module naming and the introduction of theRegexFlagenum. The only change in Python 3.15 is the addition of the check for capturing groups. Since it's been so stable, I'm guessing that this vendoring of code from a previous release is fairly safe.Note that crashes due to segmentation faults mentioned as the motivation for introducing the capturing group ban in Python 3.15 (python/cpython@fa9c3ee) seem only to be an issue when named capturing groups are used. (Ref: python/cpython#140797, python/cpython#140944.)
[Edited to add more detail about the history of
re.Scanner.]