-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scan_module(): ValueError: bad marshal data (unknown type code) #1257
Comments
See #1263. |
Release on v38.4.1 pending... |
Fix nigthly failing see pypa/setuptools#1257
Same problem occurred w/ Python 3.7.0a4+ on Travis CI (reported as: travis-ci/travis-ci#9181), probably w/o the fix. |
@smagafurov : did you update setuptools? |
setuptools (38.5.1) |
@smagafurov: I'm sorry but I don't see the setuptools' update in your Travis log and the traceback line numbers don't match 38.5.1. Can you add a call to |
@benoit-pierre: I repeat this problem locally
|
@benoit-pierre: How to repeat:
|
I can't reproduce the issue: > git clone https://github.com/aio-libs/aiopg.git
Cloning into 'aiopg'...
remote: Counting objects: 3267, done.
remote: Total 3267 (delta 0), reused 0 (delta 0), pack-reused 3267
Receiving objects: 100% (3267/3267), 666.68 KiB | 2.22 MiB/s, done.
Resolving deltas: 100% (2151/2151), done.
> cd aiopg
> python3.7 -m venv venv
> ./venv/bin/python --version
Python 3.7.0a4
> ./venv/bin/pip install -U pip wheel setuptools
Requirement already up-to-date: pip in ./venv/lib/python3.7/site-packages
Collecting wheel
Using cached wheel-0.30.0-py2.py3-none-any.whl
Collecting setuptools
Using cached setuptools-38.5.1-py2.py3-none-any.whl
Installing collected packages: wheel, setuptools
Found existing installation: setuptools 28.8.0
Uninstalling setuptools-28.8.0:
Successfully uninstalled setuptools-28.8.0
Successfully installed setuptools-38.5.1 wheel-0.30.0
> ./venv/bin/python setup.py -q bdist_egg
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'tests/**'
File "build/bdist.linux-x86_64/egg/aiopg/utils.py", line 18
ensure_future = asyncio.async
^
SyntaxError: invalid syntax
File "build/bdist.linux-x86_64/egg/aiopg/connection.py", line 109
self._conn = psycopg2.connect(dsn, async=True, **kwargs)
^
SyntaxError: invalid syntax
zip_safe flag not set; analyzing archive contents... |
And setuptools' master is still ok on Travis with nightly. |
@benoit-pierre: |'m sorry. Please clone this instead:
I am trying to add python3.7 support to 'aio-libs/aiopg.git' |
I don't think the clone URL matters (works fine with either one). Can you patch setuptools/command/bdist_egg.py | 1 +
1 file changed, 1 insertion(+)
diff --git i/setuptools/command/bdist_egg.py w/setuptools/command/bdist_egg.py
index 423b8187..a66b03c7 100644
--- i/setuptools/command/bdist_egg.py
+++ w/setuptools/command/bdist_egg.py
@@ -417,6 +417,7 @@ def scan_module(egg_dir, base, name, stubs):
skip = 12 # skip magic & date & file size
else:
skip = 16 # skip magic & reserved? & date & file size
+ print(sys.version_info, skip)
f = open(filename, 'rb')
f.read(skip)
code = marshal.load(f) |
sys.version_info(major=3, minor=7, micro=0, releaselevel='alpha', serial=3) 16 |
|
clone URL matters because I fix python3.7 syntax error here 'smagafurov/aiopg.git' |
That's another issue, irelevant to the setuptools issue. |
The first version that implemented PEP 552 was v3.7.0a4. elif sys.version_info < (3, 7): |
That's what I was thinking, thanks for confirming. |
this works for me elif sys.version_info < (3, 7, 0, 'alpha', 4): |
I'm not sure it make sense to explicitely test for 3.7.0a4: if you're running with nightly, then problems are to be expected, and you're also expected to keep current, no? What I don't understand is why it fails on Travis, or is it another hole in our testsuite? |
@smagafurov: just to be clear, to fix your issues you should:
|
@smagafurov: https://travis-ci.org/benoit-pierre/aiopg/jobs/341442846 I'm also confused by the fact that |
@benoit-pierre: Thank! Updating setuptools in Travis fixes the problem. |
setuptools on Travis doesn't support Python 3.7 yet see pypa/setuptools#1257
Because of travis-ci/travis-ci#9181 resp. pypa/setuptools#1257
Nevermind, it was an issue with the source release I downloaded containing pre-existing .pyc files. |
2021-12-28 12:47:12.020620: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found |
This happens with CPython from git master (e768c86ef442ef89004089a8a34ce5909ffb90f2):
I believe this is because PEP 552 has been implemented, which adds extra 4 bytes to the .pyc header; but setuptools is not aware of that yet.
The text was updated successfully, but these errors were encountered: