Skip to content

fix: Python 3.10-compatible add_note pollution test; drop em dashes from 3.2.1 notes - #642

Merged
fgmacedo merged 2 commits into
developfrom
docs/remove-emdash-3.2.1
Aug 1, 2026
Merged

fix: Python 3.10-compatible add_note pollution test; drop em dashes from 3.2.1 notes#642
fgmacedo merged 2 commits into
developfrom
docs/remove-emdash-3.2.1

Conversation

@fgmacedo

@fgmacedo fgmacedo commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Two small post-3.2.1 housekeeping changes.

  1. Fix CI on Python 3.10. The TransitionNotAllowed class-pollution regression added in the 3.2.1 security work asserted callable(TransitionNotAllowed.add_note), but BaseException.add_note only exists on Python 3.11+ (PEP 678), so it raised AttributeError on 3.10 (the build matrix caught it; 3.11-3.14 were green). The assertion now checks the injection site (the class __dict__), which is version-agnostic and directly verifies the blocked exploit did not set add_note = 1. Verified passing on Python 3.10. The library itself was always fine on 3.10; only the test assertion was version-specific.
  2. Drop em dashes introduced by the security work in the 3.2.1 release notes, the docs/io/security.md background section, and one spec_parser.py comment. Pre-existing em dashes elsewhere are left untouched.

Docs, tests and comments only, no behavior change.

Signed-off-by: Fernando Macedo <fgmacedo@gmail.com>
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0dad86c) to head (b6b6c14).

Additional details and impacted files
@@            Coverage Diff            @@
##           develop      #642   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           52        52           
  Lines         5572      5572           
  Branches       879       879           
=========================================
  Hits          5572      5572           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

BaseException.add_note only exists on Python 3.11+ (PEP 678), so
asserting callable(TransitionNotAllowed.add_note) raised AttributeError
on 3.10. Assert on the injection site (the class __dict__) instead, which
is version-agnostic and directly checks the blocked exploit did not set
add_note = 1.

Signed-off-by: Fernando Macedo <fgmacedo@gmail.com>
@fgmacedo fgmacedo changed the title docs: remove em dashes introduced in the 3.2.1 security notes fix: Python 3.10-compatible add_note pollution test; drop em dashes from 3.2.1 notes Aug 1, 2026
@sonarqubecloud

sonarqubecloud Bot commented Aug 1, 2026

Copy link
Copy Markdown

@fgmacedo
fgmacedo merged commit 78e2b4c into develop Aug 1, 2026
13 checks passed
@fgmacedo
fgmacedo deleted the docs/remove-emdash-3.2.1 branch August 1, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant