tox.ini: do not cause SyntaxWarning with py37 [ci skip]#4408
Conversation
Do not cause a SyntaxError for something like: > DeprecationWarning: invalid escape sequence \w This was happening via pdb++ when it imported pygments (and that had no compiled .pyc file).
RonnyPfannschmidt
left a comment
There was a problem hiding this comment.
its reasonable to make those normal warnings instead of warnings as we have no controll over external packages
as a follow-up we should investigate if we can keep the error for pytest and its own tests
|
We could use the following:
But this matches through the path only (module file name), and would still throw errors from packages in A warnings filter function could be used to make use of Merging as-is for now. |
|
we don't have to worry for pytest itself either as |
|
@asottile good point - we still have some acceptance testing patters where we use strings in strings and might miss one that would show up in a test tho @blueyed main reason i proposed this as a follow-up is that i believe the solution to mark those down correctly might not come easy and we migh even have to decide this one is way too tricky to be worth it and given the point @asottile made we should naturally approach the lack of need of this check sooner or later anyway - so i propose we let it go and fix the practices around code examples in tests to support better analysis from tools over time |
Do not cause a SyntaxError for something like:
This was happening via pdb++ when it imported pygments (and that had no
compiled .pyc file).