Skip to content

Commit

Permalink
Fix setuptools's Python 2 deprecation warning with Python linters
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano committed Feb 14, 2020
1 parent 9648539 commit 035463c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/python/pants/backend/python/lint/bandit/subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

class Bandit(PythonToolBase):
options_scope = 'bandit'
default_version = 'bandit'
default_extra_requirements = ['setuptools']
default_version = 'bandit>=1.6.2,<1.7'
default_extra_requirements = ['setuptools<45'] # `<45` is for Python 2 support
default_entry_point = 'bandit'
default_interpreter_constraints = ["CPython>=2.7,<3", "CPython>=3.0"]

Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/backend/python/lint/black/subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class Black(PythonToolBase):
options_scope = 'black'
default_version = 'black==19.3b0'
default_version = 'black==19.10b0'
default_extra_requirements = ['setuptools']
default_entry_point = 'black:patched_main'
default_interpreter_constraints = ["CPython>=3.6"]
Expand Down
4 changes: 2 additions & 2 deletions src/python/pants/backend/python/lint/flake8/subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

class Flake8(PythonToolBase):
options_scope = 'flake8'
default_version = 'flake8'
default_extra_requirements = ['setuptools']
default_version = 'flake8>=3.7.9,<3.8'
default_extra_requirements = ['setuptools<45'] # `<45` is for Python 2 support
default_entry_point = 'flake8'
default_interpreter_constraints = ["CPython>=2.7,<3", "CPython>=3.4"]

Expand Down
3 changes: 2 additions & 1 deletion src/python/pants/backend/python/lint/isort/subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@

class Isort(PythonToolBase):
options_scope = 'isort'
default_version = 'isort==4.3.20'
default_version = 'isort>=4.3.21,<4.4'
default_extra_requirements = ['setuptools']
default_entry_point = 'isort.main'
default_interpreter_constraints = ["CPython>=3.6"]

@classmethod
def register_options(cls, register):
Expand Down

0 comments on commit 035463c

Please sign in to comment.