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