after_merge stringlengths 28 79.6k | before_merge stringlengths 20 79.6k | url stringlengths 38 71 | full_traceback stringlengths 43 922k | traceback_type stringclasses 555
values |
|---|---|---|---|---|
def __init__(
self,
address=None,
loop=None,
timeout=no_default,
set_as_default=True,
scheduler_file=None,
security=None,
asynchronous=False,
name=None,
heartbeat_interval=None,
serializers=None,
deserializers=None,
extensions=DEFAULT_EXTENSIONS,
direct_to_workers... | def __init__(
self,
address=None,
loop=None,
timeout=no_default,
set_as_default=True,
scheduler_file=None,
security=None,
asynchronous=False,
name=None,
heartbeat_interval=None,
serializers=None,
deserializers=None,
extensions=DEFAULT_EXTENSIONS,
direct_to_workers... | https://github.com/dask/distributed/issues/2473 | $ python tmp/dask/shuffle_none.py
before client shuffle: MISSING
before client scheduler: MISSING
inside client shuffle: tasks
inside client scheduler: dask.distributed
after client shuffle: None
after client scheduler: None
Traceback (most recent call last):
...
NotImplementedError: Unknown shuffle method None | NotImplementedError |
def _close(self, fast=False):
"""Send close signal and wait until scheduler completes"""
self.status = "closing"
with log_errors():
_del_global_client(self)
for pc in self._periodic_callbacks.values():
pc.stop()
self._scheduler_identity = {}
with ignoring(Attribu... | def _close(self, fast=False):
"""Send close signal and wait until scheduler completes"""
self.status = "closing"
with log_errors():
_del_global_client(self)
for pc in self._periodic_callbacks.values():
pc.stop()
self._scheduler_identity = {}
with ignoring(Attribu... | https://github.com/dask/distributed/issues/2473 | $ python tmp/dask/shuffle_none.py
before client shuffle: MISSING
before client scheduler: MISSING
inside client shuffle: tasks
inside client scheduler: dask.distributed
after client shuffle: None
after client scheduler: None
Traceback (most recent call last):
...
NotImplementedError: Unknown shuffle method None | NotImplementedError |
def close(self, timeout=no_default):
"""Close this client
Clients will also close automatically when your Python session ends
If you started a client without arguments like ``Client()`` then this
will also close the local cluster that was started at the same time.
See Also
--------
Client... | def close(self, timeout=no_default):
"""Close this client
Clients will also close automatically when your Python session ends
If you started a client without arguments like ``Client()`` then this
will also close the local cluster that was started at the same time.
See Also
--------
Client... | https://github.com/dask/distributed/issues/2473 | $ python tmp/dask/shuffle_none.py
before client shuffle: MISSING
before client scheduler: MISSING
inside client shuffle: tasks
inside client scheduler: dask.distributed
after client shuffle: None
after client scheduler: None
Traceback (most recent call last):
...
NotImplementedError: Unknown shuffle method None | NotImplementedError |
def _spawn_from_binary_external(cls, binary):
def create_interpreter(stdout, check_binary=False):
identity = stdout.decode("utf-8").strip()
if not identity:
raise cls.IdentificationError(
"Could not establish identity of {}.".format(binary)
)
interpret... | def _spawn_from_binary_external(cls, binary):
def create_interpreter(stdout, check_binary=False):
identity = stdout.decode("utf-8").strip()
if not identity:
raise cls.IdentificationError(
"Could not establish identity of {}.".format(binary)
)
interpret... | https://github.com/pantsbuild/pex/issues/1231 | $ python3.8 -mvenv venv
$ venv/bin/pip -q install -U pip
$ venv/bin/pip -q install pex
$ venv/bin/pex --version
2.1.30
$ venv/bin/pip -q install --target dir pex==2.1.16
$ ls dir/
bin pex pex-2.1.16.dist-info
$ venv/bin/pex isort -c isort -o dir/isort.pex
$ cd dir/
dir $ rm -rf ~/.pex/interpreters/
dir $ ./isort.pex
... | pex.jobs.Error |
def wait(self):
# type: () -> None
"""Waits for the job to complete.
:raises: :class:`Job.Error` if the job exited non-zero.
"""
try:
self._process.wait()
self._check_returncode()
finally:
self._finalize_job()
| def wait(self):
# type: () -> None
"""Waits for the job to complete.
:raises: :class:`Job.Error` if the job exited non-zero.
"""
self._process.wait()
self._check_returncode()
| https://github.com/pantsbuild/pex/issues/1231 | $ python3.8 -mvenv venv
$ venv/bin/pip -q install -U pip
$ venv/bin/pip -q install pex
$ venv/bin/pex --version
2.1.30
$ venv/bin/pip -q install --target dir pex==2.1.16
$ ls dir/
bin pex pex-2.1.16.dist-info
$ venv/bin/pex isort -c isort -o dir/isort.pex
$ cd dir/
dir $ rm -rf ~/.pex/interpreters/
dir $ ./isort.pex
... | pex.jobs.Error |
def communicate(self, input=None):
# type: (Optional[bytes]) -> Tuple[bytes, bytes]
"""Communicates with the job sending any input data to stdin and collecting stdout and
stderr.
:param input: Data to send to stdin of the job as per the `subprocess` API.
:return: A tuple of the job's stdout and std... | def communicate(self, input=None):
# type: (Optional[bytes]) -> Tuple[bytes, bytes]
"""Communicates with the job sending any input data to stdin and collecting stdout and
stderr.
:param input: Data to send to stdin of the job as per the `subprocess` API.
:return: A tuple of the job's stdout and std... | https://github.com/pantsbuild/pex/issues/1231 | $ python3.8 -mvenv venv
$ venv/bin/pip -q install -U pip
$ venv/bin/pip -q install pex
$ venv/bin/pex --version
2.1.30
$ venv/bin/pip -q install --target dir pex==2.1.16
$ ls dir/
bin pex pex-2.1.16.dist-info
$ venv/bin/pex isort -c isort -o dir/isort.pex
$ cd dir/
dir $ rm -rf ~/.pex/interpreters/
dir $ ./isort.pex
... | pex.jobs.Error |
def kill(self):
# type: () -> None
"""Terminates the job if it is still running.
N.B.: This method is idempotent.
"""
try:
self._process.kill()
except OSError as e:
if e.errno != errno.ESRCH:
raise e
finally:
self._finalize_job()
| def kill(self):
# type: () -> None
"""Terminates the job if it is still running.
N.B.: This method is idempotent.
"""
try:
self._process.kill()
except OSError as e:
if e.errno != errno.ESRCH:
raise e
| https://github.com/pantsbuild/pex/issues/1231 | $ python3.8 -mvenv venv
$ venv/bin/pip -q install -U pip
$ venv/bin/pip -q install pex
$ venv/bin/pex --version
2.1.30
$ venv/bin/pip -q install --target dir pex==2.1.16
$ ls dir/
bin pex pex-2.1.16.dist-info
$ venv/bin/pex isort -c isort -o dir/isort.pex
$ cd dir/
dir $ rm -rf ~/.pex/interpreters/
dir $ ./isort.pex
... | pex.jobs.Error |
def install_distributions(
self,
ignore_errors=False, # type: bool
workspace=None, # type: Optional[str]
max_parallel_jobs=None, # type: Optional[int]
):
# type: (...) -> Iterable[InstalledDistribution]
if not any((self._build_requests, self._install_requests)):
# Nothing to build or ... | def install_distributions(
self,
ignore_errors=False, # type: bool
workspace=None, # type: Optional[str]
max_parallel_jobs=None, # type: Optional[int]
):
# type: (...) -> Iterable[InstalledDistribution]
if not any((self._build_requests, self._install_requests)):
# Nothing to build or ... | https://github.com/pantsbuild/pex/issues/1196 | $ python2.7 -mpex "flake8>=3.7.9,<3.9" "setuptools<45; python_full_version == '2.7.*'" "setuptools; python_version > '2.7'" -e flake8 -o flake8.pex
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.... | AssertionError |
def symlink(
self,
src, # type: str
dst, # type: str
label=None, # type: Optional[str]
):
# type: (...) -> None
dst = self._normalize(dst)
self._tag(dst, label)
self._ensure_parent(dst)
abs_src = os.path.abspath(src)
abs_dst = os.path.join(self.chroot, dst)
os.symlink(abs_... | def symlink(
self,
src, # type: str
dst, # type: str
label=None, # type: Optional[str]
):
# type: (...) -> None
dst = self._normalize(dst)
self._tag(dst, label)
self._ensure_parent(dst)
abs_src = src
abs_dst = os.path.join(self.chroot, dst)
os.symlink(abs_src, abs_dst)
| https://github.com/pantsbuild/pex/issues/1192 | $ mkdir src/
$ echo 'print("Hello World!")' > src/main.py
$ python -m pex -D src -otest.pex -e main
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_... | FileNotFoundError |
def from_filename(cls, path):
# type: (str) -> ProjectNameAndVersion
# Handle wheels:
#
# The wheel filename convention is specified here:
# https://www.python.org/dev/peps/pep-0427/#file-name-convention.
if path.endswith(".whl"):
project_name, version, _ = os.path.basename(path).split... | def from_filename(cls, path):
# type: (str) -> ProjectNameAndVersion
# Handle wheels:
#
# The wheel filename convention is specified here:
# https://www.python.org/dev/peps/pep-0427/#file-name-convention.
if path.endswith(".whl"):
project_name, version, _ = os.path.basename(path).split... | https://github.com/pantsbuild/pex/issues/1188 | $ touch requests && pex requests==2.0.0 -- -c 'import requests; print(requests.__file__)'
Traceback (most recent call last):
File "/home/jsirois/.venv/pex/bin/pex", line 8, in <module>
sys.exit(main())
File "/home/jsirois/.venv/pex/lib/python3.9/site-packages/pex/bin/pex.py", line 1068, in main
pex_builder = bu... | pex.dist_metadata.MetadataError |
def _parse_requirement_line(
line, # type: LogicalLine
basepath=None, # type: Optional[str]
):
# type: (...) -> ParsedRequirement
basepath = basepath or os.getcwd()
editable, processed_text = _strip_requirement_options(line)
project_name, direct_reference_url = _split_direct_references(proce... | def _parse_requirement_line(
line, # type: LogicalLine
basepath=None, # type: Optional[str]
):
# type: (...) -> ParsedRequirement
basepath = basepath or os.getcwd()
editable, processed_text = _strip_requirement_options(line)
project_name, direct_reference_url = _split_direct_references(proce... | https://github.com/pantsbuild/pex/issues/1188 | $ touch requests && pex requests==2.0.0 -- -c 'import requests; print(requests.__file__)'
Traceback (most recent call last):
File "/home/jsirois/.venv/pex/bin/pex", line 8, in <module>
sys.exit(main())
File "/home/jsirois/.venv/pex/lib/python3.9/site-packages/pex/bin/pex.py", line 1068, in main
pex_builder = bu... | pex.dist_metadata.MetadataError |
def __init__(
self,
constraints, # type: Iterable[str]
candidates, # type: Iterable[PythonInterpreter]
failures, # type: Iterable[InterpreterIdentificationError]
preamble=None, # type: Optional[str]
):
# type: (...) -> None
"""
:param constraints: The constraints that could not be sa... | def __init__(
self,
constraints, # type: Iterable[str]
candidates, # type: Iterable[PythonInterpreter]
failures, # type: Iterable[InterpreterIdentificationError]
):
# type: (...) -> None
"""
:param constraints: The constraints that could not be satisfied.
:param candidates: The python... | https://github.com/pantsbuild/pex/issues/1031 | Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-kh23prp9/setup.py", line 59, in <module>
'Programming Language :: Python :: 3.8',
File "/root/.pex/pip.pex/aef609891d42d65c887d1aeee58c46f6713a7e49/.deps/setuptools/setuptools/__init__.py", line 169, in setup
return distuti... | ModuleNotFoundError |
def _select_path_interpreter(
path=None, # type: Optional[str]
valid_basenames=None, # type: Optional[Tuple[str, ...]]
interpreter_constraints=None, # type: Optional[Iterable[str]]
):
# type: (...) -> Optional[PythonInterpreter]
candidate_interpreters_iter = iter_compatible_interpreters(
... | def _select_path_interpreter(
path=None, # type: Optional[str]
valid_basenames=None, # type: Optional[Tuple[str, ...]]
compatibility_constraints=None, # type: Optional[Iterable[str]]
):
# type: (...) -> Optional[PythonInterpreter]
candidate_interpreters_iter = iter_compatible_interpreters(
... | https://github.com/pantsbuild/pex/issues/1031 | Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-kh23prp9/setup.py", line 59, in <module>
'Programming Language :: Python :: 3.8',
File "/root/.pex/pip.pex/aef609891d42d65c887d1aeee58c46f6713a7e49/.deps/setuptools/setuptools/__init__.py", line 169, in setup
return distuti... | ModuleNotFoundError |
def maybe_reexec_pex(interpreter_constraints=None):
# type: (Optional[Iterable[str]]) -> Union[None, NoReturn]
"""Handle environment overrides for the Python interpreter to use when executing this pex.
This function supports interpreter filtering based on interpreter constraints stored in PEX-INFO
meta... | def maybe_reexec_pex(compatibility_constraints=None):
# type: (Optional[Iterable[str]]) -> Union[None, NoReturn]
"""Handle environment overrides for the Python interpreter to use when executing this pex.
This function supports interpreter filtering based on interpreter constraints stored in PEX-INFO
me... | https://github.com/pantsbuild/pex/issues/1031 | Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-kh23prp9/setup.py", line 59, in <module>
'Programming Language :: Python :: 3.8',
File "/root/.pex/pip.pex/aef609891d42d65c887d1aeee58c46f6713a7e49/.deps/setuptools/setuptools/__init__.py", line 169, in setup
return distuti... | ModuleNotFoundError |
def get(cls, binary=None):
# type: (Optional[str]) -> PythonIdentity
# N.B.: We should not need to look past `sys.executable` to learn the current interpreter's
# executable path, but on OSX there has been a bug where the `sys.executable` reported is
# _not_ the path of the current interpreter executab... | def get(cls, binary=None):
# type: (Optional[str]) -> PythonIdentity
# N.B.: We should not need to look past `sys.executable` to learn the current interpreter's
# executable path, but on OSX there has been a bug where the `sys.executable` reported is
# _not_ the path of the current interpreter executab... | https://github.com/pantsbuild/pex/issues/1031 | Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-kh23prp9/setup.py", line 59, in <module>
'Programming Language :: Python :: 3.8',
File "/root/.pex/pip.pex/aef609891d42d65c887d1aeee58c46f6713a7e49/.deps/setuptools/setuptools/__init__.py", line 169, in setup
return distuti... | ModuleNotFoundError |
def decode(cls, encoded):
TRACER.log("creating PythonIdentity from encoded: %s" % encoded, V=9)
values = json.loads(encoded)
if len(values) != 9:
raise cls.InvalidError("Invalid interpreter identity: %s" % encoded)
supported_tags = values.pop("supported_tags")
def iter_tags():
for ... | def decode(cls, encoded):
TRACER.log("creating PythonIdentity from encoded: %s" % encoded, V=9)
values = json.loads(encoded)
if len(values) != 7:
raise cls.InvalidError("Invalid interpreter identity: %s" % encoded)
supported_tags = values.pop("supported_tags")
def iter_tags():
for ... | https://github.com/pantsbuild/pex/issues/1031 | Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-kh23prp9/setup.py", line 59, in <module>
'Programming Language :: Python :: 3.8',
File "/root/.pex/pip.pex/aef609891d42d65c887d1aeee58c46f6713a7e49/.deps/setuptools/setuptools/__init__.py", line 169, in setup
return distuti... | ModuleNotFoundError |
def __init__(
self,
binary, # type: str
prefix, # type: str
base_prefix, # type: str
python_tag, # type: str
abi_tag, # type: str
platform_tag, # type: str
version, # type: Iterable[int]
supported_tags, # type: Iterable[tags.Tag]
env_markers, # type: Dict[str, str]
):
... | def __init__(
self,
binary,
python_tag,
abi_tag,
platform_tag,
version,
supported_tags,
env_markers,
):
# N.B.: We keep this mapping to support historical values for `distribution` and `requirement`
# properties.
self._interpreter_name = self._find_interpreter_name(python_tag... | https://github.com/pantsbuild/pex/issues/1031 | Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-kh23prp9/setup.py", line 59, in <module>
'Programming Language :: Python :: 3.8',
File "/root/.pex/pip.pex/aef609891d42d65c887d1aeee58c46f6713a7e49/.deps/setuptools/setuptools/__init__.py", line 169, in setup
return distuti... | ModuleNotFoundError |
def encode(self):
values = dict(
binary=self._binary,
prefix=self._prefix,
base_prefix=self._base_prefix,
python_tag=self._python_tag,
abi_tag=self._abi_tag,
platform_tag=self._platform_tag,
version=self._version,
supported_tags=[
(tag.inte... | def encode(self):
values = dict(
binary=self._binary,
python_tag=self._python_tag,
abi_tag=self._abi_tag,
platform_tag=self._platform_tag,
version=self._version,
supported_tags=[
(tag.interpreter, tag.abi, tag.platform) for tag in self._supported_tags
... | https://github.com/pantsbuild/pex/issues/1031 | Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-kh23prp9/setup.py", line 59, in <module>
'Programming Language :: Python :: 3.8',
File "/root/.pex/pip.pex/aef609891d42d65c887d1aeee58c46f6713a7e49/.deps/setuptools/setuptools/__init__.py", line 169, in setup
return distuti... | ModuleNotFoundError |
def _resolve_pyvenv_canonical_python_binary(
cls,
real_binary, # type: str
maybe_venv_python_binary, # type: str
):
# type: (...) -> Optional[str]
maybe_venv_python_binary = os.path.abspath(maybe_venv_python_binary)
if not os.path.islink(maybe_venv_python_binary):
return None
pyve... | def _resolve_pyvenv_canonical_python_binary(
cls,
real_binary, # type: str
maybe_venv_python_binary, # type: str
):
# type: (...) -> Optional[str]
maybe_venv_python_binary = os.path.abspath(maybe_venv_python_binary)
if not os.path.islink(maybe_venv_python_binary):
return None
home... | https://github.com/pantsbuild/pex/issues/1031 | Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-kh23prp9/setup.py", line 59, in <module>
'Programming Language :: Python :: 3.8',
File "/root/.pex/pip.pex/aef609891d42d65c887d1aeee58c46f6713a7e49/.deps/setuptools/setuptools/__init__.py", line 169, in setup
return distuti... | ModuleNotFoundError |
def binary(self):
# type: () -> str
return self._binary
| def binary(self):
return self._binary
| https://github.com/pantsbuild/pex/issues/1031 | Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-kh23prp9/setup.py", line 59, in <module>
'Programming Language :: Python :: 3.8',
File "/root/.pex/pip.pex/aef609891d42d65c887d1aeee58c46f6713a7e49/.deps/setuptools/setuptools/__init__.py", line 169, in setup
return distuti... | ModuleNotFoundError |
def to_requirement(self, dist):
req = dist.as_requirement()
# pkg_resources.Distribution.as_requirement returns requirements in one of two forms:
# 1.) project_name==version
# 2.) project_name===version
# The latter form is used whenever the distribution's version is non-standard. In those
# ca... | def to_requirement(self, dist):
req = dist.as_requirement()
markers = OrderedSet()
# Here we map any wheel python requirement to the equivalent environment marker:
# See:
# + https://www.python.org/dev/peps/pep-0345/#requires-python
# + https://www.python.org/dev/peps/pep-0508/#environment-mar... | https://github.com/pantsbuild/pex/issues/940 | Traceback (most recent call last):
File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/_vendor/packaging/requirements.py", line 106, in __init__
File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/_vendor/pyparsing.py", line 1654, in parseString
File "/app/file.pex/.boo... | pex.vendor._vendored.setuptools.pkg_resources.RequirementParseError |
def __init__(self):
# type: () -> None
self._registry = defaultdict(set) # type: DefaultDict[int, Set[str]]
self._lock = threading.RLock()
self._getpid = os.getpid
self._exists = os.path.exists
self._rmtree = shutil.rmtree
atexit.register(self.teardown)
| def __init__(self):
# type: () -> None
self._registry = cast("DefaultDict[int, Set[str]]", defaultdict(set))
self._lock = threading.RLock()
self._getpid = os.getpid
self._exists = os.path.exists
self._rmtree = shutil.rmtree
atexit.register(self.teardown)
| https://github.com/pantsbuild/pex/issues/1098 | Engine traceback:
in select
in pants.core.goals.typecheck.typecheck
in pants.backend.python.typecheck.mypy.rules.mypy_typecheck
in pants.backend.python.typecheck.mypy.rules.mypy_typecheck_partition
in pants.backend.python.util_rules.pex.create_pex
in pants.backend.python.util_rules.pex.find_interpreter (CPython<3.9,<4,... | FileNotFoundError |
def _iter_non_pyc_files(cls, directory):
# type: (str) -> Iterator[str]
normpath = os.path.realpath(os.path.normpath(directory))
for root, dirs, files in os.walk(normpath):
dirs[:] = list(filter_pyc_dirs(dirs))
for f in filter_pyc_files(files):
yield os.path.relpath(os.path.join(... | def _iter_non_pyc_files(cls, directory):
# type: (str) -> Iterator[str]
normpath = os.path.realpath(os.path.normpath(directory))
for root, dirs, files in os.walk(normpath):
dirs[:] = [d for d in dirs if d != "__pycache__"]
for f in files:
# For Python 2.7, `.pyc` files are compil... | https://github.com/pantsbuild/pex/issues/1098 | Engine traceback:
in select
in pants.core.goals.typecheck.typecheck
in pants.backend.python.typecheck.mypy.rules.mypy_typecheck
in pants.backend.python.typecheck.mypy.rules.mypy_typecheck_partition
in pants.backend.python.util_rules.pex.create_pex
in pants.backend.python.util_rules.pex.find_interpreter (CPython<3.9,<4,... | FileNotFoundError |
def vendor_runtime(chroot, dest_basedir, label, root_module_names):
"""Includes portions of vendored distributions in a chroot.
The portion to include is selected by root module name. If the module is a file, just it is
included. If the module represents a package, the package and all its sub-packages are ... | def vendor_runtime(chroot, dest_basedir, label, root_module_names):
"""Includes portions of vendored distributions in a chroot.
The portion to include is selected by root module name. If the module is a file, just it is
included. If the module represents a package, the package and all its sub-packages are ... | https://github.com/pantsbuild/pex/issues/1098 | Engine traceback:
in select
in pants.core.goals.typecheck.typecheck
in pants.backend.python.typecheck.mypy.rules.mypy_typecheck
in pants.backend.python.typecheck.mypy.rules.mypy_typecheck_partition
in pants.backend.python.util_rules.pex.create_pex
in pants.backend.python.util_rules.pex.find_interpreter (CPython<3.9,<4,... | FileNotFoundError |
def atomic_directory(target_dir, exclusive, source=None):
# type: (str, bool, Optional[str]) -> Iterator[Optional[str]]
"""A context manager that yields a new empty work directory path it will move to `target_dir`.
:param target_dir: The target directory to atomically update.
:param exclusive: If `True... | def atomic_directory(target_dir, source=None):
"""A context manager that yields a new empty work directory path it will move to `target_dir`.
:param str target_dir: The target directory to atomically update.
:param str source: An optional source offset into the work directory to use for the atomic update
... | https://github.com/pantsbuild/pex/issues/1051 | 23:06:05.36 [INFO] Starting: Resolving 3rdparty/python/constraints.txt
23:06:05.38 [WARN] /home/toolchain/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b2_py38/lib/python3.8/site-packages/pants/base/exception_sink.py:313: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.... | pants.engine.internals.scheduler.ExecutionError |
def _force_local(cls, pex_file, pex_info):
if pex_info.code_hash is None:
# Do not support force_local if code_hash is not set. (It should always be set.)
return pex_file
explode_dir = os.path.join(pex_info.zip_unsafe_cache, pex_info.code_hash)
TRACER.log("PEX is not zip safe, exploding to %... | def _force_local(cls, pex_file, pex_info):
if pex_info.code_hash is None:
# Do not support force_local if code_hash is not set. (It should always be set.)
return pex_file
explode_dir = os.path.join(pex_info.zip_unsafe_cache, pex_info.code_hash)
TRACER.log("PEX is not zip safe, exploding to %... | https://github.com/pantsbuild/pex/issues/1051 | 23:06:05.36 [INFO] Starting: Resolving 3rdparty/python/constraints.txt
23:06:05.38 [WARN] /home/toolchain/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b2_py38/lib/python3.8/site-packages/pants/base/exception_sink.py:313: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.... | pants.engine.internals.scheduler.ExecutionError |
def _spawn_from_binary_external(cls, binary):
def create_interpreter(stdout, check_binary=False):
identity = stdout.decode("utf-8").strip()
if not identity:
raise cls.IdentificationError(
"Could not establish identity of {}.".format(binary)
)
interpret... | def _spawn_from_binary_external(cls, binary):
def create_interpreter(stdout, check_binary=False):
identity = stdout.decode("utf-8").strip()
if not identity:
raise cls.IdentificationError(
"Could not establish identity of {}.".format(binary)
)
interpret... | https://github.com/pantsbuild/pex/issues/1051 | 23:06:05.36 [INFO] Starting: Resolving 3rdparty/python/constraints.txt
23:06:05.38 [WARN] /home/toolchain/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b2_py38/lib/python3.8/site-packages/pants/base/exception_sink.py:313: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.... | pants.engine.internals.scheduler.ExecutionError |
def create(cls, path):
"""Creates a pip tool with PEX isolation at path.
:param str path: The path to build the pip tool pex at.
"""
pip_pex_path = os.path.join(path, isolated().pex_hash)
with atomic_directory(pip_pex_path, exclusive=True) as chroot:
if chroot is not None:
from ... | def create(cls, path):
"""Creates a pip tool with PEX isolation at path.
:param str path: The path to build the pip tool pex at.
"""
pip_pex_path = os.path.join(path, isolated().pex_hash)
with atomic_directory(pip_pex_path) as chroot:
if chroot is not None:
from pex.pex_builder ... | https://github.com/pantsbuild/pex/issues/1051 | 23:06:05.36 [INFO] Starting: Resolving 3rdparty/python/constraints.txt
23:06:05.38 [WARN] /home/toolchain/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b2_py38/lib/python3.8/site-packages/pants/base/exception_sink.py:313: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.... | pants.engine.internals.scheduler.ExecutionError |
def finalize_install(self, install_requests):
self.atomic_dir.finalize()
# The install_chroot is keyed by the hash of the wheel file (zip) we installed. Here we add a
# key by the hash of the exploded wheel dir (the install_chroot). This latter key is used by
# zipped PEXes at runtime to explode their ... | def finalize_install(self, install_requests):
self.atomic_dir.finalize()
# The install_chroot is keyed by the hash of the wheel file (zip) we installed. Here we add a
# key by the hash of the exploded wheel dir (the install_chroot). This latter key is used by
# zipped PEXes at runtime to explode their ... | https://github.com/pantsbuild/pex/issues/1051 | 23:06:05.36 [INFO] Starting: Resolving 3rdparty/python/constraints.txt
23:06:05.38 [WARN] /home/toolchain/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b2_py38/lib/python3.8/site-packages/pants/base/exception_sink.py:313: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.... | pants.engine.internals.scheduler.ExecutionError |
def isolated():
"""Returns a chroot for third_party isolated from the ``sys.path``.
PEX will typically be installed in site-packages flat alongside many other distributions; as such,
adding the location of the pex distribution to the ``sys.path`` will typically expose many other
distributions. An isola... | def isolated():
"""Returns a chroot for third_party isolated from the ``sys.path``.
PEX will typically be installed in site-packages flat alongside many other distributions; as such,
adding the location of the pex distribution to the ``sys.path`` will typically expose many other
distributions. An isola... | https://github.com/pantsbuild/pex/issues/1051 | 23:06:05.36 [INFO] Starting: Resolving 3rdparty/python/constraints.txt
23:06:05.38 [WARN] /home/toolchain/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b2_py38/lib/python3.8/site-packages/pants/base/exception_sink.py:313: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.... | pants.engine.internals.scheduler.ExecutionError |
def cache_distribution(cls, zf, source, target_dir):
# type: (ZipFile, str, str) -> Distribution
"""Possibly cache a wheel from within a zipfile into `target_dir`.
Given a zipfile handle and a source path prefix corresponding to a wheel install embedded within
that zip, maybe extract the wheel install ... | def cache_distribution(cls, zf, source, target_dir):
# type: (ZipFile, str, str) -> Distribution
"""Possibly cache a wheel from within a zipfile into `target_dir`.
Given a zipfile handle and a source path prefix corresponding to a wheel install embedded within
that zip, maybe extract the wheel install ... | https://github.com/pantsbuild/pex/issues/1051 | 23:06:05.36 [INFO] Starting: Resolving 3rdparty/python/constraints.txt
23:06:05.38 [WARN] /home/toolchain/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b2_py38/lib/python3.8/site-packages/pants/base/exception_sink.py:313: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.... | pants.engine.internals.scheduler.ExecutionError |
def pex_hash(cls, d):
# type: (str) -> str
"""Return a reproducible hash of the contents of a loose PEX; excluding all `.pyc` files."""
names = sorted(f for f in cls._iter_non_pyc_files(d) if not f.startswith("."))
def stream_factory(name):
# type: (str) -> IO
return open(os.path.join(d... | def pex_hash(cls, d):
# type: (str) -> str
"""Return a reproducible hash of the contents of a directory."""
names = sorted(
f for f in cls._iter_files(d) if not (f.endswith(".pyc") or f.startswith("."))
)
def stream_factory(name):
# type: (str) -> IO
return open(os.path.join... | https://github.com/pantsbuild/pex/issues/1051 | 23:06:05.36 [INFO] Starting: Resolving 3rdparty/python/constraints.txt
23:06:05.38 [WARN] /home/toolchain/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b2_py38/lib/python3.8/site-packages/pants/base/exception_sink.py:313: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.... | pants.engine.internals.scheduler.ExecutionError |
def dir_hash(cls, d):
# type: (str) -> str
"""Return a reproducible hash of the contents of a directory; excluding all `.pyc` files."""
names = sorted(cls._iter_non_pyc_files(d))
def stream_factory(name):
# type: (str) -> IO
return open(os.path.join(d, name), "rb") # noqa: T802
re... | def dir_hash(cls, d):
# type: (str) -> str
"""Return a reproducible hash of the contents of a directory."""
names = sorted(f for f in cls._iter_files(d) if not f.endswith(".pyc"))
def stream_factory(name):
# type: (str) -> IO
return open(os.path.join(d, name), "rb") # noqa: T802
r... | https://github.com/pantsbuild/pex/issues/1051 | 23:06:05.36 [INFO] Starting: Resolving 3rdparty/python/constraints.txt
23:06:05.38 [WARN] /home/toolchain/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b2_py38/lib/python3.8/site-packages/pants/base/exception_sink.py:313: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.... | pants.engine.internals.scheduler.ExecutionError |
def _spawn_pip_isolated(
self,
args, # type: List[str]
env=None, # type: Optional[Mapping[str, str]]
cache=None, # type: Optional[str]
interpreter=None, # type: Optional[PythonInterpreter]
):
# type: (...) -> Job
pip_args = [
# We vendor the version of pip we want so pip should n... | def _spawn_pip_isolated(self, args, cache=None, interpreter=None):
pip_args = [
# We vendor the version of pip we want so pip should never check for updates.
"--disable-pip-version-check",
# Don't read pip configuration files like `~/.config/pip/pip.conf`.
"--isolated",
# If ... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def spawn_download_distributions(
self,
download_dir,
requirements=None,
requirement_files=None,
constraint_files=None,
allow_prereleases=False,
transitive=True,
target=None,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
build=True,
manyli... | def spawn_download_distributions(
self,
download_dir,
requirements=None,
requirement_files=None,
constraint_files=None,
allow_prereleases=False,
transitive=True,
target=None,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
build=True,
manyli... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def spawn_build_wheels(
self,
distributions,
wheel_dir,
interpreter=None,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
):
wheel_cmd = ["wheel", "--no-deps", "--wheel-dir", wheel_dir]
# If the build is PEP-517 compliant it may need to resolve build requi... | def spawn_build_wheels(
self,
distributions,
wheel_dir,
interpreter=None,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
):
wheel_cmd = ["wheel", "--no-deps", "--wheel-dir", wheel_dir]
# If the build is PEP-517 compliant it may need to resolve build requi... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def create(cls, path):
# type: (str) -> Pip
"""Creates a pip tool with PEX isolation at path.
:param path: The path to build the pip tool pex at.
"""
pip_pex_path = os.path.join(path, isolated().pex_hash)
with atomic_directory(pip_pex_path, exclusive=True) as chroot:
if chroot is not No... | def create(cls, path):
"""Creates a pip tool with PEX isolation at path.
:param str path: The path to build the pip tool pex at.
"""
pip_pex_path = os.path.join(path, isolated().pex_hash)
with atomic_directory(pip_pex_path, exclusive=True) as chroot:
if chroot is not None:
from ... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def __init__(self, pip_pex_path):
# type: (str) -> None
self._pip_pex_path = pip_pex_path # type: str
| def __init__(self, pip_pex_path):
self._pip_pex_path = pip_pex_path
| https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def _spawn_pip_isolated(
self,
args, # type: Iterable[str]
package_index_configuration=None, # type: Optional[PackageIndexConfiguration]
cache=None, # type: Optional[str]
interpreter=None, # type: Optional[PythonInterpreter]
):
# type: (...) -> Job
pip_args = [
# We vendor the ve... | def _spawn_pip_isolated(
self,
args, # type: List[str]
env=None, # type: Optional[Mapping[str, str]]
cache=None, # type: Optional[str]
interpreter=None, # type: Optional[PythonInterpreter]
):
# type: (...) -> Job
pip_args = [
# We vendor the version of pip we want so pip should n... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def spawn_download_distributions(
self,
download_dir, # type: str
requirements=None, # type: Optional[Iterable[str]]
requirement_files=None, # type: Optional[Iterable[str]]
constraint_files=None, # type: Optional[Iterable[str]]
allow_prereleases=False, # type: bool
transitive=True, # t... | def spawn_download_distributions(
self,
download_dir,
requirements=None,
requirement_files=None,
constraint_files=None,
allow_prereleases=False,
transitive=True,
target=None,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
build=True,
manyli... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def spawn_build_wheels(
self,
distributions, # type: Iterable[str]
wheel_dir, # type: str
interpreter=None, # type: Optional[PythonInterpreter]
package_index_configuration=None, # type: Optional[PackageIndexConfiguration]
cache=None, # type: Optional[str]
):
# type: (...) -> Job
whe... | def spawn_build_wheels(
self,
distributions,
wheel_dir,
interpreter=None,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
):
wheel_cmd = ["wheel", "--no-deps", "--wheel-dir", wheel_dir]
# If the build is PEP-517 compliant it may need to resolve build requi... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def spawn_install_wheel(
self,
wheel, # type: str
install_dir, # type: str
compile=False, # type: bool
cache=None, # type: Optional[str]
target=None, # type: Optional[DistributionTarget]
):
# type: (...) -> Job
target = target or DistributionTarget.current()
install_cmd = [
... | def spawn_install_wheel(
self, wheel, install_dir, compile=False, cache=None, target=None
):
target = target or DistributionTarget.current()
install_cmd = [
"install",
"--no-deps",
"--no-index",
"--only-binary",
":all:",
"--target",
install_dir,
]... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def get_pip():
# type: () -> Pip
"""Returns a lazily instantiated global Pip object that is safe for un-coordinated use."""
global _PIP
if _PIP is None:
_PIP = Pip.create(path=os.path.join(ENV.PEX_ROOT, "pip.pex"))
return _PIP
| def get_pip():
"""Returns a lazily instantiated global Pip object that is safe for un-coordinated use."""
global _PIP
if _PIP is None:
_PIP = Pip.create(path=os.path.join(ENV.PEX_ROOT, "pip.pex"))
return _PIP
| https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def _spawn_download(self, resolved_dists_dir, target):
download_dir = os.path.join(resolved_dists_dir, target.id)
download_job = get_pip().spawn_download_distributions(
download_dir=download_dir,
requirements=self.requirements,
requirement_files=self.requirement_files,
constraint... | def _spawn_download(self, resolved_dists_dir, target):
download_dir = os.path.join(resolved_dists_dir, target.id)
download_job = get_pip().spawn_download_distributions(
download_dir=download_dir,
requirements=self.requirements,
requirement_files=self.requirement_files,
constraint... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def __init__(
self,
build_requests,
install_requests,
package_index_configuration=None,
cache=None,
compile=False,
):
self._build_requests = build_requests
self._install_requests = install_requests
self._package_index_configuration = package_index_configuration
self._cache = cach... | def __init__(
self,
build_requests,
install_requests,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
compile=False,
):
self._build_requests = build_requests
self._install_requests = install_requests
self._indexes = indexes
self._find_links = find_l... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def _spawn_wheel_build(self, built_wheels_dir, build_request):
build_result = build_request.result(built_wheels_dir)
build_job = get_pip().spawn_build_wheels(
distributions=[build_request.source_path],
wheel_dir=build_result.build_dir,
cache=self._cache,
package_index_configurati... | def _spawn_wheel_build(self, built_wheels_dir, build_request):
build_result = build_request.result(built_wheels_dir)
build_job = get_pip().spawn_build_wheels(
distributions=[build_request.source_path],
wheel_dir=build_result.build_dir,
cache=self._cache,
indexes=self._indexes,
... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def resolve_multi(
requirements=None,
requirement_files=None,
constraint_files=None,
allow_prereleases=False,
transitive=True,
interpreters=None,
platforms=None,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
build=True,
use_wheel=True,
com... | def resolve_multi(
requirements=None,
requirement_files=None,
constraint_files=None,
allow_prereleases=False,
transitive=True,
interpreters=None,
platforms=None,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
build=True,
use_wheel=True,
com... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def _download_internal(
requirements=None,
requirement_files=None,
constraint_files=None,
allow_prereleases=False,
transitive=True,
interpreters=None,
platforms=None,
package_index_configuration=None,
cache=None,
build=True,
use_wheel=True,
manylinux=None,
dest=None,
... | def _download_internal(
requirements=None,
requirement_files=None,
constraint_files=None,
allow_prereleases=False,
transitive=True,
interpreters=None,
platforms=None,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
build=True,
use_wheel=True,
... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def download(
requirements=None,
requirement_files=None,
constraint_files=None,
allow_prereleases=False,
transitive=True,
interpreters=None,
platforms=None,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
build=True,
use_wheel=True,
manylinu... | def download(
requirements=None,
requirement_files=None,
constraint_files=None,
allow_prereleases=False,
transitive=True,
interpreters=None,
platforms=None,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
build=True,
use_wheel=True,
manylinu... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def install(
local_distributions,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
compile=False,
max_parallel_jobs=None,
ignore_errors=False,
):
"""Installs distributions in individual chroots that can be independently added to `sys.path`.
:keyword local_d... | def install(
local_distributions,
indexes=None,
find_links=None,
network_configuration=None,
cache=None,
compile=False,
max_parallel_jobs=None,
ignore_errors=False,
):
"""Installs distributions in individual chroots that can be independently added to `sys.path`.
:keyword local_d... | https://github.com/pantsbuild/pex/issues/1058 | $ docker run --rm -it -e HTTP_PROXY -e HTTPS_PROXY -v $REQUESTS_CA_BUNDLE:/ca-cert.crt -v $(pwd):/app python:3.7 bash
$ pip install --cert /ca-cert.crt pex
$ pex -vvvvvvvvv --cert /ca-cert.crt black setuptools
...
pex: Building pex :: Resolving distributions (['black', 'setuptools']) :: Resolving for:
pex: Spawning a m... | pip._internal.exceptions.InstallationError |
def can_add(self, dist):
filename, ext = os.path.splitext(os.path.basename(dist.location))
if ext.lower() != ".whl":
# This supports resolving pex's own vendored distributions which are vendored in directory
# directory with the project name (`pip/` for pip) and not the corresponding wheel name
... | def can_add(self, dist):
filename, ext = os.path.splitext(os.path.basename(dist.location))
if ext.lower() != ".whl":
# This supports resolving pex's own vendored distributions which are vendored in directory
# directory with the project name (`pip/` for pip) and not the corresponding wheel name
... | https://github.com/pantsbuild/pex/issues/964 | (nwpy-ml-clustering_linux-x86-64_cp3.7) app@8bceeea547ee:/srv/nerdwallet/nwpy-ml-clustering$ ./build/nwpy-ml-clustering.pex
Traceback (most recent call last):
File "/srv/nerdwallet/nwpy-ml-clustering/build/nwpy-ml-clustering.pex/.bootstrap/pex/pex.py", line 391, in execute
File "/srv/nerdwallet/nwpy-ml-clustering/build... | ValueError |
def _spawn_pip_isolated(self, args, cache=None, interpreter=None):
pip_args = ["--disable-pip-version-check", "--isolated", "--exists-action", "i"]
# The max pip verbosity is -vvv and for pex it's -vvvvvvvvv; so we scale down by a factor of 3.
pex_verbosity = ENV.PEX_VERBOSE
pip_verbosity = pex_verbosi... | def _spawn_pip_isolated(self, args, cache=None, interpreter=None):
pip_args = ["--disable-pip-version-check", "--isolated", "--exists-action", "i"]
# The max pip verbosity is -vvv and for pex it's -vvvvvvvvv; so we scale down by a factor of 3.
pex_verbosity = ENV.PEX_VERBOSE
pip_verbosity = pex_verbosi... | https://github.com/pantsbuild/pex/issues/892 | $ python3.8 <<EOF
import os
import sys
# This puts python3.8 stdlib on PYTHONPATH.
os.environ['PYTHONPATH'] = os.pathsep.join(sys.path)
from pex import resolver
from pex.interpreter import PythonInterpreter
def find_python36():
for interp in PythonInterpreter.iter():
if interp.version[:2] == (3, 6):
return interp... | ModuleNotFoundError |
def minimum_sys_modules(cls, site_libs, modules=None):
"""Given a set of site-packages paths, return a "clean" sys.modules.
When importing site, modules within sys.modules have their __path__'s populated with
additional paths as defined by *-nspkg.pth in site-packages, or alternately by distribution
me... | def minimum_sys_modules(cls, site_libs, modules=None):
"""Given a set of site-packages paths, return a "clean" sys.modules.
When importing site, modules within sys.modules have their __path__'s populated with
additional paths as defined by *-nspkg.pth in site-packages, or alternately by distribution
me... | https://github.com/pantsbuild/pex/issues/756 | Traceback (most recent call last):
File "/home/gregs/code/pants/.pants.d/test/pytest-prep/CPython-3.7.3/7c81bb6ec656c4064b548c392d519f0695716e81/.bootstrap/pex/pex.py", line 356, in execute
self.patch_sys(pex_inherit_path)
File "/home/gregs/code/pants/.pants.d/test/pytest-prep/CPython-3.7.3/7c81bb6ec656c4064b548c392d51... | TypeError |
def resolve(self, resolvables, resolvable_set=None):
resolvables = [
(resolvable, None)
for resolvable in resolvables
if self.is_resolvable_in_target_interpreter_env(resolvable)
]
resolvable_set = resolvable_set or _ResolvableSet()
processed_resolvables = set()
processed_pack... | def resolve(self, resolvables, resolvable_set=None):
resolvables = [
(resolvable, None)
for resolvable in resolvables
if self.is_resolvable_in_target_interpreter_env(resolvable)
]
resolvable_set = resolvable_set or _ResolvableSet()
processed_resolvables = set()
processed_pack... | https://github.com/pantsbuild/pex/issues/736 | Traceback (most recent call last):
File ".bootstrap/pex/pex.py", line 352, in execute
File ".bootstrap/pex/pex.py", line 284, in _wrap_coverage
File ".bootstrap/pex/pex.py", line 315, in _wrap_profiling
File ".bootstrap/pex/pex.py", line 397, in _execute
File ".bootstrap/pex/pex.py", line 495, in execute_entry
File ".b... | ModuleNotFoundError |
def run(self):
parser, options_builder = configure_clp()
options, reqs = parser.parse_args(self.pex_args)
if options.entry_point or options.script or options.pex_name:
die(
"Must not specify entry point, script or output file to --pex-args, given: {}".format(
" ".join(se... | def run(self):
parser, options_builder = configure_clp()
options, reqs = parser.parse_args(self.pex_args)
if options.entry_point or options.script or options.pex_name:
die(
"Must not specify entry point, script or output file to --pex-args, given: {}".format(
" ".join(se... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def after_installation(function):
def function_wrapper(self, *args, **kw):
self._installed = self.run()
if not self._installed:
raise SetuptoolsInstallerBase.InstallFailure(
"Failed to install %s" % self._source_dir
)
return function(self, *args, **kw)... | def after_installation(function):
def function_wrapper(self, *args, **kw):
self._installed = self.run()
if not self._installed:
raise InstallerBase.InstallFailure(
"Failed to install %s" % self._source_dir
)
return function(self, *args, **kw)
retu... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def function_wrapper(self, *args, **kw):
self._installed = self.run()
if not self._installed:
raise SetuptoolsInstallerBase.InstallFailure(
"Failed to install %s" % self._source_dir
)
return function(self, *args, **kw)
| def function_wrapper(self, *args, **kw):
self._installed = self.run()
if not self._installed:
raise InstallerBase.InstallFailure("Failed to install %s" % self._source_dir)
return function(self, *args, **kw)
| https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def mixins(self):
return ["wheel"]
| def mixins(self):
return ["setuptools", "wheel"]
| https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def __init__(self, source_dir, interpreter=None, install_dir=None):
"""Create an installer from an unpacked source distribution in source_dir."""
self._source_dir = source_dir
self._install_tmp = install_dir or safe_mkdtemp()
self._interpreter = interpreter or PythonInterpreter.get()
self._installed... | def __init__(self, source_dir, interpreter=None, install_dir=None):
"""Create an installer from an unpacked source distribution in source_dir."""
self._source_dir = source_dir
self._install_tmp = install_dir or safe_mkdtemp()
self._installed = None
from pex import vendor
self._interpreter = ve... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def run(self):
if self._installed is not None:
return self._installed
with TRACER.timed("Installing %s" % self._install_tmp, V=2):
env = self._interpreter.sanitized_environment()
mixins = OrderedSet(["setuptools"] + self.mixins)
env["PYTHONPATH"] = os.pathsep.join(third_party.ex... | def run(self):
if self._installed is not None:
return self._installed
with TRACER.timed("Installing %s" % self._install_tmp, V=2):
command = [self._interpreter.binary, "-sE", "-"] + self._setup_command()
try:
Executor.execute(
command,
env=sel... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def filter(cls, pythons):
"""
Given a map of python interpreters in the format provided by PythonInterpreter.find(),
filter out duplicate versions and versions we would prefer not to use.
Returns a map in the same format as find.
"""
good = []
MAJOR, MINOR, SUBMINOR = range(3)
def ver... | def filter(cls, pythons):
"""
Given a map of python interpreters in the format provided by PythonInterpreter.find(),
filter out duplicate versions and versions we would prefer not to use.
Returns a map in the same format as find.
"""
good = []
MAJOR, MINOR, SUBMINOR = range(3)
def ver... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def version_filter(version):
return (
version[MAJOR] == 2
and version[MINOR] >= 7
or version[MAJOR] == 3
and version[MINOR] >= 4
)
| def version_filter(version):
return (
version[MAJOR] == 2
and version[MINOR] >= 6
or version[MAJOR] == 3
and version[MINOR] >= 2
)
| https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def __init__(self, binary, identity):
"""Construct a PythonInterpreter.
You should probably PythonInterpreter.from_binary instead.
:param binary: The full path of the python binary.
:param identity: The :class:`PythonIdentity` of the PythonInterpreter.
"""
self._binary = os.path.realpath(binar... | def __init__(self, binary, identity, extras=None):
"""Construct a PythonInterpreter.
You should probably PythonInterpreter.from_binary instead.
:param binary: The full path of the python binary.
:param identity: The :class:`PythonIdentity` of the PythonInterpreter.
:param extras: A mapping from (d... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def __repr__(self):
return "%s(%r, %r)" % (self.__class__.__name__, self._binary, self._identity)
| def __repr__(self):
return "%s(%r, %r, %r)" % (
self.__class__.__name__,
self._binary,
self._identity,
self._extras,
)
| https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def from_string(cls, requirement_string, options_builder, interpreter=None):
requirement_string, extras = strip_extras(requirement_string)
if cls.is_installable(requirement_string):
if interpreter is None:
raise cls.InvalidRequirement(
"%s is not an installable directory beca... | def from_string(cls, requirement_string, options_builder, interpreter=None):
requirement_string, extras = strip_extras(requirement_string)
if cls.is_installable(requirement_string):
if interpreter is None:
raise cls.InvalidRequirement(
"%s is not an installable directory beca... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def install_vendored(cls, prefix, root=None, expose=None):
"""Install an importer for all vendored code with the given import prefix.
All distributions listed in ``expose`` will also be made available for import in direct,
un-prefixed form.
:param str prefix: The import prefix the installed importer w... | def install_vendored(cls, prefix, root=None, expose=None):
"""Install an importer for all vendored code with the given import prefix.
All distributions listed in ``expose`` will also be made available for import in direct,
un-prefixed form.
:param str prefix: The import prefix the installed importer w... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def expose(cls, dists, root=None):
from pex import vendor
root = cls._abs_root(root)
def iter_available():
yield (
"pex",
root,
) # The pex distribution itself is trivially available to expose.
for spec in vendor.iter_vendor_specs():
yield spec.... | def expose(self):
self._exposed = True
importlib.import_module(self.module)
_tracer().log("Exposed {}".format(self), V=3)
| https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def vendor_runtime(chroot, dest_basedir, label, root_module_names):
"""Includes portions of vendored distributions in a chroot.
The portion to include is selected by root module name. If the module is a file, just it is
included. If the module represents a package, the package and all its sub-packages are ... | def vendor_runtime(chroot, dest_basedir, label, root_module_names):
"""Includes portions of vendored distributions in a chroot.
The portion to include is selected by root module name. If the module is a file, just it is
included. If the module represents a package, the package and all its sub-packages are ... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def _modify__import__calls(self, red_baron): # noqa: We want __import__ as part of the name.
for call_node in red_baron.find_all("CallNode"):
if call_node.previous and call_node.previous.value == "__import__":
if self._skip(call_node):
continue
parent = call_node.pa... | def _modify__import__calls(self, red_baron): # noqa: We want __import__ as part of the name.
for call_node in red_baron.find_all("CallNode"):
if call_node.previous and call_node.previous.value == "__import__":
if self._skip(call_node):
continue
parent = call_node.pa... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def _modify_import_statements(self, red_baron):
for import_node in red_baron.find_all("ImportNode"):
modified = False
if self._skip(import_node):
continue
original = import_node.copy()
for index, import_module in enumerate(import_node):
root_package = import_... | def _modify_import_statements(self, red_baron):
for import_node in red_baron.find_all("ImportNode"):
if self._skip(import_node):
continue
original = import_node.copy()
for index, import_module in enumerate(import_node):
root_package = import_module[0]
if ... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def _modify_from_import_statements(self, red_baron):
for from_import_node in red_baron.find_all("FromImportNode"):
if self._skip(from_import_node):
continue
if len(from_import_node) == 0:
# NB: `from . import ...` has length 0, but we don't care about relative imports which ... | def _modify_from_import_statements(self, red_baron):
for from_import_node in red_baron.find_all("FromImportNode"):
if self._skip(from_import_node):
continue
if len(from_import_node) == 0:
# NB: `from . import ...` has length 0, but we don't care about relative imports which ... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def bootstrap():
# This function is called when setuptools*.egg is run using /bin/sh
if "__PEX_UNVENDORED__" in __import__("os").environ:
import setuptools # vendor:skip
else:
import pex.third_party.setuptools as setuptools
argv0 = os.path.dirname(setuptools.__path__[0])
sys.argv[0... | def bootstrap():
# This function is called when setuptools*.egg is run using /bin/sh
import pex.third_party.setuptools as setuptools
argv0 = os.path.dirname(setuptools.__path__[0])
sys.argv[0] = argv0
sys.argv.append(argv0)
main()
| https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def main(argv=None, **kw):
if "__PEX_UNVENDORED__" in __import__("os").environ:
from setuptools import setup # vendor:skip
else:
from pex.third_party.setuptools import setup
if "__PEX_UNVENDORED__" in __import__("os").environ:
from setuptools.dist import Distribution # vendor:skip... | def main(argv=None, **kw):
from pex.third_party.setuptools import setup
from pex.third_party.setuptools.dist import Distribution
class DistributionWithoutHelpCommands(Distribution):
common_usage = ""
def _show_help(self, *args, **kw):
with _patch_usage():
Distri... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def copy_tree(
self,
infile,
outfile,
preserve_mode=1,
preserve_times=1,
preserve_symlinks=0,
level=1,
):
assert preserve_mode and preserve_times and not preserve_symlinks
exclude = self.get_exclusions()
if not exclude:
return orig.install_lib.copy_tree(self, infile, out... | def copy_tree(
self,
infile,
outfile,
preserve_mode=1,
preserve_times=1,
preserve_symlinks=0,
level=1,
):
assert preserve_mode and preserve_times and not preserve_symlinks
exclude = self.get_exclusions()
if not exclude:
return orig.install_lib.copy_tree(self, infile, out... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def run(self):
if "__PEX_UNVENDORED__" in __import__("os").environ:
import setuptools.command.easy_install as ei # vendor:skip
else:
import pex.third_party.setuptools.command.easy_install as ei
self.run_command("egg_info")
if self.distribution.scripts:
orig.install_scripts.run(... | def run(self):
import pex.third_party.setuptools.command.easy_install as ei
self.run_command("egg_info")
if self.distribution.scripts:
orig.install_scripts.run(self) # run first to set up self.outfiles
else:
self.outfiles = []
if self.no_ep:
# don't install entry point scri... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def write_script(self, script_name, contents, mode="t", *ignored):
"""Write an executable file to the scripts directory"""
if "__PEX_UNVENDORED__" in __import__("os").environ:
from setuptools.command.easy_install import chmod, current_umask # vendor:skip
else:
from pex.third_party.setuptool... | def write_script(self, script_name, contents, mode="t", *ignored):
"""Write an executable file to the scripts directory"""
from pex.third_party.setuptools.command.easy_install import chmod, current_umask
log.info("Installing %s script to %s", script_name, self.install_dir)
target = os.path.join(self.in... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def read_configuration(filepath, find_others=False, ignore_option_errors=False):
"""Read given configuration file and returns options from it as a dict.
:param str|unicode filepath: Path to configuration file
to get options from.
:param bool find_others: Whether to search for other configuration f... | def read_configuration(filepath, find_others=False, ignore_option_errors=False):
"""Read given configuration file and returns options from it as a dict.
:param str|unicode filepath: Path to configuration file
to get options from.
:param bool find_others: Whether to search for other configuration f... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def _parse_packages(self, value):
"""Parses `packages` option value.
:param value:
:rtype: list
"""
find_directives = ["find:", "find_namespace:"]
trimmed_value = value.strip()
if trimmed_value not in find_directives:
return self._parse_list(value)
findns = trimmed_value == fi... | def _parse_packages(self, value):
"""Parses `packages` option value.
:param value:
:rtype: list
"""
find_directives = ["find:", "find_namespace:"]
trimmed_value = value.strip()
if trimmed_value not in find_directives:
return self._parse_list(value)
findns = trimmed_value == fi... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def fetch_build_egg(self, req):
"""Fetch an egg needed for building"""
if "__PEX_UNVENDORED__" in __import__("os").environ:
from setuptools.command.easy_install import easy_install # vendor:skip
else:
from pex.third_party.setuptools.command.easy_install import easy_install
dist = self.... | def fetch_build_egg(self, req):
"""Fetch an egg needed for building"""
from pex.third_party.setuptools.command.easy_install import easy_install
dist = self.__class__({"script_args": ["easy_install"]})
opts = dist.get_option_dict("easy_install")
opts.clear()
opts.update(
(k, v)
f... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def gen_setup(self, filename, fragment, tmpdir):
match = EGG_FRAGMENT.match(fragment)
dists = (
match
and [
d
for d in interpret_distro_name(filename, match.group(1), None)
if d.version
]
or []
)
if len(dists) == 1: # unambiguous ``#e... | def gen_setup(self, filename, fragment, tmpdir):
match = EGG_FRAGMENT.match(fragment)
dists = (
match
and [
d
for d in interpret_distro_name(filename, match.group(1), None)
if d.version
]
or []
)
if len(dists) == 1: # unambiguous ``#e... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def dump(type, exc):
"""
Always return a dumped (pickled) type and exc. If exc can't be pickled,
wrap it in UnpickleableException first.
"""
try:
return pickle.dumps(type), pickle.dumps(exc)
except Exception:
# get UnpickleableException inside the sandbox
if "__PEX_UNVEND... | def dump(type, exc):
"""
Always return a dumped (pickled) type and exc. If exc can't be pickled,
wrap it in UnpickleableException first.
"""
try:
return pickle.dumps(type), pickle.dumps(exc)
except Exception:
# get UnpickleableException inside the sandbox
from pex.third_p... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def setup_context(setup_dir):
temp_dir = os.path.join(setup_dir, "temp")
with save_pkg_resources_state():
with save_modules():
hide_setuptools()
with save_path():
with save_argv():
with override_temp(temp_dir):
with push... | def setup_context(setup_dir):
temp_dir = os.path.join(setup_dir, "temp")
with save_pkg_resources_state():
with save_modules():
hide_setuptools()
with save_path():
with save_argv():
with override_temp(temp_dir):
with push... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def _violation(self, operation, *args, **kw):
if "__PEX_UNVENDORED__" in __import__("os").environ:
from setuptools.sandbox import SandboxViolation # vendor:skip
else:
from pex.third_party.setuptools.sandbox import SandboxViolation
raise SandboxViolation(operation, args, kw)
| def _violation(self, operation, *args, **kw):
from pex.third_party.setuptools.sandbox import SandboxViolation
raise SandboxViolation(operation, args, kw)
| https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def main(): # needed for console script
if __package__ == "":
# To be able to run 'python wheel-0.9.whl/wheel':
import os.path
path = os.path.dirname(os.path.dirname(__file__))
sys.path[0:0] = [path]
if "__PEX_UNVENDORED__" in __import__("os").environ:
import wheel.tool... | def main(): # needed for console script
if __package__ == "":
# To be able to run 'python wheel-0.9.whl/wheel':
import os.path
path = os.path.dirname(os.path.dirname(__file__))
sys.path[0:0] = [path]
import pex.third_party.wheel.tool, pex.third_party.wheel as wheel
sys.exi... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def parse_version(version):
"""Use parse_version from pkg_resources or distutils as available."""
global parse_version
try:
if "__PEX_UNVENDORED__" in __import__("os").environ:
from pkg_resources import parse_version # vendor:skip
else:
from pex.third_party.pkg_resou... | def parse_version(version):
"""Use parse_version from pkg_resources or distutils as available."""
global parse_version
try:
from pex.third_party.pkg_resources import parse_version
except ImportError:
from distutils.version import LooseVersion as parse_version
return parse_version(ver... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def require_pkgresources(name):
try:
if "__PEX_UNVENDORED__" in __import__("os").environ:
import pkg_resources # vendor:skip
else:
import pex.third_party.pkg_resources as pkg_resources
# noqa: F401
except ImportError:
raise RuntimeError(
"'{0}' ne... | def require_pkgresources(name):
try:
import pex.third_party.pkg_resources as pkg_resources # noqa: F401
except ImportError:
raise RuntimeError(
"'{0}' needs pkg_resources (part of setuptools).".format(name)
)
| https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def install_scripts(distributions):
"""
Regenerate the entry_points console_scripts for the named distribution.
"""
try:
if "__PEX_UNVENDORED__" in __import__("os").environ:
from setuptools.command import easy_install # vendor:skip
else:
from pex.third_party.setu... | def install_scripts(distributions):
"""
Regenerate the entry_points console_scripts for the named distribution.
"""
try:
from pex.third_party.setuptools.command import easy_install
import pex.third_party.pkg_resources as pkg_resources
except ImportError:
raise RuntimeError("'... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def matches_requirement(req, wheels):
"""List of wheels matching a requirement.
:param req: The requirement to satisfy
:param wheels: List of wheels to search.
"""
try:
if "__PEX_UNVENDORED__" in __import__("os").environ:
from pkg_resources import Distribution, Requirement # ve... | def matches_requirement(req, wheels):
"""List of wheels matching a requirement.
:param req: The requirement to satisfy
:param wheels: List of wheels to search.
"""
try:
from pex.third_party.pkg_resources import Distribution, Requirement
except ImportError:
raise RuntimeError("Ca... | https://github.com/pantsbuild/pex/issues/661 | $ pex -vvvvvvvvv cryptography==2.5
pex: Warning, using a UrllibContext which is known to be flaky.
pex: Please build pex with the requests module for more reliable downloads.
pex: Constructed UrllibContext context <pex.http.UrllibContext object at 0x7f2fe54f2fd0>
pex:
Modifying given platform of 'current':
Using the cu... | KeyError |
def force_local(cls, pex_file, pex_info):
if pex_info.code_hash is None:
# Do not support force_local if code_hash is not set. (It should always be set.)
return pex_file
explode_dir = os.path.join(pex_info.zip_unsafe_cache, pex_info.code_hash)
TRACER.log("PEX is not zip safe, exploding to %s... | def force_local(cls, pex, pex_info):
if pex_info.code_hash is None:
# Do not support force_local if code_hash is not set. (It should always be set.)
return pex
explode_dir = os.path.join(pex_info.zip_unsafe_cache, pex_info.code_hash)
TRACER.log("PEX is not zip safe, exploding to %s" % explod... | https://github.com/pantsbuild/pex/issues/598 | Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 64, in update... | AttributeError |
def update_module_paths(cls, pex_file, explode_dir):
bootstrap = Bootstrap.locate()
pex_path = os.path.realpath(pex_file)
# Un-import any modules already loaded from within the .pex file.
to_reimport = []
for name, module in reversed(sorted(sys.modules.items())):
if bootstrap.imported_from_... | def update_module_paths(cls, new_code_path):
# Force subsequent imports to come from the .pex directory rather than the .pex file.
TRACER.log("Adding to the head of sys.path: %s" % new_code_path)
sys.path.insert(0, new_code_path)
for name, module in sys.modules.items():
if hasattr(module, "__pat... | https://github.com/pantsbuild/pex/issues/598 | Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 64, in update... | AttributeError |
def __init__(self, delegate):
self._delegate = delegate
| def __init__(self, pex, pex_info, interpreter=None, **kw):
self._internal_cache = os.path.join(pex, pex_info.internal_cache)
self._pex = pex
self._pex_info = pex_info
self._activated = False
self._working_set = None
self._interpreter = interpreter or PythonInterpreter.get()
self._inherit_pat... | https://github.com/pantsbuild/pex/issues/598 | Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 64, in update... | AttributeError |
def _activate(self):
self.update_candidate_distributions(
self.load_internal_cache(self._pex, self._pex_info)
)
if not self._pex_info.zip_safe and os.path.isfile(self._pex):
explode_dir = self.force_local(pex_file=self._pex, pex_info=self._pex_info)
self.update_module_paths(pex_file... | def _activate(self):
self.update_candidate_distributions(
self.load_internal_cache(self._pex, self._pex_info)
)
if not self._pex_info.zip_safe and os.path.isfile(self._pex):
self.update_module_paths(self.force_local(self._pex, self._pex_info))
all_reqs = [Requirement.parse(req) for req... | https://github.com/pantsbuild/pex/issues/598 | Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 64, in update... | AttributeError |
def minimum_sys_modules(cls, site_libs, modules=None):
"""Given a set of site-packages paths, return a "clean" sys.modules.
When importing site, modules within sys.modules have their __path__'s populated with
additional paths as defined by *-nspkg.pth in site-packages, or alternately by distribution
me... | def minimum_sys_modules(cls, site_libs, modules=None):
"""Given a set of site-packages paths, return a "clean" sys.modules.
When importing site, modules within sys.modules have their __path__'s populated with
additional paths as defined by *-nspkg.pth in site-packages, or alternately by distribution
me... | https://github.com/pantsbuild/pex/issues/598 | Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 64, in update... | AttributeError |
def demote_bootstrap(cls):
TRACER.log("Bootstrap complete, performing final sys.path modifications...")
should_log = {level: TRACER.should_log(V=level) for level in range(1, 10)}
def log(msg, V=1):
if should_log.get(V, False):
print("pex: {}".format(msg), file=sys.stderr)
# Remove... | def demote_bootstrap(cls):
TRACER.log("Bootstrap complete, performing final sys.path modifications...")
bootstrap_path = __file__
module_import_path = __name__.split(".")
# For example, our __file__ might be requests.pex/.bootstrap/pex/pex.pyc and our import path
# pex.pex; so we walk back through... | https://github.com/pantsbuild/pex/issues/598 | Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 64, in update... | AttributeError |
def update_module_paths(cls, new_code_path):
# Force subsequent imports to come from the .pex directory rather than the .pex file.
TRACER.log("Adding to the head of sys.path: %s" % new_code_path)
sys.path.insert(0, new_code_path)
for name, module in sys.modules.items():
if hasattr(module, "__pat... | def update_module_paths(cls, new_code_path):
# Force subsequent imports to come from the .pex directory rather than the .pex file.
TRACER.log("Adding to the head of sys.path: %s" % new_code_path)
sys.path.insert(0, new_code_path)
for name, module in sys.modules.items():
if hasattr(module, "__pat... | https://github.com/pantsbuild/pex/issues/598 | Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 64, in update... | AttributeError |
def demote_bootstrap(cls):
TRACER.log("Bootstrap complete, performing final sys.path modifications...")
bootstrap_path = __file__
module_import_path = __name__.split(".")
root_package = module_import_path[0]
# For example, our __file__ might be requests.pex/.bootstrap/_pex/pex.pyc and our import p... | def demote_bootstrap(cls):
TRACER.log("Bootstrap complete, performing final sys.path modifications...")
bootstrap_path = __file__
module_import_path = __name__.split(".")
root_package = module_import_path[0]
# For example, our __file__ might be requests.pex/.bootstrap/_pex/pex.pyc and our import p... | https://github.com/pantsbuild/pex/issues/550 | ~/sandbox $ . venv/bin/activate
(venv) ~/sandbox $ python -V
Python 2.7.15
(venv) ~/sandbox $ pex --version
pex 1.4.6
(venv) ~/sandbox $ pex responses
Python 2.7.15 (default, May 1 2018, 16:44:08)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" f... | ImportError |
def open_zip(path, *args, **kwargs):
"""A contextmanager for zip files. Passes through positional and kwargs to zipfile.ZipFile."""
with contextlib.closing(PermPreservingZipFile(path, *args, **kwargs)) as zip:
yield zip
| def open_zip(path, *args, **kwargs):
"""A contextmanager for zip files. Passes through positional and kwargs to zipfile.ZipFile."""
with contextlib.closing(zipfile.ZipFile(path, *args, **kwargs)) as zip:
yield zip
| https://github.com/pantsbuild/pex/issues/527 | $ pex torch numpy -- test.py
Traceback (most recent call last):
File "/private/var/folders/b5/hgpy98310bg_g3hfqngl759m0000gn/T/tmpxYzeas/.bootstrap/_pex/pex.py", line 367, in execute
self._wrap_coverage(self._wrap_profiling, self._execute)
File "/private/var/folders/b5/hgpy98310bg_g3hfqngl759m0000gn/T/tmpxYzeas/.bootst... | RuntimeError |
def maybe_reexec_pex(compatibility_constraints):
"""
Handle environment overrides for the Python interpreter to use when executing this pex.
This function supports interpreter filtering based on interpreter constraints stored in PEX-INFO
metadata. If PEX_PYTHON is set in a pexrc, it attempts to obtain ... | def maybe_reexec_pex(compatibility_constraints):
"""
Handle environment overrides for the Python interpreter to use when executing this pex.
This function supports interpreter filtering based on interpreter constraints stored in PEX-INFO
metadata. If PEX_PYTHON is set in a pexrc, it attempts to obtain ... | https://github.com/pantsbuild/pex/issues/434 | [omerta ~]$ pip install pex==1.2.13 2>&1 >/dev/null
[omerta ~]$ pex --version
pex 1.2.13
[omerta ~]$ pex -e 'pants.bin.pants_loader:main' pantsbuild.pants -o /tmp/pants.pex
[omerta ~]$ /tmp/pants.pex
Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 365, in execute
File ".bootstrap/_pex/pex.py"... | ImportError |
def cache_distribution(cls, zf, source, target_dir):
"""Possibly cache an egg from within a zipfile into target_cache.
Given a zipfile handle and a filename corresponding to an egg distribution within
that zip, maybe write to the target cache and return a Distribution."""
dependency_basename = os.path.... | def cache_distribution(cls, zf, source, target_dir):
"""Possibly cache an egg from within a zipfile into target_cache.
Given a zipfile handle and a filename corresponding to an egg distribution within
that zip, maybe write to the target cache and return a Distribution."""
dependency_basename = os.path.... | https://github.com/pantsbuild/pex/issues/265 | Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 309, in execute
File ".bootstrap/_pex/pex.py", line 78, in _activate
File ".bootstrap/_pex/environment.py", line 132, in activate
File ".bootstrap/_pex/environment.py", line 176, in _activate
File ".bootstrap/_pex/environment.py", line 121, in updat... | OSError |
def process_disable_cache(option, option_str, option_value, parser):
setattr(parser.values, option.dest, None)
| def process_disable_cache(option, option_str, option_value, parser):
setattr(parser.values, option.dest, [])
| https://github.com/pantsbuild/pex/issues/260 | Traceback (most recent call last):
File ".tox/package/bin/pex", line 11, in <module>
sys.exit(main())
File ".../lib/python3.4/site-packages/pex/bin/pex.py", line 533, in main
options.cache_dir = make_relative_to_root(options.cache_dir)
File ".../.tox/package/lib/python3.4/site-packages/pex/bin/pex.py", line 514, in mak... | AttributeError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.