Skip to content

gh-149083: Convert some private and simple sentinels to PEP 661#149084

Open
JelleZijlstra wants to merge 1 commit intopython:mainfrom
JelleZijlstra:more-sentinels
Open

gh-149083: Convert some private and simple sentinels to PEP 661#149084
JelleZijlstra wants to merge 1 commit intopython:mainfrom
JelleZijlstra:more-sentinels

Conversation

@JelleZijlstra
Copy link
Copy Markdown
Member

@JelleZijlstra JelleZijlstra commented Apr 28, 2026

Copy link
Copy Markdown
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a sentinel in hashlib.py to detect usage of arguments and raise appropriate warnings/errors so could you also update it? it's a hacky code because I needed to mirror the C behavior in some sense.

Copy link
Copy Markdown
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In dataclasses, there is also _FIELD, _FIELD_CLASSVAR and _FIELD_INITVAR that you could update I think?

@JelleZijlstra
Copy link
Copy Markdown
Member Author

I was going to leave those dataclasses objects alone since they're instances of a common class, and I wouldn't be able to preserve that behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants