Add `GRND_INSECURE` constant to `os` module
Open
Nobody has claimed this yet.
extension-modules
type-feature
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Feature or enhancement
Proposal:
This issue suggests adding new os constants.
os.GRND_INSECURE
os.getrandom(/* some byte size */, GRND_INSECURE) # It cannot be used with os.GRND_RANDOM
It can return a pseudo-random number when the entropy pool is not initialized, instead of blocking.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
- gh-127777
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing linked PR gh-127777 and the os.getrandom entry point, then compare how existing os constants are exposed. Done means os.GRND_INSECURE is available and reflects the documented incompatibility with os.GRND_RANDOM.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100