pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: py-lxml-3.5.0 and utf-8 paths
On Sat, Jan 02, 2016 at 10:02:42AM +0100, Richard Palo wrote:
> I'm curious if any other platforms (or all) experience issues on utf-8 filesystems (sys.getfilesystemencoding() == 'utf-8')
> > ======================================================================
> > ERROR: test_etree_parse_io_error (lxml.tests.test_io.ETreeIOTestCase)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/opt/local/lib/python2.7/unittest/case.py", line 329, in run
> > testMethod()
> > File "/tmp/pkgsrc/textproc/py-lxml/work/lxml-3.5.0/src/lxml/tests/test_io.py", line 276, in test_etree_parse_io_error
> > dn = tempfile.mkdtemp(prefix=dirnameRU)
> > File "/opt/local/lib/python2.7/tempfile.py", line 339, in mkdtemp
> > _os.mkdir(file, 0700)
> > UnicodeEncodeError: 'ascii' codec can't encode characters in position 40-53: ordinal not in range(128)
> >
>
> I attach a workaround that seems to work for my platform (SunOS) but am concerned about whether this
> is something that needs to be adressed in Python.. notably for tempfile and any other path/filename manipulations.
>
> I don't believe that the setting of LANG=C in ALL_ENV is the culprit, as I tried forcing to a UTF-8 locale for
> running the test suite in $WRKSRC/Makefile to no avail.
>
> Although the issue came up with python27, it persists with python35...
>
> Can anybody run successfully the testsuite without the attached patchset, and under what platforms/conditions?
Two of py-lxml's tests fail for me in pkgsrc with 'make test' because
of LANG=C in ALL_ENV. I've filed an upstream bug report about this:
https://bugs.launchpad.net/lxml/+bug/1522052
When using python-3.x, setting LANG to an environment that does
support UTF-8, and running the tests manually (to avoid the ALL_ENV
from above) they work for me.
Thomas
Home |
Main Index |
Thread Index |
Old Index