Skip to content

Added type to __get__ call to prevent some c modules from segfaulting. #225

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

Merged

Conversation

bakkerthehacker
Copy link
Contributor

Fixes #223

@bakkerthehacker
Copy link
Contributor Author

Passing in an additional type is documented as the way that descriptors are normally invoked. The second type argument is always present when calling the property from super.

From the 2.7 docs on descriptors:

The call super(B, obj).m() searches obj.__class__.__mro__ for the base class A immediately following B and then returns A.__dict__['m'].__get__(obj, B).

This is really the only issue blocking me from using the backported super throughout my codebase.

@edschofield edschofield merged commit a254f06 into PythonCharmers:master May 6, 2017
@edschofield
Copy link
Contributor

Thanks for your patch, Grant!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants