Skip to content

Commit

Permalink
Merge pull request #488 from bsipocz/CI_add_py312
Browse files Browse the repository at this point in the history
MAINT: Fix Python 3.12 comaptibility and add it to CI
  • Loading branch information
tomdonaldson authored Oct 8, 2023
2 parents f44eb75 + e1e5c30 commit ba81520
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci_devtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
devdeps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- 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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/test_adhoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions pyvo/dal/tests/test_tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba81520

Please sign in to comment.