This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Incorrectly pluralized abstract class error message
Type: behavior Stage: resolved
Components: Interpreter Core, Library (Lib) Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: CuriousLearner, bansalanjali, eric.smith, matrixise, ppperry, rhettinger, serhiy.storchaka, terry.reedy, xtreak
Priority: normal Keywords: patch

Created on 2018-08-03 15:56 by ppperry, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8670 merged Daniel.Andrade.Groppe, 2018-08-04 07:51
Messages (7)
msg323059 - (view) Author: (ppperry) Date: 2018-08-03 15:56
>>> 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.
msg323071 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2018-08-03 20:41
I'm not sure the effort and code is justified for a trivial fix to an error message. Is this causing some actual problem?
msg323072 - (view) Author: (ppperry) Date: 2018-08-03 20:46
No, this isn't causing me an actual problem, however the related issue34127 was accepted, and this one should be no harder to fix.
msg323088 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2018-08-03 22:08
Actually, this one is probably easier to fix. In my opinion, #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.
msg349310 - (view) Author: Sanyam Khurana (CuriousLearner) * (Python triager) Date: 2019-08-09 19:32
Adding 3.9 to this bug. I've reviewed the PR and it looks good to me.
msg351942 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-09-11 15:29
New changeset 4a12a178f4a6b9a59d97fecc727f2b6b28dfc85f by Stéphane Wirtel (Daniel Andrade) in branch 'master':
bpo-34331: Fix incorrectly pluralized abstract class error message. (GH-8670)
msg351944 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-09-11 15:30
Thank you for your contribution
Date User Action Args
2022-04-11 14:59:04adminsetgithub: 78512
2019-09-11 15:30:39matrixisesetstatus: open -> closed
versions: - Python 3.8
messages: + msg351944

resolution: fixed
stage: patch review -> resolved
2019-09-11 15:29:47matrixisesetnosy: + matrixise
messages: + msg351942
2019-08-09 19:32:50CuriousLearnersetnosy: + CuriousLearner

messages: + msg349310
versions: + Python 3.9
2018-08-04 07:51:47Daniel.Andrade.Groppesetkeywords: + patch
stage: patch review
pull_requests: + pull_request8162
2018-08-03 22:08:26eric.smithsetmessages: + msg323088
2018-08-03 20:46:59ppperrysetmessages: + msg323072
2018-08-03 20:41:07eric.smithsettype: behavior

messages: + msg323071
nosy: + eric.smith
2018-08-03 15:56:31ppperrycreate