[3.7] bpo-32568: make select.epoll() and its docs consistent (GH-7840) by miss-islington · Pull Request #8024 · python/cpython (original) (raw)
flags
is indeed deprecated, but there is a validation on its value for
backwards compatibility reasons. This adds mention of this in the docs.- The docs say that
sizehint
is deprecated and ignored, but it is still
used whenepoll_create1()
is unavailable. This adds mention of this in
the docs. sizehint=-1
is acceptable again, and is replaced withFD_SETSIZE-1
.
This is needed to have a default value available at the Python level,
sinceFD_SETSIZE
is not exposed to Python. (see: bpo-31938)- Reject
sizehint=0
since it is invalid to pass on toepoll_create()
.
The relevant tests have also been updated.
(cherry picked from commit 0cdf5f4)
Co-authored-by: Tal Einat taleinat+github@gmail.com
https://bugs.python.org/issue32568
flags
is indeed deprecated, but there is a validation on its value for backwards compatibility reasons. This adds mention of this in the docs.- The docs say that
sizehint
is deprecated and ignored, but it is still used whenepoll_create1()
is unavailable. This adds mention of this in the docs. sizehint=-1
is acceptable again, and is replaced withFD_SETSIZE-1
. This is needed to have a default value available at the Python level, sinceFD_SETSIZE
is not exposed to Python. (see: bpo-31938)- Reject
sizehint=0
since it is invalid to pass on toepoll_create()
.
The relevant tests have also been updated. (cherry picked from commit 0cdf5f4)
Co-authored-by: Tal Einat taleinat+github@gmail.com
@taleinat: Backport status check is done, and it's a success ✅ .