8000 gh-121468: Ensure PDB cleans up event loop policies after using asyncio. by freakboy3742 · Pull Request #131388 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-121468: Ensure PDB cleans up event loop policies after using asyncio. #131388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Ensure PDB cleans up event loop policies after using asyncio.
  • Loading branch information
freakboy3742 committed Mar 18, 2025
commit e8ed3a8c55801d72a0cf8e563c7e3f2fd7649d68
5 changes: 5 additions & 0 deletions Lib/test/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import zipapp
import zipfile

from asyncio.events import _set_event_loop_policy
from contextlib import ExitStack, redirect_stdout
from io import StringIO
from test import support
Expand Down Expand Up @@ -41,6 +42,10 @@ def __exit__(self, *exc):
if self.orig_trace:
sys.settrace(self.orig_trace)

# To prevent a warning "test altered the execution environment" if
# asyncio features are used.
_set_event_loop_policy(None)


def test_pdb_displayhook():
"""This tests the custom displayhook for pdb.
Expand Down
Loading
0