Skip to content

Commit 16047c7

Browse files
authored
Add Python 3.13 support (#217)
1 parent 5f2c292 commit 16047c7

13 files changed

+446
-692
lines changed

.github/workflows/codeql.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
- name: Checkout Repository
2525
uses: actions/checkout@v4
2626

27-
- name: Set up Python 3.12
27+
- name: Set up Python
2828
id: setup-python
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: '3.12'
31+
python-version: '3.x'
3232

3333
- name: Cache Dependencies
3434
id: cache-pip
@@ -48,7 +48,6 @@ jobs:
4848
uses: github/codeql-action/init@v3
4949
with:
5050
languages: python
51-
setup-python-dependencies: false
5251

5352
- name: Perform CodeQL Analysis
5453
uses: github/codeql-action/analyze@v3

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
version: [3.9, '3.10', '3.11', '3.12']
18+
version: [3.9, '3.10', '3.11', '3.12', '3.13']
1919

2020
steps:
2121
- name: Checkout Repository

.readthedocs.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: 2
22

33
build:
4-
os: ubuntu-22.04
4+
os: ubuntu-24.04
55
tools:
6-
python: "3.11"
6+
python: "3.13"
77

88
sphinx:
99
configuration: docs/conf.py

bot/cogs/utilities.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async def about(self, ctx: RoboContext) -> None:
8282
# For Kumiko, it's done differently
8383
# R. Danny's way of doing it is probably close enough anyways
8484
memory_usage = self.process.memory_full_info().uss / 1024**2
85-
cpu_usage = self.process.cpu_percent() / psutil.cpu_count()
85+
cpu_usage = self.process.cpu_percent() / psutil.cpu_count() # type: ignore
8686
bot_user: discord.ClientUser = self.bot.user # type: ignore
8787

8888
revisions = "See [GitHub](https://github.com/transprogrammer/rodhaj)"

docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
####################################################################################################
22
## Final image
33
####################################################################################################
4-
FROM python:3.12-slim-bookworm
4+
FROM python:3.13-slim-bookworm
55

66
ENV DEBIAN_FRONTEND=noninteractive
77

@@ -26,7 +26,7 @@ RUN adduser --disabled-password --gecos "" rodhaj \
2626

2727
USER rodhaj
2828

29-
ENV PATH="${PATH}:${HOME}/.local/bin"
29+
ENV PATH="${PATH}:/home/rodhaj/.local/bin"
3030

3131
RUN pip install --user -r requirements.txt
3232

docker/pg/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
FROM postgres:16
1+
FROM postgres:17
22
COPY /init.sh /docker-entrypoint-initdb.d/

docs/Makefile

-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,3 @@ help:
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21-
22-
autobuild:
23-
sphinx-autobuild . build/html

docs/requirements.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
sphinx>=7.2.6
2-
sphinx-copybutton>=0.5.2
3-
sphinxext-opengraph>=0.8.2
4-
furo>=2023.9.10
1+
sphinx>=8.1.3,<9
2+
sphinx-copybutton>=0.5.2,<1
3+
furo>=2024.5.6,<2025

poetry.lock

+422-662
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+7-8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ pygit2 = "^1.15.1"
1818
python-dateutil = "^2.9.0"
1919
click = "^8.1.7"
2020
async-lru = "^2.0.4"
21-
msgspec = "^0.18.6"
2221
jishaku = "^2.6.0"
2322
pyyaml = "^6.0.2"
2423
watchfiles = "^0.24.0"
@@ -27,13 +26,7 @@ prometheus-client = "^0.21.0"
2726
prometheus-async = "^22.2.0"
2827
parsedatetime = "^2.6"
2928
humanize = "^4.11.0"
30-
31-
32-
[tool.poetry.group.docs.dependencies]
33-
sphinx = "^7.4.7"
34-
sphinx-autobuild = "^2024.10.3"
35-
sphinx-copybutton = "^0.5.2"
36-
furo = "^2024.8.6"
29+
msgspec = {git = "https://github.com/jcrist/msgspec", rev = "595c33c4a71c6d0c539b82233982a65819e240cf"}
3730

3831

3932
[tool.poetry.group.dev.dependencies]
@@ -43,6 +36,12 @@ bandit = {extras = ["toml"], version = "^1.7.10"}
4336
ruff = "^0.7.4"
4437
tox = "^4.23.2"
4538

39+
40+
[tool.poetry.group.docs.dependencies]
41+
sphinx = "^7.4.7"
42+
sphinx-copybutton = "^0.5.2"
43+
furo = "^2024.8.6"
44+
4645
[tool.pyright]
4746
include = ["bot/**"]
4847
exclude = [

requirements-dev.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ ruff>=0.4.4,<1
88
tox>=4.15.0,<5
99

1010
# Docs
11-
sphinx>=7.3.7,<8
12-
sphinx-autobuild>=2024.4.16,<2025
11+
sphinx>=8.1.3,<9
1312
sphinx-copybutton>=0.5.2,<1
1413
furo>=2024.5.6,<2025

requirements.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
discord.py[speed]>=2.3.2,<3
1+
discord.py[speed]>=2.4.0,<3
2+
audioop-lts>=0.2.1,<1 ; python_version>='3.13'
23
uvloop>=0.19.0,<1 ; sys_platform != "win32"
34
winloop>=0.1.1,<1 ; sys_platform == "win32"
45
asyncpg>=0.29.0,<1
@@ -11,7 +12,7 @@ typing-extensions>=4.9.0,<5
1112
prometheus-client>=0.20.0,<1
1213
prometheus-async>=22.2.0,<23
1314
async-lru>=2.0.4,<3
14-
msgspec>=0.18.6,<1
15+
msgspec @ git+https://github.com/jcrist/msgspec@595c33c4a71c6d0c539b82233982a65819e240cf
1516
jishaku>=2.5.2,<3
1617
watchfiles>=0.21.0,<1
1718
PyYAML>=6.0.1,<7

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
requires =
33
tox>=4
4-
env_list = py{39,310,311,312}
4+
env_list = py{39,310,311,312,313}
55
no_package = true
66

77
[testenv]

0 commit comments

Comments
 (0)