-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a fallback for `six.raise_from`, which isn't available in six 1.4.0. It isn't available until six 1.9.0. We could also have raised the lower bound for the six requirement, but this is an easy way to allow clients to keep using their existing versions of six. Fix support for the latest version of six, 1.11.0. That release changed the temporary metaclass returned from `with_metaclass()`, such that it directly inherits from `type`, instead of inheriting from the target metaclass [1]. We depended on this detail, and the change caused .. code-block:: python TypeError('metaclass conflict: ...') to be raised when defining a class with `with_metaclass()`. We fix this by manually selecting the most derived metaclass, and including it in our temporary metaclass. Also, `__prepare__` is now defined on the temporary metaclass, in six 1.11.0 [2]. This allows us to skip our own definition of that method, when using six>=1.11.0. Fixes #228. Fixes #239. [1] <benjaminp/six#191> [2] <benjaminp/six#178>
- Loading branch information
Showing
2 changed files
with
79 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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