bpo-31567: Use decorator markup for staticmethod()/classmethod()#3959
Conversation
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
34cd57a to
8c8e4b4
Compare
October 12, 2017 02:30
|
I have made the requested changes; please review again. Removed "(function)" for both classmethod and staticmethod. Since the following explanations points to the name "function" in the arg, I modified the description too (I mimicked the line in @functools.singledispatch) https://docs.python.org/3.6/library/functools.html#functools.singledispatch
|
Sorry, something went wrong.
|
Thanks for making the requested changes! @merwok: please review the changes made to this pull request. |
Sorry, something went wrong.
Use command form like in docstrings
|
Thanks! Sphinx docs for the reference: http://www.sphinx-doc.org/en/1.6.4/domains.html#directive-py:decorator I found three misuses of the markup (including singledispatch!) which I will fix in this PR, given that the original ticket was not only about staticmethod and classmethod. |
Sorry, something went wrong.
|
I wasn’t able to push my commit to your fork (I expected that to be possible given that I could add a commit within github), and I can’t find your fork in the widget to create cross-forks PRs. https://help.github.com/articles/committing-changes-to-a-pull-request-branch-created-from-a-fork/ |
Sorry, something went wrong.
|
Sorry I'm not sure what is going on... I can see you actually added some changes in my PR, I I understand you can add more commits here "Allow edits from maintainers" check in this page looks already on. |
Sorry, something went wrong.
|
Yes that’s the one in created from github. I made another commit on my laptop and can’t push it to your fork or make a PR: merwok@59bc4a7 |
Sorry, something went wrong.
fix decorator markup
|
Tried merging the change in merwok/cpython to dmiyakawa/cpython. |
Sorry, something went wrong.
|
Thanks @dmiyakawa for the PR, and @merwok for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6. |
Sorry, something went wrong.
(cherry picked from commit 0e61e67)
|
Sorry, @dmiyakawa and @merwok, I could not cleanly backport this to |
Sorry, something went wrong.
|
I’ll leave 2.7 alone, nothing already uses the decorator markup (maybe it’s not even supported in the sphinx version used by 2.7). |
Sorry, something went wrong.
|
FTR I think the push issue was due to using an https URL for your fork rather than ssh! |
Sorry, something went wrong.
staticmethod() and classmethod() are expected to be used with decorator, so documentation should mention it.
https://bugs.python.org/issue31567