Capture and document the caveat about metaclass superclass#168
Closed
jaraco wants to merge 3 commits intobenjaminp:masterfrom
jaraco:issue-127
Closed
Capture and document the caveat about metaclass superclass#168jaraco wants to merge 3 commits intobenjaminp:masterfrom jaraco:issue-127
jaraco wants to merge 3 commits intobenjaminp:masterfrom
jaraco:issue-127
Conversation
embray
reviewed
Sep 20, 2018
| but in the rare case where the parent has a metaclass that is a | ||
| superclass of the metaclass used with the decorator, this approach will | ||
| fail with a TypeError. See `issue 127 | ||
| <https://github.com/benjaminp/six/issues/127>`_ for details. |
Contributor
There was a problem hiding this comment.
👍 I have wondered about this myself. I've never actually encountered the scenario directly but I had considered it. This is worth warning about.
Contributor
Author
|
I've resolved the conflicts in the PR. |
Contributor
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These two commits attempt to better document and communicate the subtle and rare condition where
add_metaclassis not suitable. It doesn't solve #127, but it does at least attempt to help alleviate the mystery and surprise.