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.
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