From 303f0aa804f496b7854fcfdb3dd6b702555c88cd Mon Sep 17 00:00:00 2001 From: imcompiling Date: Wed, 22 May 2024 23:16:22 -0400 Subject: [PATCH 1/3] Update python, sqlalchemy, pandas, and nextcord. --- pyproject.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a20df62..d0334f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,15 +7,15 @@ readme = "README.md" package-mode = false [tool.poetry.dependencies] -python = "^3.11" +python = "^3.12" gitpython = "3.1.43" fastapi = "0.111.0" hydra-core = "1.3.2" -nextcord = "2.4.2" -pandas = "1.5.2" +nextcord = "^2.6.0" +pandas = "^2.2.2" python-dotenv = "1.0.0" pytz = "2022.7.1" -sqlalchemy = "1.4.46" +sqlalchemy = "^2.0.30" aiofiles = "^23.2.1" @@ -63,7 +63,7 @@ line-length = 120 indent-width = 4 # Assume Python 3.8 -target-version = "py311" +target-version = "py312" [tool.ruff.lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. From cdc335936c1cf010d57d4060e1c94cee8b431738 Mon Sep 17 00:00:00 2001 From: imcompiling Date: Wed, 22 May 2024 23:35:40 -0400 Subject: [PATCH 2/3] update dependencies --- pyproject.toml | 11 ++++++----- utils.py | 7 +++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d0334f8..0c9a912 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,15 +8,16 @@ package-mode = false [tool.poetry.dependencies] python = "^3.12" -gitpython = "3.1.43" -fastapi = "0.111.0" -hydra-core = "1.3.2" +gitpython = "^3.1.43" +fastapi = "^0.111.0" +hydra-core = "^1.3.2" nextcord = "^2.6.0" pandas = "^2.2.2" -python-dotenv = "1.0.0" -pytz = "2022.7.1" +python-dotenv = "^1.0.1" +pytz = "^2024.1" sqlalchemy = "^2.0.30" aiofiles = "^23.2.1" +setuptools = "^70.0.0" [tool.poetry.group.dev.dependencies] diff --git a/utils.py b/utils.py index 7a8f64e..00c0e0f 100644 --- a/utils.py +++ b/utils.py @@ -1,5 +1,6 @@ """File contains util functions.""" +import calendar import os from collections.abc import Sequence from datetime import UTC, datetime @@ -46,12 +47,10 @@ def get_datetime(day: str) -> datetime: day = int(day.split("/")[1]) # ensure that year rolls over if current month is December and the next month is less than 12. - # TODO(imcompiling): replace with Calendar.DECEMBER when updating to python 3.12 - # https://gitea.cheezers.org/imcompiling/dakiny-bot/issues/52 - if today.month == 12 and month < 12: + if today.month == calendar.DECEMBER and month < calendar.DECEMBER: year += 1 - if today.month == 1 and month > 1: + if today.month == calendar.JANUARY and month > calendar.JANUARY: year -= 1 return datetime(year, month, day, tzinfo=UTC) From 9c71d24fe3396076ce63cf08a3d76767b71e8106 Mon Sep 17 00:00:00 2001 From: imcompiling Date: Fri, 24 May 2024 13:36:56 -0400 Subject: [PATCH 3/3] Unneeded file. --- runtime.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 runtime.txt diff --git a/runtime.txt b/runtime.txt deleted file mode 100644 index 73e24dc..0000000 --- a/runtime.txt +++ /dev/null @@ -1 +0,0 @@ -python-3.10.4