1
0
forked from VimPlug/jedi
Files
jedi-fork/jedi/inference
Lumir Balhar 9b24443787 Fix Python 3.14 compatibility for typing.Union annotations
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: https://github.com/davidhalter/jedi/issues/2064
2026-03-09 15:39:23 +01:00
..
2026-01-20 02:05:51 +01:00
2025-06-16 16:49:46 +02:00
2022-07-15 17:29:02 +10:00
2020-07-02 10:59:59 +02:00
2021-01-14 01:11:50 +01:00
2025-06-16 16:49:46 +02:00
2020-07-02 12:33:19 +02:00
2019-08-16 11:44:30 +02:00
2021-01-09 10:56:22 +01:00