From 825f67ae72e494ab70450dad09d8f9d18bad44a0 Mon Sep 17 00:00:00 2001 From: John Sirois Date: Fri, 22 Mar 2019 15:13:08 -0700 Subject: [PATCH] Rebase and upgrade to pex 1.6.3. --- 3rdparty/python/requirements.txt | 2 +- src/python/pants/backend/python/interpreter_cache.py | 2 +- src/python/pants/backend/python/tasks/select_interpreter.py | 1 - src/python/pants/bin/pants_loader.py | 4 +++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/3rdparty/python/requirements.txt b/3rdparty/python/requirements.txt index 8667b639a19e..b1baf07e4ae8 100644 --- a/3rdparty/python/requirements.txt +++ b/3rdparty/python/requirements.txt @@ -17,7 +17,7 @@ more-itertools<6.0.0 ; python_version<'3' packaging==16.8 parameterized==0.6.1 pathspec==0.5.9 -pex==1.6.2 +pex==1.6.3 psutil==5.4.8 pycodestyle==2.4.0 pyflakes==2.0.0 diff --git a/src/python/pants/backend/python/interpreter_cache.py b/src/python/pants/backend/python/interpreter_cache.py index b77c9bea9cea..6a3825593a65 100644 --- a/src/python/pants/backend/python/interpreter_cache.py +++ b/src/python/pants/backend/python/interpreter_cache.py @@ -184,5 +184,5 @@ def _purge_interpreter(self, interpreter_dir): except Exception as e: logger.warn( 'Caught exception {!r} during interpreter purge. Please run `./pants clean-all`!' - .format(e) + .format(e) ) diff --git a/src/python/pants/backend/python/tasks/select_interpreter.py b/src/python/pants/backend/python/tasks/select_interpreter.py index b5dc49fe7b58..f4c0cdb78d36 100644 --- a/src/python/pants/backend/python/tasks/select_interpreter.py +++ b/src/python/pants/backend/python/tasks/select_interpreter.py @@ -15,7 +15,6 @@ from pants.backend.python.interpreter_cache import PythonInterpreterCache from pants.backend.python.targets.python_requirement_library import PythonRequirementLibrary from pants.backend.python.targets.python_target import PythonTarget -from pants.base.exceptions import TaskError from pants.base.fingerprint_strategy import DefaultFingerprintHashingMixin, FingerprintStrategy from pants.invalidation.cache_manager import VersionedTargetSet from pants.task.task import Task diff --git a/src/python/pants/bin/pants_loader.py b/src/python/pants/bin/pants_loader.py index a5431b445878..79f5e8a6814c 100644 --- a/src/python/pants/bin/pants_loader.py +++ b/src/python/pants/bin/pants_loader.py @@ -12,6 +12,8 @@ from builtins import object from textwrap import dedent +from pex.pex_warnings import PEXWarning + class PantsLoader(object): """Loads and executes entrypoints.""" @@ -46,7 +48,7 @@ def setup_warnings(): # If we're running from a pex, suppress pex warnings about transitive dependencies that do not # properly declare dependencies on setuptools to support their namespace packages. - warnings.filterwarnings('ignore', category=UserWarning, module='pex') + warnings.filterwarnings('ignore', category=PEXWarning, module='pex') # TODO: Future has a pending PR to fix deprecation warnings at https://github.com/PythonCharmers/python-future/pull/421. # Remove this filter once that gets merged.