[Zope-dev] Test fixture failure zope.interface under Python 3.1

Lennart Regebro regebro at gmail.com
Sun May 2 15:30:23 EDT 2010


On Sun, May 2, 2010 at 18:37, Jens Vagelpohl <jens at dataflake.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all (and especially Lennart),
>
> I need a quick sanity check. Trying to test a package of mine for Python
> 3 compatibility I built Python 3.1.2 and installed distribute into it.
> My package depends on zope.interface. I am executing...
>
>  $ python3.1 setup.py test
>
> It tries to install zope.interface, but fails with this traceback:
>
> Running zope.interface-3.6.0/setup.py -q bdist_egg --dist-dir
> /var/folders/ZD/ZDGPtbYeGkqB4K7rOkPK4U+++TI/-Tmp-/easy_install-8LJGXC/zope.interface-3.6.0/egg-dist-tmp-xVkH07
> Traceback (most recent call last):
>  File "setup.py", line 58, in <module>
> <snip>
>  File
> "/usr/local/lib/python3.1/site-packages/distribute-0.6.10-py3.1.egg/setuptools/sandbox.py",
> line 33, in <lambda>
>    {'__file__':setup_script, '__name__':'__main__'})
>  File "setup.py", line 80, in <module>
>
> That's not very informative at all. Trying to debug this further I
> download zope.interface 3.6.0 and attempt to run its tests using
> "setup.py test", which gives a little more information:
>
> Traceback (most recent call last):
>  File "setup.py", line 80, in <module>
>    + '\n' +
>  File "setup.py", line 65, in read
>    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
>  File "/usr/local/lib/python3.1/encodings/ascii.py", line 26, in decode
>    return codecs.ascii_decode(input, self.errors)[0]
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
> 290: ordinal not in range(128)
>
> The issue is a non-ASCII character in the Changelog:
>
> <snip>
> - - Added support for Python 3.1. Contributors:
>
>    Lennart Regebro
>    Martin v Löwis
>    Thomas Lotze
>    Wolfgang Schnerring
> </snip>
>
> Removing the "ö" I can run the tests and buildout. Question: Is this an
> issue with my particular sandbox? The Python 3.1 I use is a fresh build
> and I don't manipulate the default encoding anywhere.

Hmm, I do not get that issue, but maybe the default encoding is
different on different systems? What are you using?

I'll change that to Loewis in any case, having non-ascii test like
that is definitely a no-no. You would think that after 30 years of
these kinds of problems I would have learnt, but apparently not. :)

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64


More information about the Zope-Dev mailing list