gh-114053: Fix bad interaction of PEP-695, PEP-563 and `get_type_hints` (#118009)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Alex Waygood 2024-04-19 14:03:44 +01:00 committed by GitHub
parent 15b3555e4a
commit 1e3e7ce11e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 81 additions and 10 deletions

View file

@ -0,0 +1,4 @@
Fix erroneous :exc:`NameError` when calling :func:`typing.get_type_hints` on
a class that made use of :pep:`695` type parameters in a module that had
``from __future__ import annotations`` at the top of the file. Patch by Alex
Waygood.