Skip to content

Readline fix#148279

Open
MazinSharaf wants to merge 3 commits intopython:mainfrom
MazinSharaf:readline-fix
Open

Readline fix#148279
MazinSharaf wants to merge 3 commits intopython:mainfrom
MazinSharaf:readline-fix

Conversation

@MazinSharaf
Copy link
Copy Markdown
Contributor

Readline Fix

A fix for hanging when importing readline module on macOS by checking if readline module is being imported on macOS and skips the import if it is to avoid hanging.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 684734ca54

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +482 to +484
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 👍 / 👎.

Raise ImportError for readline module on macOS instead of logging an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant