Skip to content

Find class source without inspect._ClassFinder (0.2.5) - #19

Merged
trissim merged 1 commit into
mainfrom
fix/class-source-py313
Oct 10, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/class-source-py313

Conversation

@trissim

@trissim trissim commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Python 3.13 removed the private inspect._ClassFinder. _qualified_class_source called it, so on 3.13+ class source lookup raised, _extract_inline_field_docs swallowed the error, and every dataclass lost its inline field documentation. pyqt-reactive's test_preview_policy_fields_include_authored_help_for_hidden_controls fails on 3.13 for this reason.

  • Find the class statement by qualified name in the module AST (<locals> for function scopes, as __qualname__ does).
  • Add Python 3.13 to the CI matrix. The four existing source-lookup tests in tests/test_dataclass_source_preparation.py failed on 3.14 before this change and pass after it.
  • Release 0.2.5.

Tests: 170 passed on 3.12 and 3.14 locally.

🤖 Generated with Claude Code

Python 3.13 removed the private inspect._ClassFinder, so class source
lookup raised and every dataclass lost its inline field documentation.
Find the class by qualified name in the module AST instead, and test
Python 3.13 in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 10, 2026 16:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@trissim
trissim merged commit 4bb7d13 into main Oct 10, 2026
15 checks passed
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.

2 participants