From a19aac1cca954e4df234e9f9dfafbacde2ff0cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Mon, 26 Aug 2024 21:22:30 -0700 Subject: [PATCH 1/2] MAINT: adding Python 3.13 to CI --- .github/workflows/ci_devtests.yml | 6 ++++++ tox.ini | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_devtests.yml b/.github/workflows/ci_devtests.yml index 2007785423..0a41204755 100644 --- a/.github/workflows/ci_devtests.yml +++ b/.github/workflows/ci_devtests.yml @@ -36,6 +36,12 @@ jobs: toxenv: py312-test-alldeps-devdeps-cov toxargs: -v + - name: Python 3.13 + os: ubuntu-latest + python: '3.13-dev' + toxenv: py313-test + toxargs: -v + steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/tox.ini b/tox.ini index 0158038123..f2f7a1f6cf 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{39,310,311,312}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-online}{,-cov} + py{39,310,311,312,313}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-online}{,-cov} codestyle linkcheck build_docs @@ -24,6 +24,8 @@ setenv = PYTEST_ARGS = '' online: PYTEST_ARGS = --remote-data=any --reruns=1 --reruns-delay 10 -m "not bigdata" devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple + # astropy doesn't yet have a 3.13 compatible release + py313: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple deps = devdeps: numpy>=0.0.dev0 @@ -32,6 +34,9 @@ deps = devdeps: pyerfa>=0.0.dev0 devdeps: git+https://github.com/astropy/pyvo.git#egg=pyvo + # astropy doesn't yet have a 3.13 compatible release + py313: astropy>0.0dev0 + # mpl while not a dependency, it's required for the tests, and would pull up a newer numpy version if not pinned. # And pillow should be pinned as well, otherwise a too new version is pulled that is not compatible with old np. From 60edbf93a371eb1b90a9159fc38636d38f3b1449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Tue, 27 Aug 2024 10:50:45 -0700 Subject: [PATCH 2/2] TST: change test to be Python 3.13 compatible --- astroquery/utils/tests/test_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/astroquery/utils/tests/test_utils.py b/astroquery/utils/tests/test_utils.py index beddfbb9e6..ce09b862ff 100644 --- a/astroquery/utils/tests/test_utils.py +++ b/astroquery/utils/tests/test_utils.py @@ -45,7 +45,9 @@ def test_class_or_instance(): assert SimpleQueryClass.query() == "class" U = SimpleQueryClass() assert U.query() == "instance" - assert SimpleQueryClass.query.__doc__ == " docstring " + # Indent changes in Python 3.13 thus cannot equate + # See https://github.com/python/cpython/issues/81283 + assert "docstring" in SimpleQueryClass.query.__doc__ @pytest.mark.parametrize(('coordinates'),