Update Python (#1083)

* drop python3.6

* update github python actions and use pip cache

* we use setup.cfg not requirements.txt

* add python 3.11. Still in RC for now

* use latest 3.11 version

* 3.11 is strill RC for now

* go back to include key that match original py version

this shouldn't fail

* upgrade psycopg2 for python 3.11

Upgrade for all, it's a minor version

* update documentation for python 3.11 support

* update version

* 3.11 is out

Right on time!
This commit is contained in:
Glandos 2022-11-08 00:10:21 +01:00 committed by GitHub
parent 294042e812
commit d8b6355101
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 31 additions and 19 deletions

View file

@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
dependencies: [normal]
database: [sqlite]
# Test other databases only with one version of Python (Debian buster has 3.7)
@ -48,7 +48,7 @@ jobs:
dependencies: normal
database: mariadb
# Try a few variants with the minimal versions supported
- python-version: 3.6
- python-version: 3.7
dependencies: minimal
database: sqlite
- python-version: 3.7
@ -63,13 +63,18 @@ jobs:
- python-version: "3.10"
dependencies: minimal
database: sqlite
- python-version: "3.11"
dependencies: minimal
database: sqlite
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/setup.cfg'
- name: Change dependencies to minimal supported versions
run: sed -i -e 's/>=/==/g; s/~=.*==\(.*\)/==\1/g; s/~=/==/g;' setup.cfg
if: matrix.dependencies == 'minimal'

View file

@ -1,7 +1,6 @@
sudo: false
language: python
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"

View file

@ -2,7 +2,14 @@
This document describes changes between each past release.
## 5.2.1 (unreleased)
## 6.0.0 (unreleased)
### Breaking
- Drop Python 3.6 support
- Add Python 3.11 support
The minimum supported version is now Python 3.7, and the project is
tested with up to Python 3.11
### Changed
- Add a cancel button when editing a bill for better UX

View file

@ -46,7 +46,7 @@ test: install-dev ## Run the tests
.PHONY: black
black: install-dev ## Run the tests
$(VENV)/bin/black --target-version=py36 .
$(VENV)/bin/black --target-version=py37 .
.PHONY: isort
isort: install-dev ## Run the tests

View file

@ -22,7 +22,7 @@ highly encouraged to do so.
## Requirements
- **Python**: version 3.6 to 3.9.
- **Python**: version 3.7 to 3.11.
- **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.6 to 3.10 will work.
- **Python**: any version from 3.7 to 3.11 will work.
- **A database backend**: choose among SQLite, PostgreSQL, MariaDB (>=
10.3.2).
- **Virtual environment** (recommended): [python3-venv]{.title-ref}

View file

@ -35,14 +35,14 @@ special instructions:
#### Switch to a supported version of Python
::: {note}
If you are already using Python ≥ 3.6, you can skip this section, no
If you are already using Python ≥ 3.7, you can skip this section, no
special action is required.
:::
If you were running IHateMoney using Python < 3.6, you must, **before**
If you were running IHateMoney using Python < 3.7, you must, **before**
upgrading:
1. Ensure to have a Python ≥ 3.6 available on your system
1. Ensure to have a Python ≥ 3.7 available on your system
2. Rebuild your virtual environment (if any). It will *not* alter your
database nor configuration. For example, if your virtual environment

View file

@ -1,6 +1,6 @@
[metadata]
name = ihatemoney
version = 5.2.1.dev0
version = 6.0.0.dev0
url = https://github.com/spiral-project/ihatemoney
description = A simple shared budget manager web application.
long_description = file: README.rst, CHANGELOG.rst
@ -11,10 +11,11 @@ license = Custom BSD Beerware
classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Internet :: WWW/HTTP
Topic :: Internet :: WWW/HTTP :: WSGI :: Application
@ -48,11 +49,12 @@ install_requires =
[options.extras_require]
database =
psycopg2-binary>=2.9,<3
# Python 3.11 support starts in 2.9.2
psycopg2-binary>=2.9.2,<3
PyMySQL>=0.9,<1.1
dev =
black>=19.10b0 ; python_version >= '3.6'
black>=19.10b0 ; python_version >= '3.7'
flake8>=3.7.9
Flask-Testing>=0.8.1
isort>=5.0.0

View file

@ -1,5 +1,5 @@
[tox]
envlist = py39,py38,py37,py36,lint_docs
envlist = py311,py310,py39,py38,py37,lint_docs
skip_missing_interpreters = True
[testenv]
@ -17,7 +17,7 @@ changedir = /tmp
[testenv:lint_docs]
commands =
black --check --target-version=py36 .
black --check --target-version=py37 .
isort -c .
flake8 ihatemoney
sphinx-build -a -n -b html -d docs/_build/doctrees docs docs/_build/html
@ -34,7 +34,6 @@ extend-ignore =
[travis]
python =
3.6: py36
3.7: py37
3.8: py38, lint_docs
3.9: py39