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.11 #9708

Merged
merged 15 commits into from Dec 16, 2022
Merged

Add support for Python 3.11 #9708

merged 15 commits into from Dec 16, 2022

Conversation

graingert
Copy link
Member

@graingert graingert commented Dec 1, 2022

@graingert graingert changed the title avoid PytestReturnNotNoneWarning in test_inheriting_class test on Python 3.11 Dec 1, 2022
@jrbourbeau jrbourbeau mentioned this pull request Dec 1, 2022
@graingert
Copy link
Member Author

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice detective work @graingert. Sounds like we can safely xfail the unhappy hdf-related tests on Python 3.11

@graingert
Copy link
Member Author

we can't xfail them as they segfault - will have to skip them for now

@jrbourbeau
Copy link
Member

👍

@graingert
Copy link
Member Author

depends on dask/distributed#7249

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restarting failed builds as it looks like the linux Python 3.11 build stalled for some reason

graingert and others added 2 commits December 14, 2022 19:35
@jrbourbeau jrbourbeau changed the title test on Python 3.11 Add support for Python 3.11 Dec 14, 2022
@jrbourbeau jrbourbeau mentioned this pull request Dec 14, 2022
8 tasks
@jakirkham
Copy link
Member

Should this still be a draft?

@graingert
Copy link
Member Author

Hmm pyarrow isn't working due to

Encountered problems while solving:

  • package pyarrow-10.0.1-py310he8a299c_0_cuda requires libarrow 10.0.1 ha344585_0_cuda, but none of the providers can be installed

@jakirkham
Copy link
Member

Would just pin to Arrow 9. Likely it will require work to upgrade to a newer version

@crusaderky
Copy link
Collaborator

Isn't it easier to comment it out again for the time being? numba is also unavailable anyway and they have a history of being several months late every time there's a new major python version.

@jakirkham
Copy link
Member

There should be a Python 3.11 package for Arrow 9 already

It is just Arrow 10 came out somewhat recently and there are some fairly significant changes in it that should improve things overall. Just will take time to fully adapt to. So that's what we are seeing here

@crusaderky
Copy link
Collaborator

@graingert commented in a previous version of the PR that pyarrow 10 is necessary for python 3.11

@jakirkham
Copy link
Member

That doesn't sound right. Arrow 9 was definitely built for Python 3.11 (for example). If that doesn't work, would be very interested to know.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, looks like the issue was due to the libprotobuf pin. That's only needed for the pyarrow-nightly build and has since been moved to a different file anyways. After removing the libprotobuf pin, I was able to get a solved Python 3.11 environment locally on my mac. Let's see if it solves in CI.

@jrbourbeau
Copy link
Member

Looks like that did the trick

@jrbourbeau jrbourbeau marked this pull request as ready for review December 15, 2022 22:29
Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Linux 3.11 build stalled for some reason, so I just retriggered CI to see if the stall happens consistently or not. If it doesn't, I think this is good to go

@mrocklin
Copy link
Member

I'll be glad to see this get in. Thank you everyone who helped here. I'm excited for Python 3.11.

@jrbourbeau
Copy link
Member

Okay, looks like the hanging Linux Python 3.11 build passed (🎉 ) but we're seeing dask/tests/test_multiprocessing.py::test_custom_context_used_python3_posix fail on macOS Python 3.11. We're also seeing it fail consistently. I'm not able to reproduce locally when I run that test in isolation. Looking into it now... Would certainly welcome thoughts from others too : )

@jrbourbeau
Copy link
Member

Alright, looks like tiledb may have been the source of the issue. At least locally when I run the tiledb-related tests alongside test_custom_context_used_python3_posix with pytest dask -k "test_custom_context_used_python3_posix or tiledb" I'm able to reproduce the error. I've temporarily commented tiledb out of the Python 3.11 CI environment file. 🤞 that fixes things

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jrbourbeau jrbourbeau merged commit 936d9f7 into dask:main Dec 16, 2022
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.

Python 3.11 support
5 participants