From 1ba260bc7c7176687b25c4c81828afe3b7f005cd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 10 May 2026 18:06:46 +0000 Subject: [PATCH] feat: update project to Python 3.11+ Agent-Logs-Url: https://github.com/OpenPIV/openpiv-python-gpu/sessions/1a723fb1-2d44-4f90-8f21-3ef24819e3ae Co-authored-by: alexlib <747110+alexlib@users.noreply.github.com> --- .github/workflows/build.yml | 6 +++--- .github/workflows/publish-to-test-pypi.yml | 6 +++--- .github/workflows/testing.yml | 2 +- .readthedocs.yaml | 2 +- .travis.yml | 2 +- openpiv/piv.py | 2 +- openpiv/test/test_process.py | 2 +- openpiv/tutorials/masking_tutorial.py | 2 +- openpiv/tutorials/tutorial1.py | 2 +- openpiv/tutorials/tutorial2.py | 2 +- openpiv/tutorials/windef_tutorial.py | 2 +- openpiv/windef.py | 2 +- setup.py | 8 +++----- 13 files changed, 19 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2cdd037a..8aaf69ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,13 +11,13 @@ on: jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python 3.11 uses: actions/setup-python@v4.5.0 with: - python-version: 3.7 + python-version: "3.11" - name: Install pypa/build run: >- python -m diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 5e863d38..4e0db088 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -5,13 +5,13 @@ on: push jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python 3.11 uses: actions/setup-python@v4.5.0 with: - python-version: 3.7 + python-version: "3.11" - name: Install pypa/build run: >- python -m diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8f81622f..a0e9e08d 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8] + python-version: ["3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 25eaa923..2052b6a8 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.9" + python: "3.11" # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/.travis.yml b/.travis.yml index 0027159c..91952e9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python python: - - "3.8" + - "3.11" notifications: email: false diff --git a/openpiv/piv.py b/openpiv/piv.py index 8361fcef..44763c36 100644 --- a/openpiv/piv.py +++ b/openpiv/piv.py @@ -2,7 +2,7 @@ import matplotlib.pyplot as plt from openpiv import pyprocess, tools -from importlib_resources import files +from importlib.resources import files # import numpy as np diff --git a/openpiv/test/test_process.py b/openpiv/test/test_process.py index 490f8e39..955de32c 100644 --- a/openpiv/test/test_process.py +++ b/openpiv/test/test_process.py @@ -4,7 +4,7 @@ from skimage import img_as_ubyte from scipy.ndimage import shift as shift_img # import pkg_resources as pkg -from importlib_resources import files +from importlib.resources import files from openpiv.pyprocess import extended_search_area_piv as piv from openpiv.pyprocess import fft_correlate_images, \ correlation_to_displacement diff --git a/openpiv/tutorials/masking_tutorial.py b/openpiv/tutorials/masking_tutorial.py index 4fe6e9f9..1c998ab2 100644 --- a/openpiv/tutorials/masking_tutorial.py +++ b/openpiv/tutorials/masking_tutorial.py @@ -1,5 +1,5 @@ import pathlib -from importlib_resources import files +from importlib.resources import files import numpy as np import matplotlib.pyplot as plt from openpiv import tools, scaling, pyprocess, validation, filters,preprocess diff --git a/openpiv/tutorials/tutorial1.py b/openpiv/tutorials/tutorial1.py index 1a1f2750..d59815e4 100644 --- a/openpiv/tutorials/tutorial1.py +++ b/openpiv/tutorials/tutorial1.py @@ -1,4 +1,4 @@ -from importlib_resources import files +from importlib.resources import files import numpy as np from openpiv import tools, pyprocess, scaling, validation, filters diff --git a/openpiv/tutorials/tutorial2.py b/openpiv/tutorials/tutorial2.py index 51cf0ad9..d161384c 100644 --- a/openpiv/tutorials/tutorial2.py +++ b/openpiv/tutorials/tutorial2.py @@ -1,5 +1,5 @@ """ Tutorial of using window deformation multi-pass """ -from importlib_resources import files +from importlib.resources import files from openpiv import tools, pyprocess, validation, filters diff --git a/openpiv/tutorials/windef_tutorial.py b/openpiv/tutorials/windef_tutorial.py index dff053ba..4dfb6bcd 100644 --- a/openpiv/tutorials/windef_tutorial.py +++ b/openpiv/tutorials/windef_tutorial.py @@ -1,4 +1,4 @@ -from importlib_resources import files +from importlib.resources import files from openpiv import windef diff --git a/openpiv/windef.py b/openpiv/windef.py index bbcecb37..a165186a 100644 --- a/openpiv/windef.py +++ b/openpiv/windef.py @@ -15,7 +15,7 @@ from scipy.interpolate import RectBivariateSpline import matplotlib.pyplot as plt -from importlib_resources import files +from importlib.resources import files from openpiv.tools import Multiprocesser, display_vector_field, transform_coordinates from openpiv import validation, filters, tools, scaling, preprocess from openpiv.pyprocess import extended_search_area_piv, get_rect_coordinates, \ diff --git a/setup.py b/setup.py index 1015f0a2..f1aa2a39 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,7 @@ setup_requires=[ "setuptools", ], + python_requires=">=3.11", install_requires=[ "numpy", "imageio>=2.22.4", @@ -25,7 +26,6 @@ "scipy", "natsort", "tqdm", - "importlib_resources", "pycuda", "scikit-cuda @ git+https://github.com/lebedov/scikit-cuda.git", ], @@ -37,10 +37,8 @@ # *sigh* "Development Status :: 4 - Beta", # Sublist of all supported Python versions. - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", # Sublist of all supported platforms and environments. "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows",