GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CI: BLD: build wheels and fix test suite for Python 3.12 by rgommers · Pull Request #23991 · numpy/numpy

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.

Sign up for GitHub

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
mattip merged 8 commits into numpy:main from rgommers:py312-wheels
Jun 20, 2023

Uh oh!

There was an error while loading. Please reload this page.

Merged

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

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit Hold shift + click to select a range
bac2173
CI: build Python 3.12 beta wheels with cibuildwheel
rgommers Jun 19, 2023
595e78a
BLD: don't use distutils on python >= 3.12
rgommers Jun 19, 2023
c929d62
TST: remove usages of `numpy.distutils` from tests for py312
rgommers Jun 19, 2023
b0872b8
TST: skip refcount related tests on py312
rgommers Jun 19, 2023
e42fc93
TST: skip memory allocator and `array_interface` tests on py312
rgommers Jun 19, 2023
4552b6c
TST: skip test using `np.load` on py2-saved .npy file on py312
rgommers Jun 19, 2023
ddbb3e1
TST: unpin setuptools in `test_requirements.txt` for py312
rgommers Jun 19, 2023
366c7a1
CI: also build Python 3.12 beta/pre wheels on Cirrus CI
rgommers Jun 19, 2023
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
TST: skip memory allocator and array_interface tests on py312
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`.
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@rgommers
rgommers committed Jun 19, 2023
commit e42fc93b54a6d41dab72d86921f96e5ebc4c4198

There are no files selected for viewing

3 changes: 3 additions & 0 deletions 3 numpy/core/tests/test_array_interface.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ def get_module(tmp_path):
more_init=more_init)


# FIXME: numpy.testing.extbuild uses `numpy.distutils`, so this won't work on
# Python 3.12 and up.
@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils")
@pytest.mark.slow
def test_cstruct(get_module):

Expand Down
15 changes: 15 additions & 0 deletions 15 numpy/core/tests/test_mem_policy.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
import sys


# FIXME: numpy.testing.extbuild uses `numpy.distutils`, so this won't work on
# Python 3.12 and up. It's an internal test utility, so for now we just skip
# these tests.


@pytest.fixture
def get_module(tmp_path):
""" Add a memory policy that returns a false pointer 64 bytes into the
Expand Down Expand Up @@ -213,6 +218,7 @@ def get_module(tmp_path):
more_init=more_init)


@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils")
def test_set_policy(get_module):

get_handler_name = np.core.multiarray.get_handler_name
Expand Down Expand Up @@ -241,6 +247,7 @@ def test_set_policy(get_module):
assert get_handler_name() == orig_policy_name


@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils")
def test_default_policy_singleton(get_module):
get_handler_name = np.core.multiarray.get_handler_name

Expand All @@ -262,6 +269,7 @@ def test_default_policy_singleton(get_module):
assert def_policy_1 is def_policy_2 is get_module.get_default_policy()


@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils")
def test_policy_propagation(get_module):
# The memory policy goes hand-in-hand with flags.owndata

Expand Down Expand Up @@ -320,6 +328,7 @@ async def async_test_context_locality(get_module):
assert np.core.multiarray.get_handler_name() == orig_policy_name


@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils")
def test_context_locality(get_module):
if (sys.implementation.name == 'pypy'
and sys.pypy_version_info[:3] < (7, 3, 6)):
Expand All @@ -341,6 +350,7 @@ def concurrent_thread2(get_module, event):
get_module.set_secret_data_policy()


@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils")
def test_thread_locality(get_module):
orig_policy_name = np.core.multiarray.get_handler_name()

Expand All @@ -359,6 +369,7 @@ def test_thread_locality(get_module):
assert np.core.multiarray.get_handler_name() == orig_policy_name


@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils")
@pytest.mark.skip(reason="too slow, see gh-23975")
def test_new_policy(get_module):
a = np.arange(10)
Expand Down Expand Up @@ -388,6 +399,8 @@ def test_new_policy(get_module):
c = np.arange(10)
assert np.core.multiarray.get_handler_name(c) == orig_policy_name


@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils")
@pytest.mark.xfail(sys.implementation.name == "pypy",
reason=("bad interaction between getenv and "
"os.environ inside pytest"))
Expand Down Expand Up @@ -420,6 +433,8 @@ def test_switch_owner(get_module, policy):
else:
os.environ['NUMPY_WARN_IF_NO_MEM_POLICY'] = oldval


@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils")
def test_owner_is_base(get_module):
a = get_module.get_array_with_base()
with pytest.warns(UserWarning, match='warn_on_free'):
Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.