]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.6] bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8025)
authorTal Einat <taleinat+github@gmail.com>
Sat, 30 Jun 2018 13:15:53 +0000 (16:15 +0300)
committerGitHub <noreply@github.com>
Sat, 30 Jun 2018 13:15:53 +0000 (16:15 +0300)
commitdb7ac30ef52ce35a4ead1bc1b9f0dd5331ed9779
treeedb36ee812987910f124b00a502af4d2396ff6f3
parentb2e88fcf63515f8a66759a6fdc75d08a0a440901
[3.6] bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8025)

* `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)
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