-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
gh-81682: Fix test failures when CPython is built without docstrings #113410
gh-81682: Fix test failures when CPython is built without docstrings #113410
Conversation
serhiy-storchaka
commented
Dec 22, 2023
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: Test failures when CPython is built without docstrings #81682
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG. I'm guessing you're on a spree of closing out old tickets? Don't let my comments distract you, this could be merge right now.
self.assertIn('inside coroutine', ct.close.__doc__) | ||
self.assertIn('in coroutine', ct.throw.__doc__) | ||
self.assertIn('of the coroutine', ct.__dict__['__name__'].__doc__) | ||
self.assertIn('of the coroutine', ct.__dict__['__qualname__'].__doc__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR to change, but this seems a rather silly test -- it tests that the methods have certain text in their docstrings. I'm curious why that needs to be a test...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was added in 5376ba9 (bpo-24400/#68588) which introduced a distinct type for 'async def' coroutines. I guess it was the simplest way to check that these methods and data descriptors belong to the coroutine type and not inherited from the generator type. It could check the __objclass__
attribute instead.
I am planning to add signatures for all builtins, so docstrings of coroutine methods will change in the nearest future (they may already be changed in my branch).
Kind of. I'm clearing my debts -- PRs that I was requested to review or was reviewed, but which for some reasons were not closed yet. |
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Sorry, @serhiy-storchaka, I could not cleanly backport this to
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to
|
…t docstrings (pythonGH-113410) (cherry picked from commit 4e5b27e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
GH-113429 is a backport of this pull request to the 3.12 branch. |
…t docstrings (pythonGH-113410) (cherry picked from commit 4e5b27e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
GH-113430 is a backport of this pull request to the 3.11 branch. |