summaryrefslogtreecommitdiffstats
path: root/Lib/annotationlib.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-119180: Add VALUE_WITH_FAKE_GLOBALS format to annotationlib (#124415)Jelle Zijlstra2024-11-261-4/+9
|
* gh-125614: annotationlib: Fix bug where not all Stringifiers are converted ↵Jelle Zijlstra2024-10-231-4/+24
| | | | (#125635)
* Minor edit for code clarification in annotationlib. (#124805)larryhastings2024-09-301-3/+1
|
* gh-119180: Rename SOURCE format to STRING (#124620)Jelle Zijlstra2024-09-261-20/+32
|
* gh-124412: Add helpers for converting annotations to source format (#124551)Jelle Zijlstra2024-09-261-1/+30
|
* gh-119180: Make FORWARDREF format look at __annotations__ first (#124479)Jelle Zijlstra2024-09-251-22/+59
| | | | From discussion with Larry Hastings and Carl Meyer, this is the desired behavior.
* gh-119180: Avoid going through AST and eval() when possible in annotationlib ↵Jelle Zijlstra2024-09-251-27/+52
| | | | | | | | | | (#124337) Often, ForwardRefs represent a single simple name. In that case, we can avoid going through the overhead of creating AST nodes and code objects and calling eval(): we can simply look up the name directly in the relevant namespaces. Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-119180: Fix annotationlib.ForwardRef.evaluate with no globals (#124326)Jelle Zijlstra2024-09-231-13/+19
| | | | | | | | | We were sometimes passing None as the globals argument to eval(), which makes it inherit the globals from the calling scope. Instead, ensure that globals is always non-None. The test was passing accidentally because I passed "annotationlib" as a module object; fix that. Also document the parameters to ForwardRef() and remove two unused private ones. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-124206: Fix calling get_annotate_function() on static types (#124208)Jelle Zijlstra2024-09-181-1/+5
| | | | Fixes #124206. No news entry because the bug this fixes was never released.
* gh-119180: annotationlib: Fix __all__, formatting (#122365)Jelle Zijlstra2024-08-111-7/+23
|
* gh-119180: Improvements to ForwardRef.evaluate (#122210)Jelle Zijlstra2024-08-111-10/+15
| | | | Noticed some issues while writing documentation for this method.
* gh-119180: Add evaluate functions for type params and type aliases (#122212)Jelle Zijlstra2024-07-271-3/+16
|
* gh-119180: Use type descriptors to access annotations (PEP 749) (#122074)Jelle Zijlstra2024-07-271-4/+32
|
* gh-119180: Add `annotationlib` module to support PEP 649 (#119891)Jelle Zijlstra2024-07-231-0/+655
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>