From 4720c481c62d5cc0a40dd212a32c641125be8e9c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 29 Jun 2016 10:22:12 +0200 Subject: Don't use deprecated 'U' flag to read manifest The universal newlines mode ('U' flag) is deprecated since Python 3.4. It only replaces "\r\n" with "\n", but it doesn't split lines at "\r" (Mac newline). In practice, the flag was useless, the sdist.read_manifest() method already uses line.strip() and so removes newline characters. --- setuptools/command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools') diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 6640d4e3..f200b946 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -179,7 +179,7 @@ class sdist(orig.sdist): distribution. """ log.info("reading manifest file '%s'", self.manifest) - manifest = open(self.manifest, 'rbU') + manifest = open(self.manifest, 'rb') for line in manifest: # The manifest must contain UTF-8. See #303. if six.PY3: -- cgit v1.2.3