chore: support for python 3.12

This commit is contained in:
Éloi Rivard 2023-11-11 11:32:19 +01:00
parent 7c7efcc24c
commit d9fb4f9167
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184
8 changed files with 13 additions and 9 deletions

View file

@ -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'

View file

@ -5,7 +5,7 @@ This document describes changes between each past release.
## 6.1.2 (unreleased)
- Nothing changed yet.
- Add support for python 3.12 (#757)
## 6.1.1 (2023-10-04)

View file

@ -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.

View file

@ -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}

View file

@ -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", "")
)

View file

@ -1781,7 +1781,7 @@ class TestBudget(IhatemoneyTestCase):
<pubDate>Tue, 25 Jul 2023 00:00:00 +0000</pubDate>
</item>
</channel>
</rss>""" # noqa: E501
</rss>""" # noqa: E221, E222, E231, E501
assert resp.data.decode() == expected_rss_content
def test_rss_feed_history_disabled(self):
@ -1865,7 +1865,7 @@ class TestBudget(IhatemoneyTestCase):
<pubDate>Tue, 25 Jul 2023 00:00:00 +0000</pubDate>
</item>
</channel>
</rss>""" # noqa: E501
</rss>""" # noqa: E221, E222, E231, E501
assert resp.data.decode() == expected_rss_content
def test_rss_if_modified_since_header(self):

View file

@ -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",
]

View file

@ -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]