blob: 22e1cd46d28df6d9d267a3ecfba2482c9a944050 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
--- contrib/python/pytz/py3/pytz/__init__.py (index)
+++ contrib/python/pytz/py3/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
|