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

COMP: Add support for python 3.11, remove 3.6 from CI build wheels #426

Merged
merged 5 commits into from
Feb 13, 2023

Conversation

cookpa
Copy link
Member

@cookpa cookpa commented Jan 20, 2023

Testing if this will work with an update to cibuildwheel version

Also update the python setup app to avoid Github deprecation warnings

Testing if this will work with an update to cibuildwheel version

Also update the python setup app to avoid Github deprecation warnings
@cookpa
Copy link
Member Author

cookpa commented Jan 21, 2023

@stnava updating cibuildwheel allows cp311 to build, but annoyingly breaks cp36 on Mac only. Says it can't find cmake, which seems bizarre to me because it works fine on every other platform.

@ravnoor
Copy link
Contributor

ravnoor commented Jan 21, 2023

In my testing py311 on arm64, both linux and macosx wheels are built but invoke a consistent error when running tests. I haven't pulled in the latest changes in master since gh-424 though. The only change is the v2.10.3 merge in stnava/pybind11. The git tag isn't pinned in the build/configure scripts, so the CI engine automatically checks out the latest.

Looks like the error stems from the removal of a deprecated function in py311:

Removed from the inspect module:

The getargspec() function, deprecated since Python 3.0; use inspect.signature() or inspect.getfullargspec() instead.

linux_aarch64: https://cirrus-ci.com/task/4594148041293824?logs=run_cibuildwheel#L4831

    + sh -c 'bash /project/tests/run_tests.sh'
/project/tests /tmp/tmp.fiarH5EVBZ/test_cwd
Running core tests
Traceback (most recent call last):
  File "/project/tests/test_core_ants_image.py", line 19, in <module>
    import ants
  File "/tmp/tmp.fiarH5EVBZ/venv/lib/python3.11/site-packages/ants/__init__.py", line 7, in <module>
    from .core import *
  File "/tmp/tmp.fiarH5EVBZ/venv/lib/python3.11/site-packages/ants/core/__init__.py", line 2, in <module>
    from .ants_image import *
  File "/tmp/tmp.fiarH5EVBZ/venv/lib/python3.11/site-packages/ants/core/ants_image.py", line 598, in <module>
    args = inspect.getargspec(getattr(utils,k)).args
           ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
                                                                     ✕ 695.36s
Error: Command ['sh', '-c', 'bash /project/tests/run_tests.sh'] failed with code 1. 

macosx_arm64: https://cirrus-ci.com/task/6031614673682432?logs=run_cibuildwheel#L6089

+ /bin/sh -c 'bash /private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cirrus-ci-build/tests/run_tests.sh'
/private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cirrus-ci-build/tests /private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cibw-run-_69wckud/cp311-macosx_arm64/test_cwd
Running core tests
Traceback (most recent call last):
  File "/private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cirrus-ci-build/tests/test_core_ants_image.py", line 19, in <module>
    import ants
  File "/private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cibw-run-_69wckud/cp311-macosx_arm64/venv-test/lib/python3.11/site-packages/ants/__init__.py", line 7, in <module>
    from .core import *
  File "/private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cibw-run-_69wckud/cp311-macosx_arm64/venv-test/lib/python3.11/site-packages/ants/core/__init__.py", line 2, in <module>
    from .ants_image import *
  File "/private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cibw-run-_69wckud/cp311-macosx_arm64/venv-test/lib/python3.11/site-packages/ants/core/ants_image.py", line 598, in <module>
    args = inspect.getargspec(getattr(utils,k)).args
           ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
                                                                     ✕ 223.62s
Error: Command ['/bin/sh', '-c', 'bash /private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cirrus-ci-build/tests/run_tests.sh'] failed with code 1. None

@cookpa
Copy link
Member Author

cookpa commented Jan 23, 2023

Thanks @ravnoor . I guess this means the build wheel action is not running the tests, because it completes successfully on cp11.

I looked around for a solution to the Mac cp36 failure, but could not find an answer.

@cookpa
Copy link
Member Author

cookpa commented Feb 4, 2023

As I understand it, #424 fixes the problems with cp11. Should I remove cp36 from the build matrix? Seems it no longer builds either here or on cirrus.

@ravnoor
Copy link
Contributor

ravnoor commented Feb 8, 2023

I think it should be fine since python 3.6 has been end-of-life since 12/2021

@stnava
Copy link
Member

stnava commented Feb 8, 2023

@cookpa I agree with @ravnoor

@cookpa
Copy link
Member Author

cookpa commented Feb 8, 2023

OK I will update this PR. Thanks @stnava @ravnoor

@cookpa cookpa changed the title COMP: Try to add support for python 3.11 COMP: Add support for python 3.11, remove 3.6 from CI build wheels Feb 13, 2023
@cookpa
Copy link
Member Author

cookpa commented Feb 13, 2023

Looks good now, thanks all

@cookpa cookpa merged commit a2692c9 into master Feb 13, 2023
@cookpa cookpa deleted the updateCIWheel branch February 13, 2023 14:41
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

Successfully merging this pull request may close these issues.

3 participants