-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Preserve metaclass when slots=True #155
Conversation
fyi the tests fail on py2/pypy2 |
Sorry, doubt I can fix the new test, without bringing analog of |
Hm. Can we bring in six as a test dependency? |
I don’t mind. I don't want runtime deps to check for PY3 but reimplementing metaclass magic just for tests seems like a bridge too far. |
Codecov Report
@@ Coverage Diff @@
## master #155 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 8 8
Lines 551 551
Branches 122 122
=====================================
Hits 551 551
Continue to review full report at Codecov.
|
Tin please take this; I have willfully forgotten everything I ever knew about meta classes. |
Sure thing. I'm sick atm though so it'll have to wait a little |
Get well soon! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It's a simple change, instead of assuming the metaclass of the class we're changing is type
, first fetch the metaclass with the type()
builtin, then use that.
The docs are failing because of the logo (Warning, treated as error:
CHANGELOG.rst:None: WARNING: nonlocal image URI found: https://attrs.readthedocs.io/en/latest/_static/attrs_logo.png), so it's unrelated.
I’ve updated the branch and it passes now. Thanks for the input and I hope you feel better! |
Fixes #154