Skip to content

Conversation

Tinche
Copy link
Member

@Tinche Tinche commented Jul 29, 2025

Try using stringified annotations when constructing classes.

@Tinche Tinche force-pushed the tin/use-string-annotations branch from 6802cce to 074f64d Compare July 29, 2025 20:54
@Tinche Tinche linked an issue Jul 29, 2025 that may be closed by this pull request
@Tinche Tinche requested a review from hynek July 29, 2025 21:05
@hynek
Copy link
Member

hynek commented Jul 30, 2025

Looks like data classes use annotationlib.Format.FORWARDREF instead:

https://github.com/python/cpython/blob/9d3b53c47fab9ebf1f40d6f21b7d1ad391c14cd7/Lib/dataclasses.py#L989-L990

Should that concern us?

@hynek hynek changed the title Request stringified annotations Allow forward-references on 3.14 Jul 30, 2025
@hynek hynek added this pull request to the merge queue Jul 30, 2025
Merged via the queue into main with commit 61e8179 Jul 30, 2025
19 checks passed
@hynek hynek deleted the tin/use-string-annotations branch July 30, 2025 16:13
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.

PEP 749 support
2 participants