From 59c7ec7624617e922967d8f68f058e01876b99d7 Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Tue, 5 Nov 2024 13:19:05 -0500 Subject: [PATCH] build!: require python 3.11-13 (#14) --- .github/workflows/checks.yaml | 2 +- pyproject.toml | 4 ++-- src/regbot/fetch/drugsfda.py | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 1d1323e..5829f05 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index c84b324..73b9445 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,11 +11,11 @@ classifiers = [ "Topic :: Scientific/Engineering :: Bio-Informatics", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] -requires-python = ">=3.10" +requires-python = ">=3.11" description = "Fetch regulatory approval data for drug terms" license = {file = "LICENSE"} dependencies = ["requests"] diff --git a/src/regbot/fetch/drugsfda.py b/src/regbot/fetch/drugsfda.py index bb86954..329039e 100644 --- a/src/regbot/fetch/drugsfda.py +++ b/src/regbot/fetch/drugsfda.py @@ -464,9 +464,7 @@ def _intify(value: str) -> int | None: def _make_datetime(value: str) -> datetime.datetime | None: try: - return datetime.datetime.strptime(value, "%Y%m%d").replace( - tzinfo=datetime.timezone.utc - ) + return datetime.datetime.strptime(value, "%Y%m%d").replace(tzinfo=datetime.UTC) except ValueError: _logger.error("Unable to convert value '%s' to datetime", value) return None