gh-81682: Fix test failures when CPython is built without docstrings#113410
gh-81682: Fix test failures when CPython is built without docstrings#113410serhiy-storchaka merged 2 commits intopython:mainfrom
Conversation
gvanrossum
left a comment
There was a problem hiding this comment.
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.
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.
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. |
Uh oh!
There was an error while loading. Please reload this page.