Skip to content

Python 3.14 - #2097

Merged
davidhalter merged 11 commits into
masterfrom
py314
Apr 27, 2026
Merged

Python 3.14#2097
davidhalter merged 11 commits into
masterfrom
py314

Conversation

@davidhalter

@davidhalter davidhalter commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Fixes #2093, fixes #2070, will fix #2064 after release.

frenzymadness and others added 11 commits March 9, 2026 15:39
In Python 3.14, typing.Union changed its repr from 'typing.Union[X, Y]'
to 'X | Y' (PEP 604), breaking annotation inference.

Changes:
- Use getattr() instead of safe_getattr() for __module__ retrieval
  (getattr_static fails on Union types in Python 3.14)
- Add fallback to typing.get_origin() when regex fails to match
- Normalize Union display back to 'Union[X, Y]' format for consistency
- Update test expectations for invalid annotation edge case in 3.14

Fixes: #2064
- Fix getattr_static for Python 3.15 __dict__ GetSetDescriptorType
- Accept abs() parameter name change ('x' → 'number')
- Add Python 3.15 os module constants to test expectations

Fixes instance attribute introspection and stdlib changes in Python 3.15.
@davidhalter
davidhalter merged commit 5bbbc53 into master Apr 27, 2026
125 checks passed
@davidhalter
davidhalter deleted the py314 branch April 27, 2026 13:56
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.

Python 3.14 compatibility

2 participants