From 587bc6ab5b09992c93cee725eebe3cca371c746d Mon Sep 17 00:00:00 2001 From: Tom Mitchell Date: Mon, 16 Oct 2023 15:25:44 -0400 Subject: [PATCH 1/4] Update compatible python versions Drop support for Python 3.7 because it is end of life. Add support for the recently released Python 3.12. --- .github/workflows/python-package.yml | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 1fccf03..5cd84f5 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,7 +16,7 @@ jobs: matrix: # Default builds are on Ubuntu os: [ubuntu-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10'] include: # Also test on macOS and Windows using latest Python 3 - os: macos-latest diff --git a/setup.py b/setup.py index f9f0512..a6a76a8 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup(name='sbol3', version='1.2', description='Python implementation of SBOL 3 standard', - python_requires='>=3.7', + python_requires='>=3.8', url='https://github.com/SynBioDex/pySBOL3', author='Tom Mitchell', author_email='tcmitchell@users.noreply.github.com', @@ -25,11 +25,11 @@ # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. 'Programming Language :: Python :: 3 :: Only', - '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', ], # What does your project relate to? keywords='synthetic biology', From 39b08281ed116d28596490672fef96b2a53cd9bf Mon Sep 17 00:00:00 2001 From: Tom Mitchell Date: Mon, 16 Oct 2023 15:38:15 -0400 Subject: [PATCH 2/4] Disable deprecation warnings in Python 3.12 Python warns about itself for datetime.datetime.utcfromtimestamp so disable the deprecation checks in Python 3.12. --- .github/workflows/python-package.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 5cd84f5..0b16af5 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -40,12 +40,13 @@ jobs: python -m pip install 'pycodestyle>=2.10.0' 'pylint>=2.17' - name: Test with unittest shell: bash - # pyshacl has a 3.10 deprecation warning in distutils - # disable warnings until we tune to ignore distutils deprecation warning + # Python 3.12 has lots of deprecation warnings about + # datetime.datetime.utcfromtimestamp in the standard library. + # disable warnings checks for python 3.12. run: | WARNINGS="-We" PY_VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") - if [ "${PY_VERSION}" == "3.10" ]; then echo "Disabling warnings"; WARNINGS=""; fi + if [ "${PY_VERSION}" == "3.12" ]; then echo "Disabling warnings"; WARNINGS=""; fi python $WARNINGS -m unittest discover -s test pycodestyle sbol3 test pylint sbol3 test From 3773e1abfd29a26b8327fdc61ff17d21b8739939 Mon Sep 17 00:00:00 2001 From: Tom Mitchell Date: Mon, 16 Oct 2023 15:49:06 -0400 Subject: [PATCH 3/4] Bump dependency versions --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a6a76a8..0740f7a 100644 --- a/setup.py +++ b/setup.py @@ -40,9 +40,9 @@ # of rdflib 6.x 'rdflib>=6.1.1,==6.*', 'python-dateutil~=2.8.2', - 'pyshacl~=0.21', + 'pyshacl~=0.23', ], test_suite='test', tests_require=[ - 'pycodestyle~=2.10' + 'pycodestyle~=2.11' ]) From 22daaf9186f5d84357544060d14430efae96da8d Mon Sep 17 00:00:00 2001 From: Tom Mitchell Date: Mon, 16 Oct 2023 16:08:47 -0400 Subject: [PATCH 4/4] Drop Python 3.12 support pyshacl imports a deprecated API `pkg_resources`. We'll have to wait for pyshacl to support Python 3.12. --- .github/workflows/python-package.yml | 2 +- setup.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0b16af5..9b4b9ca 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,7 +16,7 @@ jobs: matrix: # Default builds are on Ubuntu os: [ubuntu-latest] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10'] include: # Also test on macOS and Windows using latest Python 3 - os: macos-latest diff --git a/setup.py b/setup.py index 0740f7a..d95ad12 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,6 @@ 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', ], # What does your project relate to? keywords='synthetic biology',