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 Python 3.11 migration #3573

Merged
merged 3 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ ntl:
# we build for the oldest version possible of numpy for forward compatibility
numpy:
# part of a zip_keys: python, python_impl, numpy
- 1.20 # [not (osx and arm64)]
- 1.20
- 1.20
- 1.21
Expand Down Expand Up @@ -614,13 +613,11 @@ pybind11_abi:
- 4
python:
# part of a zip_keys: python, python_impl, numpy
- 3.7.* *_cpython # [not (osx and arm64)]
- 3.8.* *_cpython
- 3.9.* *_cpython
- 3.10.* *_cpython
python_impl:
# part of a zip_keys: python, python_impl, numpy
- cpython # [not (osx and arm64)]
- cpython
- cpython
- cpython
Expand Down
33 changes: 33 additions & 0 deletions recipe/migrations/python311.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
migrator_ts: 1666686085
__migrator:
migration_number: 1
operation: key_add
primary_key: python
ordering:
python:
- 3.6.* *_cpython
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to list 3.6 and 3.7 here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah was wondering the same thing. Saw this in our PyPy migrator

- 3.6.* *_cpython
- 3.7.* *_cpython

Also we had this in the Python 3.10 migrator ( #2008 ) ( even after we dropped Python 3.6, #1955 )

So thinking this is needed for other reasons. Hopefully someone can clarify. Also happy to drop if I've misunderstood

Copy link
Member

Choose a reason for hiding this comment

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

Can you link a PR where this migration has been applied locally? If that works, all is fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

Conda-smithy keeps trying to delete the migrator altogether (as it not merged in conda-forge-pinning). Forgetting the option to tell conda-smithy to override this behavior

Copy link
Member

Choose a reason for hiding this comment

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

It shouldn't hurt to have superfluous entries. Pretty sure we can remove 3.6.
To remove 3.7 we need to #2623 (comment) :

[...] drop 3.7 when 3.11 comes out and we start the migration in October. [...]

As per the comment above, this PR should remove 3.7 from the current pinnings already (because AFAIR we currently don't have code to do add+remove in a single migration).

Copy link
Member

Choose a reason for hiding this comment

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

I've made a PR in conda-forge/pytest-feedstock#152

(The option is --exclusive-config-file ../conda-forge-pinning-feedstock/recipe/conda_build_config.yaml)

Copy link
Member

Choose a reason for hiding this comment

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

As per the comment above, this PR should remove 3.7 from the current pinnings already (because AFAIR we currently don't have code to do add+remove in a single migration).

(NB: If there surfaced new/other (good/important) reasons to drop it after the migration, that's fine by me. I was just reciting the comment/core decision from a few months back.)

Copy link
Member Author

@jakirkham jakirkham Oct 25, 2022

Choose a reason for hiding this comment

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

Ah ok was looking for a way to drop Python 3.7 in the migration, but didn't see it. Went ahead and deleted from the pinning file directly 👍

Thanks Chris! 🙏 Yeah had tried that option, but it was still deleting it for me. Probably missing something. Maybe it matters what the path to the pinning file is? In any event, looks like the PR is doing the right thing, which is encouraging 😄

Copy link
Member

Choose a reason for hiding this comment

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

It needs to be able to find the correct migrations/ folder next to conda_build_config.yaml so perhaps that was your issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I see. Thanks for clarifying! 🙏

Yeah probably. Was trying to point it to conda_build_config.yaml installed in base as opposed to a feedstock, which would not be adjacent to migrations/ 😅

- 3.7.* *_cpython
- 3.8.* *_cpython
- 3.9.* *_cpython
- 3.10.* *_cpython
- 3.11.* *_cpython # new entry
- 3.6.* *_73_pypy
- 3.7.* *_73_pypy
- 3.8.* *_73_pypy
- 3.9.* *_73_pypy
paused: false
longterm: True
pr_limit: 5
exclude:
# this shouldn't attempt to modify the python feedstocks
- python
- pypy3.6
- pypy-meta

python:
- 3.11.* *_cpython
# additional entries to add for zip_keys
numpy:
- 1.23
python_impl:
- cpython