From 76389e310e6baf2a5c97e08b2297a260341c4df0 Mon Sep 17 00:00:00 2001 From: Lily Acadia Gilbert Date: Mon, 4 May 2026 07:50:05 -0600 Subject: [PATCH 1/8] Update active python versions --- setup.py | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 512df44..1e7ea4d 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ "PyJWT>=2.0,<3.0", ], extras_require={"asymmetric_crypto": ["cryptography>=3.3.1"]}, - python_requires=">=3.9,<4", + python_requires=">=3.10,<4", classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", diff --git a/tox.ini b/tox.ini index 653d6eb..d610999 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py39,py310,py311,py312,py313,pypy3.9,flask21,flask2x,mypy,coverage,style,docs +envlist = py310,py311,py312,py313,py314,pypy3.14,flask21,flask2x,mypy,coverage,style,docs [testenv] commands = From 7f2b022458dcb27205f44563d4bf0ff416ff6ba6 Mon Sep 17 00:00:00 2001 From: Lily Acadia Gilbert Date: Mon, 4 May 2026 07:56:07 -0600 Subject: [PATCH 2/8] Update github actions w/ new versions --- .github/workflows/type_check.yml | 2 +- .github/workflows/unit_tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/type_check.yml b/.github/workflows/type_check.yml index 11b21ad..f5e32d8 100644 --- a/.github/workflows/type_check.yml +++ b/.github/workflows/type_check.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [3.9, '3.10', '3.11', '3.12', '3.13'] + python: ['3.10', '3.11', '3.12', '3.13', '3,14'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index a69070a..69f4ac1 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.9, '3.10', '3.11', '3.12', '3.13', 'pypy3.9'] + python: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.14'] steps: - uses: actions/checkout@v3 From 9e7f65b40077a39bc3cc0a23b3e1def849a80ddb Mon Sep 17 00:00:00 2001 From: Lily Acadia Gilbert Date: Mon, 4 May 2026 07:58:48 -0600 Subject: [PATCH 3/8] Pypy only on 3.11 right now --- .github/workflows/unit_tests.yml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 69f4ac1..bdd3e37 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.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.14'] + python: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.11'] steps: - uses: actions/checkout@v3 diff --git a/tox.ini b/tox.ini index d610999..8cb7a95 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py310,py311,py312,py313,py314,pypy3.14,flask21,flask2x,mypy,coverage,style,docs +envlist = py310,py311,py312,py313,py314,pypy3.11,flask21,flask2x,mypy,coverage,style,docs [testenv] commands = From 276cb181ef5e38dc4978f31b2fbd1d44d1a9ac15 Mon Sep 17 00:00:00 2001 From: Lily Acadia Gilbert Date: Mon, 4 May 2026 08:03:19 -0600 Subject: [PATCH 4/8] Update `setup-python` to support newer python versions --- .github/workflows/coverage.yml | 4 ++-- .github/workflows/documentation.yml | 4 ++-- .github/workflows/lint.yml | 4 ++-- .github/workflows/publish_flask_jwt_extended.yml | 4 ++-- .github/workflows/type_check.yml | 4 ++-- .github/workflows/unit_tests.yml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 8ed21d1..d2d5342 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Set up Python 3.x - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: '3.10' - name: Install Dependencies diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index b5816ed..f9a6a65 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Set up Python 3.x - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: '3.10' - name: Install Dependencies diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 737a432..a2b2269 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Set up Python 3.x - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: '3.10' - name: Install Dependencies diff --git a/.github/workflows/publish_flask_jwt_extended.yml b/.github/workflows/publish_flask_jwt_extended.yml index 318b995..1fedce0 100644 --- a/.github/workflows/publish_flask_jwt_extended.yml +++ b/.github/workflows/publish_flask_jwt_extended.yml @@ -13,9 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: '3.x' - name: Install dependencies diff --git a/.github/workflows/type_check.yml b/.github/workflows/type_check.yml index f5e32d8..6fcdf25 100644 --- a/.github/workflows/type_check.yml +++ b/.github/workflows/type_check.yml @@ -13,9 +13,9 @@ jobs: python: ['3.10', '3.11', '3.12', '3.13', '3,14'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} - name: Install Dependencies diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index bdd3e37..b9599ba 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -13,9 +13,9 @@ jobs: python: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.11'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} - name: Install Dependencies From e76eb1e4a0ff1aa3f4c548e80d50ec05a53e6ff2 Mon Sep 17 00:00:00 2001 From: Lily Acadia Gilbert Date: Mon, 4 May 2026 08:13:32 -0600 Subject: [PATCH 5/8] Hard code requirements for unit testing & remove flask 2.x tests Having it return an arbitrary version of the code you are using when doing a tox install was causing some mypy errors cause of a newer version of PyJWT. Instead of handling them in this unrelated PR, I would rather it be handled in the PR that updates the version of PyJWT. I'm also removing the unit tests for flask 2x, and think that this can be more of a "at users discretion" kinda thing now. Flask 3.x has been out for nearly 3 years, at some point supporting old versions is no longer worth it. If either of these changes ends up being a poor idea I will revert it I'm not married to it. --- tox.ini | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tox.ini b/tox.ini index 8cb7a95..447129e 100644 --- a/tox.ini +++ b/tox.ini @@ -4,29 +4,27 @@ # and then run "tox" from this directory. [tox] -envlist = py310,py311,py312,py313,py314,pypy3.11,flask21,flask2x,mypy,coverage,style,docs +envlist = py310,py311,py312,py313,py314,pypy3.11,mypy,coverage,style,docs [testenv] commands = pytest tests/ deps = pytest - cryptography python-dateutil - flask21: Flask>=2.1,<2.2 - flask21: Werkzeug>=2,<3 - flask2x: Flask<3.0 - flask2x: Werkzeug>=2,<3 + -rrequirements.txt +skip_install = true [testenv:mypy] commands = mypy flask_jwt_extended/ tests/ deps = pytest - cryptography python-dateutil types-python-dateutil mypy + -rrequirements.txt +skip_install = true [testenv:coverage] commands = @@ -35,8 +33,9 @@ commands = deps = coverage pytest - cryptography python-dateutil + -rrequirements.txt +skip_install = true [testenv:style] deps = pre-commit From 9eb3b198134c37f3ab9c334992631a1957d357f8 Mon Sep 17 00:00:00 2001 From: Lily Acadia Gilbert Date: Mon, 4 May 2026 08:20:32 -0600 Subject: [PATCH 6/8] Revert "Hard code requirements for unit testing & remove flask 2.x tests" This reverts commit e76eb1e4a0ff1aa3f4c548e80d50ec05a53e6ff2. --- tox.ini | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tox.ini b/tox.ini index 447129e..8cb7a95 100644 --- a/tox.ini +++ b/tox.ini @@ -4,27 +4,29 @@ # and then run "tox" from this directory. [tox] -envlist = py310,py311,py312,py313,py314,pypy3.11,mypy,coverage,style,docs +envlist = py310,py311,py312,py313,py314,pypy3.11,flask21,flask2x,mypy,coverage,style,docs [testenv] commands = pytest tests/ deps = pytest + cryptography python-dateutil - -rrequirements.txt -skip_install = true + flask21: Flask>=2.1,<2.2 + flask21: Werkzeug>=2,<3 + flask2x: Flask<3.0 + flask2x: Werkzeug>=2,<3 [testenv:mypy] commands = mypy flask_jwt_extended/ tests/ deps = pytest + cryptography python-dateutil types-python-dateutil mypy - -rrequirements.txt -skip_install = true [testenv:coverage] commands = @@ -33,9 +35,8 @@ commands = deps = coverage pytest + cryptography python-dateutil - -rrequirements.txt -skip_install = true [testenv:style] deps = pre-commit From ed65bb22af4706b1753413d5cbd6d7b9ff7f1ebf Mon Sep 17 00:00:00 2001 From: Lily Acadia Gilbert Date: Mon, 4 May 2026 08:22:49 -0600 Subject: [PATCH 7/8] Fix PyJWT mypy breakage :( Credit to @oomichi-melco in #574 for the fix --- flask_jwt_extended/tokens.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flask_jwt_extended/tokens.py b/flask_jwt_extended/tokens.py index 836101c..dceb50b 100644 --- a/flask_jwt_extended/tokens.py +++ b/flask_jwt_extended/tokens.py @@ -11,6 +11,7 @@ from typing import Union import jwt +from jwt.types import Options from flask_jwt_extended.exceptions import CSRFError from flask_jwt_extended.exceptions import JWTDecodeError @@ -87,6 +88,7 @@ def _decode_jwt( verify_aud: bool, verify_sub: bool, ) -> dict: + options: Options options = {"verify_aud": verify_aud, "verify_sub": verify_sub} if allow_expired: options["verify_exp"] = False From c96d4ae81dfb01762bafbd5cd97389698c5f10ff Mon Sep 17 00:00:00 2001 From: Lily Acadia Gilbert Date: Mon, 4 May 2026 08:35:21 -0600 Subject: [PATCH 8/8] Fix typo --- .github/workflows/type_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/type_check.yml b/.github/workflows/type_check.yml index 6fcdf25..7e098da 100644 --- a/.github/workflows/type_check.yml +++ b/.github/workflows/type_check.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.10', '3.11', '3.12', '3.13', '3,14'] + python: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v6