Skip to content

chore(compatibility): support Python 3.14 annotation changes #337

Description

@Megafredo

Use case

Ensure client-python remains compatible with Python 3.14.

The current annotation handling relies on __annotations__, which no longer behaves as expected for this use case in Python 3.14.

Current workaround

The issue was identified while upgrading collectors from Python 3.13 to Python 3.14.

The current implementation works with Python 3.13 but fails with Python 3.14 due to changes in annotation handling.

Collectors using Python 3.14 can encounter an AttributeError when pyoaev attempts to access __annotations__ while creating managers.
Image

Proposed solution

Update the annotation discovery mechanism to use typing.get_type_hints() instead of directly accessing __annotations__.

This provides a Python-version-compatible way of retrieving the class annotations used to discover and initialize managers.

Additional information

If the feature request is approved, would you be willing to submit a PR?

Yes / No (help can be provided if you need assistance submitting a PR)

Metadata

Metadata

Assignees

Labels

do not mergeDo not merge until this label is removed.featureType: new feature or capability (feat:).tech foundationLinked to tech foundation.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions