We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 58832f2 + 2a3f50d commit 8b909f9Copy full SHA for 8b909f9
importlib_metadata/__init__.py
@@ -14,7 +14,6 @@
14
import email
15
import functools
16
import itertools
17
-import json
18
import operator
19
import os
20
import pathlib
@@ -673,6 +672,9 @@ def origin(self):
673
672
return self._load_json('direct_url.json')
674
675
def _load_json(self, filename):
+ # Deferred for performance (python/importlib_metadata#503)
676
+ import json
677
+
678
return pass_none(json.loads)(
679
self.read_text(filename),
680
object_hook=lambda data: types.SimpleNamespace(**data),
newsfragments/503.feature.rst
@@ -0,0 +1 @@
1
+Deferred import of json
0 commit comments