02-ignore-deprecate-warning.patch 664 B

1234567891011121314
  1. --- contrib/python/pytz/py2/pytz/__init__.py (index)
  2. +++ contrib/python/pytz/py2/pytz/__init__.py (working tree)
  3. @@ -99,7 +99,10 @@ def open_resource(name):
  4. # unless absolutely necessary to help when a broken version of
  5. # pkg_resources is installed.
  6. try:
  7. - from pkg_resources import resource_stream
  8. + import warnings
  9. + with warnings.catch_warnings():
  10. + warnings.filterwarnings(action='ignore', category=DeprecationWarning)
  11. + from pkg_resources import resource_stream
  12. except ImportError:
  13. resource_stream = None