python3.3 distutils TypeError: Type str doesn't support the buffer API

Bug #1287758 reported by lysdexia
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3.3 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

function rfc822_escape in /usr/lib/python3.3/distutils/util.py errors on packages with non-byte-encoded strings.

Example was found while converting rtree module to use python3.

writing Rtree.egg-info/PKG-INFO
Traceback (most recent call last):
  File "setup.py", line 44, in <module>
    'Topic :: Database',
  File "/usr/lib/python3.3/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.3/distutils/dist.py", line 929, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.3/distutils/dist.py", line 948, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 73, in run
    self.do_egg_install()
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 93, in do_egg_install
    self.run_command('bdist_egg')
  File "/usr/lib/python3.3/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.3/distutils/dist.py", line 948, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 172, in run
    self.run_command("egg_info")
  File "/usr/lib/python3.3/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.3/distutils/dist.py", line 948, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 177, in run
    writer(self, ep.name, os.path.join(self.egg_info,ep.name))
  File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 413, in write_pkg_info
    metadata.write_pkg_info(cmd.egg_info)
  File "/usr/lib/python3.3/distutils/dist.py", line 1027, in write_pkg_info
    self.write_pkg_file(pkg_info)
  File "/usr/lib/python3.3/distutils/dist.py", line 1048, in write_pkg_file
    long_desc = rfc822_escape(self.get_long_description())
  File "/usr/lib/python3.3/distutils/util.py", line 490, in rfc822_escape
    lines = header.split('\n')
TypeError: Type str doesn't support the buffer API

patch included, but unsure if it will open up more cans-o-worms.

Tags: patch
Revision history for this message
lysdexia (doug-shawhan) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch for /usr/lib/python3.3/distutils/util.py, resulted in a (thus far) successful install." seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Martin Pitt (pitti) wrote :

How can this be reproduced? Do you have a pointer to a source tree which generates this crash when trying to build it?

Does this also happen with python3.4?

This doesn't seem to involve python-distutils-extra at all, reassigning.

affects: python-distutils-extra (Ubuntu) → python3.3 (Ubuntu)
Changed in python3.3 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for python3.3 (Ubuntu) because there has been no activity for 60 days.]

Changed in python3.3 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.