Skip to content

Commit 6483180

Browse files
Make show_versions not to reload modules (GH13684) (#14126)
1 parent 5f5acc3 commit 6483180

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/util/print_versions.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ def show_versions(as_json=False):
101101
deps_blob = list()
102102
for (modname, ver_f) in deps:
103103
try:
104-
mod = importlib.import_module(modname)
104+
if modname in sys.modules:
105+
mod = sys.modules[modname]
106+
else:
107+
mod = importlib.import_module(modname)
105108
ver = ver_f(mod)
106109
deps_blob.append((modname, ver))
107110
except:

0 commit comments

Comments
 (0)