Skip to content

Use PEP 661 Sentinel for internal sentinel #657

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brianschubert
Copy link
Member

🐶
c.f. #656 (comment)

@brianschubert
Copy link
Member Author

Huh, incidentally the typing analog of this sentinel seems to be dead code now: https://github.com/python/cpython/blob/96b7a2eba423b42320f15fd4974740e3e930bb8b/Lib/typing.py#L456-L459

It's last use (and it's global instance) were removed in python/cpython#136332

@brianschubert
Copy link
Member Author

Opened python/cpython#138120

@JelleZijlstra
Copy link
Member

Let's merge this after the non-RC release goes out tomorrow.

@hauntsaninja
Copy link
Collaborator

Hmm, would we revert if PEP 661 was rejected?

@JelleZijlstra
Copy link
Member

If so, we'd likely keep Sentinel around in typing-extensions indefinitely for compatibility, and there's no real compatibility problem with changing this internal sentinel back to an internal class.

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.

3 participants