[issue33262] Deprecate shlex.split(None) to read from stdin.

2021-08-29 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Can be closed as fixed (or perhaps renamed and kept open to track eventual 
raising of error in the future?)

--
nosy: +andrei.avk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33262] Deprecate shlex.split(None) to read from stdin.

2020-04-01 Thread Paul Ganssle


Paul Ganssle  added the comment:


New changeset 975ac326ffe265e63a103014fd27e9d098fe7548 by Zackery Spytz in 
branch 'master':
bpo-33262: Deprecate passing None for `s` to shlex.split() (GH-6514)
https://github.com/python/cpython/commit/975ac326ffe265e63a103014fd27e9d098fe7548


--
nosy: +p-ganssle

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33262] Deprecate shlex.split(None) to read from stdin.

2018-08-13 Thread Niklas Rosenstein


Niklas Rosenstein  added the comment:

I've just run into this as well -- I thought it was a bug until I found this 
issue. I also think that this is anything from sane.

--
nosy: +n_rosenstein

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33262] Deprecate shlex.split(None) to read from stdin.

2018-04-17 Thread Zackery Spytz

Change by Zackery Spytz :


--
components: +Library (Lib)
nosy: +ZackerySpytz

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33262] Deprecate shlex.split(None) to read from stdin.

2018-04-17 Thread Zackery Spytz

Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +6207
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33262] Deprecate shlex.split(None) to read from stdin.

2018-04-11 Thread Eric V. Smith

Eric V. Smith  added the comment:

I agree that it should be deprecated. That's crazy behavior.

I'd also recommend that shlex.shlex with instream=None be deprecated, but maybe 
that's too radical. It seems way too easy to accidentally pass in None.

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33262] Deprecate shlex.split(None) to read from stdin.

2018-04-11 Thread Christian Heimes

New submission from Christian Heimes :

The shlex module implements simple tokenize for a shell-like mini language. The 
shlex.split() function splits a string into subcomponents just like a typical 
Unix shell. However function has a surprising feature. When None is passed into 
shlex.split().

Note: Since the split() function instantiates a shlex instance, passing None 
for s will read the string to split from standard input. 

https://docs.python.org/3/library/shlex.html#shlex.split


This is both surprising, unnecessary and potentially dangerous. Reading from 
sys.stdin is a blocking operation. In case an application doesn't account for 
None, shlex.split(value) could lead to a blocked server application. I suggest 
to deprecate and eventually remove this mis-feature.

Credits: David R. MacIver reported the bug on Twitter: 
https://twitter.com/DRMacIver/status/984001867985367040

--
messages: 315189
nosy: christian.heimes
priority: normal
severity: normal
stage: needs patch
status: open
title: Deprecate shlex.split(None) to read from stdin.
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com