Skip to content

Commit

Permalink
Try using stdlib_module_names (#5818)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Nov 10, 2023
1 parent 5205ca5 commit f5224d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions panel/io/mime_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#---------------------------------------------------------------------

def _stdlibs():
if sys.version_info[:2] >= (3, 10):
return sys.stdlib_module_names
env_dir = str(pathlib.Path(sys.executable).parent.parent)
modules = list(sys.builtin_module_names)
for m in pkgutil.iter_modules():
Expand Down
2 changes: 2 additions & 0 deletions panel/tests/io/test_mime_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def test_find_imports_stdlibs():
import os
import base64
import pathlib
import random
from datetime import datetime, timedelta
"""
assert find_requirements(code) == []

Expand Down

0 comments on commit f5224d0

Please sign in to comment.