This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: "setup.py upload --sign" broken: TypeError: 'str' does not support the buffer interface
Type: behavior Stage: commit review
Components: Distutils Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: 10578 Superseder:
Assigned To: eric.araujo Nosy List: doko, dstufft, eric.araujo, hynek, jwilk, pitrou, python-dev, tarek
Priority: normal Keywords: patch

Created on 2010-11-28 23:38 by jwilk, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue10571.diff jwilk, 2010-11-29 15:05 review
Messages (9)
msg122747 - (view) Author: Jakub Wilk (jwilk) Date: 2010-11-28 23:38
$ python3 --version
Python 3.1.3

$ python3 setup.py bdist upload --sign
[snip]
Traceback (most recent call last):
  File "setup.py", line 71, in <module>
    cmdclass = dict(build_py=build_py)
  File "/usr/local/lib/python3.1/distutils/core.py", line 149, in setup
    dist.run_commands()
  File "/usr/local/lib/python3.1/distutils/dist.py", line 919, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python3.1/distutils/dist.py", line 938, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.1/distutils/command/upload.py", line 66, in run
    self.upload_file(command, pyversion, filename)
  File "/usr/local/lib/python3.1/distutils/command/upload.py", line 155, in upload_file
    body.write(value)
TypeError: 'str' does not support the buffer interface


Without --sign it works just fine.
msg122802 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-11-29 14:10
Thank you for the report.  Do you want to propose a patch?
msg122807 - (view) Author: Jakub Wilk (jwilk) Date: 2010-11-29 15:05
Patch attached.
msg122813 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-11-29 15:29
Thank you.  I’ll apply after #10578 is solved.
msg122814 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2010-11-29 15:34
Eric: #10578 will not happen in Distutils1.

You need to add a test in distutils2, apply the bugfix there, then apply Jakub's patch in distutils1
msg164297 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-06-28 23:07
New changeset ef16a3db4628 by Antoine Pitrou in branch '3.2':
Issue #10571: Fix the "--sign" option of distutils' upload command.
http://hg.python.org/cpython/rev/ef16a3db4628

New changeset b45f105dbdfb by Antoine Pitrou in branch 'default':
Issue #10571: Fix the "--sign" option of distutils' upload command.
http://hg.python.org/cpython/rev/b45f105dbdfb
msg164298 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-06-28 23:08
Committed. Thank you Jakub!
msg164574 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-07-03 05:26
Reopening for d2.  According to our rules a unit test would be required, but if we don’t have machinery to test upload already in place then I would just commit it; we definitely want to have automated tests for all commands, but it needn’t hold up this fix.
msg214798 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-03-25 09:24
distutils2 development has ceased.
History
Date User Action Args
2022-04-11 14:57:09adminsetgithub: 54780
2014-03-25 09:24:19eric.araujosetstatus: open -> closed
versions: - 3rd party
nosy: + dstufft

messages: + msg214798

components: - Distutils2
2012-07-03 05:26:16eric.araujosetstatus: closed -> open

stage: resolved -> commit review
messages: + msg164574
versions: + 3rd party
2012-06-28 23:08:13pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg164298

resolution: fixed
stage: patch review -> resolved
2012-06-28 23:07:51python-devsetnosy: + python-dev
messages: + msg164297
2012-06-28 23:03:12pitrousetversions: - Python 2.7
2012-06-28 23:01:50pitrousetstage: test needed -> patch review
versions: + Python 2.7, - Python 3.4
2012-06-28 11:09:37hyneksetnosy: + hynek

versions: + Python 3.4, - Python 3.1
2011-07-04 14:38:03eric.araujosetstage: needs patch -> test needed
versions: + Python 3.3
2010-11-29 15:34:22tareksetnosy: doko, tarek, jwilk, eric.araujo
messages: + msg122814
components: + Distutils2
2010-11-29 15:29:22eric.araujosetdependencies: + Add mock PyPI server to test distutils
messages: + msg122813
2010-11-29 15:05:01jwilksetfiles: + issue10571.diff
keywords: + patch
messages: + msg122807
2010-11-29 14:10:06eric.araujosetversions: + Python 3.2
messages: + msg122802

assignee: tarek -> eric.araujo
type: behavior
stage: needs patch
2010-11-29 13:45:48eric.araujosetmessages: - msg122780
2010-11-29 13:45:45eric.araujosetmessages: - msg122777
2010-11-29 08:41:45jwilksetassignee: tarek
messages: + msg122780
components: + Distutils, - Library (Lib)
nosy: doko, tarek, jwilk, eric.araujo
2010-11-29 07:22:43dokosetnosy: + doko
messages: + msg122777

assignee: tarek -> (no value)
components: + Library (Lib), - Distutils
2010-11-28 23:38:55jwilkcreate