]> granicus.if.org Git - python/commit
bpo-32568: make select.epoll() and its docs consistent (#7840)
authorTal Einat <taleinat+github@gmail.com>
Sat, 30 Jun 2018 12:43:23 +0000 (15:43 +0300)
committerGitHub <noreply@github.com>
Sat, 30 Jun 2018 12:43:23 +0000 (15:43 +0300)
commit0cdf5f42898350261c5ff65d96334e736130780f
tree589e0dac3ee9c06289e972f4c3857e65c8b90c98
parent5bb5bbfca847524bab5f2368bdb48eedf5dba74f
bpo-32568: make select.epoll() and its docs consistent (#7840)

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