diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index af2bbabc0..93c522fb2 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -16,31 +16,63 @@ concurrency: cancel-in-progress: true jobs: test: + name: test (${{ matrix.os }}, ${{ matrix.python }}, ${{ matrix.dependencies }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - config: [ {python: '3.9', dependencies: 'newest'}, - {python: '3.10', dependencies: 'newest'}, - {python: '3.11', dependencies: 'newest'}, - {python: '3.11', dependencies: 'minimal'}, - {python: '3.8', dependencies: 'oldest'} ] + os: [ubuntu-latest] + python: ['3.8', '3.9', '3.10', '3.11', '3.12'] + # Unused key to force creation of new entries in the matrix + default: ['true'] + include: + # Defaults to newest dependencies + - dependencies: 'newest' + # Oldest dependency tests + - python: '3.8' + dependencies: 'oldest' + - os: 'macos-latest' + python: '3.8' + dependencies: 'oldest' + - os: 'windows-latest' + python: '3.8' + dependencies: 'oldest' + # Newest version tests for non-Linux OS + - os: 'ubuntu-latest' + python: '3.12' + dependencies: 'newest' + - os: 'macos-latest' + python: '3.12' + dependencies: 'newest' + - os: 'windows-latest' + python: '3.12' + dependencies: 'newest' + # Minimal dependencies tests + - default: 'false' + os: 'ubuntu-latest' + python: '3.12' + dependencies: 'minimal' + - os: 'macos-latest' + python: '3.12' + dependencies: 'minimal' + - os: 'windows-latest' + python: '3.12' + dependencies: 'minimal' steps: - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.config.python }} + - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v4 with: - python-version: ${{ matrix.config.python }} + python-version: ${{ matrix.python }} - name: Install newest dependencies run: | pip install -r requirements/requirements-test.txt pip install -r requirements/requirements-test-optional.txt - if: ${{ matrix.config.dependencies == 'newest' }} + if: ${{ matrix.dependencies == 'newest' }} - name: Install minimal dependencies run: | pip install -r requirements/requirements-test.txt - if: ${{ matrix.config.dependencies == 'minimal' }} + if: ${{ matrix.dependencies == 'minimal' }} - name: Install oldest supported dependencies # To prevent Dependabot from updating the pinnings in this "oldest" # dependency list, we have to avoid the word "requirements" in the @@ -48,7 +80,7 @@ jobs: # instead of "requirements." run: | pip install -r .github/workflows/ci-oldest-reqs.txt - if: ${{ matrix.config.dependencies == 'oldest' }} + if: ${{ matrix.dependencies == 'oldest' }} - name: Install the package run: | pip install -e . diff --git a/changelog.txt b/changelog.txt index 40ffc7106..801b6a3b4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -10,9 +10,15 @@ Version 2 [2.2.0] -- 2023-xx-xx --------------------- +Added ++++++ + + - Official support for Python 3.12 (#957). + Changed +++++++ + - Restrict allowable tar file features in Python 3.12 (#957). - linked views now can contain spaces and other characters except directory separators (#926). - linked views now can be created on Windows, if 'Developer mode' is enabled (#430). diff --git a/pyproject.toml b/pyproject.toml index c0ad8e1f3..0bb4bf7bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] @@ -100,7 +101,10 @@ follow_imports = 'skip' [tool.pytest.ini_options] xfail_strict = true -filterwarnings = "error" +filterwarnings = [ + "error", + "ignore::DeprecationWarning:dateutil.*", +] [tool.coverage.run] branch = true diff --git a/signac/import_export.py b/signac/import_export.py index ff8d73166..f87dc7439 100644 --- a/signac/import_export.py +++ b/signac/import_export.py @@ -9,6 +9,7 @@ import os import re import shutil +import sys import tarfile import zipfile from collections import Counter @@ -1144,7 +1145,12 @@ def read_statepoint_file(path): "The jobs identified with the given schema function are not unique!" ) - tarfile.extractall(path=tmpdir) + if sys.version_info[:2] >= (3, 12): + # the data filter should support all needed operations for users using signac's import + # feature. Other filters assume Unix specific features. + tarfile.extractall(path=tmpdir, filter="data") + else: + tarfile.extractall(path=tmpdir) for path, job in mappings.items(): if not os.path.isdir(tmpdir): raise RuntimeError(f"The provided tmpdir {tmpdir} is not a directory.")