Skip to content
Closed
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
Next Next commit
Skip readline module import on macOS
Add temporary fix to skip readline module on macOS.
  • Loading branch information
MazinSharaf authored Apr 9, 2026
commit 8117ff7914df842c2a78dfdb2f0bcd954d30467e
6 changes: 6 additions & 0 deletions Tools/build/check_extension_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,12 @@ def check_module_import(self, modinfo: ModuleInfo) -> None:
"""Attempt to import module and report errors"""
spec = self.get_spec(modinfo)
self._check_file(modinfo, spec)

# skips readline module on macOS (temporary fix)
if sys.platform == "darwin" and modinfo.name == "readline":
logger.error("Skipping readline module for macOS")
return
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep strict builds from silently passing skipped readline

Returning early for readline on macOS makes check_module_import() report success without ever executing bootstrap_load(spec). In ModuleChecker.check(), any non-exception path is treated as a successful import and added to shared_ok, so --strict/PYTHONSTRICTEXTENSIONBUILD can no longer detect a broken readline module on macOS. This undermines the strict-build guarantee and can let a bad extension ship undetected.

Useful? React with 👍 / 👎.


try:
with warnings.catch_warnings():
# ignore deprecation warning from deprecated modules
Expand Down