Skip to content

Commit b6bcf7b

Browse files
committed
Add two interpreters constraints: 2.7 and >=3.6.
1 parent a86ba64 commit b6bcf7b

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

algorithms/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
python_library(
22
name="algorithms",
33
sources=["*.py", "!*_test.py"],
4-
interpreter_constraints=[">=3.6"],
4+
interpreter_constraints=["==2.7.*", ">=3.6"],
55
)
66

77

algorithms/a_star_path_finding.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from builtins import range
2-
from builtins import object
31
import heapq
42

53

algorithms/permutations.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from builtins import range
21
def permutations(lst):
32
"""Generator for list permutations.
43

algorithms/string.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from builtins import range
21
def string_matching_naive(text='', pattern=''):
32
"""Returns positions where pattern is found in text.
43

algorithms/tests/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# `sources` defaults to ['*_test.py', 'test_*.py', 'conftest.py'].
22
# `dependencies` are inferred.
3-
python_tests(name = 'tests')
3+
python_tests(
4+
name = 'tests',
5+
interpreter_constraints=["==2.7.*", ">=3.6"],
6+
)

pants.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ root_patterns = ["/"]
1313
# The default interpreter compatibility for code in this repo. Individual targets can override
1414
# this with the `interpreter_constraints` field. See
1515
# https://www.pantsbuild.org/docs/python-interpreter-compatibility.
16-
interpreter_constraints = [">=3.6"]
16+
interpreter_constraints = ["==2.7.*", ">=3.6"]
1717
# Use a constraints file. See https://www.pantsbuild.org/docs/python-third-party-dependencies.
1818
requirement_constraints = "constraints.txt"
1919
# We search for interpreters on both on the $PATH and in the `$(pyenv root)/versions` folder.
@@ -24,3 +24,7 @@ interpreter_search_paths = ["<PATH>", "<PYENV>"]
2424

2525
[flake8]
2626
config = "build-support/.flake8"
27+
28+
[pytest]
29+
version = "pytest>=4.0,<6.1"
30+
pytest_plugins = ["zipp>=1.2"]

0 commit comments

Comments
 (0)