Skip to content

Commit 30abd91

Browse files
Deprecate and update python support (#650)
* Drop Python 3.9; add 3.13/3.14 and PyPy CI/tox coverage - Require Python 3.10+; update classifiers, docs, and bumpr test env - Expand GitHub Actions matrix (CPython, PyPy) and Flask exclusions - Update tox for Flask 2/3 factors, PyPy envs with tox-only rpds pins - Refresh test deps (pytest stack, twine) for newer interpreters - Fix field tests for Python 3.14 partial/class attribute behavior - Document changes under CHANGELOG 1.3.3 Authored-by: Peter Doggart <peter.doggart@pulseai.io>
1 parent 604fe94 commit 30abd91

16 files changed

Lines changed: 72 additions & 43 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ jobs:
77
build:
88
runs-on: ubuntu-latest
99
steps:
10-
- name: Set up Python 3.9
11-
uses: actions/setup-python@v1
10+
- name: Set up Python 3.10
11+
uses: actions/setup-python@v4
1212
with:
13-
python-version: 3.9
13+
python-version: "3.10"
1414
- name: Checkout code
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616
- name: Install dependencies
1717
run: |
1818
python -m pip install --upgrade pip

.github/workflows/test.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.9", "3.10", "3.11", "pypy3.9", "3.12"]
18+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.11"]
1919
flask: ["<3.0.0", ">=3.0.0"]
20+
exclude:
21+
- python-version: "3.13"
22+
flask: "<3.0.0"
23+
- python-version: "3.14"
24+
flask: "<3.0.0"
2025
steps:
2126
- name: Set up Python ${{ matrix.python-version }}
2227
uses: actions/setup-python@v4
@@ -28,6 +33,11 @@ jobs:
2833
- name: Install dependencies
2934
run: |
3035
python -m pip install --upgrade pip
36+
# PyPy: pin rpds-py before resolving jsonschema/referencing so pip picks manylinux wheels
37+
# (sdists use maturin; builds are fragile on PyPy). CPython does not need this.
38+
case "${{ matrix.python-version }}" in
39+
pypy3.11) pip install 'rpds-py<0.30' 'readme-renderer>=35,<42' ;;
40+
esac
3141
pip install "flask${{ matrix.flask }}"
3242
pip install ".[test]"
3343
- name: Test with inv
@@ -41,10 +51,10 @@ jobs:
4151
runs-on: ubuntu-latest
4252
if: github.event_name == 'pull_request'
4353
steps:
44-
- name: Set up Python 3.9
54+
- name: Set up Python 3.12
4555
uses: actions/setup-python@v4
4656
with:
47-
python-version: "3.9"
57+
python-version: "3.12"
4858
- name: Checkout ${{ github.base_ref }}
4959
uses: actions/checkout@v3
5060
with:

CHANGELOG.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,28 @@ Releases prior to 0.3.0 were “best effort” filled out, but are missing
2525
some info. If you see your contribution missing info, please open a PR
2626
on the Changelog!
2727

28+
.. _section-1.3.3:
29+
1.3.3
30+
-----
31+
.. _enhancements-1.3.3
32+
Enhancements
33+
~~~~~~~~~~~~
34+
35+
::
36+
37+
* Drop support for Python 3.9 (EOL); require Python 3.10 or newer. [python-restx]
38+
* Declare and test support for Python 3.13 and 3.14 (CPython). [python-restx]
39+
* Expand GitHub Actions and tox coverage: PyPy 3.11 with both Flask 2.x and Flask 3.x; exclude Flask 2 on 3.13/3.14 where unsupported. [python-restx]
40+
* Refresh test and release tooling (pytest, pytest-benchmark, pytest-profiling, twine) for newer interpreters. GitHub Actions pre-installs compatible ``rpds-py`` (and ``readme-renderer`` for PyPy 3.11) for PyPy jobs; tox pins ``rpds-py`` for local PyPy envs. [python-restx]
41+
42+
.. _bug_fixes-1.3.3
43+
Bug Fixes
44+
~~~~~~~~~
45+
46+
::
47+
48+
* Adjust field tests for Python 3.14 (``staticmethod`` around ``functools.partial`` used as a class attribute). [python-restx]
49+
2850
.. _section-1.3.1:
2951
1.3.1
3052
-----

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ and expose its documentation properly using `Swagger`_.
3838
Compatibility
3939
=============
4040

41-
Flask-RESTX requires Python 3.9+.
41+
Flask-RESTX requires Python 3.10+.
4242

4343
On Flask Compatibility
4444
======================

bumpr.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ vcs = git
44
commit = true
55
tag = true
66
push = true
7-
tests = tox -e py39
7+
tests = tox -e py310
88
clean =
99
inv clean
1010
files =

doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ development and to support our users.
3333
Compatibility
3434
=============
3535

36-
Flask-RESTX requires Python 3.9+.
36+
Flask-RESTX requires Python 3.10+.
3737

3838

3939
Installation

doc/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ The development version can be downloaded from
2020
pip install -e .[dev,test]
2121
2222
23-
Flask-RESTX requires Python version 3.9+.
23+
Flask-RESTX requires Python version 3.10+.
2424
It's also working with PyPy and PyPy3.

flask_restx/fields.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from .marshalling import marshal
2323
from .utils import camel_to_dash, not_none
2424

25-
2625
__all__ = (
2726
"Raw",
2827
"String",
@@ -880,10 +879,10 @@ def output(self, key, obj, ordered=False):
880879
# complexity to O(n)
881880
if ordered:
882881
# Get first element if respecting order
883-
(objkey, val) = self._flat.pop(0)
882+
objkey, val = self._flat.pop(0)
884883
else:
885884
# Previous default retained
886-
(objkey, val) = self._flat.pop()
885+
objkey, val = self._flat.pop()
887886
if (
888887
objkey not in self._cache
889888
and objkey not in self.exclude

flask_restx/model.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from .utils import not_none
1818
from ._http import HTTPStatus
1919

20-
2120
RE_REQUIRED = re.compile(r"u?\'(?P<name>.*)\' is a required property", re.I | re.U)
2221

2322

flask_restx/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from ._http import HTTPStatus
99

10-
1110
FIRST_CAP_RE = re.compile("(.)([A-Z][a-z]+)")
1211
ALL_CAP_RE = re.compile("([a-z0-9])([A-Z])")
1312

0 commit comments

Comments
 (0)