Flask-AppBuilder
Flask-AppBuilder copied to clipboard
fix: Support WTForms 3.0
Description
This is a follow up of #1733
Stop using deprecated APIs from WTForms v2.
ADDITIONAL INFORMATION
- [x] Has associated issue: #1732
- [ ] Is CRUD MVC related.
- [ ] Is Auth, RBAC security related.
- [ ] Changes the security db schema.
- [ ] Introduces new feature
- [ ] Removes existing feature
Codecov Report
Merging #1734 (9d1ec8d) into master (dd560f8) will decrease coverage by
5.60%
. The diff coverage is50.00%
.
@@ Coverage Diff @@
## master #1734 +/- ##
==========================================
- Coverage 77.06% 71.45% -5.61%
==========================================
Files 56 56
Lines 8226 8226
==========================================
- Hits 6339 5878 -461
- Misses 1887 2348 +461
Flag | Coverage Δ | |
---|---|---|
python | 71.45% <50.00%> (-5.61%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
flask_appbuilder/models/mongoengine/fields.py | 41.66% <0.00%> (-27.78%) |
:arrow_down: |
flask_appbuilder/upload.py | 32.67% <100.00%> (-3.97%) |
:arrow_down: |
flask_appbuilder/security/mongoengine/models.py | 0.00% <0.00%> (-89.34%) |
:arrow_down: |
flask_appbuilder/models/mongoengine/interface.py | 0.00% <0.00%> (-77.50%) |
:arrow_down: |
flask_appbuilder/models/mongoengine/filters.py | 0.00% <0.00%> (-68.58%) |
:arrow_down: |
flask_appbuilder/security/mongoengine/manager.py | 0.00% <0.00%> (-66.16%) |
:arrow_down: |
flask_appbuilder/models/base.py | 72.92% <0.00%> (-1.11%) |
:arrow_down: |
flask_appbuilder/models/filters.py | 88.43% <0.00%> (-0.69%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update dd560f8...9d1ec8d. Read the comment docs.
This is great @shawnzhu !! Yet going to release 3.4.0 with the pinned WTForms today to unblock people/projects
@shawnzhu can you revisit this?
@shawnzhu @dpgaspar What is keeping this from being merged? Our security plugin recommends wtforms 3.0+, so curious if this will be fixed.
@shawnzhu @dpgaspar What is keeping this from being merged? Our security plugin recommends wtforms 3.0+, so curious if this will be fixed.
tests are failing for mongoDB, I may be related with: https://github.com/dpgaspar/Flask-AppBuilder/blob/master/flask_appbuilder/models/mongoengine/fields.py#L37
@shawnzhu can you replace that super call by:
return super().process(formdata, data, **kwargs)
To see if it fixes the issue?
Thank you!
@shawnzhu @dpgaspar Seems like there was an issue...
field.process(formdata, data, extra_filters=field_extra_filters)
TypeError: process() got an unexpected keyword argument 'extra_filters'
However, no idea where this unexpected keyword argument is coming from. Could it possibly be related to this branch being out-of-date with base branch?
Closing, implemented on https://github.com/dpgaspar/Flask-AppBuilder/pull/1904