Skip to content

Commit b8b954f

Browse files
committed
Lazy import urllib.request
1 parent ffd9987 commit b8b954f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fastjsonschema/ref_resolver.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import re
1212
from urllib import parse as urlparse
1313
from urllib.parse import unquote
14-
from urllib.request import urlopen
1514

1615
from .exceptions import JsonSchemaDefinitionException
1716

@@ -59,6 +58,8 @@ def resolve_remote(uri, handlers):
5958
if scheme in handlers:
6059
result = handlers[scheme](uri)
6160
else:
61+
from urllib.request import urlopen
62+
6263
req = urlopen(uri)
6364
encoding = req.info().get_content_charset() or 'utf-8'
6465
try:

0 commit comments

Comments
 (0)