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

Update calls to super #1167

Closed
rahulporuri opened this issue Aug 28, 2020 · 1 comment · Fixed by #1604
Closed

Update calls to super #1167

rahulporuri opened this issue Aug 28, 2020 · 1 comment · Fixed by #1604
Labels
priority: low Issues that are not a priority. type: not-important

Comments

@rahulporuri
Copy link
Contributor

super has changed between Python 2 and 3. On 2, super(ClassName, self) was expected but on 3, super() works. These changes are similar to that in traits and envisage enthought/traits#1280. Please use the regex mentioned in the traits PR to automated to search and replace - instead of making these changes by hand, manually.

@rahulporuri rahulporuri added type: not-important priority: low Issues that are not a priority. labels Aug 28, 2020
@mdickinson
Copy link
Member

Just a note: a little bit of care is required, since historically we have had some instances where the explicit Python-2-version super call refers to something other than the current class in its first argument.

Any such instances are likely broken and need careful examination. But the main point is that there is potential for behaviour change as a result of the regex replacement.

rahulporuri pushed a commit that referenced this issue Apr 26, 2021
Together with #1583, #1587 , #1588 and #1589 , this PR fixes #1167
rahulporuri pushed a commit that referenced this issue Apr 26, 2021
Together with #1583, #1587 , #1588 and #1589 , this PR fixes #1167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low Issues that are not a priority. type: not-important
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants