Skip to content

gh-142784: Make the asyncio REPL call .close() on the loop - #142785

Merged
kumaraditya303 merged 10 commits into
python:mainfrom
johnslavik:asyncio-repl-close-loop
Dec 18, 2025
Merged

gh-142784: Make the asyncio REPL call .close() on the loop#142785
kumaraditya303 merged 10 commits into
python:mainfrom
johnslavik:asyncio-repl-close-loop

Conversation

@johnslavik

@johnslavikjohnslavik commented Dec 16, 2025

Copy link
Copy Markdown
Member

@johnslavik

Copy link
Copy Markdown
MemberAuthor

I'm happy to have confirmed that this fixes the problem in GH-140288. I'll add a test and we're ready.

@johnslavik

Copy link
Copy Markdown
MemberAuthor

In the meantime -- @graingert, do you think this is the good direction?

Comment threadMisc/NEWS.d/next/Library/2025-12-16-04-39-27.gh-issue-142784.HBGJag.rst Outdated
@johnslavikjohnslavik changed the title gh-142784: Employ asyncio.Runner in the asyncio REPLgh-142784: Make the asyncio REPL call .close() on the loopDec 18, 2025
Comment threadLib/test/test_repl.py Outdated
@johnslavik

Copy link
Copy Markdown
MemberAuthor

@kumaraditya303 I've dropped asyncio.Runner and used .close() only, as discussed.

Comment threadMisc/NEWS.d/next/Library/2025-12-16-04-39-27.gh-issue-142784.HBGJag.rst Outdated
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
@kumaraditya303
kumaraditya303 enabled auto-merge (squash) December 18, 2025 12:31
@kumaraditya303
kumaraditya303 merged commit ddfc155 into python:mainDec 18, 2025
50 checks passed
@johnslavik

Copy link
Copy Markdown
MemberAuthor

@ZeroIntensityneeds backport to 3.13needs backport to 3.14

@ZeroIntensityZeroIntensity added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Dec 18, 2025
@miss-islington-app

Copy link
Copy Markdown

Thanks @johnslavik for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @johnslavik for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 18, 2025
…ythonGH-142785)
(cherry picked from commit ddfc155)
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 18, 2025
…ythonGH-142785)
(cherry picked from commit ddfc155)
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
@bedevere-app

Copy link
Copy Markdown

GH-142932 is a backport of this pull request to the 3.13 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.13 bugs and security fixes label Dec 18, 2025
@bedevere-app

Copy link
Copy Markdown

GH-142933 is a backport of this pull request to the 3.14 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label Dec 18, 2025
kumaraditya303 pushed a commit that referenced this pull request Dec 18, 2025
…H-142785) (#142933)
gh-142784: make the asyncio REPL call `loop.close()` at exit (GH-142785)
(cherry picked from commit ddfc155)
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
kumaraditya303 pushed a commit that referenced this pull request Dec 18, 2025
…H-142785) (#142932)
gh-142784: make the asyncio REPL call `loop.close()` at exit (GH-142785)
(cherry picked from commit ddfc155)
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
cocolato pushed a commit to cocolato/cpython that referenced this pull request Dec 18, 2025
@johnslavik
johnslavik deleted the asyncio-repl-close-loop branch April 20, 2026 23:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@johnslavik@kumaraditya303@ZeroIntensity