properly encoded and include the encoding in the Content-Type header.
if type(value) != type([]):
value = [value]
for value in value:
- value = str(value)
+ value = unicode(value).encode("utf-8")
body.write(sep_boundary)
body.write('\nContent-Disposition: form-data; name="%s"'%key)
body.write("\n\n")
# build the Request
headers = {
- 'Content-type': 'multipart/form-data; boundary=%s'%boundary,
+ 'Content-type': 'multipart/form-data; boundary=%s; charset=utf-8'%boundary,
'Content-length': str(len(body))
}
req = urllib2.Request(self.repository, body, headers)
- distutils.commands.upload was added to support uploading distribution
files to PyPI.
+- distutils.commands.register now encodes the data as UTF-8 before posting
+ them to PyPI.
+
- decimal operator and comparison methods now return NotImplemented
instead of raising a TypeError when interacting with other types. This
allows other classes to implement __radd__ style methods and have them