Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CI: BLD: build wheels and fix test suite for Python 3.12 #23991

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

Merged
merged 8 commits into from
Jun 20, 2023

Conversation

rgommers
Copy link
Member

No description provided.

rgommers added 5 commits June 19, 2023 19:51
Python 3.12 has immortal refcounts; the initial and final
values will be the same when accessing `sys.getrefcount` inside a
test.

Closes numpygh-23986
They require numpy.distutils, which isn't available on >=3.12
The `numpy.testing.extbuild` utility will need changing to make this
work again. Could either use plain `setuptools` or `meson`.
@rgommers
Copy link
Member Author

Hmm, I tested on GitHub Actions on my own fork and that is happy with

python: ["cp312"]
env:
    CIBW_PRERELEASE_PYTHONS: True

The Cirrus CI yaml is a little different; I expected this to work but it doesn't:

env:
        CIBW_PRERELEASE_PYTHONS: True
        CIBW_BUILD: cp312-*

it ends with:

cibuildwheel: No build identifiers selected: BuildSelector(build_config='cp312-*', skip_config='cp36-* cp37-* cp-38* pp37-* *-manylinux_i686 *_ppc64le *_s390x *-musllinux_aarch64 *-win32', requires_python=<SpecifierSet('>=3.9')>, prerelease_pythons=True)

not sure if it's not yet supported yet or the cp312-* selector needs a tweak. If anyone happens to know, that would be helpful here.

@rgommers
Copy link
Member Author

test_requirements.txt is annoying, we now need it with an unpinned setuptools for Python 3.12, and ==59.2.0 on other Python versions. Guess no choice but to duplicate it for now.

@mattip
Copy link
Member

mattip commented Jun 19, 2023

Is the cibuildwheel version current on that job? I see 2.12.1 where 2.13.1 is the latest.

@mattip
Copy link
Member

mattip commented Jun 19, 2023

Guess no choice but to duplicate it

you mean to put a selector on the line in test_requirements.txt for the python version, or do you want to duplicate the file?

rgommers added 2 commits June 19, 2023 21:26
We need a recent `setuptools` to make `import distutils` work
(that will then get the `setuptools`-patched version of it),
and that is used in at least `numpy/core/tests/test_cython.py`.
@rgommers
Copy link
Member Author

Thanks @mattip, good catches. My brain is kinda fried it seems after the mini-sprint in the last 36 hours:)

This is ready now. For merging it, please include [wheel build] in the merge commit message, that'll kick off new wheel builds for upload to the nightlies bucket.

@rgommers
Copy link
Member Author

The one CI failure is a connection issue; the actual job had completed and is green in Azure.

@rgommers
Copy link
Member Author

@seberg or @charris would one of you mind reviewing this? Matti is traveling for a little while so I don't expect he'll get to this soon, and I suspect some folks in downstream projects are keenly awaiting the 3.12 nightlies.

@rgommers rgommers added this to the 2.0.0 release milestone Jun 20, 2023
@mattip
Copy link
Member

mattip commented Jun 20, 2023

Thanks @rgommers. Lets keep things moving.

@mattip mattip merged commit dbc454a into numpy:main Jun 20, 2023
@rgommers rgommers deleted the py312-wheels branch June 20, 2023 10:58
@mattip
Copy link
Member

mattip commented Jun 20, 2023

I merged with the github button and will manually kick off a wheel build

@rgommers
Copy link
Member Author

Ah, guess I was wrong - thanks Matti!

@seberg
Copy link
Member

seberg commented Jun 20, 2023

πŸŽ‰ I think manual button doesn't trigger the cirrus builds, but it probably doesn't matter much in practice, the next build is tomorrow anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
36 - Build Build related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants