unicode problem

Bug #995653 reported by Pavol Klačanský
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-distutils-extra (Ubuntu)
Fix Released
High
Martin Pitt
Precise
Fix Released
Undecided
Unassigned

Bug Description

python3 setup.py build
Traceback (most recent call last):
  File "setup.py", line 14, in <module>
    cmdclass={'build': build_extra.build_extra})
  File "/usr/lib/python3/dist-packages/DistUtilsExtra/auto.py", line 98, in setup
    __requires(attrs, src_all)
  File "/usr/lib/python3/dist-packages/DistUtilsExtra/auto.py", line 443, in __requires
    line = f.readline()
  File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 72: ordinal not in range(128)

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: python3-distutils-extra 2.32-2
ProcVersionSignature: Ubuntu 3.2.0-24.38-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Sun May 6 22:24:36 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120328)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=sk_SK.UTF-8
 SHELL=/bin/bash
SourcePackage: python-distutils-extra
UpgradeStatus: No upgrade log present (probably fresh install)

TEST-CASE:
----------

Test-case:
  cd /tmp
  quickly create ubuntu-application test-project
  cd test-project/
  wget http://people.canonical.com/~dholbach/tmp/es.py
  bzr add es.py
  quickly package

Note: no crash.

REGRESSION POTENTIAL:
---------------------

Almost no regression potential. As the changes mostly revolve around descriptive changes in the packaging of apps, there is little which can go wrong.

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :
Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

If I use distutilsextra and I have utf-8 characters in files, it crashes

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

I have added this to debian/rules, but I am not sure, if it is the best solution
export LC_ALL=C.UTF-8

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

Just discovered that myself.

Changed in python-distutils-extra (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → In Progress
Martin Pitt (pitti)
Changed in python-distutils-extra (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-distutils-extra - 2.33-1

---------------
python-distutils-extra (2.33-1) unstable; urgency=low

  * auto.py: Fix crash when encountering binary files with Python 3.
    (LP: #995653)
  * auto.py: Fix crash when encountering an UTF-8 Python source code file.
 -- Martin Pitt <email address hidden> Mon, 11 Jun 2012 18:14:28 +0200

Changed in python-distutils-extra (Ubuntu):
status: Fix Committed → Fix Released
description: updated
tags: added: arb
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Pavol, or anyone else affected,

Accepted python-distutils-extra into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/python-distutils-extra/2.33-0ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-distutils-extra (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
David Planella (dpm) wrote :

I'm not sure if it's related to this bug, but it's the only bug fix on this SRU that mentions Unicode, so I'll take a guess.

In any case, the p-d-e version in precise-proposed causes Quickly to issue a lot of warnings along the lines of "syntax errors in testme_lib/testmeconfig.py: encoding declaration in Unicode string (testmeconfig.py, line 0)", as shown in bug 1021969

Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Pavol, or anyone else affected,

Accepted python-distutils-extra into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/python-distutils-extra/2.34-0ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

I have quantal, to be honest, I need it to work on PPA servers

Revision history for this message
Sebastien Bacher (seb128) wrote :

works fine here

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.5 KiB)

This bug was fixed in the package python-distutils-extra - 2.34-0ubuntu0.1

---------------
python-distutils-extra (2.34-0ubuntu0.1) precise-proposed; urgency=low

  * Backport some fixes from latest release (and a regression fix):
    - debian/rules: Run Python3 tests under C locale, to expose more unicode
      errors.
    - auto.py: Fix *.ui detection to be robust for non-ASCII files.
      (LP: #1017468)
    - auto.py: Fix a regression with python2 if files have some utf-8 directives
      (LP: #1021969)

python-distutils-extra (2.34-1) unstable; urgency=low

  [ Martin Pitt ]
  * debian/rules: Run Python3 tests under C locale, to expose more unicode
    errors.
  * auto.py: Fix *.ui detection to be robust for non-ASCII files.
    (LP: #1017468)

  [ Didier Roche ]
  * auto.py: Fix a regression with python2 if files have some utf-8 directives
    (LP: #1021969)

python-distutils-extra (2.33-0ubuntu0.1) precise-proposed; urgency=low

  * Backport 2.33-1 to precise as an SRU (LP: #1020017):
    - auto.py: Fix crash when encountering binary files with Python 3.
      (LP: #995653)
    - auto.py: Fix crash when encountering an UTF-8 Python source code file.
    - debian/local/python-mkdebian cleanups: (LP: #706051)
      - Don't use {XS, XB}-Python-Version.
      - Generate an up to date Standards-Version.
      - Generate build dep on debhelper (>= 8) as debian/compat is set to '8'
        and debhelper overrides are used.
      - No need to generate a build dep on cdbs.
    - debian/local/python-mkdebian: For projects using --prefix, install
      binaries into a .../bin/ subdirectory instead of into the main project
      directory. This avoids potential name collisions with local Python
      modules. Thanks to Michael Terry for the patch!
    - debian/local/python-mkdebian: Create copyright format 1.0 compatible
      copyright files. Thanks Andrew Starr-Bochicchio! (LP: #1002379)
    - debian/copyright: Update to copyright 1.0 format.
    - debian/control: Bump Standards-Version to 3.9.3.
    - python-mkdebian: Fix wrong kde4 ui file detection regular expression.
      Thanks Angelo Compagnucci! (LP: #1002076)

python-distutils-extra (2.33-1) unstable; urgency=low

  * auto.py: Fix crash when encountering binary files with Python 3.
    (LP: #995653)
  * auto.py: Fix crash when encountering an UTF-8 Python source code file.

python-distutils-extra (2.32-5) unstable; urgency=low

  [ Andrew Starr-Bochicchio ]
  * debian/local/python-mkdebian cleanups: (LP: #706051)
    - Don't use {XS, XB}-Python-Version.
    - Generate an up to date Standards-Version.
    - Generate build dep on debhelper (>= 8) as debian/compat is set to '8'
      and debhelper overrides are used.
    - No need to generate a build dep on cdbs.

  [ Martin Pitt ]
  * debian/local/python-mkdebian: For projects using --prefix, install
    binaries into a .../bin/ subdirectory instead of into the main project
    directory. This avoids potential name collisions with local Python
    modules. Thanks to Michael Terry for the patch!

python-distutils-extra (2.32-4) unstable; urgency=low

  * debian/local/python-mkdebian: Create copyright format 1.0 compatible
    copyright fi...

Read more...

Changed in python-distutils-extra (Ubuntu Precise):
status: Fix Committed → Fix Released
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.