Skip to content

gh-143700: Document secrets.DEFAULT_ENTROPY#144447

Closed
kovan wants to merge 1 commit intopython:mainfrom
kovan:gh-143700-secrets-default-entropy
Closed

gh-143700: Document secrets.DEFAULT_ENTROPY#144447
kovan wants to merge 1 commit intopython:mainfrom
kovan:gh-143700-secrets-default-entropy

Conversation

@kovan
Copy link
Contributor

@kovan kovan commented Feb 3, 2026

Summary

  • Add documentation for secrets.DEFAULT_ENTROPY constant
  • Document it as an opaque value that may change at any time
  • Encourage users to explicitly pass nbytes if they need a specific amount of entropy

Closes #143700

Test plan

  • Verified against source code (Lib/secrets.py:31)
  • make check in Doc/ directory passed

🤖 Generated with Claude Code


📚 Documentation preview 📚: https://cpython-previews--144447.org.readthedocs.build/

Add documentation for the DEFAULT_ENTROPY constant in the secrets
module. Document it as an opaque value that may change at any time,
encouraging users to explicitly pass nbytes if they need a specific
amount of entropy.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@picnixz
Copy link
Member

picnixz commented Feb 3, 2026

When an issue is already assigned, it is customary to not take over the PR. I wanted to do it myself and I will do so when I find time. So sorry but I'm going to close this PR because I want to use an alternative wording and you have enough open PRs which will need review (so please do not open more, TiA).

@picnixz picnixz closed this Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Document secrets.DEFAULT_ENTROPY as an opaque value

2 participants