From 11f07850393fe6d886ea4abe675ba29218e82397 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Tue, 14 Nov 2023 10:19:09 -0500 Subject: [PATCH 01/24] ci: Add Python 3.12 and limit MacOS/Window's tests. --- .github/workflows/run-pytest.yml | 37 ++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index af2bbabc0..3d1a70836 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -20,12 +20,37 @@ jobs: 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.9', '3.10', '3.11', '3.12'] + 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: 'macos-latest' + python: '3.12' + dependencies: 'newest' + - os: 'windows-latest' + python: '3.12' + dependencies: 'newest' + # Minimal dependencies tests + - 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 }} From 2c5252f3261b150f2aaa55753adad1929612f44e Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Tue, 14 Nov 2023 10:22:06 -0500 Subject: [PATCH 02/24] doc: Update changelog --- changelog.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/changelog.txt b/changelog.txt index e5b1f2ad2..3f46de51f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -10,6 +10,11 @@ Version 2 [2.2.0] -- 2023-xx-xx --------------------- +Added ++++++ + + - Official support for Python 3.12 (#957). + Changed +++++++ From 4147c15b607894b2c6a66873aaef5f3952f2f308 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Tue, 14 Nov 2023 10:24:49 -0500 Subject: [PATCH 03/24] misc: Add Python 3.12 to pyproject tags --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index c0ad8e1f3..081d66e3c 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", ] From 12f040b30150d7539a874362e20f4d7401907b31 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Tue, 14 Nov 2023 11:43:03 -0500 Subject: [PATCH 04/24] ci: Apply fixes Co-authored-by: Joshua A. Anderson --- .github/workflows/run-pytest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index 3d1a70836..def29229c 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python: ['3.9', '3.10', '3.11', '3.12'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12'] include: # Defaults to newest dependencies - dependencies: 'newest' @@ -53,7 +53,7 @@ jobs: 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 }} From 6ac49dbd96c7a1e2cde8ad763143f6f26ddd44a6 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Tue, 14 Nov 2023 11:43:57 -0500 Subject: [PATCH 05/24] ci: Further fixes. --- .github/workflows/run-pytest.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index def29229c..3540f4119 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -56,16 +56,16 @@ jobs: - 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 @@ -73,7 +73,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 . From 63d9550309f23e7f48c7e95f6db1f2dee0751c27 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Tue, 14 Nov 2023 11:55:58 -0500 Subject: [PATCH 06/24] fix: Remove Deprecation errors in Python 3.12 --- changelog.txt | 1 + signac/import_export.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 3f46de51f..65d4e83fc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -18,6 +18,7 @@ Added Changed +++++++ + - Restrict allowable tar file features in Python 3.12 (#957). - linked views now can contain spaces and other characters except directory separators (#926). [2.1.0] -- 2023-07-12 diff --git a/signac/import_export.py b/signac/import_export.py index ff8d73166..e94cb6c2f 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] >= 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.") From 88c3881aebe8ed6120e691d22be00eac192a35c9 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Tue, 14 Nov 2023 14:46:19 -0500 Subject: [PATCH 07/24] fix: Correctly check minor not bugfix version --- signac/import_export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signac/import_export.py b/signac/import_export.py index e94cb6c2f..ae7729fba 100644 --- a/signac/import_export.py +++ b/signac/import_export.py @@ -1145,7 +1145,7 @@ def read_statepoint_file(path): "The jobs identified with the given schema function are not unique!" ) - if sys.version_info[2] >= 12: + if sys.version_info[1] >= 12: # minor version # 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") From dede4d6d7eb588aa1e2e3dc8258285e2a5c04905 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Tue, 14 Nov 2023 14:47:57 -0500 Subject: [PATCH 08/24] ci: Add manual naming for run-pytest --- .github/workflows/run-pytest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index 3540f4119..5f873be54 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -16,6 +16,7 @@ concurrency: cancel-in-progress: true jobs: test: + name: test (${{ matrix.os }}, ${{ matrix.python }}, ${{ matrix.dependencies }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false From a667eb454e99cf058217b67250d2efa87c8a6afb Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Tue, 14 Nov 2023 16:14:46 -0500 Subject: [PATCH 09/24] test: Update pandas newest test requirements. --- requirements/requirements-test-optional.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-test-optional.txt b/requirements/requirements-test-optional.txt index d157a9e0f..2db9fd369 100644 --- a/requirements/requirements-test-optional.txt +++ b/requirements/requirements-test-optional.txt @@ -1,5 +1,5 @@ h5py==3.10.0; implementation_name=='cpython' numpy==1.26.1 -pandas==2.1.2; implementation_name=='cpython' +pandas==2.1.3; implementation_name=='cpython' ruamel.yaml==0.18.3 tables==3.9.1; implementation_name=='cpython' From 37bcbf72ab9240f26a20315576eda2d4ea1a5b10 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Tue, 14 Nov 2023 16:19:36 -0500 Subject: [PATCH 10/24] ci: Attempt to add ubuntu-latest, 3.12, newest --- .github/workflows/run-pytest.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index 5f873be54..2429a3be4 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -36,6 +36,9 @@ jobs: 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' @@ -43,8 +46,7 @@ jobs: python: '3.12' dependencies: 'newest' # Minimal dependencies tests - - os: 'ubuntu-latest' - python: '3.12' + - python: '3.12' dependencies: 'minimal' - os: 'macos-latest' python: '3.12' From 4aaccfe5ccf89d750e7ec3ab194242c166cccae8 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 15 Nov 2023 05:35:39 -0500 Subject: [PATCH 11/24] Try default key. --- .github/workflows/run-pytest.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index 2429a3be4..1601a5890 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -23,6 +23,7 @@ jobs: matrix: os: [ubuntu-latest] python: ['3.8', '3.9', '3.10', '3.11', '3.12'] + default: 'true' include: # Defaults to newest dependencies - dependencies: 'newest' @@ -46,7 +47,8 @@ jobs: python: '3.12' dependencies: 'newest' # Minimal dependencies tests - - python: '3.12' + - default: 'false' + python: '3.12' dependencies: 'minimal' - os: 'macos-latest' python: '3.12' From 03be4c750fd9877b183356bf9d4ab4681ed6d278 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 15 Nov 2023 10:35:55 +0000 Subject: [PATCH 12/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/run-pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index 1601a5890..5deff7b55 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -47,7 +47,7 @@ jobs: python: '3.12' dependencies: 'newest' # Minimal dependencies tests - - default: 'false' + - default: 'false' python: '3.12' dependencies: 'minimal' - os: 'macos-latest' From d5a0c82596d1e1cfd768f55dde10746695a6a7ee Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 15 Nov 2023 05:39:05 -0500 Subject: [PATCH 13/24] Try a different key name. --- .github/workflows/run-pytest.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index 5deff7b55..af9d31090 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -23,7 +23,8 @@ jobs: matrix: os: [ubuntu-latest] python: ['3.8', '3.9', '3.10', '3.11', '3.12'] - default: 'true' + # unused key to force creation of new entries in the matrix + unused: 'true' include: # Defaults to newest dependencies - dependencies: 'newest' @@ -47,7 +48,7 @@ jobs: python: '3.12' dependencies: 'newest' # Minimal dependencies tests - - default: 'false' + - unused: 'false' python: '3.12' dependencies: 'minimal' - os: 'macos-latest' From 5f16d686e5706fdc05cb2a2edaadaeec1da12625 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 15 Nov 2023 05:40:41 -0500 Subject: [PATCH 14/24] Fix actions syntax. --- .github/workflows/run-pytest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index af9d31090..75787d11a 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -23,8 +23,8 @@ jobs: matrix: 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 - unused: 'true' + # Unused key to force creation of new entries in the matrix + default: ['true'] include: # Defaults to newest dependencies - dependencies: 'newest' @@ -48,7 +48,7 @@ jobs: python: '3.12' dependencies: 'newest' # Minimal dependencies tests - - unused: 'false' + - default: 'false' python: '3.12' dependencies: 'minimal' - os: 'macos-latest' From 14d8ade886a00024fc5cc62b5309dc8e5d59c9e5 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 15 Nov 2023 05:42:39 -0500 Subject: [PATCH 15/24] Add missing os key. --- .github/workflows/run-pytest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index 75787d11a..93c522fb2 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -49,6 +49,7 @@ jobs: dependencies: 'newest' # Minimal dependencies tests - default: 'false' + os: 'ubuntu-latest' python: '3.12' dependencies: 'minimal' - os: 'macos-latest' From 9d51a36494232584ebe44e2f752263f96b6efb94 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Wed, 15 Nov 2023 11:17:39 -0500 Subject: [PATCH 16/24] refactor: Check both major and minor version. Co-authored-by: Bradley Dice --- signac/import_export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signac/import_export.py b/signac/import_export.py index ae7729fba..f87dc7439 100644 --- a/signac/import_export.py +++ b/signac/import_export.py @@ -1145,7 +1145,7 @@ def read_statepoint_file(path): "The jobs identified with the given schema function are not unique!" ) - if sys.version_info[1] >= 12: # minor version + 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") From 8e5a4d309939184c5b77a95ec7fa11e1d10c878d Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Thu, 30 Nov 2023 17:43:39 -0500 Subject: [PATCH 17/24] fix: Ignore unrelated testing error to filterwarnings --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 081d66e3c..995aecbad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,7 +101,10 @@ follow_imports = 'skip' [tool.pytest.ini_options] xfail_strict = true -filterwarnings = "error" +filterwarnings = [ + "error", + "ignore::DeprecationWarning:datetime.datetime" +] [tool.coverage.run] branch = true From 904609476820d4130e6fda7a87e7905bb879d322 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Fri, 1 Dec 2023 17:45:31 -0500 Subject: [PATCH 18/24] fix: Another warning filter attempt --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 995aecbad..0b6360e82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,7 +103,7 @@ follow_imports = 'skip' xfail_strict = true filterwarnings = [ "error", - "ignore::DeprecationWarning:datetime.datetime" + "ignore::DeprecationWarning:datetime" ] [tool.coverage.run] From c2709fdf3d76bc6348abd317b97567132e2c5cf9 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Fri, 1 Dec 2023 17:58:38 -0500 Subject: [PATCH 19/24] fix: Let's see if it works? --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0b6360e82..8b4fc0d8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,7 +103,8 @@ follow_imports = 'skip' xfail_strict = true filterwarnings = [ "error", - "ignore::DeprecationWarning:datetime" + "ignore::DeprecationWarning", + "error::DeprecationWarning:signac" ] [tool.coverage.run] From c48f4de0c9a3dc36677d31bc5fb5e11b88e9d8f2 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Fri, 1 Dec 2023 18:05:42 -0500 Subject: [PATCH 20/24] fix (WIP): Check to ensure that error is from fitlerwarnings --- pyproject.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8b4fc0d8d..1e0eda415 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,11 +101,6 @@ follow_imports = 'skip' [tool.pytest.ini_options] xfail_strict = true -filterwarnings = [ - "error", - "ignore::DeprecationWarning", - "error::DeprecationWarning:signac" -] [tool.coverage.run] branch = true From 8baa62b35d78d58ab4be2e55a3a9d5eedc7d8a63 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Mon, 4 Dec 2023 14:46:30 -0500 Subject: [PATCH 21/24] ci: Attempt to reintroduce errors in warnings A more specific filter is needed to avoid excluding internal deprecation warnings as errors. --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 1e0eda415..8e3dbc486 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,6 +101,10 @@ follow_imports = 'skip' [tool.pytest.ini_options] xfail_strict = true +filterwarnings = [ + "error", + "ignore::DeprecationWarning", +] [tool.coverage.run] branch = true From a84701b1b7c9d43e092b013a57bea1df18984d2b Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Mon, 4 Dec 2023 15:41:27 -0500 Subject: [PATCH 22/24] ci: Attempt to specify which warnings to ignore. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8e3dbc486..f86fc72d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,7 +103,7 @@ follow_imports = 'skip' xfail_strict = true filterwarnings = [ "error", - "ignore::DeprecationWarning", + "ignore::DeprecationWarning:datetime.*", ] [tool.coverage.run] From 61f9652e22584d2bcca36dea1ef183a04c474d5d Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Mon, 4 Dec 2023 16:04:33 -0500 Subject: [PATCH 23/24] ci: Try again --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f86fc72d4..d1d12a93e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,7 +103,7 @@ follow_imports = 'skip' xfail_strict = true filterwarnings = [ "error", - "ignore::DeprecationWarning:datetime.*", + "ignore::DeprecationWarning:pandas.*", ] [tool.coverage.run] From 26a8519490f4cd8dfb59dd01aee69ff87580c601 Mon Sep 17 00:00:00 2001 From: Brandon Butler Date: Tue, 5 Dec 2023 10:31:05 -0500 Subject: [PATCH 24/24] ci: One more time this time with feeling --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d1d12a93e..0bb4bf7bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,7 +103,7 @@ follow_imports = 'skip' xfail_strict = true filterwarnings = [ "error", - "ignore::DeprecationWarning:pandas.*", + "ignore::DeprecationWarning:dateutil.*", ] [tool.coverage.run]