#1214 closed defect (fixed)

test_argv_to_unicode is red on my Mac OS 10.4

Reported by: zooko Owned by: zooko
Priority: major Milestone: 1.8.1
Component: code-frontend-cli Version: 1.8.0
Keywords: unicode review-needed Cc:
Launchpad Bug:

Description

HACK Wonwin-McBrootles-Computer:~/playground/tahoe-lafs/trunk$ cmd.sh PYTHONPATH=support/lib/python2.5/site-packages/ trial --until-failure allmydata.test.test_encodingutil.EncodingUtilErrors.test_argv_to_unicode
Test Pass 1
allmydata.test.test_encodingutil
  EncodingUtilErrors
    test_argv_to_unicode ...                                             [FAIL]

===============================================================================
[FAIL]: allmydata.test.test_encodingutil.EncodingUtilErrors.test_argv_to_unicode

Traceback (most recent call last):
  File "/Users/wonwinmcbrootles/playground/tahoe-lafs/trunk/src/allmydata/test/test_encodingutil.py", line 125, in test_argv_to_unicode
    lumiere_nfc.encode('latin1'))
twisted.trial.unittest.FailTest: UsageError not raised (u'lumi\xcbre' returned)
-------------------------------------------------------------------------------
Ran 1 tests in 0.148s

FAILED (failures=1)

real    0m14.255s
user    0m0.837s
sys     0m1.060s
HACK Wonwin-McBrootles-Computer:~/playground/tahoe-lafs/trunk$ PYTHONPATH=support/lib/python2.5/site-packages/ ./support/bin/tahoe --version
allmydata-tahoe: 1.8.0-r4745, foolscap: 0.5.1, pycryptopp: 0.5.25, zfec: 1.4.5, Twisted: 10.0.0, Nevow: 0.10.0, zope.interface: 3.1.0c1, python: 2.5.4, platform: Darwin-8.11.1-i386-32bit, sqlite: 3.1.3, simplejson: 2.1.1, argparse: 0.8.0, pycrypto: 2.0.1, pyOpenSSL: 0.9, pyutil: 1.7.6, zbase32: 1.1.0, setuptools: 0.6c16dev2, pyasn1: 0.0.11a, pysqlite: 2.3.2
HACK Wonwin-McBrootles-Computer:~/playground/tahoe-lafs/trunk$ cmd.sh python misc/build_helpers/show-tool-versions.py

Got exception invoking 'cl'. Exception follows.
Traceback (most recent call last):
  File "misc/build_helpers/show-tool-versions.py", line 41, in print_stdout
    stdout=subprocess.PIPE).communicate()[0]
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/subprocess.py", line 594, in __init__
    errread, errwrite)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/subprocess.py", line 1097, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Got exception invoking 'cryptest'. Exception follows.
Traceback (most recent call last):
  File "misc/build_helpers/show-tool-versions.py", line 41, in print_stdout
    stdout=subprocess.PIPE).communicate()[0]
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/subprocess.py", line 594, in __init__
    errread, errwrite)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/subprocess.py", line 1097, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

pkg_resources reported no setuptools_trial package installed. Exception follows.
Traceback (most recent call last):
  File "misc/build_helpers/show-tool-versions.py", line 98, in print_py_pkg_ver
    out = str(pkg_resources.require(pkgname))
  File "/Users/wonwinmcbrootles/playground/tahoe-lafs/trunk/pristine/setuptools-0.6c15dev.egg/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Users/wonwinmcbrootles/playground/tahoe-lafs/trunk/pristine/setuptools-0.6c15dev.egg/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
DistributionNotFound: setuptools-trial

pkg_resources reported no setuptools_darcs package installed. Exception follows.
Traceback (most recent call last):
  File "misc/build_helpers/show-tool-versions.py", line 98, in print_py_pkg_ver
    out = str(pkg_resources.require(pkgname))
  File "/Users/wonwinmcbrootles/playground/tahoe-lafs/trunk/pristine/setuptools-0.6c15dev.egg/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Users/wonwinmcbrootles/playground/tahoe-lafs/trunk/pristine/setuptools-0.6c15dev.egg/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
DistributionNotFound: setuptools-darcs

pkg_resources reported no darcsver package installed. Exception follows.
Traceback (most recent call last):
  File "misc/build_helpers/show-tool-versions.py", line 98, in print_py_pkg_ver
    out = str(pkg_resources.require(pkgname))
  File "/Users/wonwinmcbrootles/playground/tahoe-lafs/trunk/pristine/setuptools-0.6c15dev.egg/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Users/wonwinmcbrootles/playground/tahoe-lafs/trunk/pristine/setuptools-0.6c15dev.egg/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
DistributionNotFound: darcsver

platform: Darwin-8.11.1-i386-32bit

python: 2.5.4 (release25-maint:72153M, Apr 30 2009, 12:28:20)  [GCC 4.0.1 (Apple Computer, Inc. build 5367)]
maxunicode: 65535

locale: LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_ALL="en_US.UTF-8" 

sys.stdout.encoding: None 

sys.stderr.encoding: None 

filesystem.encoding: utf-8
locale.getpreferredencoding: mac-roman
os.path.supports_unicode_filenames: False
locale.defaultlocale: (None, 'mac-roman')
locale.locale: (None, None)

buildbot: Buildbot version: 0.7.10p1 Twisted version: 10.0.0 


gcc: i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is 
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  

g++: i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is 
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  


darcs: 2.4.4 (unknown) 

darcs-exact-version: darcs compiled on Jul 18 2010, at 14:28:54 context not available Compiled with:  HTTP-4000.0.8 array-0.2.0.0 base-3.0.3.1 bytestring-0.9.1.4 containers-0.2.0.1 directory-1.0.0.3 ext
ensible-exceptions-0.1.1.0 filepath-1.1.0.2 hashed-storage-0.5 haskeline-0.6.2.2 html-1.0.1.2 mmap-0.5.6 mtl-1.1.0.2 network-2.2.1.5 old-time-1.0.0.2 parsec-2.1.0.1 process-1.0.1.1 random-1.0.0.1 regex-
compat-0.92 tar-0.3.1.0 terminfo-0.3.1.1 text-0.7.0.1 unix-2.3.2.0 zlib-0.5.2.0 

7za:  7-Zip (A) 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30 p7zip Version 9.04 (locale=utf8,Utf16=on,HugeFiles=on,2 CPUs)  Usage: 7za <command> [<switches>...] <archive_name> [<file_names
>...]        [<@listfiles...>]  <Commands>   a: Add files to archive   b: Benchmark   d: Delete files from archive   e: Extract files from archive (without using directory names)   l: List contents of a
rchive   t: Test integrity of archive   u: Update files to archive   x: eXtract files with full paths <Switches>   -ai[r[-|0]]{@listfile|!wildcard}: Include archives   -ax[r[-|0]]{@listfile|!wildcard}: 
eXclude archives   -bd: Disable percentage indicator   -i[r[-|0]]{@listfile|!wildcard}: Include filenames   -m{Parameters}: set compression Method (see the manual)   -l: don't store symlinks; store the 
files/directories they point to   CAUTION : the scanning stage can never end because of symlinks like '..'             (ex:  ln -s .. ldir)   -o{Directory}: set Output directory   -p{Password}: set Pass
word   -r[-|0]: Recurse subdirectories   (CAUTION: this flag does not do what you think, avoid using it)   -sfx[{name}]: Create SFX archive   -si[{name}]: read data from stdin   -slt: show technical inf
ormation for l (List) command   -so: write data to stdout (eg: 7z a dummy -tgzip -so Doc.txt > archive.gz)   -ssc[-]: set sensitive case mode   -t{Type}: Set type of archive   -u[-][p#][q#][r#][x#][y#][
z#][!newArchiveName]: Update options   -v{Size}[b|k|m|g]: Create volumes   -w[{path}]: assign Work directory. Empty path means a temporary directory   -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
   -y: assume Yes on all queries 

flappclient: Foolscap version: 0.5.1 Twisted version: 10.0.0 

as:  Apple Computer, Inc. version cctools-622.5.obj~13, GNU assembler version 1.38 

setuptools: [setuptools 0.6c15dev (/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c15dev.egg)]

coverage: [coverage 3.3.2a1 (/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/coverage-3.3.2a1-py2.5-macosx-10.3-i386.egg)]

trialcoverage: [trialcoverage 0.3.11 (/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/trialcoverage-0.3.11-py2.5.egg), setuptools 0.6c15dev (/Library/Frameworks/Python.fram
ework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c15dev.egg), pyutil 1.7.6 (/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyutil-1.7.6-py2.5.egg), coverage 3.
3.2a1 (/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/coverage-3.3.2a1-py2.5-macosx-10.3-i386.egg), simplejson 2.1.1 (/Library/Frameworks/Python.framework/Versions/2.5/lib
/python2.5/site-packages/simplejson-2.1.1-py2.5-macosx-10.3-i386.egg), zbase32 1.1.0 (/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/zbase32-1.1.0-py2.5.egg), argparse 0.8
.0 (/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/argparse-0.8.0-py2.5.egg)]


pyflakes: [pyflakes 0.3.0 (/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyflakes-0.3.0-py2.5.egg)]

zope.interface: [zope.interface 3.1.0c1 (/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages)]


Attachments (1)

wrong-encoding-variable.darcs.patch (3.9 KB) - added by davidsarah at 2010-10-23T04:21:43Z.
test_encodingutil.py: test_argv_to_unicode modified the wrong encoding variable.

Download all attachments as: .zip

Change History (9)

Changed at 2010-10-23T04:21:43Z by davidsarah

test_encodingutil.py: test_argv_to_unicode modified the wrong encoding variable.

comment:1 Changed at 2010-10-23T04:22:20Z by davidsarah

  • Keywords review-needed added
  • Milestone changed from eventually to 1.8.1
  • Owner set to zooko

comment:2 Changed at 2010-10-26T01:31:34Z by david-sarah@…

  • Resolution set to fixed
  • Status changed from new to closed

In daf2b8314aff8ef7:

test_encodingutil.py: test_argv_to_unicode modified the wrong encoding variable. fixes #1214

comment:3 Changed at 2010-10-26T01:44:35Z by davidsarah

I committed this because it was a low-risk change to a test, but it still needs confirmation that it fixes the problem on zooko's machine.

comment:4 Changed at 2010-10-26T02:32:24Z by zooko

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed at 2010-10-26T04:42:58Z by zooko

  • Status changed from reopened to new

comment:6 Changed at 2010-10-26T11:42:53Z by zooko

  • Status changed from new to assigned

comment:7 Changed at 2010-10-27T00:15:21Z by davidsarah

Incidentally, the explanation for the test failing on this machine is that its locale encoding (and hence argv_encoding) is 'mac-roman'. The test intended to alter the argv_encoding to UTF-8 but failed to do so (it altered the output_encoding instead).

python -c "print repr(u'lumi\u00E8re'.encode('latin1').decode('mac-roman'))" gives the observed u'lumi\xcbre'.

comment:8 Changed at 2010-10-28T05:26:22Z by zooko

  • Resolution set to fixed
  • Status changed from assigned to closed

Confirmed that this one patch fixed it on my Mac OS 10.4 system.

Note: See TracTickets for help on using tickets.