Skip to content
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

RuntimeWarning on Python 3.8 #348

Closed
Harmon758 opened this issue May 21, 2019 · 4 comments
Closed

RuntimeWarning on Python 3.8 #348

Harmon758 opened this issue May 21, 2019 · 4 comments

Comments

@Harmon758
Copy link
Member

Harmon758 commented May 21, 2019

Description
Attempting to import multidict using Python 3.8.0a4 3.8.0b1 raises a SystemError 3.8.0b2 causes a RuntimeWarning to occur.

Reproduction Steps

  1. Use Python 3.8.0a4 3.8.0b1 3.8.0b2
  2. import multidict
  3. Observe traceback warning

Expected Behavior
Successful import
No warning

Traceback

>>> import multidict
<frozen importlib._bootstrap>:219: RuntimeWarning: builtins.type size changed, may indicate binary incompatibility. Expected 864 from C header, got 880 from PyObject

Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\Python38\lib\site-packages\multidict_init_.py", line 23, in
from ._multidict import (MultiDictProxy,
SystemError: c:_work\14\s\objects\codeobject.c:131: bad argument to internal function

Python Version
Python 3.8.0a4 (v3.8.0a4:c1004b8546, May 7 2019, 13:53:12) [MSC v.1916 64 bit (AMD64)] on win32
Python 3.8.0b1 (tags/v3.8.0b1:3b5deb0116, Jun 4 2019, 19:52:55) [MSC v.1916 64 bit (AMD64)] on win32
Python 3.8.0b2 (tags/v3.8.0b2:21dd01d, Jul 4 2019, 16:00:09) [MSC v.1916 64 bit (AMD64)] on win32

multidict Version
multidict 4.5.2

Additional Context
This seems to be caused by changes to PyCode_New as part of the implementation of PEP 570:
python/cpython@8c77b8c#diff-e3862c228cffe90385cf9f14529868fe (python/cpython#12701)

bpo-37221 has reverted PyCode_New to be a backwards compatible wrapper for a new PyCode_NewEx with python/cpython@cb083f7 (python/cpython#13959, python/cpython#14505).
The handling for this change was added in Cython 0.29.11 with cython/cython@9b6a02f (cython/cython#3009) and fixed in Cython 0.29.12 with cython/cython@0d88839 (cython/cython#3031, cython/cython#3034).

Updating to Cython 0.29.12 should now resolve this issue.

@asvetlov
Copy link
Member

Thanks for the report!

@webknjaz
Copy link
Member

Looks like Cython 0.29.12 fixes it.

@Harmon758 Harmon758 changed the title SystemError on Python 3.8 RuntimeWarning on Python 3.8 Jul 25, 2019
@Harmon758
Copy link
Member Author

The import succeeds and only a RuntimeWarning occurs now with Python 3.8.0b2.
Cython 0.29.12 should resolve that issue (as well as the SystemError with Python 3.8.0a4 and 3.8.0b1).
I've updated the issue accordingly.

@webknjaz
Copy link
Member

Solved by #355.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants