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

Incorrectly pluralized abstract class error message #78512

Closed
pppery mannequin opened this issue Aug 3, 2018 · 7 comments
Closed

Incorrectly pluralized abstract class error message #78512

pppery mannequin opened this issue Aug 3, 2018 · 7 comments
Labels
3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@pppery
Copy link
Mannequin

pppery mannequin commented Aug 3, 2018

BPO 34331
Nosy @rhettinger, @terryjreedy, @ericvsmith, @serhiy-storchaka, @matrixise, @pppery, @CuriousLearner, @tirkarthi, @bansalanjali2512
PRs
  • bpo-34331: Fix incorrectly pluralized abstract class error message. #8670
  • 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 = None
    closed_at = <Date 2019-09-11.15:30:39.215>
    created_at = <Date 2018-08-03.15:56:31.694>
    labels = ['interpreter-core', 'type-bug', 'library', '3.9']
    title = 'Incorrectly pluralized abstract class error message'
    updated_at = <Date 2019-09-11.15:30:39.213>
    user = 'https://github.com/pppery'

    bugs.python.org fields:

    activity = <Date 2019-09-11.15:30:39.213>
    actor = 'matrixise'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-09-11.15:30:39.215>
    closer = 'matrixise'
    components = ['Interpreter Core', 'Library (Lib)']
    creation = <Date 2018-08-03.15:56:31.694>
    creator = 'ppperry'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34331
    keywords = ['patch']
    message_count = 7.0
    messages = ['323059', '323071', '323072', '323088', '349310', '351942', '351944']
    nosy_count = 9.0
    nosy_names = ['rhettinger', 'terry.reedy', 'eric.smith', 'serhiy.storchaka', 'matrixise', 'ppperry', 'CuriousLearner', 'xtreak', 'bansalanjali']
    pr_nums = ['8670']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue34331'
    versions = ['Python 3.9']

    @pppery
    Copy link
    Mannequin Author

    pppery mannequin commented Aug 3, 2018

    >>> class abstract(abc.ABC):
    ...     @abc.abstractmethod
    ...     def meth():
    ...         pass
    ...
    >>> x()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: Can't instantiate abstract class x with abstract methods meth

    Error should be "Can't instantiate abstract class abstract with abstract method meth" in the singular, because there is only one abstract method.

    @pppery pppery mannequin added 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) stdlib Python modules in the Lib dir labels Aug 3, 2018
    @ericvsmith
    Copy link
    Member

    I'm not sure the effort and code is justified for a trivial fix to an error message. Is this causing some actual problem?

    @ericvsmith ericvsmith added the type-bug An unexpected behavior, bug, or error label Aug 3, 2018
    @pppery
    Copy link
    Mannequin Author

    pppery mannequin commented Aug 3, 2018

    No, this isn't causing me an actual problem, however the related bpo-34127 was accepted, and this one should be no harder to fix.

    @ericvsmith
    Copy link
    Member

    Actually, this one is probably easier to fix. In my opinion, bpo-34127 is more important to fix, since it's seen much more often than the message about abstract base classes.

    I wouldn't necessarily object to fixing this one, I just personally think it's not worth the hassle.

    @CuriousLearner
    Copy link
    Member

    Adding 3.9 to this bug. I've reviewed the PR and it looks good to me.

    @CuriousLearner CuriousLearner added the 3.9 only security fixes label Aug 9, 2019
    @matrixise
    Copy link
    Member

    New changeset 4a12a17 by Stéphane Wirtel (Daniel Andrade) in branch 'master':
    bpo-34331: Fix incorrectly pluralized abstract class error message. (GH-8670)
    4a12a17

    @matrixise
    Copy link
    Member

    Thank you for your contribution

    @matrixise matrixise removed the 3.8 only security fixes label Sep 11, 2019
    @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
    3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants