Skip to content

gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value#144568

Open
picnixz wants to merge 4 commits intopython:mainfrom
picnixz:doc/secrets/document-default-entropy-143700
Open

gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value#144568
picnixz wants to merge 4 commits intopython:mainfrom
picnixz:doc/secrets/document-default-entropy-143700

Conversation

@picnixz
Copy link
Member

@picnixz picnixz commented Feb 7, 2026

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news labels Feb 7, 2026
@picnixz picnixz requested a review from gpshead February 7, 2026 12:33
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Feb 7, 2026
@picnixz picnixz requested a review from sethmlarson February 7, 2026 12:33
@picnixz picnixz added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Feb 7, 2026
@picnixz
Copy link
Member Author

picnixz commented Feb 7, 2026

I'm a bit unsure where to really put the name of that constant. I do want users to be able to use the constant itself but I don't want them to change it. Should I add an additional note saying that the value should not be changed?

Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

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

I'm a bit unsure where to really put the name of that constant. I do want users to be able to use the constant itself but I don't want them to change it. Should I add an additional note saying that the value should not be changed?

that's probably overthinking it, we have all sorts of constants in Python modules that if changed will cause bad behavior - I don't think any special callout is necessary.

if we wanted to prevent it from being changed that'd require getting too creative with the module dict or using a C extension module instead. We rejected PEP-726 that could've offered an ability because the actual need was so rare.

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants