diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-02-03 09:23:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-03 09:23:35 -0500 |
commit | b93956652eb8112c2ba94ac7e5120969a8b8a523 (patch) | |
tree | 8e6f9b840a34f4e683e6a9a4594a73fe38457911 /setuptools | |
parent | 69c9a3aacaefbf5f06716350fb88a226920fe51e (diff) | |
parent | 7bf15cb3c8a29545cc4869a4a1c52ac678eba1da (diff) | |
download | external_python_setuptools-b93956652eb8112c2ba94ac7e5120969a8b8a523.tar.gz external_python_setuptools-b93956652eb8112c2ba94ac7e5120969a8b8a523.tar.bz2 external_python_setuptools-b93956652eb8112c2ba94ac7e5120969a8b8a523.zip |
Merge pull request #1263 from benoit-pierre/fix_python37_support
fix Python 3.7 support
Diffstat (limited to 'setuptools')
-rw-r--r-- | setuptools/command/bdist_egg.py | 4 | ||||
-rw-r--r-- | setuptools/tests/test_sandbox.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 5fdb62d9..d222c208 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -409,8 +409,10 @@ def scan_module(egg_dir, base, name, stubs): module = pkg + (pkg and '.' or '') + os.path.splitext(name)[0] if sys.version_info < (3, 3): skip = 8 # skip magic & date - else: + elif sys.version_info < (3, 7): skip = 12 # skip magic & date & file size + else: + skip = 16 # skip magic & reserved? & date & file size f = open(filename, 'rb') f.read(skip) code = marshal.load(f) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index a3f1206d..d8675422 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -75,6 +75,8 @@ class TestExceptionSaver: def test_unpickleable_exception(self): class CantPickleThis(Exception): "This Exception is unpickleable because it's not in globals" + def __repr__(self): + return 'CantPickleThis%r' % (self.args,) with setuptools.sandbox.ExceptionSaver() as saved_exc: raise CantPickleThis('detail') |