On 11. 01. 21 18:22, Miro Hrončok wrote:
On 11. 01. 21 18:02, Miro Hrončok wrote:
On 11. 01. 21 13:19, Miro Hrončok wrote:
On 11. 01. 21 13:13, Miro Hrončok wrote:
Hello Siteshwar,
I see two Python packages that fail to test with Bash 5.1 due to
\x1b[?2004l\r376\r or similar unexpectedly in captured stdout:
https://bugzilla.redhat.com/show_bug.cgi?id=1914782
https://bugzilla.redhat.com/show_bug.cgi?id=1914880
Is this anything you are aware of? What shall be done to fix this?
Thanks,
Actually, I see more:
https://koschei.fedoraproject.org/affected-by/bash?epoch1=0&version1=5.0.17&release1=3.fc34&epoch2=0&version2=5.1.0&release2=1.fc34&collection=f34
e.g. pytest:
child.expect("Pdb")
> assert "\r\n'i=0.'\r\n" in child.before.decode("utf8")
E assert "\r\n'i=0.'\r\n" in ") 'i=%i.' %
i\r\n\x1b[?2004l\r'i=0.'\r\n\x1b[?2004h("
E + where ") 'i=%i.' % i\r\n\x1b[?2004l\r'i=0.'\r\n\x1b[?2004h(" =
<built-in method decode of bytes object at 0x3ff4c3ff3f0>('utf8')
E + where <built-in method decode of bytes object at 0x3ff4c3ff3f0>
= b") 'i=%i.' % i\r\n\x1b[?2004l\r'i=0.'\r\n\x1b[?2004h(".decode
E + where b") 'i=%i.' % i\r\n\x1b[?2004l\r'i=0.'\r\n\x1b[?2004h("
= <pexpect.pty_spawn.spawn object at 0x3ff4c3e1b80>.before
/builddir/build/BUILD/pytest-6.0.2/testing/test_debugging.py:492: AssertionError
E AssertionError: assert '\r\nENTERING RECURSIVE DEBUGGER\r\n' in
'\r\n\x1b[?2004hdebug set_trace()\r\n\x1b[?2004l\rENTERING RECURSIVE
DEBUGGER\r\n'
or python-pexpect:
> assert res.strip() == '11'
E AssertionError: assert '\x1b[?2004l\...\n\x1b[?2004h' == '11'
E - 11
E + [?2004l
E + 11
E + [?2004h
And more...
Also ccing devel list for help.
There was some off-list discussion about this. A summary:
This is coming from the bracketed paste, which is enabled by default:
https://lists.gnu.org/archive/html/bug-readline/2020-11/msg00010.html
https://lists.gnu.org/archive/html/bug-bash/2020-10/msg00048.html
https://lists.gnu.org/archive/html/bug-bash/2020-10/msg00087.html
The tests would already fail in the situations where user has enabled
bracketed paste mode in their environments. Since Bash 5.1, this is the
default, so the tests fail in mock. It might be a good idea to fix the tests
(or sometimes even the implementation) to work with bracketed paste. However,
as a stop-gap measure, this seem to work reliably:
%check
echo "set enable-bracketed-paste off" > .inputrc
export INPUTRC=$PWD/.inputrc
It appears that the common denominator of all (or at least most of) the failures
is pexpect:
https://bugzilla.redhat.com/show_bug.cgi?id=1914843
Correction, terminado does not use pexpect:
https://bugzilla.redhat.com/show_bug.cgi?id=1914880
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx