Skip to content
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

Add an abstactmethod directive to the Python ReST domain #65439

Closed
ericsnowcurrently opened this issue Apr 15, 2014 · 6 comments
Closed

Add an abstactmethod directive to the Python ReST domain #65439

ericsnowcurrently opened this issue Apr 15, 2014 · 6 comments
Assignees
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@ericsnowcurrently
Copy link
Member

BPO 21240
Nosy @brettcannon, @birkenfeld, @merwok, @ericsnowcurrently, @berkerpeksag
Files
  • issue21240.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/berkerpeksag'
    closed_at = <Date 2015-12-08.10:21:14.366>
    created_at = <Date 2014-04-15.15:57:26.410>
    labels = ['type-feature', 'docs']
    title = 'Add an abstactmethod directive to the Python ReST domain'
    updated_at = <Date 2015-12-08.10:21:14.363>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2015-12-08.10:21:14.363>
    actor = 'berker.peksag'
    assignee = 'berker.peksag'
    closed = True
    closed_date = <Date 2015-12-08.10:21:14.366>
    closer = 'berker.peksag'
    components = ['Documentation']
    creation = <Date 2014-04-15.15:57:26.410>
    creator = 'eric.snow'
    dependencies = []
    files = ['34920']
    hgrepos = []
    issue_num = 21240
    keywords = ['patch']
    message_count = 6.0
    messages = ['216323', '216555', '216660', '255902', '256109', '256110']
    nosy_count = 7.0
    nosy_names = ['brett.cannon', 'georg.brandl', 'eric.araujo', 'docs@python', 'python-dev', 'eric.snow', 'berker.peksag']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue21240'
    versions = ['Python 3.5', 'Python 3.6']

    @ericsnowcurrently
    Copy link
    Member Author

    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.)

    @ericsnowcurrently ericsnowcurrently added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Apr 15, 2014
    @berkerpeksag
    Copy link
    Member

    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.

    @birkenfeld
    Copy link
    Member

    LGTM without having tested it.

    @brettcannon
    Copy link
    Member

    Are you willing to check this in, Berker? Or is it not needed anymore?

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 8, 2015

    New changeset 1d0d8b27a4e6 by Berker Peksag in branch '3.5':
    Issue bpo-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 bpo-21240: Add an abstractmethod directive to mark abstract methods in the docs more explicitly
    https://hg.python.org/cpython/rev/84468e1aea61

    @berkerpeksag
    Copy link
    Member

    Thanks for reminding me of this issue, Brett. I have also updated numbers and selectors docs to use the new directive.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants