[issue12169] Factor out common code for d2 commands register, upload and upload_docs
John Edmonds added the comment: I'd like to try tackling this issue. I've made a patch that moves encode_multipart from upload_docs to the distutils2.command module and changed the register and upload commands to use this function. -- keywords: +patch nosy: +John.Edmonds Added file: http://bugs.python.org/file22309/patch.diff ___ Python tracker <http://bugs.python.org/issue12169> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12169] Factor out common code for d2 commands register, upload and upload_docs
John Edmonds added the comment: Here is the patch, re-written for the packaging module. -- Added file: http://bugs.python.org/file22330/patch.diff ___ Python tracker <http://bugs.python.org/issue12169> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12169] Factor out common code for d2 commands register, upload and upload_docs
John Edmonds added the comment: Thanks for reviewing the patch. I don't believe I received an email for the review. I think I have addressed your comment about the usage of str(body) by removing the call to str() and changing the tests to use byte literals. As for the content-length changing in the tests, that is because encode_multipart uses '\r\n' to end lines while the previous code only ended lines in '\n'. -- Added file: http://bugs.python.org/file22478/patch.diff ___ Python tracker <http://bugs.python.org/issue12169> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5423] Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached
John Edmonds added the comment: It looks like set_charset's documentation says that it assumes you are calling it on a message with a mimetype of text/*. This case calls it on a message of type multipart/mixed. Nonetheless, I am attaching a patch that catches this earlier and prints a more relevant and consistent error message. -- keywords: +patch nosy: +pocketcookies Added file: http://bugs.python.org/file15979/issue5423.patch ___ Python tracker <http://bugs.python.org/issue5423> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5423] Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached
Changes by John Edmonds : Added file: http://bugs.python.org/file15983/issue5423.patch ___ Python tracker <http://bugs.python.org/issue5423> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5423] Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached
Changes by John Edmonds : Removed file: http://bugs.python.org/file15979/issue5423.patch ___ Python tracker <http://bugs.python.org/issue5423> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com