You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=Nonecreated_at=<Date2018-04-11.10:28:49.441>labels= ['3.8', 'type-bug', 'library']
title='Deprecate shlex.split(None) to read from stdin.'updated_at=<Date2021-08-29.19:19:42.031>user='https://github.com/tiran'
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.
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.