Skip to content

Commit dcda4ad

Browse files
author
Peter Doggart
committed
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 Made-with: Cursor
1 parent 604fe94 commit dcda4ad

11 files changed

Lines changed: 67 additions & 25 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: 8 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.10", "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
@@ -41,10 +46,10 @@ jobs:
4146
runs-on: ubuntu-latest
4247
if: github.event_name == 'pull_request'
4348
steps:
44-
- name: Set up Python 3.9
49+
- name: Set up Python 3.12
4550
uses: actions/setup-python@v4
4651
with:
47-
python-version: "3.9"
52+
python-version: "3.12"
4853
- name: Checkout ${{ github.base_ref }}
4954
uses: actions/checkout@v3
5055
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.10 and 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; PyPy test envs use tox-only dependency pins where needed. [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.

requirements/test.pip

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
blinker
22
Faker==2.0.0
33
mock==3.0.5
4-
pytest==7.0.1
5-
pytest-benchmark==3.4.1
4+
pytest==8.4.2
5+
pytest-benchmark==5.2.3
66
pytest-cov==4.0.0
77
pytest-flask==1.3.0
88
pytest-mock==3.6.1
9-
pytest-profiling==1.7.0
9+
pytest-profiling==1.8.1
1010
invoke==2.2.0
11-
twine==3.8.0
11+
twine==6.2.0;platform_python_implementation!="PyPy"
1212
setuptools
13-
backports.zoneinfo;python_version<"3.9"

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,14 @@ def pip(filename):
102102
"Topic :: System :: Software Distribution",
103103
"Programming Language :: Python",
104104
"Programming Language :: Python :: 3",
105-
"Programming Language :: Python :: 3.9",
106105
"Programming Language :: Python :: 3.10",
107106
"Programming Language :: Python :: 3.11",
108107
"Programming Language :: Python :: 3.12",
108+
"Programming Language :: Python :: 3.13",
109+
"Programming Language :: Python :: 3.14",
109110
"Programming Language :: Python :: Implementation :: PyPy",
110111
"Topic :: Software Development :: Libraries :: Python Modules",
111112
"License :: OSI Approved :: BSD License",
112113
],
113-
python_requires=">=3.9",
114+
python_requires=">=3.10",
114115
)

tests/test_fields.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ def test_unsupported_value_format(self):
693693

694694

695695
class FormatedStringFieldTest(StringTestMixin, BaseFieldTestMixin, FieldTestCase):
696-
field_class = partial(fields.FormattedString, "Hello {name}")
696+
field_class = staticmethod(partial(fields.FormattedString, "Hello {name}"))
697697

698698
def test_defaults(self):
699699
field = fields.FormattedString("Hello {name}")
@@ -731,7 +731,7 @@ def test_tuple(self):
731731

732732

733733
class UrlFieldTest(StringTestMixin, BaseFieldTestMixin, FieldTestCase):
734-
field_class = partial(fields.Url, "endpoint")
734+
field_class = staticmethod(partial(fields.Url, "endpoint"))
735735

736736
def test_defaults(self):
737737
field = fields.Url("endpoint")
@@ -931,7 +931,7 @@ def test_as_list_is_reusable(self, api):
931931

932932

933933
class ListFieldTest(BaseFieldTestMixin, FieldTestCase):
934-
field_class = partial(fields.List, fields.String)
934+
field_class = staticmethod(partial(fields.List, fields.String))
935935

936936
def test_defaults(self):
937937
field = fields.List(fields.String)
@@ -1025,7 +1025,7 @@ def test_list_of_raw(self):
10251025

10261026

10271027
class WildcardFieldTest(BaseFieldTestMixin, FieldTestCase):
1028-
field_class = partial(fields.Wildcard, fields.String)
1028+
field_class = staticmethod(partial(fields.Wildcard, fields.String))
10291029

10301030
def test_types(self):
10311031
with pytest.raises(fields.MarshallingError):

0 commit comments

Comments
 (0)