#3475 Lots of FlaskWTFDeprecationWarning when testing
Closed: Fixed 6 years ago Opened 6 years ago by sergiodj.

While running the testsuite, one can notice a huge number of warnings in this form:

/build/pagure-4.0.4+dfsg/.pybuild/cpython2_2.7_pagure/build/tests/../pagure/forms.py:173: FlaskWTFDeprecationWarning: "csrf_enabled" is deprecated and will be removed in 1.0. Set "meta.csrf" instead.
  super(ProjectForm, self).__init__(*args, **kwargs)

It would be nice to fix these so as to avoid pollution of the testsuite results.


The issue is knowing which version of flask-wtf supports the new format and if that version is available where we want.

Metadata Update from @pingou:
- Issue tagged with: RFE

6 years ago

On Tuesday, July 31 2018, Pierre-YvesChibon wrote:

The issue is knowing which version of flask-wtf supports the new format and if that version is available where we want.

According to:

https://github.com/lepture/flask-wtf/blob/0598f96f70a695d5f84c05a9f4e11feff1d64caa/docs/changelog.rst

The deprecation warning was introduced on version 0.14, from 2017-01-06:

csrf_enabled parameter is still recognized but deprecated. All other
attributes and methods from SecureForm are removed. (#271)

Pagure could explicitly depend on flask-wtf >= 0.14 and get rid of the
deprecation warning. Would that work for you?

--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

Looks like epel7 has flask-wtf 0.8 :(

On Friday, September 21 2018, Pierre-YvesChibon wrote:

pingou added a new comment to an issue you are following:
Looks like epel7 has flask-wtf 0.8 :(

Hm, I see. Well, I don't know. I think EPEL7 will be around for quite
a while, so unless someone backports flask-wtf > 0.8 to it, we'll have
to live with these warnings.

--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

IIRC, I have an utility method in the tests to check the wtform version, maybe it could be adjusted for flask-wtf and we could adjust our behavior based on the version loaded.

Metadata Update from @pingou:
- Issue set to the milestone: 5.1

6 years ago

hm, I was looking at this issue and found it should already be solved: https://pagure.io/pagure/blob/master/f/pagure/forms.py#_54

On Friday, September 28 2018, Pierre-YvesChibon wrote:

pingou added a new comment to an issue you are following:
hm, I was looking at this issue and found it should already be solved: https://pagure.io/pagure/blob/master/f/pagure/forms.py#_54

Ah, fair enough. Unfortunately I won't be able to test right away, but
you can close this if you want, and I can always reopen the issue if the
problem still persists.

Thanks,

--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

6 years ago

Log in to comment on this ticket.

Metadata