Skip to content
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

changed warning raised by async def to error #12346

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

polkapolka
Copy link

No description provided.

Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

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

👋 Hi Phebe! This looks good to me overall - three things to do:

  1. Moving the exception definition, as below
  2. Doing the various TODOs in comments
  3. Edit the top comment to link to the issue for awareness and auto-closing, and briefly describe the issue.

Comment on lines -1 to 2
from typing import final


@final
class UsageError(Exception):
"""Error in pytest usage or invocation."""
Copy link
Member

Choose a reason for hiding this comment

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

Let's try to keep this - define PytestUnhandledCoroutineError in this file, and then do UsageError = final(UsageError) below that to keep the runtime effect.

@nicoddemus
Copy link
Member

Hi folks,

Sorry why is this being done? Is there an issue related to it?

@Zac-HD
Copy link
Member

Zac-HD commented May 22, 2024

Suggested in #11372 🙂

(and we're at the PyCon US sprints, so most communication about this has been verbal instead of online)

@nicoddemus
Copy link
Member

Ahh OK, no worries, thanks @Zac-HD!

If possible it helps adding the issue number in the PR description for context. 👍

Sign up for free to 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