[Distutils] [issue161] commands.upload.upload_file breaks when iterable 'value' is not of type tuple

Blake VandeMerwe setuptools at bugs.python.org
Thu May 7 22:57:48 CEST 2015


New submission from Blake VandeMerwe:

In distutils\command\upload.py:

On line 152 `if type(value) != type([])` will break if value is a tuple instead of a list, which messes up the lgoic from 155-159

To duplicate, in setup.py:

setup(
    name = 'test setup',
    ...
    ...
    classifiers = (
        'Development Status :: 3 - Alpha',
    )
)


Traceback:

running upload
Traceback (most recent call last):
  File "setup.py", line 47, in <module>
    test_suite = 'tests'
  File "C:\Python34\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Python34\lib\distutils\command\upload.py", line 65, in run
    self.upload_file(command, pyversion, filename)
  File "C:\Python34\lib\distutils\command\upload.py", line 163, in upload_file
    body.write(value)
TypeError: 'str' does not support the buffer interface

----------
messages: 749
nosy: blakev
priority: bug
status: unread
title: commands.upload.upload_file breaks when iterable 'value' is not of type tuple

_______________________________________________
Setuptools tracker <setuptools at bugs.python.org>
<http://bugs.python.org/setuptools/issue161>
_______________________________________________


More information about the Distutils-SIG mailing list