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

TST: test on Python 3.11 #163

Merged
merged 5 commits into from
Jan 23, 2023

Conversation

neutrinoceros
Copy link
Member

My goal here is to start testing on Python 3.11
I except this will be a little challenging because:

@neutrinoceros
Copy link
Member Author

So, the state of affairs currently is that builds fail at compile time, but unfortunately it fails even sooner on my machine because I can't even install h5py from source on macOS. Currently I don't think I'll be able to disentangle this before wheels are available for h5py + Python 3.11

@neutrinoceros
Copy link
Member Author

Appears to be a linking problem

io/io_tipsy.c:7:10: fatal error: rpc/types.h: No such file or directory
    7 | #include <rpc/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.

@neutrinoceros
Copy link
Member Author

Another problem I'm seeing locally (turns out I can try and compile with python -m build) is that numpy 1.23, the oldest version supporting Python 3.11, removes some C API we rely on (namely NPY_ARRAY_UPDATEIFCOPY)
https://numpy.org/doc/stable/release/1.23.0-notes.html?highlight=npy_array_updateifcopy#expired-deprecations

Maybe I can try to fix this first, since I can iterate locally

@neutrinoceros neutrinoceros force-pushed the test_python_311 branch 2 times, most recently from 04bb089 to bcc1929 Compare December 18, 2022 18:39
@neutrinoceros
Copy link
Member Author

neutrinoceros commented Dec 18, 2022

Wheels are up and running, but the linking problem on circleci is still here. I've tried to reinstall the "missing" header files via libntirpc-dev, libtirpc-dev and libgcc-dev packages, for now nothing worked.

@neutrinoceros
Copy link
Member Author

The more I think about it the less I understand this failure; it must be a problem with the docker image that's used for Python 3.11, and the right call is probably just to report to CircleCI directly.

@neutrinoceros
Copy link
Member Author

Following an exchange with CircleCI's support, here's the report upstream CircleCI-Public/cimg-base#226

@neutrinoceros
Copy link
Member Author

I intend to take the important bits from this into the next bugfix release but not necessarily the whole thing

@neutrinoceros
Copy link
Member Author

h5py doesn't even compile from source anymore. The repo seems quite active these days so I'll try again soon

@neutrinoceros neutrinoceros force-pushed the test_python_311 branch 3 times, most recently from 9c8ceed to e0afbbe Compare January 5, 2023 16:19
@neutrinoceros
Copy link
Member Author

So there are two main difficulties with testing on Python 3.11 with Circle CI:

  • The corresponding docker image is using Ubuntu 22.04, and compiling rockstar there requires a couple patches to its Makefile. I think this part is now working correctly but it's nonetheless worrisome because rockstar didn't receive any update in the last two years and no merge request was ever reviewed or merged, so I have little hope of upstreaming the patch, and I expect it will not get better in the future.
  • h5py still doesn't have wheels for Python 3.11. I thought I could workaround this by building it from source but it's actually a very complicated process to replicate so I figure it's not worth it. I'll just wait some more.

@jzuhone
Copy link
Contributor

jzuhone commented Jan 6, 2023

@brittonsmith any chance we can move this repo to github actions?

@neutrinoceros
Copy link
Member Author

@jzuhone AFAIC feel free to give it a shot, but it won't help with the current blocker

@neutrinoceros
Copy link
Member Author

h5py 3.8 was just released with 3.11 wheels, let's give this another shot !

@neutrinoceros
Copy link
Member Author

closing/reopening doesn't retrigger circleci, so I'll force-push instead

@neutrinoceros
Copy link
Member Author

This is now stable, I'll include it in a bugfix release

@neutrinoceros neutrinoceros marked this pull request as ready for review January 23, 2023 11:00
@neutrinoceros neutrinoceros merged commit fac4420 into yt-project:main Jan 23, 2023
@neutrinoceros neutrinoceros deleted the test_python_311 branch January 23, 2023 11:01
@brittonsmith
Copy link
Member

@jzuhone, I have no objections to moving the testing to actions, but also no bandwidth to do it. I'm more than happy for it to happen if you'd like to give it a try.

@neutrinoceros, as far as I understand, the main repo of rockstar-galaxies will never be updated again. It's even missing a crucial, but minor bugfix that only exists in John Wise's repo. This is noted in the yt-astro install docs. Previously, yt-project maintained an older version of rockstar for similar reasons. I would prefer not to have to do that. Maybe the new "upsteam" could be John's repo. I'm pretty sure he would accept pull requests.

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