Skip to content

Commit 5a61601

Browse files
authored
Support python 3.12 and add support for flask 3.0 (#527)
Had to make some tweaks to the tox.ini to lock the werkzeug version, as installing a clean install of flask 2.x installs a non-compatible version 😢 pallets/flask#5279
1 parent 4bac6fe commit 5a61601

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

.github/workflows/unit_tests.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python: [3.7, 3.8, 3.9, '3.10', '3.11', 'pypy3.9']
13+
python: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12', 'pypy3.9']
1414

1515
steps:
1616
- uses: actions/checkout@v3
@@ -20,7 +20,9 @@ jobs:
2020
python-version: ${{ matrix.python }}
2121
- name: Install Dependencies
2222
run: pip install tox
23-
- name: Run Tox
23+
- name: Run Tox Flask==3.x
2424
run: tox -e py
2525
- name: Run Tox Flask==2.1
2626
run: tox -e flask21
27+
- name: Run Tox Flask==2.x
28+
run: tox -e flask2x

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ tox
5252
A subset of checks can also be ran by adding an argument to tox. The available
5353
arguments are:
5454

55-
- py37, py38, py39, py310, pypy3
55+
- py37, py38, py39, py310, py311, py312, pypy3
5656
- Run unit tests on the given python version
5757
- mypy
5858
- Run mypy type checking

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
black==21.12b0
22
cryptography==41.0.4
3-
Flask==2.3.2
3+
Flask==3.0.0
44
pre-commit==2.18.1
55
PyJWT==2.7.0
66
tox==3.25.0

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
platforms="any",
3131
install_requires=[
3232
"Werkzeug>=0.14", # Needed for SameSite cookie functionality
33-
"Flask>=2.0,<3.0",
33+
"Flask>=2.0,<4.0",
3434
"PyJWT>=2.0,<3.0",
3535
"typing_extensions>=3.7.4; python_version<'3.8'", # typing.Literal
3636
],
@@ -52,6 +52,7 @@
5252
"Programming Language :: Python :: 3.9",
5353
"Programming Language :: Python :: 3.10",
5454
"Programming Language :: Python :: 3.11",
55+
"Programming Language :: Python :: 3.12",
5556
"Programming Language :: Python :: Implementation :: CPython",
5657
"Programming Language :: Python :: Implementation :: PyPy",
5758
"Topic :: Software Development :: Libraries :: Python Modules",

tox.ini

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py37,py38,py39,py310,py311,pypy3.9,flask21,mypy,coverage,style,docs
7+
envlist = py37,py38,py39,py310,py311,py312,pypy3.9,flask21,flask2x,mypy,coverage,style,docs
88

99
[testenv]
1010
commands =
@@ -14,6 +14,9 @@ deps =
1414
cryptography
1515
python-dateutil
1616
flask21: Flask>=2.1,<2.2
17+
flask21: Werkzeug>=2,<3
18+
flask2x: Flask<3.0
19+
flask2x: Werkzeug>=2,<3
1720

1821
[testenv:mypy]
1922
commands =

0 commit comments

Comments
 (0)