From bb3950e57a7a32bab5c49ba872ee084ae87ef64e Mon Sep 17 00:00:00 2001 From: Lily Acadia Gilbert Date: Mon, 2 Oct 2023 11:35:00 -0600 Subject: [PATCH 1/3] Support python 3.12 and add support for flask 3.0 --- .github/workflows/unit_tests.yml | 2 +- README.md | 2 +- requirements.txt | 2 +- setup.py | 3 ++- tox.ini | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index bff9c997..cb5503b9 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -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 diff --git a/README.md b/README.md index 2578d6ae..100c60ca 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/requirements.txt b/requirements.txt index 47340b3d..3a448fd3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/setup.py b/setup.py index 6ed4c544..737e7311 100644 --- a/setup.py +++ b/setup.py @@ -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 ], @@ -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", diff --git a/tox.ini b/tox.ini index 7d1335e5..a99de82d 100644 --- a/tox.ini +++ b/tox.ini @@ -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,mypy,coverage,style,docs [testenv] commands = From 02b2f63b6c6d6f45b85fef770d3e941aeedd4380 Mon Sep 17 00:00:00 2001 From: Lily Acadia Gilbert Date: Tue, 3 Oct 2023 10:55:25 -0600 Subject: [PATCH 2/3] Force werkzeug<3.0 when installing flask 2.1 --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index a99de82d..35bb1284 100644 --- a/tox.ini +++ b/tox.ini @@ -14,6 +14,7 @@ deps = cryptography python-dateutil flask21: Flask>=2.1,<2.2 + flask21: Werkzeug>=2,<3 [testenv:mypy] commands = From 40ae088f15fedc3c1323ee45a9dc9377a7d249d4 Mon Sep 17 00:00:00 2001 From: Lily Acadia Gilbert Date: Tue, 3 Oct 2023 11:20:36 -0600 Subject: [PATCH 3/3] Add latest flask 2.x release to CI runs --- .github/workflows/unit_tests.yml | 4 +++- tox.ini | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index cb5503b9..a692ee1a 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -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 diff --git a/tox.ini b/tox.ini index 35bb1284..5a91819b 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py37,py38,py39,py310,py311,py312,pypy3.9,flask21,mypy,coverage,style,docs +envlist = py37,py38,py39,py310,py311,py312,pypy3.9,flask21,flask2x,mypy,coverage,style,docs [testenv] commands = @@ -15,6 +15,8 @@ deps = python-dateutil flask21: Flask>=2.1,<2.2 flask21: Werkzeug>=2,<3 + flask2x: Flask<3.0 + flask2x: Werkzeug>=2,<3 [testenv:mypy] commands =