KEMBAR78
gh-120388: Improve deprecation warning message, when test returns non-None by sobolevn · Pull Request #120401 · python/cpython · GitHub
Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented Jun 12, 2024

New message:

DeprecationWarning: It is deprecated to return a value that is not None, got: (<class 'coroutine'>) from a test case (<bound method TestSpecial.test_some of <test.test_enum.TestSpecial testMethod=test_some>>); a coroutine is returned, maybe you forgot to use IsolatedAsyncioTestCase base class?
  return self.run(*args, **kwds)

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Looks great to me, thanks!

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@sobolevn sobolevn enabled auto-merge (squash) June 12, 2024 14:14
@sobolevn sobolevn merged commit fabcf6b into python:main Jun 12, 2024
@serhiy-storchaka
Copy link
Member

Thanks, @sobolevn.

mrahtz pushed a commit to mrahtz/cpython that referenced this pull request Jun 30, 2024
…ns non-None (python#120401)

Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
…ns non-None (python#120401)

Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…ns non-None (python#120401)

Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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.

4 participants