forked from pynamodb/PynamoDB
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
5e125a1
commit 8d58d2e
Showing
49 changed files
with
1,118 additions
and
2,017 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
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 |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
""" | ||
__author__ = 'Jharrod LaFon' | ||
__license__ = 'MIT' | ||
__version__ = '4.3.3' | ||
__version__ = '5.0.0b1' |
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,33 +1,6 @@ | ||
import six | ||
import sys | ||
from typing import Generic, TYPE_CHECKING | ||
|
||
if six.PY2: | ||
from inspect import getargspec as getfullargspec | ||
if TYPE_CHECKING: | ||
GenericMeta = type # to avoid dynamic base class | ||
else: | ||
from inspect import getfullargspec | ||
|
||
|
||
class FakeGenericMeta(type): | ||
"""Poor man's Generic[T] that doesn't depend on typing. The real generics are in the type stubs.""" | ||
def __getitem__(self, item): | ||
return self | ||
|
||
|
||
def load_module(name, path): | ||
"""Load module using the Python version compatible function.""" | ||
if sys.version_info >= (3, 3): | ||
from importlib.machinery import SourceFileLoader | ||
|
||
# Typeshed is incorrect in requiring a string arg to `load_module`, | ||
# as this works with no args or a None arg. | ||
# Even `load_module` is now deprecated, so we should update to just | ||
# using the following approach in >= python 3.5: | ||
# https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly | ||
loader = SourceFileLoader(name, path) | ||
return loader.load_module() # type: ignore | ||
else: | ||
from imp import load_source | ||
return load_source(name, path) | ||
|
||
|
||
__all__ = ('getfullargspec', 'FakeGenericMeta', 'load_module') | ||
GenericMeta = type(Generic) |
Oops, something went wrong.