Skip to content

Commit

Permalink
Turn off pex warnings for Pants when run from a pex.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Feb 22, 2019
1 parent 0237fa9 commit dd79c3e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/python/pants/bin/pants_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ def setup_warnings():
# However, we do turn off deprecation warnings for libraries that Pants uses for which we do not have a fixed
# upstream version, typically because the library is no longer maintained.
warnings.simplefilter('default', category=DeprecationWarning)

# 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')

# 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.
warnings.filterwarnings('ignore', category=DeprecationWarning, module="future")
Expand Down

0 comments on commit dd79c3e

Please sign in to comment.