Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add Python deprecation checking to CI #7909

Closed
anoadragon453 opened this issue Jul 20, 2020 · 4 comments
Closed

Add Python deprecation checking to CI #7909

anoadragon453 opened this issue Jul 20, 2020 · 4 comments

Comments

@anoadragon453
Copy link
Member

anoadragon453 commented Jul 20, 2020

#7895 mentioned that we can use the following (or similar) command to check for Python deprecation warnings which may sneak up on us.

find . -path ./env -prune -o -path ./.tox -prune -o -path ./build -prune -o -iname '*.py' | grep -Ev 'vendor|example|doc|tools|sphinx' | xargs -P4 -I{} python3.8 -Wall -m py_compile {}

However, I'm wary of the usefulness of this if the only thing it caught was an invalid escape sequence, which flake8 has been shown to catch as well (related: #7910).

@tirkarthi
Copy link
Contributor

flake8 already supports this https://www.flake8rules.com/rules/W605.html

@tirkarthi
Copy link
Contributor

flake8 contrib
contrib/experiments/test_messaging.py:78:34: W605 invalid escape sequence '\S'
contrib/experiments/test_messaging.py:87:36: W605 invalid escape sequence '\S'
contrib/experiments/test_messaging.py:87:42: W605 invalid escape sequence '\S'
contrib/experiments/test_messaging.py:96:34: W605 invalid escape sequence '\S'
contrib/experiments/test_messaging.py:105:38: W605 invalid escape sequence '\S'

@anoadragon453
Copy link
Member Author

Indeed. If flake8 already handles deprecation warnings, then #7910 is probably the way to go here.

@anoadragon453
Copy link
Member Author

Closing in favour of #7910.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants