]> granicus.if.org Git - python/commit
bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8024)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 30 Jun 2018 13:03:19 +0000 (06:03 -0700)
committerTal Einat <taleinat+github@gmail.com>
Sat, 30 Jun 2018 13:03:19 +0000 (16:03 +0300)
commitfd1c092bb9fee46d8d543710973c69a0e93a697a
treeca1ed4e54fa0a22b0a81a36b425ef312a66405df
parent42ea5226642c2a416b32278914fa4738093298ff
bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8024)

* `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 when `epoll_create1()` is unavailable. This adds mention of this in
  the docs.
* `sizehint=-1` is acceptable again, and is replaced with `FD_SETSIZE-1`.
  This is needed to have a default value available at the Python level,
  since `FD_SETSIZE` is not exposed to Python. (see: bpo-31938)
* Reject `sizehint=0` since it is invalid to pass on to `epoll_create()`.

The relevant tests have also been updated.

(cherry picked from commit 0cdf5f42898350261c5ff65d96334e736130780f)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
Doc/library/select.rst
Lib/test/test_epoll.py
Misc/NEWS.d/next/Library/2018-06-21-09-33-02.bpo-32568.f_meGY.rst [new file with mode: 0644]
Modules/selectmodule.c