diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py index 4926aa3e154..8b36851d256 100644 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py @@ -125,7 +125,7 @@ def upload_file(self, command, pyversion, filename): if self.sign: data['gpg_signature'] = (os.path.basename(filename) + ".asc", - open(filename+".asc").read()) + open(filename+".asc", "rb").read()) # set up the authentication user_pass = (self.username + ":" + self.password).encode('ascii') diff --git a/Misc/ACKS b/Misc/ACKS index 514e95dbec9..efa7339e2b3 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1009,6 +1009,7 @@ Felix Wiemann Gerry Wiener Frank Wierzbicki Bryce "Zooko" Wilcox-O'Hearn +Jakub Wilk Jason Williams John Williams Sue Williams diff --git a/Misc/NEWS b/Misc/NEWS index a8c274965d9..242b8f76d1a 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -81,6 +81,9 @@ Core and Builtins Library ------- +- Issue #10571: Fix the "--sign" option of distutils' upload command. + Patch by Jakub Wilk. + - Issue #9559: If messages were only added, a new file is no longer created and renamed over the old file when flush() is called on an mbox, MMDF or Babyl mailbox.