helpful-lunch-92084
11/18/2020, 6:12 PMEngine traceback:
in select
in pants.core.goals.test.run_tests
in pants.core.goals.test.enrich_test_result (tests/python/test_djangofly/cbpsso/authentication_update_tests.py:../djangofly_apps_tests)
in pants.backend.python.goals.pytest_runner.run_python_test (tests/python/test_djangofly/cbpsso/authentication_update_tests.py:../djangofly_apps_tests)
in pants.backend.python.goals.pytest_runner.setup_pytest_for_target
in pants.engine.internals.graph.transitive_targets
Traceback (most recent call last):
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.1.0_py36/lib/python3.6/site-packages/pants/engine/internals/native.py", line 65, in generator_send
res = func.send(arg)
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.1.0_py36/lib/python3.6/site-packages/pants/engine/internals/graph.py", line 338, in transitive_targets
_detect_cycles(tuple(t.address for t in roots_as_targets), dependency_mapping)
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.1.0_py36/lib/python3.6/site-packages/pants/engine/internals/graph.py", line 291, in _detect_cycles
visit(root)
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.1.0_py36/lib/python3.6/site-packages/pants/engine/internals/graph.py", line 286, in visit
visit(dep_address)
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.1.0_py36/lib/python3.6/site-packages/pants/engine/internals/graph.py", line 286, in visit
visit(dep_address)
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.1.0_py36/lib/python3.6/site-packages/pants/engine/internals/graph.py", line 286, in visit
visit(dep_address)
[Previous line repeated 1005 more times]
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.1.0_py36/lib/python3.6/site-packages/pants/engine/internals/graph.py", line 288, in visit
path_stack.remove(address)
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.1.0_py36/lib/python3.6/_collections_abc.py", line 582, in remove
if value not in self:
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.1.0_py36/lib/python3.6/site-packages/pants/util/ordered_set.py", line 57, in __contains__
return key in self._items
RecursionError: maximum recursion depth exceeded
hundreds-breakfast-49010
11/18/2020, 6:14 PMhelpful-lunch-92084
11/18/2020, 6:15 PM$ cat ~/.cache/pants/setup/bootstrap-Darwin-x86_64/2.1.0_py36/bin/pants
#!/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.CseQil/install/bin/python3.6
# -*- coding: utf-8 -*-
import re
import sys
from pants.bin.pants_loader import main
sys.setrecursionlimit(1021)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
hundreds-breakfast-49010
11/18/2020, 6:21 PMsys.setrecursionlimit
in pantswitty-crayon-22786
11/18/2020, 6:59 PMconftest.py
…? that would allow you to do it once for the entire repo, for example
EDIT: Oh… but native support for pulling in conftest.py
automatically didn’t land until the 2.0.0.beta series i think.helpful-lunch-92084
11/18/2020, 7:12 PMwitty-crayon-22786
11/18/2020, 7:13 PMhundreds-father-404
11/18/2020, 7:15 PM./pants dependencies path/to/my_test.py
and confirming you see something like path/to/conftest.py
in the result. (See https://www.pantsbuild.org/docs/python-test-goal#conftestpy)
But Stu, we should still probably figure out a principled fix to the recursion limit, like possibly rewriting that codewitty-crayon-22786
11/18/2020, 7:16 PMhundreds-father-404
11/18/2020, 7:16 PMwitty-crayon-22786
11/18/2020, 7:17 PMhelpful-lunch-92084
11/18/2020, 7:18 PMwitty-crayon-22786
11/18/2020, 7:20 PMregister.py
files?jolly-midnight-72759
11/18/2020, 7:20 PMwitty-crayon-22786
11/18/2020, 7:20 PMjolly-midnight-72759
11/18/2020, 7:22 PMwitty-crayon-22786
11/18/2020, 7:22 PMjolly-midnight-72759
11/18/2020, 7:22 PMwitty-crayon-22786
11/18/2020, 7:22 PMjolly-midnight-72759
11/18/2020, 7:23 PMregister.py
resolves the issue.hundreds-father-404
11/20/2020, 10:12 PM