Skip to content

fix: Support WTForms 3.0#1734

Closed
shawnzhu wants to merge 4 commits intodpgaspar:masterfrom
shawnzhu:wtforms-3
Closed

fix: Support WTForms 3.0#1734
shawnzhu wants to merge 4 commits intodpgaspar:masterfrom
shawnzhu:wtforms-3

Conversation

@shawnzhu
Copy link
Contributor

@shawnzhu shawnzhu commented Nov 9, 2021

Description

This is a follow up of #1733

Stop using deprecated APIs from WTForms v2.

ADDITIONAL INFORMATION

@codecov
Copy link

codecov bot commented Nov 9, 2021

Codecov Report

Merging #1734 (9d1ec8d) into master (dd560f8) will decrease coverage by 5.60%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            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%) ⬇️

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%) ⬇️
flask_appbuilder/upload.py 32.67% <100.00%> (-3.97%) ⬇️
flask_appbuilder/security/mongoengine/models.py 0.00% <0.00%> (-89.34%) ⬇️
flask_appbuilder/models/mongoengine/interface.py 0.00% <0.00%> (-77.50%) ⬇️
flask_appbuilder/models/mongoengine/filters.py 0.00% <0.00%> (-68.58%) ⬇️
flask_appbuilder/security/mongoengine/manager.py 0.00% <0.00%> (-66.16%) ⬇️
flask_appbuilder/models/base.py 72.92% <0.00%> (-1.11%) ⬇️
flask_appbuilder/models/filters.py 88.43% <0.00%> (-0.69%) ⬇️

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.

@dpgaspar
Copy link
Owner

This is great @shawnzhu !!
Yet going to release 3.4.0 with the pinned WTForms today to unblock people/projects

@dpgaspar
Copy link
Owner

@shawnzhu can you revisit this?

@bjliu
Copy link

bjliu commented Jan 27, 2022

@shawnzhu @dpgaspar What is keeping this from being merged? Our security plugin recommends wtforms 3.0+, so curious if this will be fixed.

@dpgaspar
Copy link
Owner

@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!

@bjliu
Copy link

bjliu commented Feb 4, 2022

@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?


return super(MongoFileField, self).process(formdata, data)
# return super(MongoFileField, self).process(formdata, data)
return super().process(formdata, data)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawnzhu could you please include the return super().process(formdata, data, **kwargs) to check if it solve the issue? Thank you

@dpgaspar
Copy link
Owner

Closing, implemented on #1904

@dpgaspar dpgaspar closed this Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants