proud-dentist-22844
04/13/2021, 3:14 AMst2-auth-ldap @ git+<https://github.com/StackStorm/st2-auth-ldap.git@master>
Then, using pip freeze --all
I end up with a line in my constraints-pants.txt
like:
st2-auth-ldap @ git+<https://github.com/StackStorm/st2-auth-ldap.git@078334ca4767a552232c1a2563761c7f73c1d4e9>
But when I try to run ./pants lint ::
(where pylint.pex is actually building successfully 🎉 ), I get this:
DEPRECATION: Constraints are only allowed to take the form of a package name and a version specifier. Other forms were originally permitted as an accident of the implementation, but were undocumented. The new implementation of the resolver no longer supports these forms. A possible replacement is replacing the constraint with a requirement.. You can find discussion regarding this at <https://github.com/pypa/pip/issues/8210>.
ERROR: Links are not allowed as constraints
So, I tried commenting out the VCS portion in constraints-pants.txt
like this:
st2-auth-ldap #@ git+<https://github.com/StackStorm/st2-auth-ldap.git@078334ca4767a552232c1a2563761c7f73c1d4e9>
But, then I get this error instead:
Traceback (most recent call last):
File "/Users/jafloyd/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0rc3_py37/lib/python3.7/site-packages/pants/bin/local_pants_runner.py", line 229, in _run_inner
return self._perform_run(goals)
File "/Users/jafloyd/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0rc3_py37/lib/python3.7/site-packages/pants/bin/local_pants_runner.py", line 168, in _perform_run
return self._perform_run_body(goals, poll=False)
File "/Users/jafloyd/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0rc3_py37/lib/python3.7/site-packages/pants/bin/local_pants_runner.py", line 190, in _perform_run_body
poll_delay=(0.1 if poll else None),
File "/Users/jafloyd/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0rc3_py37/lib/python3.7/site-packages/pants/init/engine_initializer.py", line 136, in run_goal_rules
goal_product, params, poll=poll, poll_delay=poll_delay
File "/Users/jafloyd/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0rc3_py37/lib/python3.7/site-packages/pants/engine/internals/scheduler.py", line 526, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/Users/jafloyd/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0rc3_py37/lib/python3.7/site-packages/pants/engine/internals/scheduler.py", line 490, in _raise_on_error
wrapped_exceptions=tuple(t.exc for t in throws),
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:
Engine traceback:
in select
in pants.core.goals.lint.lint
in pants.core.goals.lint.enrich_lint_results
in pants.backend.python.lint.pylint.rules.pylint_lint
in pants.backend.python.lint.pylint.rules.pylint_lint_partition
in pants.backend.python.util_rules.pex.create_pex
in pants.backend.python.util_rules.pex.build_pex (requirements.pex)
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "/Users/jafloyd/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0rc3_py37/lib/python3.7/site-packages/pants/engine/process.py", line 255, in fallible_to_exec_result_or_raise
description.value,
pants.engine.process.ProcessExecutionFailure: Process 'Resolving constraints-pants.txt' failed with exit code 1.
stdout:
stderr:
ERROR: Could not find a version that satisfies the requirement st2-auth-ldap
ERROR: No matching distribution found for st2-auth-ldap
pid 56773 -> /opt/local/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 /Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /Users/jafloyd/.cache/pants/named_caches/pex_root --log /private/var/folders/d7/hkbhq46j2_g3f392vkjp407xxl_1cw/T/process-executionnZmtBG/.tmp/tmptqkj94nv/pip.log download --dest /private/var/folders/d7/hkbhq46j2_g3f392vkjp407xxl_1cw/T/process-executionnZmtBG/.tmp/tmpw6u3zj0v/opt.local.Library.Frameworks.Python.framework.Versions.3.6.bin.python3.6 --constraint constraints-pants.txt APScheduler==3.7.0 Babel==2.9.0 Flask==1.1.2 GitPython==3.1.14 Jinja2==2.11.3 MarkupSafe==1.1.1 PyNaCl==1.4.0 PyYAML==5.4.1 Routes==2.5.1 WebOb==1.8.7 Werkzeug==1.0.1 amqp==5.0.6 appdirs==1.4.4 astroid==2.5.3 bcrypt==3.2.0 beautifulsoup4==4.9.3 cachetools==2.0.1 certifi==2020.12.5 cffi==1.14.5 chardet==3.0.4 click==7.1.2 cryptography==3.4.7 debtcollector==2.2.0 decorator==5.0.6 distlib==0.3.1 dnspython==1.16.0 eventlet==0.30.2 fasteners==0.16 filelock==3.0.12 flex==6.14.1 futurist==2.3.0 gitdb==4.0.7 greenlet==1.0.0 gunicorn==20.1.0 idna==2.10 iso8601==0.1.14 itsdangerous==1.1.0 jsonpath-rw==1.4.0 jsonpointer==2.1 jsonschema==2.6.0 kazoo==2.8.0 kombu==5.0.2 lazy-object-proxy==1.6.0 linecache2==1.0.0 lockfile==0.12.2 mail-parser==3.15.0 mock==4.0.3 mongoengine==0.23.0 msgpack==1.0.2 netaddr==0.8.0 netifaces==0.10.9 networkx==1.11 orjson==3.5.1 orquesta oslo.config==1.12.1 oslo.i18n==5.0.1 oslo.serialization==4.1.0 oslo.utils==4.8.0 packaging==20.9 paramiko==2.7.2 passlib==1.7.4 pbr==5.5.1 pip==21.0.1 ply==3.11 prance==0.20.0 prompt-toolkit==3.0.18 psutil==5.8.0 pyOpenSSL==20.0.1 pyasn1-modules==0.2.8 pyasn1==0.4.8 pycparser==2.20 pymongo==3.11.3 pyparsing==2.4.7 python-dateutil==2.8.1 python-editor==1.0.4 python-ldap==3.0.0 python-statsd==2.1.0 pytz==2021.1 repoze.lru==0.7 requests==2.25.1 retrying==1.3.3 rfc3987==1.3.8 semver==2.13.0 setuptools==49.2.1 simplejson==3.17.2 six==1.15.0 smmap==4.0.0 soupsieve==2.2.1 sseclient-py==1.7 st2-auth-backend-flat-file st2-auth-ldap st2-rbac-backend stevedore==3.3.0 strict-rfc3339==0.7 tenacity==7.0.0 tooz==2.8.0 traceback2==1.4.0 tzlocal==2.1 udatetime==0.0.16 ujson==4.0.2 unittest2==1.1.0 urllib3==1.26.4 validate-email==1.3 vine==5.0.0 virtualenv==20.4.3 voluptuous==0.12.1 wcwidth==0.2.5 wheel==0.36.2 wrapt==1.12.1 yaql==1.1.3 zake==0.2.2 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with 1 and STDERR:
None
proud-dentist-22844
04/13/2021, 3:18 AM-vvv
output gives me:
1 location(s) to search for versions of st2-auth-ldap:
* <https://pypi.org/simple/st2-auth-ldap/>
Fetching project page and analyzing links: <https://pypi.org/simple/st2-auth-ldap/>
Getting page <https://pypi.org/simple/st2-auth-ldap/>
Found index url <https://pypi.org/simple/>
Looking up "<https://pypi.org/simple/st2-auth-ldap/>" in the cache
Request header has "max_age" as 0, cache bypassed
<https://pypi.org:443> "GET /simple/st2-auth-ldap/ HTTP/1.1" 404 13
Status code 404 not in (200, 203, 300, 301)
Could not fetch URL <https://pypi.org/simple/st2-auth-ldap/>: 404 Client Error: Not Found for url: <https://pypi.org/simple/st2-auth-ldap/> - skipping
Given no hashes to check 0 links for project 'st2-auth-ldap': discarding no candidates
ERROR: Could not find a version that satisfies the requirement st2-auth-ldap
ERROR: No matching distribution found for st2-auth-ldap
Exception information:
Traceback (most recent call last):
File "/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/pip/pip/_vendor/resolvelib/resolvers.py", line 171, in _merge_into_criterion
crit = self.state.criteria[name]
KeyError: 'st2-auth-ldap'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/pip/pip/_vendor/resolvelib/resolvers.py", line 318, in resolve
name, crit = self._merge_into_criterion(r, parent=None)
File "/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/pip/pip/_vendor/resolvelib/resolvers.py", line 173, in _merge_into_criterion
crit = Criterion.from_requirement(self._p, requirement, parent)
File "/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/pip/pip/_vendor/resolvelib/resolvers.py", line 83, in from_requirement
raise RequirementsConflicted(criterion)
pip._vendor.resolvelib.resolvers.RequirementsConflicted: Requirements conflict: SpecifierRequirement('st2-auth-ldap')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/pip/pip/_internal/resolution/resolvelib/resolver.py", line 122, in resolve
requirements, max_rounds=try_to_avoid_resolution_too_deep,
File "/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/pip/pip/_vendor/resolvelib/resolvers.py", line 453, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/pip/pip/_vendor/resolvelib/resolvers.py", line 320, in resolve
raise ResolutionImpossible(e.criterion.information)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('st2-auth-ldap'), parent=None)]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/pip/pip/_internal/cli/base_command.py", line 223, in _main
status = self.run(options, args)
File "/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/pip/pip/_internal/cli/req_command.py", line 180, in wrapper
return func(self, options, args)
File "/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/pip/pip/_internal/commands/download.py", line 131, in run
reqs, check_supported_wheels=True
File "/Users/jafloyd/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a/.deps/pip/pip/_internal/resolution/resolvelib/resolver.py", line 127, in resolve
six.raise_from(error, e)
File "<string>", line 3, in raise_from
pip._internal.exceptions.DistributionNotFound: No matching distribution found for st2-auth-ldap
proud-dentist-22844
04/13/2021, 3:47 AMproud-dentist-22844
04/13/2021, 3:48 AM23:43:02.57 [WARN] The constraints file constraints-pants.txt does not contain entries for the following requirements: orquesta
23:43:02.58 [WARN] Ignoring `[python_setup].resolve_all_constraints` option because constraints file does not cover all requirements.
proud-dentist-22844
04/13/2021, 3:49 AMhappy-kitchen-89482
04/13/2021, 4:49 AMhappy-kitchen-89482
04/13/2021, 4:52 AMhappy-kitchen-89482
04/13/2021, 4:06 PMhappy-kitchen-89482
04/13/2021, 8:42 PMpip freeze
to emit st2-auth-ldap @ git+<https://github.com/StackStorm/st2-auth-ldap.git@078334ca4767a552232c1a2563761c7f73c1d4e9>
into your constraints files? If I try that I get st2-auth-ldap==3.5.dev0
in the freeze outputproud-dentist-22844
04/13/2021, 9:04 PMpip freeze --all
. I tested with pip 20.3.3 (in a different virtualenv) and 21.0.1 (in the venv built by generate_constraints.sh). Both of them use the git hash.proud-dentist-22844
04/13/2021, 9:28 PMpip config debug
).proud-dentist-22844
04/13/2021, 9:28 PMproud-dentist-22844
04/13/2021, 9:36 PMproud-dentist-22844
04/13/2021, 9:36 PMhappy-kitchen-89482
04/13/2021, 9:37 PMhappy-kitchen-89482
04/13/2021, 9:37 PMhappy-kitchen-89482
04/13/2021, 9:37 PMhappy-kitchen-89482
04/13/2021, 9:38 PMhappy-kitchen-89482
04/13/2021, 9:38 PMproud-dentist-22844
04/13/2021, 9:38 PM"${PIP}" freeze --all | sed '/git+https/s/^/#/' >> "${CONSTRAINTS_FILE}"
happy-kitchen-89482
04/13/2021, 9:39 PMproud-dentist-22844
04/13/2021, 9:39 PMhappy-kitchen-89482
04/13/2021, 9:39 PMhappy-kitchen-89482
04/13/2021, 9:39 PMhappy-kitchen-89482
04/13/2021, 9:39 PMproud-dentist-22844
04/13/2021, 9:40 PMproud-dentist-22844
04/13/2021, 9:40 PMhappy-kitchen-89482
04/13/2021, 9:40 PMproud-dentist-22844
04/13/2021, 9:41 PMsteep-breakfast-98857
04/13/2021, 9:56 PMproud-dentist-22844
04/13/2021, 10:09 PMhappy-kitchen-89482
04/13/2021, 10:16 PMhappy-kitchen-89482
04/15/2021, 1:18 PMfile://
URLs): https://github.com/pantsbuild/pants/pull/11907happy-kitchen-89482
04/15/2021, 1:19 PMhappy-kitchen-89482
04/15/2021, 1:20 PMproud-dentist-22844
04/15/2021, 3:24 PMhappy-kitchen-89482
04/15/2021, 3:54 PMhappy-kitchen-89482
04/18/2021, 5:37 AMhappy-kitchen-89482
04/18/2021, 6:07 AMhappy-kitchen-89482
04/18/2021, 6:08 AM./pants lint ::
and black and flake8 pass. PyLint itself builds too, but there are PyLint failures that I guess are legit?proud-dentist-22844
04/26/2021, 4:49 PMhappy-kitchen-89482
04/29/2021, 11:49 PMhappy-kitchen-89482
04/29/2021, 11:50 PM./pants path/to/file.py path/to/dir::
and so onhappy-kitchen-89482
04/29/2021, 11:51 PMhundreds-father-404
04/29/2021, 11:53 PM--ignore
option work via [pylint].args
in your pants.toml
? http://pylint.pycqa.org/en/latest/user_guide/run.html#command-line-optionshappy-kitchen-89482
04/29/2021, 11:54 PMhappy-kitchen-89482
04/29/2021, 11:54 PMhappy-kitchen-89482
04/29/2021, 11:55 PMhappy-kitchen-89482
04/29/2021, 11:55 PMhappy-kitchen-89482
04/29/2021, 11:55 PMhappy-kitchen-89482
04/29/2021, 11:56 PMproud-dentist-22844
04/30/2021, 12:19 AM--ignore
option is really limited or works in a way that is a complete mismatch with my mental model 😉. I couldn’t figure out how to use patterns or paths to exclude things.proud-dentist-22844
04/30/2021, 12:20 AMproud-dentist-22844
04/30/2021, 12:21 AMproud-dentist-22844
04/30/2021, 12:22 AMhundreds-father-404
05/01/2021, 10:31 PMpython_library(skip_pylint=True)
I'm hoping to get this out Monday, which should make it into the upcoming dev releasehappy-kitchen-89482
05/01/2021, 11:29 PMhappy-kitchen-89482
05/01/2021, 11:29 PMproud-dentist-22844
05/02/2021, 12:09 AMproud-dentist-22844
05/02/2021, 12:10 AMhappy-kitchen-89482
05/02/2021, 12:14 AMhundreds-father-404
05/03/2021, 9:43 PMproud-dentist-22844
05/03/2021, 9:58 PMhundreds-father-404
05/03/2021, 10:16 PMproud-dentist-22844
05/03/2021, 10:48 PMhappy-kitchen-89482
05/04/2021, 5:53 PMhappy-kitchen-89482
05/04/2021, 5:54 PMhappy-kitchen-89482
05/04/2021, 5:54 PMhundreds-father-404
05/04/2021, 5:57 PMThis timeout will apply to each file belonging to the python_tests target, meaning that test_f1.py will have a timeout of 120 seconds and test_f2.py will have a timeout of 120 seconds. If you want finer-grained timeouts, create a dedicated python_tests target for each file:
You should be able to change the timeout for test_f1.py
without needing to split out new targets and without impacting sibling files
My concern is less that "targets are unnatural / targets should possibly not fundamentally exist"proud-dentist-22844
05/04/2021, 6:01 PMgetting rid of (explicit) BUILD file targets entirely, unless you need them to specify non-default metadata.Yes please!