Skip to content

Commit

Permalink
Replace future with six in the python style checker. (#7374)
Browse files Browse the repository at this point in the history
### Problem

The workaround for #7158 was to remove usage of `future` in the python style `checker` pex, but documentation was not left behind to defend against re-addition, and so it regressed.

### Solution

Switch from `future` to `six`, and add a comment.

### Result

Checking py3 code from within a py2 pex should work.
  • Loading branch information
Stu Hood authored Mar 13, 2019
1 parent 2a63c86 commit 38311dc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ python_library(
}
),
dependencies=[
'3rdparty/python:future',
# NB: See https://github.com/pantsbuild/pants/issues/7158 before introducing additional
# dependencies here.
'3rdparty/python:pycodestyle',
'3rdparty/python:pyflakes',
'3rdparty/python:six',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import ast

from future.utils import PY3
from six import PY3

from pants.contrib.python.checks.checker.common import CheckstylePlugin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import ast

from future.utils import PY3
from six import PY3

from pants.contrib.python.checks.checker.common import CheckstylePlugin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import ast

from future.utils import PY3
from six import PY3

from pants.contrib.python.checks.checker.common import CheckstylePlugin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import ast
import re

from future.utils import PY3
from six import PY3

from pants.contrib.python.checks.checker.common import CheckstylePlugin

Expand Down

0 comments on commit 38311dc

Please sign in to comment.