STINNER Victor <vstin...@python.org> added the comment:

There are different things:

* Bracketed paste mode prevents to execute malicious command copied from evil 
internet web pages
* Python REPL is not really convenient in the bracked paste mode: bpo-39820
* Users are not used to the bracketed mode which gives a surprising behavior in 
Python REPL
* Copy/paste in a shell running in a graphical terminal is fine in bracketed 
mode, since users running a shell are used to modify a command before running 
and to run manually a command by pressing ENTER
* The bracketed paste mode causes test failures in applications (like pytest 
test suite) which doesn't support it.
* It is not easy/convenient to opt-out for the bracketed paste mode.

For all these reasons, it sounds reasonable to disable the readline bracketed 
paste mode by default in Python, even if it's enabled explicitly in ~/.inputrc.

If an user opts in for the bracketed paste mode, it is more likely to prevent 
running malicious commands in a shell, rather than not executing immediately 
commands executed in Python.

Once the bpo-39820 will be fixed, we can reconsider to leave the bracketed 
paste mode default unchanged (no longer disable it explicitly).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42819>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to