From f35074896fa25d1cb7d69126b1cfb9df97331b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Thu, 21 Sep 2023 22:58:49 -0700 Subject: [PATCH 1/4] CI: adding python 3.12 testing --- .github/workflows/ci_devtests.yml | 6 +++--- tox.ini | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_devtests.yml b/.github/workflows/ci_devtests.yml index 3bb453fbc..4205d46de 100644 --- a/.github/workflows/ci_devtests.yml +++ b/.github/workflows/ci_devtests.yml @@ -22,14 +22,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12-dev" - name: Install tox run: python -m pip install --upgrade tox - name: Run tests against dev dependencies - run: tox -e py311-test-devdeps-alldeps-cov + run: tox -e py312-test-devdeps-alldeps-cov - name: Upload coverage to codecov uses: codecov/codecov-action@v3 diff --git a/tox.ini b/tox.ini index 193416297..6fab0c398 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ # as oldestdeps and devastropy might not support the full python range # listed here envlist = - py{38,39,310,311}-test{,-alldeps,-oldestdeps,-devdeps}{,-online}{,-cov} + py{38,39,310,311,312}-test{,-alldeps,-oldestdeps,-devdeps}{,-online}{,-cov} linkcheck codestyle build_docs From dc29c19c11b9304c92bdb2ba5818f886262264d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Thu, 21 Sep 2023 22:59:04 -0700 Subject: [PATCH 2/4] CI: update actions version --- .github/workflows/ci_devtests.yml | 2 +- .github/workflows/ci_tests.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_devtests.yml b/.github/workflows/ci_devtests.yml index 4205d46de..0d3fa35e3 100644 --- a/.github/workflows/ci_devtests.yml +++ b/.github/workflows/ci_devtests.yml @@ -21,7 +21,7 @@ jobs: devdeps: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.12 uses: actions/setup-python@v4 with: diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 73eae268c..f2c18dd52 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python @@ -60,7 +60,7 @@ jobs: os: [macos-latest, windows-latest] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python @@ -78,7 +78,7 @@ jobs: strategy: fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.8 uses: actions/setup-python@v4 with: From fde586f83dc5c92e0fabaf4d9e0c367694255b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Thu, 21 Sep 2023 23:07:15 -0700 Subject: [PATCH 3/4] MAINT: add python 3.12 compatibility fixes --- docs/conf.py | 2 +- pyvo/dal/tests/test_adhoc.py | 2 +- pyvo/dal/tests/test_tap.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 4949e229c..32db0328a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -72,7 +72,7 @@ project = setup_cfg['name'] author = setup_cfg['author'] copyright = '{}, {}'.format( - datetime.datetime.now().year, setup_cfg['author']) + datetime.datetime.now(tz=datetime.timezone.utc).year, setup_cfg['author']) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/pyvo/dal/tests/test_adhoc.py b/pyvo/dal/tests/test_adhoc.py index 26a3f86c7..540040b7d 100644 --- a/pyvo/dal/tests/test_adhoc.py +++ b/pyvo/dal/tests/test_adhoc.py @@ -127,7 +127,7 @@ class TestClass(dict, AxisParamMixin): pass test_obj = TestClass() assert not hasattr(test_obj, '_time') - now = Time(datetime.datetime.now()) + now = Time(datetime.datetime.now(tz=datetime.timezone.utc)) test_obj.time.add(now) assert now in test_obj.time assert test_obj['TIME'] == ['{now} {now}'.format(now=now.mjd)] diff --git a/pyvo/dal/tests/test_tap.py b/pyvo/dal/tests/test_tap.py index d2ca6d7a8..60cc4b732 100644 --- a/pyvo/dal/tests/test_tap.py +++ b/pyvo/dal/tests/test_tap.py @@ -598,7 +598,7 @@ def test_get_job_list(self): # - 1 job for after attribute # Tests consists in counting the cumulative number of jobs as per # above rules - after = datetime.datetime.now() + after = datetime.datetime.now(tz=datetime.timezone.utc) assert len(service.get_job_list()) == 0 assert len(service.get_job_list(last=3)) == 3 assert len(service.get_job_list(after='2018-04-25T17:46:01Z')) == 1 @@ -609,7 +609,7 @@ def test_get_job_list(self): last=3)) == 4 assert len(service.get_job_list(phases=['EXECUTING'], last=3)) == 5 assert len(service.get_job_list(phases=['EXECUTING'], last=3, - after=datetime.datetime.now())) == 6 + after=datetime.datetime.now(tz=datetime.timezone.utc))) == 6 @pytest.mark.usefixtures('create_fixture') def test_create_table(self): From e1e5c3015c4bb367fc6265982bc33e5e34c1839e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Wed, 4 Oct 2023 12:27:34 -0700 Subject: [PATCH 4/4] CI: python 3.12 is now released --- .github/workflows/ci_devtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_devtests.yml b/.github/workflows/ci_devtests.yml index 0d3fa35e3..ba2ce24e7 100644 --- a/.github/workflows/ci_devtests.yml +++ b/.github/workflows/ci_devtests.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Python 3.12 uses: actions/setup-python@v4 with: - python-version: "3.12-dev" + python-version: "3.12" - name: Install tox run: python -m pip install --upgrade tox - name: Run tests against dev dependencies