Title: PyREPL: Different Completion Behavior with GNU Readline · Issue #145392 · python/cpython · GitHub
Open Graph Title: PyREPL: Different Completion Behavior with GNU Readline · Issue #145392 · python/cpython
X Title: PyREPL: Different Completion Behavior with GNU Readline · Issue #145392 · python/cpython
Description: Bug report Bug description: The current completion logic in Lib/_pyrepl/completing_reader.py uses a suffix-insertion strategy (source code): In the contrast, Readline completely replaces user input with the candidate (source code). This ...
Open Graph Description: Bug report Bug description: The current completion logic in Lib/_pyrepl/completing_reader.py uses a suffix-insertion strategy (source code): In the contrast, Readline completely replaces user input...
X Description: Bug report Bug description: The current completion logic in Lib/_pyrepl/completing_reader.py uses a suffix-insertion strategy (source code): In the contrast, Readline completely replaces user input...
Opengraph URL: https://github.com/python/cpython/issues/145392
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PyREPL: Different Completion Behavior with GNU Readline","articleBody":"# Bug report\n\n### Bug description:\n\nThe current completion logic in `Lib/_pyrepl/completing_reader.py` uses a suffix-insertion strategy ([source code](https://github.com/python/cpython/blob/main/Lib/_pyrepl/completing_reader.py#L184)):\n\nIn the contrast, Readline completely replaces user input with the candidate ([source code](https://cgit.git.savannah.gnu.org/cgit/readline.git/tree/complete.c#n1906)).\n\nThis will lead to unwanted behavior in case-insensitive completion scenario. If user input 'xy', they might get 'xyZZY' instead of the expected 'XYZZY'.\n\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-145393\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/tanloong","@type":"Person","name":"tanloong"},"datePublished":"2026-03-01T15:20:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/145392/cpython/issues/145392"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:29bb53ce-d8fa-7dfd-3286-75a6593706ba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE38:32425C:FCD19F:1559F02:6A54481C |
| html-safe-nonce | 179048b3cb8a567856e6195996bf779322b192ed8f4438cdccbbe783783e604a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTM4OjMyNDI1QzpGQ0QxOUY6MTU1OUYwMjo2QTU0NDgxQyIsInZpc2l0b3JfaWQiOiIzNjM1MzM5MDY5MzQzNjgwNTQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e30d27e0b71fbb75eb634b5feabb2d7fefae904e3a06af2c6444d8a1eebe8213 |
| hovercard-subject-tag | issue:4007482962 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/145392/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cbe0ccd8a4f9b4fa4aee598ddd89febf89e1cc9296e33b3893c113d8a5c06634/python/cpython/issues/145392 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cbe0ccd8a4f9b4fa4aee598ddd89febf89e1cc9296e33b3893c113d8a5c06634/python/cpython/issues/145392 |
| og:image:alt | Bug report Bug description: The current completion logic in Lib/_pyrepl/completing_reader.py uses a suffix-insertion strategy (source code): In the contrast, Readline completely replaces user input... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tanloong |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width