Commit Graph

22 Commits

Author SHA1 Message Date
Yury Selivanov 431b540bf7
bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528)
This will address the common mistake many asyncio users make:
an "except Exception" clause breaking Tasks cancellation.

In addition to this change, we stop inheriting asyncio.TimeoutError
and asyncio.InvalidStateError from their concurrent.futures.*
counterparts.  There's no point for these exceptions to share the
inheritance chain.

In 3.9 we'll focus on implementing supervisors and cancel scopes,
which should allow better handling of all exceptions, including
SystemExit and KeyboardInterrupt
2019-05-27 14:45:12 +02:00
Yury Selivanov d757aaf9dd
bpo-32356: idempotent pause_/resume_reading; new is_reading method. (#4914) 2017-12-18 17:03:23 -05:00
Yury Selivanov 6370f345e1
bpo-32262: Fix codestyle; use f-strings formatting where necessary. (#4775) 2017-12-10 18:36:12 -05:00
INADA Naoki 3e2ad8ec61 bpo-29617: Remove Python 3.3 support from asyncio (GH-232) 2017-04-25 10:57:18 +09:00
Yury Selivanov a05a6ef1ca asyncio: Add set_protocol / get_protocol methods to Transports 2016-09-11 21:11:02 -04:00
Yury Selivanov 5bb1afb332 asyncio: Add Transport.is_closing()
See https://github.com/python/asyncio/pull/291 for details.
2015-11-16 12:43:21 -05:00
Serhiy Storchaka d65c9496da Issue #25523: Further a-to-an corrections. 2015-11-02 14:10:23 +02:00
Victor Stinner eaf16abc68 asyncio: sync with github
* Fix ResourceWarning warnings in test_streams
* Return True from StreamReader.eof_received() to fix
  http://bugs.python.org/issue24539 (but still needs a unittest).
  Add StreamReader.__repr__() for easy debugging.
* remove unused imports
* Issue #234: Drop JoinableQueue on Python 3.5+
2015-07-25 02:40:40 +02:00
Victor Stinner 71080fc351 asyncio: Add asyncio.compat module
Move compatibility helpers for the different Python versions to a new
asyncio.compat module.
2015-07-25 02:23:21 +02:00
Victor Stinner 004adb91f6 asyncio: Move loop attribute to _FlowControlMixin
Move the _loop attribute from the constructor of _SelectorTransport,
_ProactorBasePipeTransport and _UnixWritePipeTransport classes to the
constructor of the _FlowControlMixin class.

Add also an assertion to explicit that the parent class must ensure that the
loop is defined (not None)
2014-11-05 15:27:41 +01:00
Victor Stinner 52bb949fd3 asyncio, tulip issue 203: Add _FlowControlMixin.get_write_buffer_limits() method 2014-08-26 00:22:28 +02:00
Yury Selivanov 1589920977 asyncio: WriteTransport.set_write_buffer_size to call _maybe_pause_protocol 2014-02-19 11:10:52 -05:00
Yury Selivanov 3cb9914488 asyncio.transports: Make _ProactorBasePipeTransport use _FlowControlMixin 2014-02-18 18:41:13 -05:00
Victor Stinner 6f055e73df asyncio: make PY34 symbol private (rename it to _PY34) 2014-01-02 18:41:34 +01:00
Guido van Rossum ac97bf4fd9 asyncio: Export all abstract protocol and transport classes. Fixes issue #20029. 2013-12-20 14:16:21 -08:00
Guido van Rossum f10345e102 asyncio: Improve default writelines(). 2013-12-02 18:36:30 -08:00
Guido van Rossum 9204af42cc asyncio: Use Interface instead of ABC. Fixes issue 19726. 2013-11-30 15:35:42 -08:00
Guido van Rossum 488b0da5da Fix typo. 2013-11-23 11:51:09 -08:00
Antoine Pitrou dec43382c1 Fix transport docstrings 2013-11-23 12:30:00 +01:00
Guido van Rossum 355491dc47 Write flow control for asyncio (includes asyncio.streams overhaul). 2013-10-18 15:17:11 -07:00
Guido van Rossum 57497ad181 Rename Transport.pause/resume to pause_reading/pause_writing. Also relax timeout in test_call_later(). 2013-10-18 07:58:20 -07:00
Guido van Rossum 27b7c7ebf1 Initial checkin of asyncio package (== Tulip, == PEP 3156). 2013-10-17 13:40:50 -07:00