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 Mar 22, 2019
1 parent 2a36bc3 commit 5340994
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 @@ -43,6 +43,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 5340994

Please sign in to comment.