Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Jan 17, 2022

Skip test_builtin PTY tests on non-ASCII characters if the readline
module is loaded. The readline module changes input() behavior, but
test_builtin is not intented to test the readline module.

When the readline module is loaded, PyOS_Readline() uses the readline
implementation. In some cases, the Python readline callback
rlhandler() is called by readline with a string without non-ASCII
characters.

https://bugs.python.org/issue13886

Skip test_builtin PTY tests on non-ASCII characters if the readline module is loaded. The readline module changes input() behavior, but test_builtin is not intented to test the readline module. When the readline module is loaded, PyOS_Readline() uses the readline implementation. In some cases, the Python readline callback rlhandler() is called by readline with a string without non-ASCII characters.
@vstinner
Copy link
MemberAuthor

The "Docs / Docs (pull_request)" CI job failure is unrelated to my change: https://bugs.python.org/issue40066#msg410711

File "library/enum.rst", line ?, in default Failed example: Color(0) Exception raised: Traceback (most recent call last): File "/home/runner/work/cpython/cpython/Lib/doctest.py", line 1346, in __run exec(compile(example.source, filename, "single", ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<doctest default[0]>", line 1, in <module> Color(0) ^^^^^ NameError: name 'Color' is not defined 

@vstinnervstinner merged commit ad6e640 into python:mainJan 17, 2022
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

@vstinnervstinner deleted the test_builtin_readline branch January 17, 2022 13:00
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 17, 2022
…0631) Skip test_builtin PTY tests on non-ASCII characters if the readline module is loaded. The readline module changes input() behavior, but test_builtin is not intented to test the readline module. When the readline module is loaded, PyOS_Readline() uses the readline implementation. In some cases, the Python readline callback rlhandler() is called by readline with a string without non-ASCII characters. (cherry picked from commit ad6e640) Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-botbedevere-bot removed the needs backport to 3.10 only security fixes label Jan 17, 2022
@bedevere-bot
Copy link

GH-30634 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 17, 2022
…0631) Skip test_builtin PTY tests on non-ASCII characters if the readline module is loaded. The readline module changes input() behavior, but test_builtin is not intented to test the readline module. When the readline module is loaded, PyOS_Readline() uses the readline implementation. In some cases, the Python readline callback rlhandler() is called by readline with a string without non-ASCII characters. (cherry picked from commit ad6e640) Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-bot
Copy link

GH-30635 is a backport of this pull request to the 3.9 branch.

miss-islington added a commit that referenced this pull request Jan 17, 2022
Skip test_builtin PTY tests on non-ASCII characters if the readline module is loaded. The readline module changes input() behavior, but test_builtin is not intented to test the readline module. When the readline module is loaded, PyOS_Readline() uses the readline implementation. In some cases, the Python readline callback rlhandler() is called by readline with a string without non-ASCII characters. (cherry picked from commit ad6e640) Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this pull request Jan 17, 2022
…H-30635) Skip test_builtin PTY tests on non-ASCII characters if the readline module is loaded. The readline module changes input() behavior, but test_builtin is not intented to test the readline module. When the readline module is loaded, PyOS_Readline() uses the readline implementation. In some cases, the Python readline callback rlhandler() is called by readline with a string without non-ASCII characters. (cherry picked from commit ad6e640) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
…0631) (pythonGH-30635) Skip test_builtin PTY tests on non-ASCII characters if the readline module is loaded. The readline module changes input() behavior, but test_builtin is not intented to test the readline module. When the readline module is loaded, PyOS_Readline() uses the readline implementation. In some cases, the Python readline callback rlhandler() is called by readline with a string without non-ASCII characters. (cherry picked from commit ad6e640) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@vstinner@miss-islington@bedevere-bot@the-knights-who-say-ni