fatiando / boule

Reference ellipsoids for geodesy and geophysics
https://www.fatiando.org/boule
BSD 3-Clause "New" or "Revised" License
38 stars 17 forks source link

Add support for Python 3.10 #85

Closed hugovk closed 3 years ago

hugovk commented 3 years ago

Description of the desired feature

Related to fatiando/maintenance#15

welcome[bot] commented 3 years ago

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible.

You might also want to take a look at our Contributing Guide and Code of Conduct.

hugovk commented 3 years ago

Here's a WIP commit: https://github.com/hugovk/boule/commit/fd1c3af876327e519c4df7f4b19cdc071f35f915

Passes for Ubuntu and Windows, not for macOS:

https://github.com/hugovk/boule/actions/runs/1170845860

Errors like:

==================================== ERRORS ====================================
_ ERROR collecting .nox/test-3-10/lib/python3.10/site-packages/boule/__init__.py _
../lib/python3.10/site-packages/boule/__init__.py:10: in <module>
    from .ellipsoid import Ellipsoid
../lib/python3.10/site-packages/boule/ellipsoid.py:12: in <module>
    import numpy as np
../lib/python3.10/site-packages/numpy/__init__.py:391: in <module>
    raise RuntimeError(msg)
E   RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, more information is available at numpy.org/doc/stable/user/building.html#accelerated-blas-lapack-libraries Otherwise report this to the vendor that provided NumPy.
E   RankWarning: Polyfit may be poorly conditioned

I expect this is caused by building NumPy from source, rather than using a precompiled binary wheel.

This is a downside of trying to test early during the release candidate, others dependencies may not be ready. Also building from source can be slow.

NumPy have created manylinux wheels for 3.10 but not macOS:

Is anyone familiar with what's needed to build NumPy properly? Alternatively, macOS on 3.10 could be excluded for now, and rely on Linux/Windows on 3.10.

leouieda commented 3 years ago

Ouch. I suspect it's not worth the trouble to build numpy. Excluding Mac is reasonable. We may only need to build on Linux since there is little that can go wrong with numerical code nowadays between platforms (at least at this level of abstraction). We barely interact with the file system.

leouieda commented 3 years ago

Thanks for pushing this forward @hugovk! 💯

hugovk commented 3 years ago

Please see PR #87.