Russell Davis
ba1bcffe5c
bpo-29255: Wait in KqueueSelector.select when no fds are registered (GH-19508)
...
Also partially fixes bpo-25680 (there's still a discrepancy in behavior
on Windows that needs to be fixed).
2020-04-15 11:57:06 -07:00
Giampaolo Rodola
ced36a993f
bpo-30624 remaining bare except ( #2108 )
...
bpo-30624 / selectors: use bare 'except' clause instead of 'except
Exception'
2017-06-12 14:43:40 +02:00
Giampaolo Rodola
05dc20f992
#30624 / selectors: use bare except clause in order to not leave the fd in a bad state in case of error ( #2082 )
2017-06-10 16:51:52 -07:00
Giampaolo Rodola
fbfaa6fd57
bpo-30014: make poll-like selector's modify() method faster ( #1030 )
...
* #30014 : make selectors.DefaultSelector.modify() faster by relying on selector's modify() method instead of un/register()ing the fd
* #30014 : add unit test
* speedup poll/epoll/devpoll modify() method by using internal modify() call
* update doc
* address PR comments
* update NEWS entries
* use != instead of 'is not'
2017-06-09 22:20:41 +02:00
Giampaolo Rodola
62c7d90b64
#30014 : refactor poll-related classes ( #1035 )
...
* #30014 : refactor poll-related classes so that poll(), epoll() and devpoll() share the same methods for register(), unregister(), close() and select()
* remove unused attribute
* use specific class attributes instead of select.* constants
* have all classes except SelectSelector a _selector attribute
* BaseException -> Exception
* be explicit in defining a close() method only for selectors which have it
* fix AttributeError
2017-05-20 11:34:44 +02:00
Serhiy Storchaka
2e576f5aec
bpo-30144: Import collections ABC from collections.abc rather than collections. ( #1263 )
2017-04-24 09:05:00 +03:00
Yury Selivanov
525aedc5fa
Issue #27759 : Fix selectors incorrectly retain invalid file descriptors.
...
Patch by Mark Williams.
2016-09-15 19:30:42 -04:00
Yury Selivanov
0c6a34409e
asyncio, selectors: Update to the upstream version
2016-03-02 10:37:59 -05:00
Yury Selivanov
90ecfe65e6
asyncio: Sync with github repo
2015-05-11 13:48:16 -04:00
Serhiy Storchaka
2116b12da5
Issue #23865 : close() methods in multiple modules now are idempotent and more
...
robust at shutdown. If needs to release multiple resources, they are released
even if errors are occured.
2015-04-10 13:29:28 +03:00
Serhiy Storchaka
7e7a3dba5f
Issue #23865 : close() methods in multiple modules now are idempotent and more
...
robust at shutdown. If needs to release multiple resources, they are released
even if errors are occured.
2015-04-10 13:24:41 +03:00
Victor Stinner
45ca48b03d
Issue #23485 : select.devpoll.poll() is now retried when interrupted by a signal
2015-03-31 12:10:33 +02:00
Victor Stinner
4448c08451
Issue #23485 : select.kqueue.control() is now retried when interrupted by a signal
2015-03-31 11:48:34 +02:00
Victor Stinner
41eba224de
Issue #23485 : select.epoll.poll() is now retried when interrupted by a signal
2015-03-30 21:59:21 +02:00
Victor Stinner
3c7d6e0693
Issue #23485 : select.poll.poll() is now retried when interrupted by a signal
2015-03-30 21:38:00 +02:00
Victor Stinner
f70e1ca0fc
Issue #23485 : select.select() is now retried automatically with the recomputed
...
timeout when interrupted by a signal, except if the signal handler raises an
exception. This change is part of the PEP 475.
The asyncore and selectors module doesn't catch the InterruptedError exception
anymore when calling select.select(), since this function should not raise
InterruptedError anymore.
2015-03-30 21:16:11 +02:00
Victor Stinner
458fc6f98c
Issue #23209 , #23225 : selectors.BaseSelector.get_key() now raises a
...
RuntimeError if the selector is closed. And selectors.BaseSelector.close() now
clears its internal reference to the selector mapping to break a reference
cycle. Initial patch written by Martin Richard.
2015-01-13 10:00:55 +01:00
Victor Stinner
38dc250521
Issue #23209 , #23225 : selectors.BaseSelector.close() now clears its internal
...
reference to the selector mapping to break a reference cycle. Initial patch
written by Martin Richard.
2015-01-13 09:58:33 +01:00
Victor Stinner
c50a9c1617
(Merge 3.4) Issue #23209 : Revert change on selectors, test_selectors failed.
2015-01-09 21:57:19 +01:00
Victor Stinner
686fe6e156
Issue #23209 : Revert change on selectors, test_selectors failed.
2015-01-09 21:56:28 +01:00
Victor Stinner
6a825a8314
Merge 3.4 (asyncio, selectors)
2015-01-09 21:35:03 +01:00
Victor Stinner
587feb19e8
Issue #23209 : Break some reference cycles in asyncio. Patch written by Martin
...
Richard.
2015-01-09 21:34:27 +01:00
Victor Stinner
53a6d74fbf
selectors: truncate to 80 characters
2015-01-09 00:13:39 +01:00
Yury Selivanov
dfc44e0525
selectors: Fix typo in comment.
2014-12-08 12:30:10 -05:00
Yury Selivanov
d60ef4aa9d
selectors: Make sure EpollSelecrtor.select() works when no FD is registered.
...
Closes issue #23009 .
2014-12-08 12:21:58 -05:00
Yury Selivanov
c57ca93a78
selectors: Fix typo in comment.
2014-12-08 12:30:28 -05:00
Yury Selivanov
7f98d3ecb8
selectors: Make sure EpollSelecrtor.select() works when no FD is registered.
...
Closes issue #23009 .
2014-12-08 12:22:33 -05:00
Giampaolo Rodola'
f97e82937f
Fix issue 18931: selectors module now supports /dev/poll on Solaris.
2014-03-20 21:43:41 +01:00
Victor Stinner
da492a8c39
asyncio: remove unused imports and unused variables noticed by pyflakes
2014-02-20 10:37:27 +01:00
Yury Selivanov
b0b0e628ee
asyncio: Fix spelling and typos.
...
Thanks to Vajrasky Kok for discovering some of them.
2014-02-18 22:27:48 -05:00
Victor Stinner
b4c9388947
asyncio: remove unused imports and unused variables noticed by pyflakes
2014-02-20 10:37:27 +01:00
Yury Selivanov
dec1a45fd1
asyncio: Fix spelling and typos.
...
Thanks to Vajrasky Kok for discovering some of them.
2014-02-18 22:27:48 -05:00
Victor Stinner
85310a50a9
Issue #20505 : Remove resolution and _granularity from selectors and asyncio
...
* Remove selectors.BaseSelector.resolution attribute
* Remove asyncio.BaseEventLoop._granularity attribute
2014-02-07 23:34:58 +01:00
Victor Stinner
665758f804
Issue #20455 : math.ceil() returns an int in Python 3, no need to cast the
...
result again to int
2014-01-31 16:24:21 +01:00
Victor Stinner
dcd9740ad2
Issue #20452 : select and selectors round (again) timeout away from zero for
...
poll and epoll
Improve also debug info to analyze the issue
2014-01-31 12:12:53 +01:00
Victor Stinner
635fca9704
Issue #20311 : selectors: Add a resolution attribute to BaseSelector.
2014-01-25 14:56:48 +01:00
Victor Stinner
2041859f27
Issue #20311 : Revert e042ea77a152 and 7ce7295393c2, PollSelector.select() and
...
EpollSelector.select() round again the timeout towards zero
2014-01-25 14:43:45 +01:00
Victor Stinner
567b26e882
Issue #20311 : EpollSelector now also rounds the timeout towards zero, as
...
PollSelector.
This change is not really required in Python 3.4, since select.epoll.poll() now
rounds also correctly the timeout. But Guido van Rossum prefers to have exactly
the same selectors.py file in CPython and Tulip projects: "it's not harmful".
2014-01-21 21:00:47 +01:00
Victor Stinner
7067b5d927
selectors: add a comment to explain why and how poll timeout is rounded
2014-01-21 17:49:41 +01:00
Victor Stinner
11da8e24ba
Issue #20311 : selector.PollSelector.select() now rounds the timeout away from
...
zero, instead of rounding towards zero. For example, a timeout of one
microsecond is now rounded to one millisecond, instead of being rounded to
zero.
Move also a test in test_epoll which was moved by my previous merge.
2014-01-21 01:48:28 +01:00
Guido van Rossum
9710ff04ac
Silently ignore unregistering closed files. Fixes issue 19876. With docs and slight test refactor.
2013-12-07 15:57:01 -08:00
Charles-François Natali
b3330a0abf
Issue #19842 : Refactor BaseSelector to make it an actual usable ABC.
2013-12-01 11:04:17 +01:00
Charles-François Natali
f47981f51e
selectors: use a single return.
2013-11-18 18:59:43 +01:00
Guido van Rossum
d0786a1a50
Optimize BaseSelector.modify(). Patch by Arnaud Faure.
2013-11-07 08:39:28 -08:00
Guido van Rossum
61a2ced1c5
Close resources owned by subclass before calling super().close().
2013-10-31 11:01:40 -07:00
Charles-François Natali
4574b49703
Issue #19172 : Add a get_map() method to selectors.
2013-10-30 20:31:04 +01:00
Charles-François Natali
243d8d85de
Issue #16853 : Add new selectors module.
2013-09-04 19:02:49 +02:00