Commit 935751c8 authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #1486 from pypa/bugfix/1111-import-warning

Suppress warnings in importer.find_module.
parents 6b222623 6e122a15
Suppress warnings in pkg_resources.handle_ns.
......@@ -2094,7 +2094,12 @@ def _handle_ns(packageName, path_item):
importer = get_importer(path_item)
if importer is None:
return None
loader = importer.find_module(packageName)
# capture warnings due to #1111
with warnings.catch_warnings():
warnings.simplefilter("ignore")
loader = importer.find_module(packageName)
if loader is None:
return None
module = sys.modules.get(packageName)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment