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.

classification
Title: Positional-only arguments break super()
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ncoghlan, pablogsal, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2019-05-31 08:27 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pep570super.py serhiy.storchaka, 2019-05-31 08:27
Pull Requests
URL Status Linked Edit
PR 13695 merged pablogsal, 2019-05-31 10:42
Messages (3)
msg344034 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-05-31 08:27
See the example pep570super.py. super() without arguments does not work for positional-only arguments.

Traceback (most recent call last):
  File "pep570super.py", line 13, in <module>
    print(C())
  File "pep570super.py", line 10, in __new__
    return super().__new__(cls)
RuntimeError: super(): no arguments
msg344062 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-05-31 11:07
New changeset 3a46d5c293d39995dc5218bf46a7d92b16fb2a15 by Pablo Galindo in branch 'master':
bpo-37108: Support super with methods that use positional-only arguments (GH-13695)
https://github.com/python/cpython/commit/3a46d5c293d39995dc5218bf46a7d92b16fb2a15
msg344063 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-05-31 11:08
Thank you very much, Serhiy, for the catch!
History
Date User Action Args
2022-04-11 14:59:16adminsetgithub: 81289
2019-05-31 11:08:42pablogsalsetstatus: open -> closed
resolution: fixed
messages: + msg344063

stage: patch review -> resolved
2019-05-31 11:07:59pablogsalsetmessages: + msg344062
2019-05-31 10:42:59pablogsalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request13581
2019-05-31 08:27:50serhiy.storchakacreate