From 2bc9587bef694451ff35aa3a69bb236d88f26998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Mon, 10 Jun 2024 10:56:23 -0600 Subject: [PATCH 1/9] Replace distutils.spawn.find_executable with shutil.which --- python/sdss_access/sync/curl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sdss_access/sync/curl.py b/python/sdss_access/sync/curl.py index 7bda080..bb6110e 100644 --- a/python/sdss_access/sync/curl.py +++ b/python/sdss_access/sync/curl.py @@ -1,8 +1,8 @@ from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to3 support. -import distutils.spawn import re +import shutil import time from os import popen from os.path import exists, dirname, join, basename, getsize, getmtime, sep @@ -28,7 +28,7 @@ class CurlAccess(BaseAccess): def __init__(self, label='sdss_curl', stream_count=5, mirror=False, public=False, release=None, verbose=False): - if not distutils.spawn.find_executable('curl'): + if not shutil.which('curl'): msg = ('cURL does not appear to be installed. To install, the cURL ' 'download wizard is located at: https://curl.haxx.se/dlwiz/. ' 'Installation tutorials for cURL (software from https://curl.haxx.se) ' From e809479eb5e4b21f2b1dfdddb5c6f334673665c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Mon, 10 Jun 2024 11:13:25 -0600 Subject: [PATCH 2/9] Require Sphinx<8 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index b998db5..fde984f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -72,7 +72,7 @@ dev = wheel>=0.33.6 docs = - Sphinx>=7.1.0 + Sphinx>=7.1.0,<8.0.0 sphinx_bootstrap_theme>=0.4.12 recommonmark>=0.6 sphinx-issues>=1.2.0 From 7c656a485ef9cf47a0e2ef14698e546964951f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Mon, 10 Jun 2024 11:14:59 -0600 Subject: [PATCH 3/9] Also require pytest < 8.0.0 in setup.cfg --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index fde984f..f89cd9f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -55,7 +55,7 @@ dev = matplotlib>=3.1.1 flake8>=3.7.9 doc8>=0.8.0 - pytest>=5.2.2 + pytest>=5.2.2,<8.0.0 pytest-cov>=2.8.1 pytest-mock>=1.13.0 pytest-sugar>=0.9.2 From ec33c2c612c8f3ec5cc10183cd2d03090d81daa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Mon, 10 Jun 2024 12:05:24 -0600 Subject: [PATCH 4/9] Pinning Sphinx<7.3.7 See https://github.com/sphinx-doc/sphinx/issues/12339 --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index f89cd9f..0b02c5f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -55,7 +55,7 @@ dev = matplotlib>=3.1.1 flake8>=3.7.9 doc8>=0.8.0 - pytest>=5.2.2,<8.0.0 + pytest>=5.2.2 pytest-cov>=2.8.1 pytest-mock>=1.13.0 pytest-sugar>=0.9.2 @@ -72,7 +72,7 @@ dev = wheel>=0.33.6 docs = - Sphinx>=7.1.0,<8.0.0 + Sphinx>=7.0.0,<7.3.7 # Pinning until this solved issue is tagged: https://github.com/sphinx-doc/sphinx/issues/12339 sphinx_bootstrap_theme>=0.4.12 recommonmark>=0.6 sphinx-issues>=1.2.0 From 9e6b155fc82b1814f36db35a7cb32078bb8a64e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Mon, 10 Jun 2024 12:09:49 -0600 Subject: [PATCH 5/9] Pin <7.3.0 for Sphinx --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 0b02c5f..e70eb74 100644 --- a/setup.cfg +++ b/setup.cfg @@ -72,7 +72,7 @@ dev = wheel>=0.33.6 docs = - Sphinx>=7.0.0,<7.3.7 # Pinning until this solved issue is tagged: https://github.com/sphinx-doc/sphinx/issues/12339 + Sphinx>=7.0.0,<7.3.0 # Pinning until this solved issue is tagged: https://github.com/sphinx-doc/sphinx/issues/12339 sphinx_bootstrap_theme>=0.4.12 recommonmark>=0.6 sphinx-issues>=1.2.0 From 65434c74a4aa4e565d2897b612b18896cd9bc7b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Mon, 10 Jun 2024 13:22:24 -0600 Subject: [PATCH 6/9] Added matrix with Python versions 3.9-3.12 --- .github/workflows/build.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be62e40..786b895 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,11 @@ jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.9', '3.10', '3.11', '3.12'] + + steps: - name: Clone access uses: actions/checkout@v4 @@ -24,7 +29,7 @@ jobs: - name: Set up Python 3.9 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: ${{ matrix.python-version }} - name: Install tree package run: | @@ -70,4 +75,4 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: - file: ./access/coverage.xml \ No newline at end of file + file: ./access/coverage.xml From f1461e18658783d0bf164ea024843041e85f9574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Mon, 10 Jun 2024 13:26:51 -0600 Subject: [PATCH 7/9] Set fail-fast to false in the strategy matrix --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 786b895..754ce40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ['3.9', '3.10', '3.11', '3.12'] - steps: - name: Clone access uses: actions/checkout@v4 @@ -26,7 +26,7 @@ jobs: repository: sdss/tree path: tree - - name: Set up Python 3.9 + - name: Set up Python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} From 59dbeb47f47be2b279c3e3a95b4c09d3b9069352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Mon, 10 Jun 2024 13:28:22 -0600 Subject: [PATCH 8/9] Fix test_lookup_keys after tree update --- tests/path/test_sdss5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/path/test_sdss5.py b/tests/path/test_sdss5.py index 4c9660b..9b56c87 100644 --- a/tests/path/test_sdss5.py +++ b/tests/path/test_sdss5.py @@ -71,7 +71,7 @@ def test_special_function(self, path, name, special, keys, exp): assert exp in full @pytest.mark.parametrize('name, keys', [('specLite', ['fieldid', 'catalogid', 'run2d', 'mjd']), - ('mwmStar', ['component', 'sdss_id', 'v_astra']),]) + ('mwmStar', ['sdss_id', 'v_astra']),]) def test_lookup_keys(self, path, name, keys): realkeys = path.lookup_keys(name) assert set(keys) == set(realkeys) From 51473528e8b0321b6f5a8d46753d7e339d645f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Mon, 10 Jun 2024 13:33:06 -0600 Subject: [PATCH 9/9] Update changelog --- CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b94f0b2..501a8c7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,10 @@ Change Log This document records the main changes to the sdss_access code. +3.0.5 (unreleased) +------------------ +- PR `62` - Fix issue `61`: removed use of ``disutils`` which has been Deprecated in Python 3.12. Also pin Sphinx to ``<7.3.0`` to address `this issue `. + 3.0.4 (03-08-2024) ------------------ - Fix issue `52` - rsync failure when remote file is compressed compared to template