localhost pyudev # ebuild pyudev-0.14.ebuild clean test >>> Source compiled. >>> Test phase [none]: dev-python/pyudev-0.14 localhost pyudev # ebuild pyudev-0.14.ebuild merge * Compilation and optimization of Python modules for CPython 2.7 ... [ ok ] * Compilation and optimization of Python modules for CPython 3.1 ... [ ok ] >>> dev-python/pyudev-0.14 merged. good to go
Created attachment 305453 [details, diff] files/pyudev-unicode.patch gentoo64 pyudev # USE_PYTHON="3.1 3.2" ebuild pyudev-0.15.ebuild clean test ============= 581 passed, 145 skipped, 16 xfailed in 4.13 seconds ============== 16 xfailed it seems are not fatal failures but some type of hybrid. -------------------------------------------------------------------------------- gentoo64 pyudev # USE_PYTHON="2.7 3.1 3.2" ebuild pyudev-0.15.ebuild clean test =================================== FAILURES =================================== _____________ TestTags.test_contains[/devices/virtual/sound/timer] _____________ self = <test_device.TestTags object at 0x1894e50> device = Device(u'/sys/devices/virtual/sound/timer'), tags = [u'udev-acl'] Testing failed with CPython 2.7 in python_test_function() function The ebuild presents with #DISTUTILS_SRC_TEST="py.test" # FIXME: some tests are known to fail So I opened up the test suite and spent an 'extended' period trying it out. This failure above results from (u'/sys/devices/virtual/sound/timer'), the key being unicode. Initially there were 2 other tests that failed also featuring reading unicode. Apparently the root of this comes from the distutils module in Cpython itself. This is where it gets interesting, or confounding. http://bugs.python.org/issue9561 lists a couple of complete patches to Python3.2. I have in fact patched my Pythons 3.1 && 3.2, resulting in the success of the first listed run. {USE_PYTHON="3.1 3.2"} The status for python2 is for me at this point confusing. "..I prefer to leave distutils unchanged in Python 2.7 (at least for PKG-INFO)." "It would be possible to use codecs.open(), but an Unicode file expects Unicode strings......." "I forgot that. No change is needed in 2.7." Well I beg to differ. I attempted to patch python2.7 for hours and it picked up some bad syntax and aborted mid way thru install. I could not patch python2.7 and it fails this test above which the patched python3s now succeed. If it can be patched, it need be written to python2 format reqs. There are at least three other bugs (1 recorded as a duplicate) that demo this unicode shortcoming. There is little point in preparing a patch that assumes the python3 versions are patched, putting it out of step with gx86. I have included a patch that does take out two other tests, captured in 1 def, which appear to fail only because they are found listed then not found listed; essentially an unhelpful test that contributes nothing but for a point at which to trip up.
dev-python/pyudev-0.15 already in portage. @Ian: please open an own bug for this. thanks!