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

Add support for Python 3.8. #161

Merged
merged 12 commits into from
Jan 8, 2020
Merged

Add support for Python 3.8. #161

merged 12 commits into from
Jan 8, 2020

Conversation

dhermes
Copy link
Owner

@dhermes dhermes commented Jan 7, 2020

No description provided.

In particular, the latest version of NumPy **is** compatible with
PyPy 3. The move was spurred on by the absence of NumPy wheels for
Python 3.8 in 1.17.0 (while building the `dhermes/bezier` image).
@dhermes
Copy link
Owner Author

dhermes commented Jan 7, 2020

Relevant for removal of m (i.e. 38m -> 38 in .so files): https://bugs.python.org/issue36707

On macOS:

>>> distutils.sysconfig.get_config_var("EXT_SUFFIX")
'.cpython-37m-darwin.so'
>>> distutils.sysconfig.get_config_var("EXT_SUFFIX")
'.cpython-38-darwin.so'

@dhermes
Copy link
Owner Author

dhermes commented Jan 7, 2020

As part of this process I tried many pairs of numpy and scipy versions in PyPy:

scipy | numpy  | success
------+--------+--------
1.4.1 | 1.18.1 |    N
1.4.0 | 1.15.0 |    N
1.4.1 | 1.15.0 |    N
1.4.1 | 1.17.5 |    N
1.3.3 | 1.15.0 |    Y
1.3.3 | 1.17.5 |    Y
1.3.3 | 1.18.1 |    Y

This seems to contradict the SciPy 1.3.0 release notes

For running on PyPy, PyPy3 6.0+ and NumPy 1.15.0 are required.

and the 1.4.0 release notes

For running on PyPy, PyPy3 6.0+ and NumPy 1.15.0 are required.

Every time there was an error it was of the form

...
  ERROR: Failed building wheel for scipy
  Running setup.py clean for scipy
  ERROR: Command errored out with exit status 1:
   command: /pypy3-env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-b1wdrah7/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-b1wdrah7/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
       cwd: /tmp/pip-wheel-b1wdrah7/scipy
  Complete output (11 lines):
  /pypy3-env/lib-python/3/importlib/_bootstrap.py:219: UserWarning: builtins.type size changed, may indicate binary incompatibility. Expected 872, got 416
    return f(*args, **kwds)
...

UPDATE: One suggested fix for this issue is to just ignore the warning. The pypy-fix-cython-warning package on PyPI is written for Python 2, but for Python 3 we can do the same thing

echo "import warnings; warnings.filterwarnings('ignore', 'builtins.type size changed, may indicate binary incompatibility. Expected .*, got .*')" \
  > .../site-packages/pypy-fix-cython-warning.pth

but I haven't (yet) been able to get this work.

@dhermes dhermes merged commit 871699a into master Jan 8, 2020
@dhermes dhermes deleted the support-3.8 branch January 8, 2020 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant