-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-112510: Add readline.backend
for the backend readline uses
#112511
Conversation
@@ -3293,7 +3293,7 @@ def setUpClass(): | |||
# Ensure that the readline module is loaded | |||
# If this fails, the test is skipped because SkipTest will be raised | |||
readline = import_module('readline') | |||
if readline.__doc__ and "libedit" in readline.__doc__: | |||
if readline.backend == "editline": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For just internal usage, why not just use readline._backend?
Co-authored-by: Donghee Na <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from my view. But I will leave it to @encukou since we have to export backend
as the public. Once we export it we should maintain it for a long time and Petr is the expert in this area.
Thank you! Could you add a test to assert |
Very helpful insight! From my observation, the difference between different versions of the same library is significantly less important than the difference between the two libraries. I can't guarantee that the version of the backend will not ever be used at all in the future, but I would guess that's a very rare case. Both That being said, I think using a single string type for If in the future, |
I think we are done with the review for this PR? We should merge this before #107748 so it can use the |
One more thing: the docs entry needs a (And I fell into the trap of thinking this is simple enough to use GitHub UI rather than a local clone...) |
Thanks for the quick review! |
…pythonGH-112511) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Donghee Na <[email protected]>
…pythonGH-112511) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Donghee Na <[email protected]>
readline.backend
for the backendreadline
uses #112510📚 Documentation preview 📚: https://cpython-previews--112511.org.readthedocs.build/