[issue21240] Add an abstactmethod directive to the Python ReST domain
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
New submission from Eric Snow: I'd like to be able to mark abstract methods in the docs more explicitly and have their presentation in the docs be more obvious. So I'd like to propose "abstractmethod" as a new directive to join the existing ones (classmethod, staticmethod, etc.). (This is motivated by msg216314.) ---------- assignee: docs@python components: Documentation messages: 216323 nosy: docs@python, eric.snow priority: normal severity: normal status: open title: Add an abstactmethod directive to the Python ReST domain type: enhancement versions: Python 3.4, Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21240> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Brett Cannon <brett@python.org>: ---------- nosy: +georg.brandl _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21240> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Berker Peksag added the comment: Here's patch. The new PyAbstractMethod class is basically a subclass of the sphinx.domains.python.PyClassmember class which implements the method, classmethod and staticmethod directives. ---------- keywords: +patch nosy: +berker.peksag stage: -> patch review Added file: http://bugs.python.org/file34920/issue21240.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21240> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Éric Araujo <merwok@netwok.org>: ---------- nosy: +eric.araujo _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21240> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Georg Brandl added the comment: LGTM without having tested it. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21240> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Brett Cannon added the comment: Are you willing to check this in, Berker? Or is it not needed anymore? ---------- assignee: docs@python -> berker.peksag nosy: +brett.cannon _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21240> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Roundup Robot added the comment: New changeset 1d0d8b27a4e6 by Berker Peksag in branch '3.5': Issue #21240: Add an abstractmethod directive to mark abstract methods in the docs more explicitly https://hg.python.org/cpython/rev/1d0d8b27a4e6 New changeset 84468e1aea61 by Berker Peksag in branch 'default': Issue #21240: Add an abstractmethod directive to mark abstract methods in the docs more explicitly https://hg.python.org/cpython/rev/84468e1aea61 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21240> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Berker Peksag added the comment: Thanks for reminding me of this issue, Brett. I have also updated numbers and selectors docs to use the new directive. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21240> _______________________________________
participants (6)
-
Berker Peksag
-
Brett Cannon
-
Eric Snow
-
Georg Brandl
-
Roundup Robot
-
Éric Araujo