Skip to content

chore(pyoaev): compatibility support Python 3.14 (#337) - #339

Open
Ferdinand (guzmud) wants to merge 1 commit into
mainfrom
feat/337-compatibility-support-python-314-annotation-changes
Open

chore(pyoaev): compatibility support Python 3.14 (#337)#339
Ferdinand (guzmud) wants to merge 1 commit into
mainfrom
feat/337-compatibility-support-python-314-annotation-changes

Conversation

@guzmud

@guzmud Ferdinand (guzmud) commented Aug 12, 2026

Copy link
Copy Markdown
Member

Proposed changes

  • Adapted for Python 3.14: used get_type_hints(type(self)) instead of self.__annotations__ to maintain compatibility with the new annotation handling introduced in Python 3.14 and to use the introspection API recommended by Python.

Testing Instructions

  1. Step-by-step how to test
  2. Environment or config notes

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Further comments

@guzmud Ferdinand (guzmud) added the do not merge Do not merge until this label is removed. label Aug 12, 2026
@github-actions github-actions Bot added the filigran team Item from the Filigran team. label Aug 12, 2026
@Filigran-Automation Filigran Automation (Filigran-Automation) changed the title chore(pyoaev): compatibility support python 3.14 chore(pyoaev): compatibility support Python 3.14 (#337) Aug 12, 2026
@Filigran-Automation Filigran Automation (Filigran-Automation) removed the do not merge Do not merge until this label is removed. label Aug 12, 2026
@Filigran-Automation

Copy link
Copy Markdown
Contributor

🤖 [AI-generated]

Hey Ferdinand (@guzmud)! 👋 Thanks a lot for opening PR #339 — really appreciate the contribution, especially getting ahead of Python 3.14 compatibility! 🙏

I just had a quick look and I think the description could be enhanced a little to help reviewers get through it faster. I haven't changed anything in your description — just a gentle suggestion:

Area What could help Suggestion
Proposed changes The section is still empty (just two bare bullet points) A couple of lines on what changed, e.g. switching from __annotations__ to typing.get_type_hints() in pyoaev/base.py
Testing Instructions Still the placeholder text ("Step-by-step how to test") A quick note on how this was verified (e.g. tested under Python 3.14, existing test suite still passing)
Related issues Still the placeholder Closes #ISSUE-NUMBER Replace with the actual reference, e.g. Closes #337, so it's explicit in the description too
Checklist All items still unchecked Check off what applies once ready

💡 If helpful, the contribution conventions walk through what to include.

No rush at all — thanks again for contributing to the project! 🚀

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.

Pull request overview

Updates pyoaev’s manager auto-creation logic to stay compatible with Python 3.14’s annotation handling changes by switching to the supported introspection API (typing.get_type_hints) instead of relying on instance __annotations__.

Changes:

  • Import get_type_hints from typing.
  • Use get_type_hints(type(self)) to retrieve annotations when creating managers.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyoaev/base.py
Comment on lines +169 to +170
annotations = get_type_hints(type(self))
for attr, annotation in sorted(annotations.items()):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team Item from the Filigran team. tech foundation Linked to tech foundation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(compatibility): support Python 3.14 annotation changes

5 participants