[issue35114] ssl.RAND_status docs describe it as returning True/False; actually returns 1/0

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 7d37b86ad48368cf93440ca220b758696730d0e5 by Zackery Spytz in 
branch 'master':
bpo-35114: Make ssl.RAND_status() return a bool (GH-20063)
https://github.com/python/cpython/commit/7d37b86ad48368cf93440ca220b758696730d0e5


--
nosy: +christian.heimes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35114] ssl.RAND_status docs describe it as returning True/False; actually returns 1/0

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks Zackery!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35114] ssl.RAND_status docs describe it as returning True/False; actually returns 1/0

2020-05-12 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 3.0 -> 4.0
pull_requests: +19372
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20063

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35114] ssl.RAND_status docs describe it as returning True/False; actually returns 1/0

2018-11-01 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35114] ssl.RAND_status docs describe it as returning True/False; actually returns 1/0

2018-10-30 Thread Josh Rosenberg

New submission from Josh Rosenberg :

The ssl.RAND_status online docs say (with code format on True/False):

"Return True if the SSL pseudo-random number generator has been seeded with 
‘enough’ randomness, and False otherwise."

This is incorrect; the function actually returns 1 or 0 (and the docstring 
agrees).

Fix can be one of:

1. Update docs to be less specific about the return type (use true/false, not 
True/False)
2. Update docs to match docstring (which specifically says 1/0, not True/False)
3. Update implementation and docstring to actually return True/False (replacing 
PyLong_FromLong with PyBool_FromLong and changing docstring to use True/False 
to match online docs)

#3 involves a small amount of code churn, but it also means we're not 
needlessly replicating a C API's use of int return values when the function is 
logically bool (there is no error status for the C API AFAICT, so it's not like 
returning int gains us anything on flexibility). bool would be mathematically 
equivalent to the original 1/0 return value in the rare cases someone uses it 
mathematically.

--
assignee: docs@python
components: Documentation, SSL
messages: 328917
nosy: docs@python, josh.r
priority: low
severity: normal
status: open
title: ssl.RAND_status docs describe it as returning True/False; actually 
returns 1/0
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com