Skip to content

Commit

Permalink
Support python 3.12 and add support for flask 3.0 (#527)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vimalloc authored Oct 3, 2023
1 parent 4bac6fe commit 5a61601
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7, 3.8, 3.9, '3.10', '3.11', 'pypy3.9']
python: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12', 'pypy3.9']

steps:
- uses: actions/checkout@v3
Expand All @@ -20,7 +20,9 @@ jobs:
python-version: ${{ matrix.python }}
- name: Install Dependencies
run: pip install tox
- name: Run Tox
- name: Run Tox Flask==3.x
run: tox -e py
- name: Run Tox Flask==2.1
run: tox -e flask21
- name: Run Tox Flask==2.x
run: tox -e flask2x
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ tox
A subset of checks can also be ran by adding an argument to tox. The available
arguments are:

- py37, py38, py39, py310, pypy3
- py37, py38, py39, py310, py311, py312, pypy3
- Run unit tests on the given python version
- mypy
- Run mypy type checking
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
black==21.12b0
cryptography==41.0.4
Flask==2.3.2
Flask==3.0.0
pre-commit==2.18.1
PyJWT==2.7.0
tox==3.25.0
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
platforms="any",
install_requires=[
"Werkzeug>=0.14", # Needed for SameSite cookie functionality
"Flask>=2.0,<3.0",
"Flask>=2.0,<4.0",
"PyJWT>=2.0,<3.0",
"typing_extensions>=3.7.4; python_version<'3.8'", # typing.Literal
],
Expand All @@ -52,6 +52,7 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

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

[testenv]
commands =
Expand All @@ -14,6 +14,9 @@ deps =
cryptography
python-dateutil
flask21: Flask>=2.1,<2.2
flask21: Werkzeug>=2,<3
flask2x: Flask<3.0
flask2x: Werkzeug>=2,<3

[testenv:mypy]
commands =
Expand Down

0 comments on commit 5a61601

Please sign in to comment.