Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1914843 - python-pexpect is broken with Bash 5.1 and bracketed-paste mode (now the default), unexpected \x1b[?2004l\r376 in output
Summary: python-pexpect is broken with Bash 5.1 and bracketed-paste mode (now the defa...
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pexpect
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Dan Radez
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F34FTBFS PYTHON3.10 1892612 1914782
TreeView+ depends on / blocked
Reported: 2021-01-11 10:23 UTC by Tomáš Hrnčiar
Modified: 2021-02-02 18:09 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-01-19 17:32:10 UTC
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github pexpect pexpect issues 669 0 None open Readline and bracketed-paste mode 2021-02-02 18:09:11 UTC

Description Tomáš Hrnčiar 2021-01-11 10:23:30 UTC
Description of problem:
Package python-pexpect fails to build from source in Fedora rawhide.

Version-Release number of selected component (if applicable):

Steps to Reproduce:
koji build --scratch f34 python-pexpect-4.8.0-5.fc34.src.rpm

Additional info:
This package is tracked by Koschei. See:

_________________________ REPLWrapTestCase.test_python _________________________

self = <tests.test_replwrap.REPLWrapTestCase testMethod=test_python>

    def test_python(self):
        if platform.python_implementation() == 'PyPy':
            raise unittest.SkipTest(skip_pypy)
        p = replwrap.python()
        res = p.run_command('4+7')
>       assert res.strip() == '11'
E       AssertionError: assert '\x1b[?2004l\...\n\x1b[?2004h' == '11'
E         - 11
E         + [?2004l
E         + 11
E         + [?2004h

/builddir/build/BUILD/pexpect-4.8.0/tests/ AssertionError

Comment 1 Miro Hrončok 2021-01-11 17:17:54 UTC

Upstream issue:

(I could not add the link to the Bugzilla field, because there is some error in Jira synchronization.)

Comment 2 Victor Stinner 2021-01-19 11:38:06 UTC
FYI Python had a similar issue with readline which injected bytes like ".[?1034h": The workaround was to set TERM=xterm-256color environment variable.

Comment 3 Dan Radez 2021-01-19 14:39:29 UTC
I tried running the checks after updating the test command to "TERM=xterm-256color TRAVIS=true py.test-3 --verbose"
Saw the env value set in the checks when I ran mock to build the package.

Same failure.

Thx for the suggestion Victor.

Comment 4 Dan Radez 2021-01-19 16:06:42 UTC
I added the temporary workaround:
echo "set enable-bracketed-paste off" > .inputrc
export INPUTRC=$PWD/.inputrc

and pushed it up so the tests would be passing again.

The build failed:
I tried to reproduce the failure in a scratch build and it succeeded:

The build failure was not the bracketed paste error at first glance.
I'll poke a bit more and see what I can figure out.

Note You need to log in before you can comment on or make changes to this bug.