summaryrefslogtreecommitdiffstats
path: root/Lib/selectors.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-41182 selector: use DefaultSelector based upon implementation (GH-21257)Miss Islington (bot)2020-07-261-4/+28
| | | | | | | | | | | | | On some platform such as VMware ESXi, DefaultSelector fails to detect selector due to default value. This fix adds a check and uses the correct selector depending upon select implementation and actual call. Fixes: [bpo-41182]() Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit bcd47837a9bf4806e559b40df73869493efcce27) Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
* bpo-29255: Wait in KqueueSelector.select when no fds are registered (GH-19508)Russell Davis2020-04-151-1/+4
| | | | Also partially fixes bpo-25680 (there's still a discrepancy in behavior on Windows that needs to be fixed).
* bpo-30624 remaining bare except (#2108)Giampaolo Rodola2017-06-121-1/+1
| | | | bpo-30624 / selectors: use bare 'except' clause instead of 'except Exception'
* #30624 / selectors: use bare except clause in order to not leave the fd in a ↵Giampaolo Rodola2017-06-101-2/+2
| | | | bad state in case of error (#2082)
* bpo-30014: make poll-like selector's modify() method faster (#1030)Giampaolo Rodola2017-06-091-1/+29
| | | | | | | | | | | | | | | | * #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'
* #30014: refactor poll-related classes (#1035)Giampaolo Rodola2017-05-201-132/+84
| | | | | | | | | | | | | | | | * #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
* bpo-30144: Import collections ABC from collections.abc rather than ↵Serhiy Storchaka2017-04-241-1/+2
| | | | collections. (#1263)
* Issue #27759: Fix selectors incorrectly retain invalid file descriptors.Yury Selivanov2016-09-151-9/+17
| | | | Patch by Mark Williams.
* asyncio, selectors: Update to the upstream versionYury Selivanov2016-03-021-2/+11
|
* asyncio: Sync with github repoYury Selivanov2015-05-111-23/+26
|
* Issue #23865: close() methods in multiple modules now are idempotent and moreSerhiy Storchaka2015-04-101-6/+12
|\ | | | | | | | | robust at shutdown. If needs to release multiple resources, they are released even if errors are occured.
| * Issue #23865: close() methods in multiple modules now are idempotent and moreSerhiy Storchaka2015-04-101-4/+8
| | | | | | | | | | robust at shutdown. If needs to release multiple resources, they are released even if errors are occured.
* | Issue #23485: select.devpoll.poll() is now retried when interrupted by a signalVictor Stinner2015-03-311-4/+3
| |
* | Issue #23485: select.kqueue.control() is now retried when interrupted by a ↵Victor Stinner2015-03-311-4/+2
| | | | | | | | signal
* | Issue #23485: select.epoll.poll() is now retried when interrupted by a signalVictor Stinner2015-03-301-4/+2
| |
* | Issue #23485: select.poll.poll() is now retried when interrupted by a signalVictor Stinner2015-03-301-4/+3
| |
* | Issue #23485: select.select() is now retried automatically with the recomputedVictor Stinner2015-03-301-4/+1
| | | | | | | | | | | | | | | | | | 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.
* | Issue #23209, #23225: selectors.BaseSelector.get_key() now raises aVictor Stinner2015-01-131-0/+3
|\ \ | |/ | | | | | | | | 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.
| * Issue #23209, #23225: selectors.BaseSelector.close() now clears its internalVictor Stinner2015-01-131-0/+3
| | | | | | | | | | reference to the selector mapping to break a reference cycle. Initial patch written by Martin Richard.
* | (Merge 3.4) Issue #23209: Revert change on selectors, test_selectors failed.Victor Stinner2015-01-091-1/+0
|\ \ | |/
| * Issue #23209: Revert change on selectors, test_selectors failed.Victor Stinner2015-01-091-1/+0
| |
* | Merge 3.4 (asyncio, selectors)Victor Stinner2015-01-091-0/+1
|\ \ | |/
| * Issue #23209: Break some reference cycles in asyncio. Patch written by MartinVictor Stinner2015-01-091-0/+1
| | | | | | | | Richard.
* | selectors: truncate to 80 charactersVictor Stinner2015-01-081-1/+2
| |
* | selectors: Fix typo in comment.Yury Selivanov2014-12-081-1/+1
|\ \ | |/
| * selectors: Fix typo in comment.Yury Selivanov2014-12-081-1/+1
| |
* | selectors: Make sure EpollSelecrtor.select() works when no FD is registered.Yury Selivanov2014-12-081-1/+6
|\ \ | |/ | | | | Closes issue #23009.
| * selectors: Make sure EpollSelecrtor.select() works when no FD is registered.Yury Selivanov2014-12-081-1/+6
| | | | | | | | Closes issue #23009.
| * asyncio: remove unused imports and unused variables noticed by pyflakesVictor Stinner2014-02-201-2/+1
| |
| * asyncio: Fix spelling and typos.Yury Selivanov2014-02-191-1/+1
| | | | | | | | Thanks to Vajrasky Kok for discovering some of them.
* | Fix issue 18931: selectors module now supports /dev/poll on Solaris.Giampaolo Rodola'2014-03-201-1/+61
| |
* | asyncio: remove unused imports and unused variables noticed by pyflakesVictor Stinner2014-02-201-2/+1
| |
* | asyncio: Fix spelling and typos.Yury Selivanov2014-02-191-1/+1
|/ | | | Thanks to Vajrasky Kok for discovering some of them.
* Issue #20505: Remove resolution and _granularity from selectors and asyncioVictor Stinner2014-02-071-21/+0
| | | | | * Remove selectors.BaseSelector.resolution attribute * Remove asyncio.BaseEventLoop._granularity attribute
* Issue #20455: math.ceil() returns an int in Python 3, no need to cast theVictor Stinner2014-01-311-1/+1
| | | | result again to int
* Issue #20452: select and selectors round (again) timeout away from zero forVictor Stinner2014-01-311-2/+8
| | | | | | poll and epoll Improve also debug info to analyze the issue
* Issue #20311: selectors: Add a resolution attribute to BaseSelector.Victor Stinner2014-01-251-1/+22
|
* Issue #20311: Revert e042ea77a152 and 7ce7295393c2, PollSelector.select() andVictor Stinner2014-01-251-8/+2
| | | | EpollSelector.select() round again the timeout towards zero
* Issue #20311: EpollSelector now also rounds the timeout towards zero, asVictor Stinner2014-01-211-1/+8
| | | | | | | | 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".
* selectors: add a comment to explain why and how poll timeout is roundedVictor Stinner2014-01-211-2/+4
|
* Issue #20311: selector.PollSelector.select() now rounds the timeout away fromVictor Stinner2014-01-211-1/+7
| | | | | | | | 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.
* Silently ignore unregistering closed files. Fixes issue 19876. With docs and ↵Guido van Rossum2013-12-071-9/+65
| | | | slight test refactor.
* Issue #19842: Refactor BaseSelector to make it an actual usable ABC.Charles-François Natali2013-12-011-44/+68
|
* selectors: use a single return.Charles-François Natali2013-11-181-4/+2
|
* Optimize BaseSelector.modify(). Patch by Arnaud Faure.Guido van Rossum2013-11-071-3/+6
|
* Close resources owned by subclass before calling super().close().Guido van Rossum2013-10-311-2/+2
|
* Issue #19172: Add a get_map() method to selectors.Charles-François Natali2013-10-301-1/+26
|
* Issue #16853: Add new selectors module.Charles-François Natali2013-09-041-0/+405