-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
65 additions
and
73 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
import six | ||
# copied from Python 2.7 source code as plone testing uses __bases__ | ||
def _searchbases(cls, accum): | ||
# Simulate the "classic class" search order. | ||
if cls in accum: | ||
return | ||
accum.append(cls) | ||
for base in cls.__bases__: | ||
_searchbases(base, accum) | ||
|
||
|
||
if six.PY2: | ||
from inspect import getmro | ||
else: | ||
# copied from Python 2.7 source code as plone testing uses __bases__ | ||
def _searchbases(cls, accum): | ||
# Simulate the "classic class" search order. | ||
if cls in accum: | ||
return | ||
accum.append(cls) | ||
for base in cls.__bases__: | ||
_searchbases(base, accum) | ||
|
||
def getmro(cls): | ||
"Return tuple of base classes in method resolution order." | ||
if hasattr(cls, "__mro__"): | ||
return cls.__mro__ | ||
else: | ||
result = [] | ||
_searchbases(cls, result) | ||
return tuple(result) | ||
def getmro(cls): | ||
"Return tuple of base classes in method resolution order." | ||
if hasattr(cls, "__mro__"): | ||
return cls.__mro__ | ||
else: | ||
result = [] | ||
_searchbases(cls, result) | ||
return tuple(result) |
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
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