Skip to content

Commit

Permalink
Bump libraries and fix UTC deprecation warning (#80)
Browse files Browse the repository at this point in the history
* Bump libraries and fix UTC deprecation warning

* Bump 2.0.1
  • Loading branch information
lloesche authored Mar 6, 2024
1 parent e396424 commit 0bdb1ea
Show file tree
Hide file tree
Showing 4 changed files with 630 additions and 425 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/fixclient_test_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,16 @@ jobs:
FIXCORE_PSK: "changeme"
ports:
- 8900:8900

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Restore dependency cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: $\{\{runner.os}}-poetry-$\{\{hashFiles('poetry.lock')}}
Expand Down
4 changes: 2 additions & 2 deletions fixclient/ca.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from logging import Logger
from typing import Optional, Mapping, Tuple
import asyncio
from datetime import timedelta, datetime
from datetime import timedelta, datetime, timezone
from threading import Lock, Thread, Condition, Event
from ssl import SSLContext, create_default_context, Purpose
import certifi
Expand Down Expand Up @@ -160,7 +160,7 @@ def __certificates_watcher(self) -> None:
with self.__exit:
if self.__loaded.is_set():
cert = self.__ca_cert
if isinstance(cert, Certificate) and cert.not_valid_after < datetime.utcnow() - self.__renew_before:
if isinstance(cert, Certificate) and cert.not_valid_after_utc < datetime.now(timezone.utc) - self.__renew_before:
asyncio.run(self.reload())
if self.__exit.wait(60):
break
Loading

0 comments on commit 0bdb1ea

Please sign in to comment.