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

Unstubbing constructors in Python3 breaks class #33

Open
GraylinKim opened this issue Dec 17, 2017 · 0 comments
Open

Unstubbing constructors in Python3 breaks class #33

GraylinKim opened this issue Dec 17, 2017 · 0 comments

Comments

@GraylinKim
Copy link
Member

The constructor stubbing implementation works by hotswapping the __new__ magic function. Dynamically assigning __new__ is broken as of Python3.5 Issue 25731.

I have been able to work around this by providing my own __new__ implementation instead of falling back to object.__new__.

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

No branches or pull requests

1 participant