Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update stdlib modules list
Also update `generate_stdlib_module_names.py` to collect `compression`,
a namespace package.
  • Loading branch information
emmatyping committed Apr 26, 2025
commit 0d7e1db155f3ce57069c41c71143ab748a50438c
2 changes: 1 addition & 1 deletion Python/stdlib_module_names.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Tools/build/generate_stdlib_module_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,16 @@ def list_packages(names):
package_path = os.path.join(STDLIB_PATH, name)
if not os.path.isdir(package_path):
continue
if any(package_file.endswith(".py")
for package_file in os.listdir(package_path)):
# Walk the package directory to check if the package is a namespace
Comment thread
emmatyping marked this conversation as resolved.
Outdated
has_py_files = False
for root, _dirs, files in os.walk(package_path):
for file in files:
if file.endswith(".py"):
has_py_files = True
break
if has_py_files:
break
if has_py_files:
names.add(name)


Expand Down