summaryrefslogtreecommitdiffstats
path: root/Lib/shlex.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/shlex.py')
-rw-r--r--Lib/shlex.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/shlex.py b/Lib/shlex.py
index c817274..4801a6c 100644
--- a/Lib/shlex.py
+++ b/Lib/shlex.py
@@ -304,6 +304,10 @@ class shlex:
def split(s, comments=False, posix=True):
"""Split the string *s* using shell-like syntax."""
+ if s is None:
+ import warnings
+ warnings.warn("Passing None for 's' to shlex.split() is deprecated.",
+ DeprecationWarning, stacklevel=2)
lex = shlex(s, posix=posix)
lex.whitespace_split = True
if not comments: