Skip to content

Conversation

@iritkatriel
Copy link
Member

@iritkatrieliritkatriel commented Apr 5, 2023

Now that 3.10 is no longer getting bugfixes, we can use sys.exception() without worrying about it impacting bugfix backports (it exists since 3.11).

This PR does the tests.

Copy link
Member

@gvanrossumgvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, no need to wait for another approval after you fix it.

timed_out
andtask.uncancel() ==0
andsys.exc_info()[0] isasyncio.CancelledError
andisinstance(sys.exception(), asyncio.CancelledError)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add the isinstance() call? The original test insists that you get exactlyCancelledError. I think that's useful to test for, since not all cancellation code is resilient to subclasses of CancelledError.

(In other cases below I don't mind.)

@iritkatrieliritkatriel merged commit 482b6ee into python:mainApr 6, 2023
warsaw pushed a commit to warsaw/cpython that referenced this pull request Apr 11, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@iritkatriel@gvanrossum@bedevere-bot