Skip to content

gh-81989: Deprecate passing a single argument to super()#15205

Open
ZackerySpytz wants to merge 1 commit intopython:mainfrom
ZackerySpytz:bpo-37808-super-single-arg
Open

gh-81989: Deprecate passing a single argument to super()#15205
ZackerySpytz wants to merge 1 commit intopython:mainfrom
ZackerySpytz:bpo-37808-super-single-arg

Conversation

@ZackerySpytz
Copy link
Copy Markdown
Contributor

@ZackerySpytz ZackerySpytz commented Aug 11, 2019

:func:`super`, see `guide to using super()
<https://rhettinger.wordpress.com/2011/05/26/super-considered-super/>`_.

.. deprecated:: 3.9
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also mention that it's deprecated earlier on in the file where it says "If the second argument is omitted, the super object returned is unbound."?


if (PyTuple_GET_SIZE(args) == 1 &&
PyErr_WarnEx(PyExc_DeprecationWarning,
"Passing 1 argument to super() is deprecated", 1) < 0) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Passing a single argument" might sound better / be more consistent with the rest of the wording, for the deprecation message, too.

@matrixise matrixise self-assigned this Sep 14, 2019
@matrixise matrixise removed their assignment Feb 17, 2020
@erlend-aasland erlend-aasland changed the title bpo-37808: Deprecate passing a single argument to super() gh-81989: Deprecate passing a single argument to super() Jan 5, 2024
@Ri-yaB

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants