Skip to content

Commit c1e49e9

Browse files
Merge branch 'oauth-redirect' of github.com:thedumbterminal/flask-restx into oauth-redirect
2 parents 331e314 + 2adc2e9 commit c1e49e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1926
-668
lines changed

.github/workflows/black.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: psf/black@stable

.github/workflows/test.yml

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -10,55 +10,25 @@ on:
1010
- cron: "0 1 * * *"
1111
workflow_dispatch:
1212
jobs:
13-
checks:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Set up Python 3.8
17-
uses: actions/setup-python@v1
18-
with:
19-
python-version: 3.8
20-
- name: Checkout code
21-
uses: actions/checkout@v2
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install ".[dev]"
26-
- name: Audit Python packages for known vulnerabilities
27-
run: |
28-
if ! RES=$(ossaudit --installed --config setup.cfg); then
29-
RES="${RES//'%'/'%25'}"
30-
RES="${RES//$'\n'/'%0A'}"
31-
RES="${RES//$'\r'/'%0D'}"
32-
echo "::error ::${RES}"
33-
exit 1
34-
fi
35-
echo ${RES}
36-
- name: Format with black
37-
run: |
38-
if ! RES=$(black --check $(git diff --name-only --diff-filter=AM master -- "*.py") 2>&1); then
39-
RES="${RES//'%'/'%25'}"
40-
RES="${RES//$'\n'/'%0A'}"
41-
RES="${RES//$'\r'/'%0D'}"
42-
echo "::error ::${RES}"
43-
exit 1
44-
fi
45-
echo ${RES}
4613
unit-tests:
47-
needs: checks
4814
runs-on: ubuntu-latest
4915
strategy:
16+
fail-fast: false
5017
matrix:
51-
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy2, pypy3]
18+
python-version: ["3.8", "3.9", "3.10", "3.11", "pypy3.8", "3.12"]
19+
flask: ["<3.0.0", ">=3.0.0"]
5220
steps:
5321
- name: Set up Python ${{ matrix.python-version }}
54-
uses: actions/setup-python@v1
22+
uses: actions/setup-python@v4
5523
with:
5624
python-version: ${{ matrix.python-version }}
25+
allow-prereleases: true
5726
- name: Checkout code
58-
uses: actions/checkout@v2
27+
uses: actions/checkout@v3
5928
- name: Install dependencies
6029
run: |
6130
python -m pip install --upgrade pip
31+
pip install "flask${{ matrix.flask }}"
6232
pip install ".[test]"
6333
- name: Test with inv
6434
run: inv cover qa
@@ -72,16 +42,16 @@ jobs:
7242
if: github.event_name == 'pull_request'
7343
steps:
7444
- name: Set up Python 3.8
75-
uses: actions/setup-python@v1
45+
uses: actions/setup-python@v4
7646
with:
77-
python-version: 3.8
47+
python-version: "3.8"
7848
- name: Checkout ${{ github.base_ref }}
79-
uses: actions/checkout@v2
49+
uses: actions/checkout@v3
8050
with:
8151
ref: ${{ github.base_ref}}
8252
path: base
8353
- name: Checkout ${{ github.ref }}
84-
uses: actions/checkout@v2
54+
uses: actions/checkout@v3
8555
with:
8656
ref: ${{ github.ref}}
8757
path: ref

CHANGELOG.rst

Lines changed: 138 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,143 @@ 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.1:
29+
1.3.1
30+
-----
31+
.. _bug_fixes-1.3.1
32+
Bug Fixes
33+
~~~~~~~~~
34+
35+
::
36+
37+
* Add python version requirement on setup.py (#586) [jason-the-j]
38+
39+
40+
.. _section-1.3.0:
41+
1.3.0
42+
-----
43+
.. _bug_fixes-1.3.0
44+
Bug Fixes
45+
~~~~~~~~~
46+
47+
::
48+
49+
* Fixing werkzeug 3 deprecated version import. Import is replaced by new style version check with importlib (#573) [Ryu-CZ]
50+
* Fixing flask 3.0+ compatibility of `ModuleNotFoundError: No module named 'flask.scaffold'` Import error. (#567) [Ryu-CZ]
51+
* Fix wrong status code and message on responses when handling `HTTPExceptions` (#569) [lkk7]
52+
* Add flask 2 and flask 3 to testing matrix. [foarsitter]
53+
* Update internally pinned pytest-flask to 1.3.0 for Flask >=3.0.0 support. [peter-doggart]
54+
* Python 3.12 support. [foarsitter]
55+
* Fix wrong status code and message on responses when handling HTTPExceptions. [ikk7]
56+
* Update changelog Flask version table. [peter-doggart]
57+
* Remove temporary package version restrictions for flask < 3.0.0, werkzeug and jsonschema (jsonschema future deprecation warning remains. See #553). [peter-doggart]
58+
59+
.. _section-1.2.0:
60+
1.2.0
61+
-----
62+
.. _bug_fixes-1.2.0
63+
Bug Fixes
64+
~~~~~~~~~
65+
66+
::
67+
68+
* Fixing test as HTTP Header MIMEAccept expects quality-factor number in form of `X.X` (#547) [chipndell]
69+
* Introduce temporary restrictions on some package versions. (`flask<3.0.0`, `werkzeug<3.0.0`, `jsonschema<=4.17.3`) [peter-doggart]
70+
71+
72+
.. _enhancements-1.2.0:
73+
74+
Enhancements
75+
~~~~~~~~~~~~
76+
77+
::
78+
79+
* Drop support for python 3.7
80+
81+
82+
.. _section-1.1.0:
83+
1.1.0
84+
-----
85+
86+
.. _bug_fixes-1.1.0
87+
Bug Fixes
88+
~~~~~~~~~
89+
90+
::
91+
92+
* Update Swagger-UI to latest version to fix several security vulnerabiltiies. [peter-doggart]
93+
* Add a warning to the docs that nested Blueprints are not supported. [peter-doggart]
94+
* Add a note to the docs that flask-restx always registers the root (/) path. [peter-doggart]
95+
96+
.. _section-1.0.6:
97+
1.0.6
98+
-----
99+
100+
.. _bug_fixes-1.0.6
101+
Bug Fixes
102+
~~~~~~~~~
103+
104+
::
105+
106+
* Update Black to 2023 version [peter-doggart]
107+
* Fix minor bug introduced in 1.0.5 that changed the behaviour of how flask-restx propagates exceptions. (#512) [peter-doggart]
108+
* Update PyPi classifer to Production/Stable. [peter-doggart]
109+
* Add support for Python 3.11 (requires update to invoke ^2.0.0) [peter-doggart]
110+
111+
.. _section-1.0.5:
112+
1.0.5
113+
-----
114+
115+
.. _bug_fixes-1.0.5
116+
Bug Fixes
117+
~~~~~~~~~
118+
119+
::
120+
121+
* Fix failing pypy python setup in github actions
122+
* Fix compatibility with upcoming release of Flask 2.3+. (#485) [jdieter]
123+
124+
.. _section-1.0.2:
125+
1.0.2
126+
-----
127+
128+
.. _bug_fixes-1.0.2
129+
Bug Fixes
130+
~~~~~~~~~
131+
132+
::
133+
134+
* Properly remove six dependency
135+
136+
.. _section-1.0.1:
137+
1.0.1
138+
-----
139+
140+
.. _breaking-1.0.1
141+
142+
Breaking
143+
~~~~~~~~
144+
145+
Starting from this release, we only support python versions >= 3.7
146+
147+
.. _bug_fixes-1.0.1
148+
149+
Bug Fixes
150+
~~~~~~~~~
151+
152+
::
153+
154+
* Fix compatibility issue with werkzeug 2.1.0 (#423) [stacywsmith]
155+
156+
.. _enhancements-1.0.1:
157+
158+
Enhancements
159+
~~~~~~~~~~~~
160+
161+
::
162+
163+
* Drop support for python <3.7
164+
28165
.. _section-0.5.1:
29166
0.5.1
30167
-----
@@ -79,7 +216,7 @@ Bug Fixes
79216

80217
::
81218

82-
* Fix Namespace error handlers when propogate_exceptions=True (#285) [mjreiss]
219+
* Fix Namespace error handlers when propagate_exceptions=True (#285) [mjreiss]
83220
* pin flask and werkzeug due to breaking changes (#308) [jchittum]
84221
* The Flask/Blueprint API moved to the Scaffold base class (#308) [jloehel]
85222

README.rst

Lines changed: 11 additions & 4 deletions
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 2.7 or 3.4+.
41+
Flask-RESTX requires Python 3.8+.
4242

4343
On Flask Compatibility
4444
======================
@@ -60,10 +60,16 @@ Flask and Werkzeug moved to versions 2.0 in March 2020. This caused a breaking c
6060
- < 2.0.0
6161
- pinned in Flask-RESTX.
6262
* - >= 0.5.0
63-
- All (For Now)
63+
- < 3.0.0
64+
- unpinned, import statements wrapped for compatibility
65+
* - == 1.2.0
66+
- < 3.0.0
67+
- pinned in Flask-RESTX.
68+
* - >= 1.3.0
69+
- >= 2.0.0 (Flask >= 3.0.0 support)
6470
- unpinned, import statements wrapped for compatibility
6571
* - trunk branch in Github
66-
- All (and updated more often)
72+
- >= 2.0.0 (Flask >= 3.0.0 support)
6773
- unpinned, will address issues faster than releases.
6874

6975
Installation
@@ -189,7 +195,8 @@ Contributors
189195

190196
Flask-RESTX is brought to you by @python-restx. Since early 2019 @SteadBytes,
191197
@a-luna, @j5awry, @ziirish volunteered to help @python-restx keep the project up
192-
and running.
198+
and running, they did so for a long time! Since the beginning of 2023, the project
199+
is maintained by @peter-doggart with help from @ziirish.
193200
Of course everyone is welcome to contribute and we will be happy to review your
194201
PR's or answer to your issues.
195202

doc/conf.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
master_doc = "index"
5252

5353
# General information about the project.
54-
project = u"Flask-RESTX"
55-
copyright = u"2020, python-restx Authors"
54+
project = "Flask-RESTX"
55+
copyright = "2020, python-restx Authors"
5656

5757
# The version info for the project you're documenting, acts as replacement for
5858
# |version| and |release|, also used in various other places throughout the
@@ -124,7 +124,11 @@
124124
"show_related": True,
125125
"page_width": "1000px",
126126
"sidebar_width": "260px",
127-
"favicons": {64: "favicon-64.png", 128: "favicon-128.png", 196: "favicon-196.png",},
127+
"favicons": {
128+
64: "favicon-64.png",
129+
128: "favicon-128.png",
130+
196: "favicon-196.png",
131+
},
128132
"badges": [
129133
(
130134
# Gitter.im
@@ -262,8 +266,8 @@
262266
(
263267
"index",
264268
"Flask-RESTX.tex",
265-
u"Flask-RESTX Documentation",
266-
u"python-restx Authors",
269+
"Flask-RESTX Documentation",
270+
"python-restx Authors",
267271
"manual",
268272
),
269273
]
@@ -294,7 +298,7 @@
294298
# One entry per manual page. List of tuples
295299
# (source start file, name, description, authors, manual section).
296300
man_pages = [
297-
("index", "flask-restx", u"Flask-RESTX Documentation", [u"python-restx Authors"], 1)
301+
("index", "flask-restx", "Flask-RESTX Documentation", ["python-restx Authors"], 1)
298302
]
299303

300304
# If true, show URL addresses after external links.
@@ -310,8 +314,8 @@
310314
(
311315
"index",
312316
"Flask-RESTX",
313-
u"Flask-RESTX Documentation",
314-
u"python-restx Authors",
317+
"Flask-RESTX Documentation",
318+
"python-restx Authors",
315319
"Flask-RESTX",
316320
"One line description of project.",
317321
"Miscellaneous",

doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ development and to support our users.
3333
Compatibility
3434
=============
3535

36-
flask-restx requires Python 2.7+ or 3.4+.
36+
Flask-RESTX requires Python 3.8+.
3737

3838

3939
Installation
4040
============
4141

42-
You can install flask-restx with pip:
42+
You can install Flask-RESTX with pip:
4343

4444
.. code-block:: console
4545

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 2.7, 3.5, 3.6, 3.7, or 3.8.
23+
Flask-RESTX requires Python version 3.8+.
2424
It's also working with PyPy and PyPy3.

doc/marshalling.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ use :class:`~fields.Wildcard` ::
232232
>>> '{"Jane": "68", "bob": "42", "John": "12"}'
233233

234234
The name you give to your :class:`~fields.Wildcard` acts as a real glob as
235-
shown bellow ::
235+
shown below ::
236236

237237
>>> from flask_restx import fields, marshal
238238
>>> import json

doc/parsing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ It looks for two arguments in the :attr:`flask.Request.values` dict: an integer
3838
.. note ::
3939
4040
The default argument type is a unicode string.
41-
This will be ``str`` in python3 and ``unicode`` in python2.
41+
This will be ``str``.
4242
4343
If you specify the ``help`` value,
4444
it will be rendered as the error message when a type error is raised while parsing it.
@@ -85,7 +85,7 @@ And your args will look like this :
8585
args = parser.parse_args()
8686
args['name'] # ['bob', 'sue', 'joe']
8787
88-
If you expect a coma separated list, use the ``action='split'``:
88+
If you expect a comma-separated list, use the ``action='split'``:
8989

9090
.. code-block:: python
9191

0 commit comments

Comments
 (0)