diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml
index aaf77855..372ca8ae 100644
--- a/.github/workflows/test-docs.yml
+++ b/.github/workflows/test-docs.yml
@@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
+ python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
dependencies: [normal]
database: [sqlite]
# Test other databases only with one version of Python (Debian buster has 3.7)
@@ -66,6 +66,9 @@ jobs:
- python-version: "3.11"
dependencies: minimal
database: sqlite
+ - python-version: "3.12"
+ dependencies: minimal
+ database: sqlite
steps:
- uses: actions/checkout@v3
@@ -100,4 +103,4 @@ jobs:
TESTING_SQLALCHEMY_DATABASE_URI: 'mysql+pymysql://root:ihatemoney@localhost:3306/ihatemoney_ci'
- name: Run Lint & Docs
run: tox -e lint_docs
- if: matrix.python-version == '3.11'
+ if: matrix.python-version == '3.12'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c1a28619..0b5a3888 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ This document describes changes between each past release.
## 6.2.0 (unreleased)
-- Nothing changed yet.
+- Add support for python 3.12 (#757)
## 6.1.3 (2023-11-23)
diff --git a/README.md b/README.md
index ff4cdf67..f6d3759e 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ highly encouraged to do so.
## Requirements
-- **Python**: version 3.7 to 3.11.
+- **Python**: version 3.7 to 3.12.
- **Backends**: SQLite, PostgreSQL, MariaDB (version 10.3.2 or above),
Memory.
diff --git a/docs/installation.md b/docs/installation.md
index 8cd88429..d0cae448 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -83,7 +83,7 @@ Some Paas (Platform-as-a-Service), provide a documentation or even a quick insta
«Ihatemoney» depends on:
-- **Python**: any version from 3.7 to 3.11 will work.
+- **Python**: any version from 3.7 to 3.12 will work.
- **A database backend**: choose among SQLite, PostgreSQL, MariaDB (>=
10.3.2).
- **Virtual environment** (recommended): [python3-venv]{.title-ref}
diff --git a/ihatemoney/tests/api_test.py b/ihatemoney/tests/api_test.py
index 13477ada..260d6d45 100644
--- a/ihatemoney/tests/api_test.py
+++ b/ihatemoney/tests/api_test.py
@@ -43,7 +43,7 @@ class TestAPI(IhatemoneyTestCase):
def get_auth(self, username, password=None):
password = password or username
base64string = (
- base64.encodebytes(f"{username}:{password}".encode("utf-8"))
+ base64.encodebytes(f"{username}:{password}".encode("utf-8")) # noqa: E231
.decode("utf-8")
.replace("\n", "")
)
diff --git a/ihatemoney/tests/budget_test.py b/ihatemoney/tests/budget_test.py
index e3292053..f66cab1c 100644
--- a/ihatemoney/tests/budget_test.py
+++ b/ihatemoney/tests/budget_test.py
@@ -1784,7 +1784,7 @@ class TestBudget(IhatemoneyTestCase):
Tue, 25 Jul 2023 00:00:00 +0000
-""" # noqa: E501
+""" # noqa: E221, E222, E231, E501
assert resp.data.decode() == expected_rss_content
def test_rss_feed_history_disabled(self):
@@ -1868,7 +1868,7 @@ class TestBudget(IhatemoneyTestCase):
Tue, 25 Jul 2023 00:00:00 +0000
-""" # noqa: E501
+""" # noqa: E221, E222, E231, E501
assert resp.data.decode() == expected_rss_content
def test_rss_if_modified_since_header(self):
diff --git a/pyproject.toml b/pyproject.toml
index 13af5cde..d14e8288 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -20,6 +20,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
]
diff --git a/tox.ini b/tox.ini
index e79ede31..695d550c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py311,py310,py39,py38,py37,lint_docs
+envlist = py312,py311,py310,py39,py38,py37,lint_docs
skip_missing_interpreters = True
[testenv]