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

Support python 3.11 #601

Merged
merged 10 commits into from
Dec 7, 2022
Merged

Support python 3.11 #601

merged 10 commits into from
Dec 7, 2022

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Dec 5, 2022

Add support for python 3.11. For now, numba is not installed on python 3.11 until it is compatible.

I have split the test into two files, one which runs pull request, push etc., using python versions 3.7, 3.9 and 3.11. And a weekly test that also runs the versions in between.

I have also removed actions/setup-python@v4 as it is not needed to run the test.

At last I have added echo $(python --version | tr ' [:upper:]' '=[:lower:]') > $CONDA_PREFIX/conda-meta/pinned to the conda setup step to pin the python version.

@hoxbro hoxbro force-pushed the support_python311 branch 4 times, most recently from 3505fa0 to 77501ba Compare December 5, 2022 19:11
@hoxbro hoxbro force-pushed the support_python311 branch from 77501ba to 9349106 Compare December 5, 2022 19:14
@hoxbro hoxbro requested a review from maximlt December 5, 2022 20:20
@maximlt
Copy link
Member

maximlt commented Dec 5, 2022

At last I have added echo $(python --version | tr ' [:upper:]' '=[:lower:]') > $CONDA_PREFIX/conda-meta/pinned to the conda setup step to pin the python version.

What does that do exactly?

I'll have a closer look tomorrow but at first sight I'm not thrilled by having to split up the test workflow into three files, specially if we have to do that across many repos, as there's just more change for things to diverge when they're more scattered. But I don't know maybe it's the only way!

@hoxbro
Copy link
Member Author

hoxbro commented Dec 6, 2022

What does that do exactly?

It pins the python version, so it is not updated in the following conda installs example.

  1. echo $(python --version | tr ' [:upper:]' '=[:lower:]') outputs the current python version installed with major.minor.patch, lowercasing it and replacing space with equal. Example: python=3.9.15
  2. $CONDA_PREFIX is the active environment location.
  3. conda-meta/pinned prevents packages listed from being updated ref.

... not thrilled by having to split up the test workflow into three files

I'm not either, but I couldn't get it to work in a single file, and two (almost) identical files were a non-starter. I would love to have it in one file.

@maximlt
Copy link
Member

maximlt commented Dec 6, 2022

It pins the python version

Usually the issue I've seen with doit develop_install failing because of CPython being updated isn't that the version is updated but the build only. For instance what happened in one case I have in mind (maybe this is common, not sure) is that the first command (e.g. conda create -n test-env python=3.x pyctdev) installed Python built against OpenSSL 3.0.0. The next commands would try to pull dependencies that weren't built against OpenSSL 3.0.0 but OpenSSL 1.1.1, so conda downgrades CPython to a build of the same version but built against OpenSSL 1.1.1.

I think that unfortunately in this case this workaround wouldn't help :(

I would love to have it in one file.

I'll try to see if there's another way.

@hoxbro hoxbro force-pushed the support_python311 branch from 457b6dc to 20469ba Compare December 7, 2022 09:12
@hoxbro hoxbro force-pushed the support_python311 branch from 20469ba to d8131e7 Compare December 7, 2022 09:13
@hoxbro hoxbro merged commit 2310cb3 into master Dec 7, 2022
@hoxbro hoxbro deleted the support_python311 branch December 7, 2022 16:40
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.

2 participants