fix(test): parse baddns submodule source from file (Py 3.13+ fix)#3069
Merged
TheTechromancer merged 1 commit intodevfrom May 1, 2026
Merged
fix(test): parse baddns submodule source from file (Py 3.13+ fix)#3069TheTechromancer merged 1 commit intodevfrom
TheTechromancer merged 1 commit intodevfrom
Conversation
inspect.getsource(cls) relies on linecache heuristics that mis-anchor on Python 3.13+ and can return a single indented attribute line, which ast.parse rejects with IndentationError. Read the whole source file instead — each baddns submodule is one class per file.
Contributor
📊 Performance Benchmark Report
📈 Detailed Results (All Benchmarks)
🎯 Performance Summary✅ No significant performance changes detected (all changes <10%) 🐍 Python Version 3.11.15 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3069 +/- ##
=====================================
- Coverage 91% 91% -0%
=====================================
Files 437 437
Lines 37507 37509 +2
=====================================
+ Hits 33922 33923 +1
- Misses 3585 3586 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
TheTechromancer
approved these changes
May 1, 2026
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.
Summary
test_baddns_max_severity_confidencefailed on Python 3.13/3.14 becauseinspect.getsource(cls)returned a single indented attribute line (e.g.description = "..."), whichast.parserejected withIndentationError. CPython 3.13's source-block heuristics regressed for that class.inspect.getsourcefile()is equivalent and avoids theinspect.getsourceheuristic entirely.Failure context: https://github.com/blacklanternsecurity/bbot/actions/runs/24939288537/job/73030154357