Pylons / deform

A Python HTML form library.
Other
416 stars 160 forks source link

Fix deprecation warnings #419

Closed viraptor closed 3 years ago

viraptor commented 4 years ago

Fix incomplete character escaping

deform/field.py:350: DeprecationWarning: invalid escape sequence \w
deform/field.py:351: DeprecationWarning: invalid escape sequence \s
stevepiercy commented 4 years ago

@viraptor thank you for your PR. I could not find where the DeprecationWarning appeared in any of the earlier builds. Can you elaborate where you found the warning?

Also if you have not already done so, would you please sign https://github.com/Pylons/deform/blob/master/CONTRIBUTORS.txt and push to this PR? Thank you!

viraptor commented 4 years ago

The warning appears if you import the module while testing with pytest. I'm not quite sure how to show it in normal usage - it seems they bump up the warning levels to extreme.

stevepiercy commented 4 years ago

OK, thanks. I'll verify locally first before merging. I've been meaning to switch to pytest as the test runner for Deform anyway, because nosetest has been in maintenance mode for years.

In fact, if you would like to prepare a PR for the switch to pytest, I'll get it into the upcoming Deform 3.0.0 release.

stevepiercy commented 3 years ago

Finally got around to this. Tested, verified, and it looks good.

Can you share with me how you were able to run the test suite via pytest? I would love to kick nosetests to the curb.

Thank you!

viraptor commented 3 years ago

Ah, it wasn't when testing deform with pytest, but rather my own app which uses pytest :)

stevepiercy commented 3 years ago

Ah, OK. Thanks for clarifying.