Skip to content

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

Merged
picnixz merged 4 commits into
python:mainfrom
picnixz:doc/secrets/document-default-entropy-143700
Feb 7, 2026
Merged

gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value#144568
picnixz merged 4 commits into
python:mainfrom
picnixz:doc/secrets/document-default-entropy-143700

Conversation

@picnixz

@picnixzpicnixz commented Feb 7, 2026

Copy link
Copy Markdown
Member

@picnixz

Copy link
Copy Markdown
MemberAuthor

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?

@gpsheadgpshead left a comment

Copy link
Copy Markdown
Member

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.

Comment threadDoc/library/secrets.rst Outdated
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Comment threadDoc/library/secrets.rst Outdated
Comment threadDoc/library/secrets.rst Outdated
@picnixz
picnixz merged commit 9349972 into python:mainFeb 7, 2026
33 checks passed
@github-project-automationgithub-project-automationBot moved this from Todo to Done in Docs PRsFeb 7, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@picnixz
picnixz deleted the doc/secrets/document-default-entropy-143700 branch February 7, 2026 22:36
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 7, 2026
pythonGH-144568)
(cherry picked from commit 9349972)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 7, 2026
pythonGH-144568)
(cherry picked from commit 9349972)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@bedevere-app

Copy link
Copy Markdown

GH-144579 is a backport of this pull request to the 3.14 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label Feb 7, 2026
@bedevere-app

Copy link
Copy Markdown

GH-144580 is a backport of this pull request to the 3.13 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.13 bugs and security fixes label Feb 7, 2026
picnixz added a commit that referenced this pull request Feb 7, 2026
…ue (GH-144568) (#144579)
gh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (GH-144568)
(cherry picked from commit 9349972)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz added a commit that referenced this pull request Feb 7, 2026
…ue (GH-144568) (#144580)
gh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (GH-144568)
(cherry picked from commit 9349972)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants

@picnixz@gpshead