This PR updates to the latest Flask and Flask related projects. The Flask pins that limited it to a max version were removed under the setup.py. Due to the upgrade to the latest versions, several API calls had to be updated in the process:
For one of the register_blueprint calls, a unique name was passed in as an argument. Otherwise, the following warning message occurs:
/export/home/hysdsops/sciflo/lib/python3.9/site-packages/flask/scaffold.py:57:
UserWarning: The name 'restx_doc' is already registered for this blueprint.
Use 'name=' to provide a unique name. This will become an error in Flask 2.1.
See comments in https://hysds-core.atlassian.net/browse/HC-367 for how Pele was tested after these changes were made. A cluster was deployed with these updates. Then the Pele README was followed, where a set of Pele REST calls were made on the GRQ instance to verify that they still work.
This PR updates to the latest Flask and Flask related projects. The Flask pins that limited it to a max version were removed under the
setup.py
. Due to the upgrade to the latest versions, several API calls had to be updated in the process:For one of the
register_blueprint
calls, a unique name was passed in as an argument. Otherwise, the following warning message occurs:Use
get_remote_address
instead ofget_ip_addr
as this function no longer exists per https://github.com/alisaifee/flask-limiter/commit/514fe06a24b14d95e22ee47cd0f0984b6f8c8f7d#diff-ff77b4993f06d228e3e76d62903767d0d3e5e775d3399be35557c8dc856a61a6Use
StringField
instead ofTextField
per https://dev.to/sm0ke/cannot-import-name-textfield-from-wtforms-58n8.The WTForms' validator function no longer has a
required
function. Per https://wtforms.readthedocs.io/en/3.0.x/validators/, it was recommended to useinput_required
instead.The importing of the
MigrateCommand
was removed as it is no longer supported per https://github.com/miguelgrinberg/Flask-Migrate/issues/407See comments in https://hysds-core.atlassian.net/browse/HC-367 for how Pele was tested after these changes were made. A cluster was deployed with these updates. Then the Pele README was followed, where a set of Pele REST calls were made on the GRQ instance to verify that they still work.