Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-13886: Skip PTY non-ASCII tests if readline is loaded#30631

Merged
vstinner merged 1 commit into
python:mainpython/cpython:mainfrom
vstinner:test_builtin_readlineCopy head branch name to clipboard
Jan 17, 2022
Merged

bpo-13886: Skip PTY non-ASCII tests if readline is loaded#30631
vstinner merged 1 commit into
python:mainpython/cpython:mainfrom
vstinner:test_builtin_readlineCopy head branch name to clipboard

Conversation

@vstinner

@vstinner vstinner commented Jan 17, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

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

@vstinner vstinner merged commit ad6e640 into python:main Jan 17, 2022
@miss-islington

Copy link
Copy Markdown
Contributor

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

@vstinner vstinner 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-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jan 17, 2022
@bedevere-bot

Copy link
Copy Markdown

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
Copy Markdown

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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.