Skip to content

Add support for Python 3.11 - #9708

Merged
jrbourbeau merged 15 commits into
dask:mainfrom
graingert:test-on-311
Dec 16, 2022
Merged

jrbourbeau merged 15 commits into
dask:mainfrom
graingert:test-on-311

Conversation

@graingert

@graingert graingert commented Dec 1, 2022 •

Copy link
Copy Markdown
Member

@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
Copy Markdown
Member Author

@jrbourbeau jrbourbeau left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

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

@jrbourbeau

Copy link
Copy Markdown
Member

👍

@graingert

Copy link
Copy Markdown
Member Author

depends on dask/distributed#7249

@jrbourbeau jrbourbeau left a comment •

Copy link
Copy Markdown
Member

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

@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
6 of 8 tasks
@jakirkham

Copy link
Copy Markdown
Member

Should this still be a draft?

@graingert

Copy link
Copy Markdown
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
Copy Markdown
Member

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

@crusaderky

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

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

@jakirkham

Copy link
Copy Markdown
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.

@jrbourbeau jrbourbeau left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

Looks like that did the trick

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

@jrbourbeau jrbourbeau left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@jrbourbeau jrbourbeau left a comment

Copy link
Copy Markdown
Member

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