Commit Graph

1131 Commits

Author SHA1 Message Date
Kumar Aditya 60fbc20ef9 gh-140947: fix contextvars handling for server tasks in asyncio (#141158) 2026-03-21 17:44:08 +05:30
Guido van Rossum 788c329117 gh-123720: When closing an asyncio server, stop the handlers (#124689) 2026-03-14 11:28:49 -07:00
Konstantin Vlasov 77c06f3da6 gh-145703: Fix asyncio.BaseEventLoop low clock resolution (#145706) 2026-03-14 11:07:30 +05:30
Steve Dower ae0d2875bc gh-145035: Allows removing the _pyrepl module to completely disable the modern REPL (GH-145159) 2026-03-10 14:58:32 +01:00
Daan De Meyer 1564e231aa gh-145541: Fix InvalidStateError in BaseSubprocessTransport._call_connection_lost() (#145554) 2026-03-09 19:37:23 +05:30
Maksym Kasimov 0598f4a899 gh-142352: Fix asyncio start_tls() to transfer buffered data from StreamReader (#142354)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-02-28 23:19:04 +05:30
Serhiy Storchaka d6a71f4690 gh-137335: Fix unlikely name conflicts for named pipes in multiprocessing and asyncio on Windows (#137389)
Since os.stat() raises an OSError for existing named pipe "\\.\pipe\...",
os.path.exists() always returns False for it, and tempfile.mktemp() can
return a name that matches an existing named pipe.

So, tempfile.mktemp() cannot be used to generate unique names for named
pipes. Instead, CreateNamedPipe() should be called in a loop with
different names until it completes successfully.
2026-02-24 13:27:49 +02:00
Bartosz Sławecki 63cc1257db gh-143952: Fix asyncio tools to work with the new remote debugging API (#143954) 2026-01-17 19:16:12 -05:00
Bartosz Sławecki e7c542de5f gh-140648: Make asyncio REPL respect the -I flag (isolated mode) (#143045) 2026-01-03 13:33:04 +05:30
Kumar Aditya abdbe0b807 gh-142615: disallow multiple initializations of asyncio.Task and asyncio.Future (#142616) 2026-01-03 13:27:02 +05:30
Bartosz Sławecki 6213a512bf gh-143046: Make asyncio REPL respect the -q flag (quiet mode) (#143047) 2025-12-22 07:05:15 +00:00
Bartosz Sławecki ddfc155d3a gh-142784: make the asyncio REPL call loop.close() at exit (#142785) 2025-12-18 13:00:12 +00:00
Victor Stinner 0b8c348f27 Fix pyflakes warnings: variable is assigned to but never used (#142294)
Example of fixed warning:

    Lib/netrc.py:98:13: local variable 'toplevel'
    is assigned to but never used
2025-12-08 14:00:31 +01:00
Kaisheng Xu 14715e3a64 gh-105836: Fix asyncio.run_coroutine_threadsafe leaving underlying cancelled asyncio task running (#141696)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-12-06 19:33:25 +00:00
Cody Maloney b484c32d0a gh-141863: use bytearray.take_bytes in asyncio streams for better performance (#141864) 2025-11-24 21:06:53 +05:30
yihong ecb901dd87 Drop three unused imports (#141875) 2025-11-23 16:33:05 +00:00
Kumar Aditya ef474cfafb gh-103847: fix cancellation safety of asyncio.create_subprocess_exec (#140805) 2025-11-12 10:47:38 +05:30
Frost Ming d86ad870cc gh-140251: colorize import statement formatting in asyncio console (#140252) 2025-10-18 20:05:24 +05:30
yihong a310b3a99d gh-139845: do not print twice in default asyncio REPL (#139846)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-10-09 15:24:52 +00:00
Kumar Aditya 0b2168275e gh-138703: clarify data buffer requirement of asyncio.StreamWriter.write (#139564) 2025-10-04 21:44:05 +05:30
yihong 22f7ccfad6 gh-138899: fix sys.ps1 in asyncio repl (#138900) 2025-10-01 11:19:49 +05:30
yihong 4c0d7bc52a gh-138958: remove unused variable in Lib/asyncio/streams.py (#138959) 2025-09-16 08:48:41 +05:30
ivonastojanovic 419441a6e1 Improve permission error messages in pdb and asyncio.tools (#134290) 2025-09-12 12:54:04 +01:00
Bruce Merry 7d435cfde6 gh-136234: Fix SelectorSocketTransport.writelines to be robust to connection loss (#136743) 2025-09-08 21:39:52 +05:30
Kumar Aditya c779f2324d gh-134861: revert "Add CSV and BSV output formats to asyncio ps" (#138187)
This reverts commit ee72c95aa9 and 470cbe97a5
2025-08-28 21:19:15 +05:30
maurycy db8742e2b4 Remove redundant assignment in asyncio.streams.StreamReaderProtocol.connection_lost() (GH-137524)
The _stream_writer attribute was removed in a355f60 (gh-114914).
2025-08-07 18:38:14 +03:00
Daniele Parmeggiani ee72c95aa9 gh-134861: Add 🍌SV output format to `python -m asyncio ps` (#137486)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-06 20:42:34 +00:00
Daniele Parmeggiani 470cbe97a5 gh-134861: Add CSV output format to `python -m asyncio ps` (#134862)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-06 20:10:40 +00:00
alexey semenyuk c5cebe1b5a gh-137128: Remove outdated todo about coro_fns in asyncio (#137385) 2025-08-04 16:44:29 +00:00
Serhiy Storchaka 1612dcbafe gh-137341: Remove more word duplications (GH-137342) 2025-08-03 19:41:12 +03:00
Justin Bronder e3ea861351 gh-135444: fix asyncio.DatagramTransport.sendto to account for datagram header size when data cannot be sent (#135445)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-07-30 23:41:28 +05:30
Raymond Hettinger ea06ae5b5e Fix Queue.shutdown docs for condition to unblock a join (gh-137088) 2025-07-25 07:56:28 -06:00
Raymond Hettinger 245671555b Fix docs for Queue.shutdown (gh-137028) 2025-07-24 11:23:03 -06:00
Justin Su 77fa7a4dcc gh-136447: Use self.loop instead of global loop variable in asyncio REPL (#136448) 2025-07-09 14:27:20 +05:30
Jelle Zijlstra 797abd1f7f gh-134657: Remove newly added private names from asyncio.__all__ (#134665) 2025-07-09 13:25:46 +05:30
Serhiy Storchaka 9084b15156 gh-135836: Fix IndexError in asyncio.create_connection() (#135875) 2025-07-03 09:38:39 +05:30
heliang666s 0e19db653d gh-135836: Fix IndexError in asyncio.create_connection with empty exceptions list (#135845)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-07-01 11:50:11 +00:00
Pablo Galindo Salgado 028309fb47 gh-135371: Fix asyncio introspection output to include internal coroutine chains (#135436) 2025-06-14 13:48:25 +01:00
Pablo Galindo Salgado 42b25ad4d3 gh-91048: Refactor and optimize remote debugging module (#134652)
Completely refactor Modules/_remote_debugging_module.c with improved
code organization, replacing scattered reference counting and error
handling with centralized goto error paths. This cleanup improves
maintainability and reduces code duplication throughout the module while
preserving the same external API.

Implement memory page caching optimization in Python/remote_debug.h to
avoid repeated reads of the same memory regions during debugging
operations. The cache stores previously read memory pages and reuses
them for subsequent reads, significantly reducing system calls and
improving performance.

Add code object caching mechanism with a new code_object_generation
field in the interpreter state that tracks when code object caches need
invalidation. This allows efficient reuse of parsed code object metadata
and eliminates redundant processing of the same code objects across
debugging sessions.

Optimize memory operations by replacing multiple individual structure
copies with single bulk reads for the same data structures. This reduces
the number of memory operations and system calls required to gather
debugging information from the target process.

Update Makefile.pre.in to include Python/remote_debug.h in the headers
list, ensuring that changes to the remote debugging header force proper
recompilation of dependent modules and maintain build consistency across
the codebase.

Also, make the module compatible with the free threading build as an extra :)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-25 20:19:29 +00:00
Evgeny Demchenko f9324cb3cb gh-134451: Converted asyncio.tools.CycleFoundException from dataclass to a regular exception type. (#134513) 2025-05-23 05:15:21 +00:00
Kumar Aditya 5804ee7b46 gh-114177: avoid calling connection lost callbacks when loop is already closed in asyncio subprocess (#134508) 2025-05-23 10:03:16 +05:30
Christian Harries 109f7597d2 gh-90871: fix connection backlog offset in asyncio (gh-134392)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-21 15:59:09 +02:00
Christian Harries f695eca60c gh-86802: Fix asyncio memory leak; shielded task exceptions log once through the exception handler (gh-134331)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-20 17:14:27 +02:00
J. Nick Koston 53da1e8c8c gh-134173: optimize state transfer between concurrent.futures.Future and asyncio.Future (#134174)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-18 21:26:20 +05:30
Sebastian Rittau 1d3eacedb8 gh-133893: asyncio.graph: Replace TextIO annotation with io.Writer (#133894) 2025-05-11 17:59:56 +03:00
Łukasz Langa 60cdd800d9 gh-91048: Add filename:line_no information to asyncio pstree (#133478) 2025-05-05 23:07:33 +00:00
Łukasz Langa f610bbdf74 gh-133346: Make theming support in _colorize extensible (GH-133347)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-05-05 23:45:25 +02:00
Thomas Grainger 08d7687094 gh-128307: Support eager_start=<bool> in create_eager_task_factory and various create_task functions (#128306)
Some create_task() functions were changed from `name=None, context=None` to `**kwargs`.

Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2025-05-05 04:58:07 +00:00
Adam Turner 3f80165a26 GH-91048: Minor fixes for `_remotedebugging & rename to _remote_debugging` (#133398) 2025-05-05 02:30:14 +02:00
Pablo Galindo Salgado 3109c47be8 gh-91048: Add filename and line number to external inspection routines (GH-133385)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2025-05-04 23:33:37 +02:00