[Debian-l10n-devel] Bug#866551: translate-toolkit: ftbfs when multiple python 3 versions are supported

Michael Hudson-Doyle michael.hudson at ubuntu.com
Fri Jun 30 02:28:11 UTC 2017

Source: translate-toolkit
Version: 2.0.0-1
Severity: important
User: debian-python at lists.debian.org
Usertags: python3.6

Dear Maintainer,

The build fails in very strange ways when multiple Python 3 versions are
supported, e.g. if 3.5 is default and 3.6 is supported you get this when
running the Python 3.6 tests:

__________________________ test_open_office_to_xliff ___________________________

    @pytest.mark.skipif('TTKIT_SKIP_COMMANDS' in os.environ,
                        reason='Skip testing command line tools')
    def test_open_office_to_xliff():
>       assert call(['oo2xliff', 'en-US.sdf', '-l', 'fr', 'fr']) == 0
E       assert 1 == 0
E        +  where 1 = call(['oo2xliff', 'en-US.sdf', '-l', 'fr', 'fr'])

test_xliff_conformance.py:67: AssertionError
----------------------------- Captured stderr call -----------------------------
Failed to import the site module
Traceback (most recent call last):
  File "/usr/lib/python3.6/site.py", line 79, in <module>
    import os
  File "/usr/lib/python3.6/os.py", line 652, in <module>
    from _collections_abc import MutableMapping
  File "/usr/lib/python3.6/_collections_abc.py", line 64
    async def _ag(): yield
SyntaxError: 'yield' inside async function

What's happening here is that the oo2xliff binary has been built to use the
default Python 3 (3.5) but the way that test_xliff_conformance.py sets up the
environment means that oo2xliff tries to import site.py from _Python 3.6_. And
this doesn't work.

I poked a little at trying to fix this but didn't really get anywhere. Perhaps
the simple fix is just to support the default version of Python 3.


-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial'), (400, 'xenial-proposed'), (100, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-81-generic (SMP w/4 CPU cores)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

More information about the Debian-l10n-devel mailing list