summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30805: Avoid race condition with debug logging (GH-7545)Miss Islington (bot)2018-06-081-2/+4
| | | | | | Supersedes https://github.com/python/cpython/pull/2490 (cherry picked from commit 12f482e0ae33021c04264294f33fa6baa9617cec) Co-authored-by: Yury Selivanov <yury@magic.io>
* bpo-32684: Fix gather to propagate cancel of itself with return_exceptions ↵Yury Selivanov2018-05-291-1/+10
| | | | (GH-7224)
* bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines (GH-7180)Yury Selivanov2018-05-292-12/+19
| | | [3.6 backport of 989b9e0]
* bpo-33674: asyncio: Fix SSLProtocol race (GH-7175) (GH-7188)Victor Stinner2018-05-291-1/+1
| | | | | | | | Fix a race condition in SSLProtocol.connection_made() of asyncio.sslproto: start immediately the handshake instead of using call_soon(). Previously, data_received() could be called before the handshake started, causing the handshake to hang or fail. (cherry picked from commit be00a5583a2cb696335c527b921d1868266a42c6)
* bpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171)Miss Islington (bot)2018-05-291-0/+3
| | | | | (cherry picked from commit fdccfe09f0b10776645fdb04a0783d6864c32b21) Co-authored-by: Yury Selivanov <yury@magic.io>
* bpo-31647: Fix write_eof() after close() for SelectorSocketTransport ↵Miss Islington (bot)2018-05-281-1/+1
| | | | | | | | | (GH-7149) (#7154) Fixed bug where calling write_eof() on a _SelectorSocketTransport after it's already closed raises AttributeError. (cherry picked from commit 23f587e395e41bd5e116312b036183f42bc4159b) Co-authored-by: twisteroid ambassador <twisteroidambassador@users.noreply.github.com>
* [3.6] bpo-26819: Prevent proactor double read on resume (GH-6921) (#7110)CtrlZvi2018-05-251-1/+5
| | | | | | | | | | | | | The proactor event loop has a race condition when reading with pausing/resuming. `resume_reading()` unconditionally schedules the read function to read from the current future. If `resume_reading()` was called before the previously scheduled done callback fires, this results in two attempts to get the data from the most recent read and an assertion failure. This commit tracks whether or not `resume_reading` needs to reschedule the callback to restart the loop, preventing a second attempt to read the data.. (cherry picked from commit 4151061855b571bf8a7579daa7875b8e243057b9) Co-authored-by: CtrlZvi <viz+github@flippedperspective.com>
* [3.6] bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) (#7025)Andrew Svetlov2018-05-211-5/+9
| | | | | | | | | * bpo-33263 Fix FD leak in _SelectorSocketTransport. (GH-6450) Under particular circumstances _SelectorSocketTransport can try to add a reader even the transport is already being closed. This can lead to FD leak and invalid stated of the following connections. Fixed the SelectorSocketTransport to add the reader only if the trasport is still active.. (cherry picked from commit a84d0b361a26c05c6fadc6640591ec3feee5bfb5)
* [3.6] bpo-33584: Fix several minor bugs in asyncio. (GH-7003) (#7006)Serhiy Storchaka2018-05-201-1/+1
| | | | | * repr() was called for a borrowed link. * str() was used instead of repr() in formatting one error message. (cherry picked from commit 6655354afcd116c27486bb5ba1dfa50b369d8d85)
* [3.6] bpo-33037: Skip sending/receiving after SSL transport closing ↵Andrew Svetlov2018-03-101-1/+5
| | | | | | (GH-6044) (GH-6058) * Skip write()/data_received() if sslpipe is destroyed. (cherry picked from commit 5e80a71ab67045fecec46573a1892e240b569ace)
* bpo-32841: Fix cancellation in awaiting asyncio.Condition (GH-5665) (GH-5683)Miss Islington (bot)2018-02-141-1/+5
| | | | | (cherry picked from commit 5746510b7aef423fa4afc92b2abb919307b1dbb9) Co-authored-by: Bar Harel <bzvi7919@gmail.com>
* [3.6] bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466) ↵Bar Harel2018-02-021-10/+22
| | | | | | | (#5502) (cherry picked from commit d41e9e0952393e64f2f9756d778553d704191086)
* bpo-26133: Fix typos (GH-5010) (#5014)Miss Islington (bot)2017-12-261-2/+2
| | | | | | * Fix typos * Change warning text * Add test (cherry picked from commit a8f4e15f3d33084862ddd3a7d58cd00034e94f16)
* bpo-26133: Clear signals list on interpreter finalizing (GH-5002) (#5003)Miss Islington (bot)2017-12-241-4/+7
| | | (cherry picked from commit 4f146f9ed133b9ad56d4ee7a653396836af34067)
* bpo-26133: Dont unsubscribe signals in UNIX even loop on interpreter ↵Miss Islington (bot)2017-12-211-2/+8
| | | | | shutdown (GH-4956) (#4962) (cherry picked from commit 4a02543cf97e8cbf9293741379f977b85531e4c2)
* bpo-27456: Ensure TCP_NODELAY is set on linux (#4231) (#4898)Yury Selivanov2017-12-163-24/+25
| | | (cherry picked from commit e796b2fe26f220107ac50667de6cc86c82b465e3)
* asyncio: Remove unused Future._tb_logger attribute (GH-4596) (#4598)Miss Islington (bot)2017-11-281-8/+1
| | | | | It was only used on Python 3.3, now only Future._log_traceback is used. (cherry picked from commit c16bacec3c2f08a74e4dc282f7d84f17ec70d0d5)
* bpo-32034: Make IncompleteReadError & LimitOverrunError pickleable GH-4409 ↵Miss Islington (bot)2017-11-161-0/+6
| | | | | (#4411) (cherry picked from commit 43605e6bfa8d49612df4a38460d063d6ba781906)
* [3.6] bpo-32015: Asyncio looping during simultaneously socket read/write ↵Andrew Svetlov2017-11-141-13/+12
| | | | | | | | | | | | | | an… (GH-4386) (#4393) * bpo-32015: Asyncio cycling during simultaneously socket read/write and reconnection * Tests fix * Tests fix * News add * Add new unit tests. (cherry picked from commit e1d62e0b7cc842d6b75b4d480391f4a94e503255)
* bpo-31620: have asyncio/queues not leak memory when you've exceptions during ↵Miss Islington (bot)2017-11-071-0/+6
| | | | | waiting (GH-3813) (#4326) (cherry picked from commit c62f0cb3b1f6f9ca4ce463b1c99b0543bdfa38d6)
* [3.6] bpo-31970: Reduce performance overhead of asyncio debug mode. ↵Antoine Pitrou2017-11-075-6/+36
| | | | | | (GH-4314) (#4322) * bpo-31970: Reduce performance overhead of asyncio debug mode.. (cherry picked from commit 921e9432a1461bbf312c9c6dcc2b916be6c05fa0)
* bpo-31960: Fix asyncio.Future documentation for thread (un)safety. (GH-4319) ↵Miss Islington (bot)2017-11-071-1/+3
| | | | | (#4320) (cherry picked from commit 22b1128559bdeb96907da5840960691bb050d11a)
* bpo-31632: fix set_protocol() in _SSLProtocolTransport (GH-3817) (GH-3817) ↵Miss Islington (bot)2017-10-191-6/+4
| | | | | (#4052) (cherry picked from commit ea2ef5d0ca869d4550820ed53bdf56013dbb9546)
* [3.6] bpo-31250: test_asyncio: fix dangling threads (#3517)Victor Stinner2017-09-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | * bpo-31250, test_asyncio: fix dangling threads (#3252) * Explicitly call shutdown(wait=True) on executors to wait until all threads complete to prevent side effects between tests. * Fix test_loop_self_reading_exception(): don't mock loop.close(). Previously, the original close() method was called rather than the mock, because how set_event_loop() registered loop.close(). (cherry picked from commit 16432beadb8eba079c9786cc0c0eaacfd9fd2f7b) * bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264) Call doCleanups() to close the loop after calling executor.shutdown(wait=True): see TestCase.set_event_loop() of asyncio.test_utils. Replace also gc.collect() with support.gc_collect(). (cherry picked from commit e8a533fbc734af6eeb389202ba6c6e9c2548027f)
* bpo-31350: Optimize get_event_loop and _get_running_loop (GH-3347) (GH-3373)Miss Islington (bot)2017-09-061-6/+4
| | | | | | | | | | | | | | | | * call remove_done_callback in finally section * Optimize get_event_loop and _get_running_loop * rename _loop_pid as loop_pid and add blurb news * rename _loop_pid as loop_pid and add blurb news * add back _RunningLoop * Update 2017-09-05-10-30-48.bpo-31350.dXJ-7N.rst * Update 2017-09-05-10-30-48.bpo-31350.dXJ-7N.rst (cherry picked from commit 80bbe6a7b67f33d0d0976bb8e3e5ba26b6b0e626)
* bpo-30280: Cleanup threads in ayncio tests (#2501) (#2511)Victor Stinner2017-06-301-0/+6
| | | | | | | | | | | | | | | | | * bpo-30280: asyncio now cleans up threads asyncio base TestCase now uses threading_setup() and threading_cleanup() of test.support to cleanup threads. * asyncio: Fix TestBaseSelectorEventLoop cleanup bpo-30280: TestBaseSelectorEventLoop of test.test_asyncio.test_selector_events now correctly closes the event loop: cleanup its executor to not leak threads. Don't override the close() method of the event loop, only override the_close_self_pipe() method. (cherry picked from commit b9030674624c181d6e9047cdb14ad65bb6c84c66)
* [3.6] Fix a typo in a comment in coroutines.py (GH-2267) (GH-2370)Mariatta2017-06-241-1/+1
| | | | defiend -> defined (cherry picked from commit cab469245d7635447c5e04fa6ed860b067dfc26b)
* Revert "[3.6] bpo-29406: asyncio SSL contexts leak sockets after calling ↵Yury Selivanov2017-06-111-23/+1
| | | | | close with certain servers (GH-409) (#2062)" (#2112) This reverts commit 6e14fd2a14cef6ea0709ad234ab41198c2195591.
* bpo-30508: Don't log exceptions if Task/Future "cancel()" method was called. ↵Yury Selivanov2017-06-112-0/+2
| | | | (#2109)
* [3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with ↵Yury Selivanov2017-06-101-1/+23
| | | | | | | | | | | | | | | certain servers (GH-409) (#2062) * bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (#409) (cherry picked from commit a608d2d5a7f1aabe9bcbfc220135c5e126189390) * [3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (GH-409) * asyncio SSL contexts leak sockets after calling close with certain servers * cleanup _shutdown_timeout_handle on _fatal_error. (cherry picked from commit a608d2d5a7f1aabe9bcbfc220135c5e126189390)
* [3.6] Fix TypeError is asyncio/proactor_events (GH-993) (#2061)Yury Selivanov2017-06-101-2/+3
| | | (cherry picked from commit 34792d25ab7329241ea24595286d65d54c266274)
* Break circular references when closing SSLTransport objects (#981) (#2049)Yury Selivanov2017-06-091-4/+6
|
* Closing transport during handshake process leaks socket (#480) (#2044)Yury Selivanov2017-06-091-2/+5
|
* Fix waiter cancellation in asyncio.Lock (#1031) (#2037)Yury Selivanov2017-06-091-5/+12
| | | | | | Avoid a deadlock when the waiter who is about to take the lock is cancelled Issue #27585
* [3.6] call remove_done_callback in finally section (GH-1688) (#1755)Łukasz Langa2017-05-231-1/+2
| | | (cherry picked from commit 21b3e04c13212b29e8c35ffc36eed8603fde08f4)
* bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1546)INADA Naoki2017-05-111-1/+6
| | | | | | | | | | | | | | when there are no more `await` or `yield (from)` before return in coroutine, cancel was ignored. example: async def coro(): asyncio.Task.current_task().cancel() return 42 ... res = await coro() # should raise CancelledError (cherry picked from commit 991adca012f5e106c2d4040ce619c696ba6f9c46)
* bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future ↵Mariatta2017-04-221-1/+2
| | | | | (GH-1170) (#1247) (cherry picked from commit ae5b3260dd459845aad8a30491b76d471577785d)
* bpo-29742: asyncio get_extra_info() throws exception (#525) (#645)Yury Selivanov2017-03-121-1/+3
|
* asyncio: Optimize _get_running_loop() to call getpid() only when there's a loopYury Selivanov2017-03-031-2/+3
|
* bpo-29704: Fix asyncio.SubprocessStreamProtocol closing (#405)Seth M. Larson2017-03-031-2/+15
|
* bpo-29703: asyncio: Fix creating new event loops in child processes. (#404) ↵Yury Selivanov2017-03-032-2/+11
| | | | (#410)
* Issue #29314: Merge with 3.5Mariatta Wijaya2017-02-071-1/+2
|\
| * Issue #29314: Set the stacklevel to two in asyncio.async() Deprecation WarningMariatta Wijaya2017-02-071-1/+2
| |
* | Merge 3.5 (issue #28990)Yury Selivanov2016-12-161-0/+1
|\ \ | |/
| * Issue #28990: Fix SSL hanging if connection is closed before handshake ↵Yury Selivanov2016-12-161-0/+1
| | | | | | | | completed.
* | Merge 3.5 (issue #28652)Yury Selivanov2016-11-211-12/+10
|\ \ | |/
| * Issue #28652: Partially rollback previous changesYury Selivanov2016-11-211-12/+10
| | | | | | | | Allow AF_UNIX in create_server & create_connection
* | Merge 3.5 (issue #28704)Yury Selivanov2016-11-151-0/+8
|\ \ | |/
| * Issue #28704: Fix create_unix_server to support Path-like objectsYury Selivanov2016-11-151-0/+8
| |
* | Merge 3.5 (issue #28703)Yury Selivanov2016-11-151-2/+14
|\ \ | |/