Skip to content

2.1.1: own annotations through inspect.get_annotations (Python 3.14) - #26

Merged
trissim merged 2 commits into
mainfrom
b6-py314-annotations
Oct 12, 2026
Merged

trissim merged 2 commits into
mainfrom
b6-py314-annotations

Conversation

@trissim

@trissim trissim commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Part of OpenHCS surface B6 (main's CI green, OpenHCSDev/openhcs#1195).

On Python 3.14 a class's own annotations are no longer in cls.__dict__['__annotations__'], so get_inherited_field_names reported a redeclared field (enabled) as inherited and rebuilt the class. OpenHCS's config field then pointed at a different class object than the one its domain module exports, and Official30 parity on 3.14 failed with "analysis_consolidation_config must be AnalysisConsolidationConfig; got AnalysisConsolidationConfig". The fix reads own annotations through inspect.get_annotations.

Bumps to 1.3.2. Release needs the owner: after merge, tag v1.3.2 so it publishes; OpenHCS then requires objectstate>=1.3.2.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 11, 2026 08:05

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 added a commit to OpenHCSDev/openhcs that referenced this pull request Oct 11, 2026
Official30 parity on 3.14 failed because ObjectState rebuilt a config class
whose redeclared field it misread as inherited. Lockstep with
OpenHCSDev/ObjectState#26; release-readiness needs v1.3.2 tagged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trissim and others added 2 commits October 11, 2026 12:11
Python 3.14 (PEP 649) no longer stores class annotations in
cls.__dict__['__annotations__']. get_inherited_field_names therefore treated
every redeclared parent field as inherited and rebuilt the class with None
defaults, so @global_pipeline_config returned a new class whose identity no
longer matched the one its module exported (OpenHCS: 'analysis_consolidation_config
must be AnalysisConsolidationConfig; got AnalysisConsolidationConfig' on 3.14).
Field abbreviations were lost on 3.14 for the same reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trissim
trissim force-pushed the b6-py314-annotations branch from 1ac5777 to a44b90b Compare October 11, 2026 16:12
@trissim trissim changed the title 1.3.2: own annotations through inspect.get_annotations (Python 3.14) 2.1.1: own annotations through inspect.get_annotations (Python 3.14) Oct 11, 2026
@trissim
trissim merged commit 1fcdf12 into main Oct 12, 2026
11 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