Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typing.evaluate_forward_ref is not fully covered #128661

Closed
sobolevn opened this issue Jan 9, 2025 · 1 comment
Closed

typing.evaluate_forward_ref is not fully covered #128661

sobolevn opened this issue Jan 9, 2025 · 1 comment
Assignees
Labels
3.14 new features, bugs and security fixes tests Tests in the Lib/test dir topic-typing

Comments

@sobolevn
Copy link
Member

sobolevn commented Jan 9, 2025

Right now it is:
Снимок экрана 2025-01-09 в 11 36 03

I have a PR ready.

Linked PRs

@sobolevn sobolevn added tests Tests in the Lib/test dir topic-typing 3.14 new features, bugs and security fixes labels Jan 9, 2025
@sobolevn sobolevn self-assigned this Jan 9, 2025
@sobolevn
Copy link
Member Author

sobolevn commented Jan 9, 2025

Aaaand I found a bug!

cpython/Lib/typing.py

Lines 1021 to 1030 in a1284e9

def evaluate_forward_ref(
forward_ref,
*,
owner=None,
globals=None,
locals=None,
type_params=None,
format=annotationlib.Format.VALUE,
_recursive_guard=frozenset(),
):

type_params here is None, not _sentinel, so the deprecation warning is never shown.

sobolevn added a commit to sobolevn/cpython that referenced this issue Jan 9, 2025
sobolevn added a commit to sobolevn/cpython that referenced this issue Jan 9, 2025
sobolevn added a commit that referenced this issue Jan 9, 2025
…128663)

gh-128661: Fix `typing.evaluate_forward_ref` not showing deprecataion
@sobolevn sobolevn closed this as completed Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.14 new features, bugs and security fixes tests Tests in the Lib/test dir topic-typing
Projects
None yet
Development

No branches or pull requests

1 participant