Loosen flask version requirement to >= 2#479
Conversation
Later versions in the Flask 2.x series changed the API a fair bit. Loosen the version requirement to >= 2, which allows people to continue using 2.0.x and 2.1.x. Add tests using 2.0.3 to be sure this continues working. Fixes apiflask#478.
f708b72 to
059004b
Compare
059004b to
127c341
Compare
|
There's a fair number of unit test failures because the examples depend on more recent features in flask-sqlalchemy (get_or_404, paginate). I could fix them, but I'd like to wait for guidance from @greyli before continuing. |
|
Please create a separate requirement file for minimal dep versions, see this file for example. |
|
@greyli Ok I think this is ready for review! Appreciate your support and encouragement on this |
requirements/flask20.in
Outdated
| @@ -0,0 +1,5 @@ | |||
| authlib==1.2.1 | |||
There was a problem hiding this comment.
The purpose of the flask20 test is to test the minimum versions of the install requirements, so this file should include the following definition:
# minimum install requirements
flask==2.0.0
flask-marshmallow==0.12.0
webargs==8.3.0
flask-httpauth==4.0.0
apispec==6.0.0
# for example applications
flask-sqlalchemy==2.5.1
sqlalchemy==1.4.49
marshmallow-dataclass==8.5.0
authlib==1.2.1
And the name min (for test env, requirement file, etc.) would be more appropriate.
There was a problem hiding this comment.
That makes sense. I think I'll use the name min-versions since min might be confused with the existing minimal
|
|
||
|
|
||
| @pytest.mark.skipif(flask.__version__ < '2.0.1', | ||
| reason='Depends on new behaviour introduced in Flask 2.0.1') |
There was a problem hiding this comment.
Needed to add these skips as well if we're going to test with actual flask 2.0.0
|
@greyli ready for another look! |
|
Merged, thanks! I'll make a new release soon. |
Later versions in the Flask 2.x series changed the API a fair bit.
Loosen the version requirement to >= 2, which allows people to continue
using 2.0.x and 2.1.x. Add tests using 2.0.3 to be sure this continues
working. Fixes #478.