From 6d5a0f354f35291bca02da3e5c10d2e52903d92a Mon Sep 17 00:00:00 2001 From: Mark Towers Date: Tue, 21 May 2024 03:44:24 +0100 Subject: [PATCH] Add testing for Python 3.12 (#1004) --- .github/workflows/build.yml | 2 +- pyproject.toml | 1 + tests/vector/utils/test_shared_memory.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5a532212..73c7fb783 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 - run: | diff --git a/pyproject.toml b/pyproject.toml index fea360f69..541c1a2d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", 'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering :: Artificial Intelligence', ] diff --git a/tests/vector/utils/test_shared_memory.py b/tests/vector/utils/test_shared_memory.py index 3edf6a45d..ba96001eb 100644 --- a/tests/vector/utils/test_shared_memory.py +++ b/tests/vector/utils/test_shared_memory.py @@ -23,12 +23,12 @@ ) def test_shared_memory_create_read_write(space, num, ctx): """Test the shared memory functions, create, read and write for all testing spaces.""" + ctx = mp if ctx is None else mp.get_context(ctx) if ctx not in mp.get_all_start_methods(): pytest.skip( f"Multiprocessing start method {ctx} not available on this platform." ) - ctx = mp if ctx is None else mp.get_context(ctx) samples = [space.sample() for _ in range(num)] try: