Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-127949: deprecate asyncio.set_event_loop #128218

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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 24, 2024
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
Prev Previous commit
add test
  • Loading branch information
kumaraditya303 committed Dec 24, 2024
commit 962bd63998fbc37cf42f7b8bcaebbb839f9744ae
8 changes: 8 additions & 0 deletions 8 Lib/test/test_asyncio/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -2695,6 +2695,14 @@ async def inner():

class PolicyTests(unittest.TestCase):

def test_asyncio_set_event_loop_deprecation(self):
with self.assertWarnsRegex(
DeprecationWarning, "'asyncio.set_event_loop' is deprecated"):
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
self.assertIs(loop, asyncio.get_event_loop())
loop.close()

def test_abstract_event_loop_policy_deprecation(self):
with self.assertWarnsRegex(
DeprecationWarning, "'asyncio.AbstractEventLoopPolicy' is deprecated"):
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.