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

Add Python deprecation checking to CI #7909

Closed

Description

@anoadragon453

#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).

Activity

  1. tirkarthi commented on Jul 20, 2020

    @tirkarthi
    Contributor

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

  2. tirkarthi commented on Jul 20, 2020

    @tirkarthi
    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'
    
  3. anoadragon453 commented on Jul 20, 2020

    @anoadragon453
    MemberAuthor

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

  4. anoadragon453 commented on Jul 20, 2020

    @anoadragon453
    MemberAuthor

    Closing in favour of #7910.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions