Skip to content

Requiring metaclass attribute breaks a lot of code #594

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

Closed
pschella opened this issue Jan 5, 2017 · 1 comment · Fixed by #679
Closed

Requiring metaclass attribute breaks a lot of code #594

pschella opened this issue Jan 5, 2017 · 1 comment · Fixed by #679

Comments

@pschella
Copy link
Contributor

pschella commented Jan 5, 2017

I'm sorry to not have caught this earlier, but I'm really not happy with the change to require py::metaclass() whenever a static property is used.
For very large codebases like ours, where many many classes have static properties this causes unnecessary breakage. Is there any way this can be avoided now or in the future?

@wjakob
Copy link
Member

wjakob commented Jan 5, 2017

No, sorry -- v2.0.0 is out, and it's too late to complain ;).

We need to break compatibility occasionally (with a corresponding increase of the major number according to semver). In this case it was necessary to do so for compatibility with PyPy.

You could implement an alternative py::class_<> wrapper that always passes py::metaclass, though this means that some memory will be wasted.

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 a pull request may close this issue.

2 participants