summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-11-23 20:14:01 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-11-23 20:14:01 (GMT)
commit310e4c43cd87df44b170acf43f63cb94d00321c5 (patch)
treea0f7a9343a149ed2d0709f7f463e33903f6f56d5 /Lib/zipfile.py
parente8b1ba1699d429b1e80ea7d31032628d09c3e43e (diff)
parentdd52c5a1c46b4d8e42e5e7a00f9b307f113de08d (diff)
downloadcpython-310e4c43cd87df44b170acf43f63cb94d00321c5.zip
cpython-310e4c43cd87df44b170acf43f63cb94d00321c5.tar.gz
cpython-310e4c43cd87df44b170acf43f63cb94d00321c5.tar.bz2
merge
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index ae65b42..fad52a2 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -1117,6 +1117,10 @@ class ZipFile:
"""Return file-like object for 'name'."""
if mode not in ("r", "U", "rU"):
raise RuntimeError('open() requires mode "r", "U", or "rU"')
+ if 'U' in mode:
+ import warnings
+ warnings.warn("'U' mode is deprecated",
+ DeprecationWarning, 2)
if pwd and not isinstance(pwd, bytes):
raise TypeError("pwd: expected bytes, got %s" % type(pwd))
if not self.fp: