test(bdc): count regex compilations on Python 3.10 too - #1378
Merged
Merged
Conversation
test_issue_1342's fixture patched `re._compiler.compile`, which exists only on 3.11+. On 3.10 the fixture raised AttributeError, and the offline audit in test-fast (3.10) reported it as a fast test that needs the SEC, turning every main run red since #1343. On 3.10 `re` calls `sre_compile.compile` through the module, so patch that instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
test-fast (3.10)has failed on every push to main since #1343 (e.g. run 36442787663). The offline audit reports:The test doesn't need the SEC. Its
compilationsfixture patchesre._compiler.compile, which exists only on Python 3.11+. On 3.10 it raisesAttributeError: module 're' has no attribute '_compiler'. PR CI runs only 3.13, so this only shows up after merge.Fix: fall back to
sre_compile, which 3.10'srecalls through the module. This is a test-only change, so there's no changelog fragment.Checked:
-p tests._offline_harness.🤖 Generated with Claude Code