Skip to content

Commit

Permalink
MAINT: add python 3.12 compatibility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipocz committed Sep 22, 2023
1 parent dc29c19 commit fde586f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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

0 comments on commit fde586f

Please sign in to comment.