enough-analyst-54434
01/19/2021, 6:19 PM__init__.py
contents?helpful-lunch-92084
01/19/2021, 6:23 PMresolver_version
in python-setup
.
I can confirm that using pex 2.1.23 correctly resolves the following with the new resolver:
boto3==1.15.6
botocore
Pex in action:
$ pex --version
2.1.23
$ pex boto3==1.15.6 botocore -o boto3.pex
Failed to resolve compatible distributions:
1: boto3==1.15.6 requires botocore<1.19.0,>=1.18.6 but botocore 1.19.56 was resolved
$ pex --resolver-version=pip-2020-resolver boto3==1.15.6 botocore -o boto3.pex
$
Pants in action:
$ cat 3rdparty/python/BUILD.foo
python_requirement_library(
name="foo",
requirements=["boto3==1.15.6", "botocore"],
)
$ pants repl 3rdparty/python:foo
...
Engine traceback:
in select
in pants.core.goals.repl.run_repl
in pants.backend.python.goals.repl.create_ipython_repl_request
in pants.backend.python.util_rules.pex.create_pex (requirements.pex)
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.3.0.dev0_py38/lib/python3.8/site-packages/pants/engine/process.py", line 255, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Building requirements.pex with 2 requirements: boto3==1.15.6, botocore' failed with exit code 1.
stdout:
stderr:
Failed to resolve compatible distributions:
1: boto3==1.15.6 requires botocore<1.19.0,>=1.18.6 but botocore 1.19.56 was resolved
Any thoughts?enough-analyst-54434
01/19/2021, 6:29 PMenough-analyst-54434
01/19/2021, 6:30 PMenough-analyst-54434
01/19/2021, 6:32 PM$ ./pants help-advanced python-setup
...
--python-setup-resolver-version=<ResolverVersion>
PANTS_PYTHON_SETUP_RESOLVER_VERSION
resolver_version
one of: [pip-legacy-resolver, pip-2020-resolver]
default: pip-legacy-resolver
current value: pip-2020-resolver (from pants.toml)
The resolver implementation to use when resolving Python requirements.
Support for the 'pip-legacy-resolver' will be removed in Pants 2.5; so you're encouraged
to start using the 'pip-2020-resolver' early. For more information on this change see
<https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver->
in-20-2-2020
Upcoming deprecation in version: 2.3.0.dev1, will be removed in version: 2.5.0.dev1.
helpful-lunch-92084
01/19/2021, 6:34 PMenough-analyst-54434
01/19/2021, 6:35 PM./pants help-advanced python-setup
. If you read my output above closely it shows the current set value.helpful-lunch-92084
01/19/2021, 6:35 PM--python-setup-resolver-version=<ResolverVersion>
PANTS_PYTHON_SETUP_RESOLVER_VERSION
resolver_version
one of: [pip-legacy-resolver, pip-2020-resolver]
default: pip-legacy-resolver
current value: pip-2020-resolver (from pants.toml)
enough-analyst-54434
01/19/2021, 6:37 PMhelpful-lunch-92084
01/19/2021, 6:41 PMhelpful-lunch-92084
01/19/2021, 6:41 PMenough-analyst-54434
01/19/2021, 6:58 PM$ cat BUILD.nate
python_requirement_library(
name="foo",
requirements=["boto3==1.15.6", "botocore"],
)
$ ./pants repl //:foo
10:55:21.20 [WARN] The constraints file 3rdparty/python/constraints.txt does not contain entries for the following requirements: botocore, boto3
10:55:21.20 [WARN] Ignoring resolve_all_constraints setting in [python_setup] scope because constraints file does not cover all requirements.
10:56:23.37 [INFO] Completed: Building requirements.pex with 2 requirements: boto3==1.15.6, botocore
10:56:23.37 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
...
pants.engine.process.ProcessExecutionFailure: Process 'Building requirements.pex with 2 requirements: boto3==1.15.6, botocore' failed with exit code 1.
stdout:
stderr:
ERROR: Cannot install botocore==1.18.10, botocore==1.18.11, botocore==1.18.12, botocore==1.18.13, botocore==1.18.14, botocore==1.18.15, botocore==1.18.16, botocore==1.18.17, botocore==1.18.18, botocore==1.18.6, botocore==1.18.7, botocore==1.18.8 and botocore==1.18.9 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit <https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies>
pid 152051 -> /usr/bin/python3.7 /home/jsirois/.cache/pants/named_caches/pex_root/pip.pex/1b2dfe434f773fd6aaf45cdd941bad0c262b8e13 --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /home/jsirois/.cache/pants/named_caches/pex_root download --dest /tmp/process-executionYHMAYe/.tmp/tmp10y30qf9/usr.bin.python3.7 --constraint 3rdparty/python/constraints.txt boto3==1.15.6 botocore --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with 1 and STDERR:
None
At a baseline we should see the same error and we don'thundreds-father-404
01/20/2021, 2:40 AMA macro can create multiple targets:
def python23_tests(name, **kwargs):
kwargs.pop("interpreter_constraints", None)
python_tests(
name=f"{name}_py2",
interpreter_constraints=["==2.7.*"],
**kwargs,
)
python_tests(
name=f"{name}_py3",
interpreter_constraints=[">=3.5"],
**kwargs,
)
narrow-activity-17405
01/20/2021, 7:42 AMechoing-nightfall-72095
01/20/2021, 7:54 AMpolite-vase-75369
01/20/2021, 9:23 PMpolite-vase-75369
01/20/2021, 9:26 PMwitty-crayon-22786
01/20/2021, 10:00 PMechoing-nightfall-72095
01/21/2021, 12:28 PMpants.toml
and a <http://pants.ci|pants.ci>.toml
? I have set the env_var PANTS_CONFIG_FILES=<http://pants.ci|pants.ci>.toml
. Linting complains that the version should be set in the GLOBAL section in pants.toml
. But I have specified it in <http://pants.ci|pants.ci>.toml
.
[GLOBAL]
pants_version = "2.2.0"
I thought maybe it does not use that env_var. I tested setting the env_var and removing pants.ci.toml, then it complains that pant.ci.toml is missing as it should. So the only way to make it work for me is having both and files. I can of course rename the <http://pants.ci|pants.ci>.toml
to pants.toml
and not setting the env_var.narrow-activity-17405
01/21/2021, 1:09 PMhigh-egg-2153
01/23/2021, 4:18 PMenough-analyst-54434
01/23/2021, 5:16 PMhigh-egg-2153
01/23/2021, 5:33 PMsquare-oxygen-75288
01/25/2021, 2:29 PM06:21:43 01:19 [run]
Auto-detected 8 processors, using -parallel-threads=8
Time: 0.001
OK (0 tests)
test/scala/com/github/slvrtrn:tests ..... SUCCESS
Waiting for background workers to finish.
06:21:43 01:19 [complete]
SUCCESS
The test file itself is correctly recognized and there is no error reported in the console. But the suite is not actually executed.bored-mechanic-51694
01/25/2021, 4:12 PM10:56:38 15:56:38 [INFO] Resolving new plugins...:
10:56:38 pantsbuild.pants.contrib.avro==1.26.0
10:56:38 pantsbuild.pants.contrib.googlejavaformat==1.26.0
10:56:38 pantsbuild.pants.contrib.python.checks==1.26.0
10:56:38 pantsbuild.pants.contrib.scrooge==1.26.0
10:56:38 pantsbuild.pants.contrib.thrifty==1.26.0
10:56:38 pex: Resolving for:
[SNIP]
10:56:39 Starting new HTTPS connection (1): <http://pypi.org:443|pypi.org:443>
10:57:39 Incremented Retry for (url='/simple/pantsbuild-pants-contrib-avro/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
10:57:39 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fc21492b080>, 'Connection to <http://pypi.org|pypi.org> timed out. (connect timeout=15)')': /simple/pantsbuild-pants-contrib-avro/
helpful-lunch-92084
01/26/2021, 3:58 AMwitty-crayon-22786
01/26/2021, 5:17 PMpolite-vase-75369
01/26/2021, 6:58 PMbusy-vase-39202
01/28/2021, 4:07 AMfierce-france-72742
01/28/2021, 10:03 AMpackage
on a target, calling run
on it for the first time leads to a long contraints resolution step. I quite don't understand why those constraints are resolved after the ".pex" file was created. Isn't that pex file fully self-contained and hermetic?