#1151827 python-sepaxml: FTBFS: E ImportError: cannot import name 'etree' from 'lxml' (/usr/lib/python3/dist-packages/lxml/__init__.py)

#1151827#5
Date:
2026-10-23 16:44:56 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202610/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:python-sepaxml, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/transfer/test_timestamps.py:9: in <module>
    from tests.utils import validate_xml
tests/utils.py:4: in <module>
    from lxml import etree
E   ImportError: cannot import name 'etree' from 'lxml' (/usr/lib/python3/dist-packages/lxml/__init__.py)
=========================== short test summary info ============================
ERROR tests/debit/test_00800102.py
ERROR tests/debit/test_00800108.py
ERROR tests/debit/test_00800109.py
ERROR tests/debit/test_00800110.py
ERROR tests/debit/test_currency_override.py
ERROR tests/debit/test_endtoendid.py
ERROR tests/debit/test_escaped.py
ERROR tests/debit/test_no_bic.py
ERROR tests/debit/test_non_batch.py
ERROR tests/debit/test_timestamps.py
ERROR tests/transfer/test_00100103.py
ERROR tests/transfer/test_00100109.py
ERROR tests/transfer/test_00100110.py
ERROR tests/transfer/test_00100111.py
ERROR tests/transfer/test_currency_override.py
ERROR tests/transfer/test_domestic.py
ERROR tests/transfer/test_endtoendid.py
ERROR tests/transfer/test_no_bic.py
ERROR tests/transfer/test_non_batch.py
ERROR tests/transfer/test_timestamps.py
!!!!!!!!!!!!!!!!!!! Interrupted: 20 errors during collection !!!!!!!!!!!!!!!!!!!
============================== 20 errors in 0.16s ==============================
E: pybuild pybuild:485: test: plugin distutils failed with: exit code=2: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.15_python-sepaxml/build; python3.15 -m pytest --ignore tests/debit/test_00800302.py
I: pybuild base:383: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_python-sepaxml/build; python3.14 -m pytest --ignore tests/debit/test_00800302.py
============================= test session starts ==============================
platform linux -- Python 3.14.8, pytest-9.1.1, pluggy-1.6.0
rootdir: /<<PKGBUILDDIR>>
collected 25 items

tests/debit/test_00800102.py .                                           [  4%]
tests/debit/test_00800108.py .                                           [  8%]
tests/debit/test_00800109.py .                                           [ 12%]
tests/debit/test_00800110.py .                                           [ 16%]
tests/debit/test_config.py ..                                            [ 24%]
tests/debit/test_currency_override.py .                                  [ 28%]
tests/debit/test_endtoendid.py .                                         [ 32%]
tests/debit/test_escaped.py .                                            [ 36%]
tests/debit/test_no_bic.py .                                             [ 40%]
tests/debit/test_non_batch.py .                                          [ 44%]
tests/debit/test_timestamps.py .                                         [ 48%]
tests/transfer/test_00100103.py .                                        [ 52%]
tests/transfer/test_00100109.py .                                        [ 56%]
tests/transfer/test_00100110.py .                                        [ 60%]
tests/transfer/test_00100111.py .                                        [ 64%]
tests/transfer/test_config.py ..                                         [ 72%]
tests/transfer/test_currency_override.py .                               [ 76%]
tests/transfer/test_domestic.py .                                        [ 80%]
tests/transfer/test_endtoendid.py .                                      [ 84%]
tests/transfer/test_no_bic.py .                                          [ 88%]
tests/transfer/test_non_batch.py ..                                      [ 96%]
tests/transfer/test_timestamps.py .                                      [100%]

=============================== warnings summary ===============================
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_00800102.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_00800108.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_00800109.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_00800110.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_currency_override.py: 1 warning
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_endtoendid.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_escaped.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_no_bic.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_timestamps.py: 2 warnings
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_python-sepaxml/build/sepaxml/debit.py:401: DeprecationWarning: Testing an element's truth value will always return True in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
    if TX_nodes['PstlAdr_Dbtr_Node']:

.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_00800102.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_00800108.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_00800109.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_00800110.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_currency_override.py: 1 warning
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_endtoendid.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_escaped.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_no_bic.py: 2 warnings
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_timestamps.py: 2 warnings
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_python-sepaxml/build/sepaxml/debit.py:491: DeprecationWarning: Testing an element's truth value will always return True in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
    if PmtInf_nodes['PstlAdr_Cdtr_Node']:

.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_non_batch.py::test_two_debits
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_non_batch.py::test_two_debits
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_python-sepaxml/build/sepaxml/debit.py:306: DeprecationWarning: Testing an element's truth value will always return True in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
    if PmtInf_nodes['PstlAdr_Cdtr_Node']:

.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_non_batch.py::test_two_debits
.pybuild/cpython3_3.14_python-sepaxml/build/tests/debit/test_non_batch.py::test_two_debits
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_python-sepaxml/build/sepaxml/debit.py:360: DeprecationWarning: Testing an element's truth value will always return True in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
    if TX_nodes['PstlAdr_Dbtr_Node']:

.pybuild/cpython3_3.14_python-sepaxml/build/tests/transfer/test_config.py::test_valid_config
  /usr/lib/python3/dist-packages/_pytest/python.py:171: PytestReturnNotNoneWarning: Test functions should return None, but .pybuild/cpython3_3.14_python-sepaxml/build/tests/transfer/test_config.py::test_valid_config returned <class 'sepaxml.transfer.SepaTransfer'>.
  Did you mean to use `assert` instead of `return`?
  See https://docs.pytest.org/en/stable/how-to/assert.html#return-not-none for more information.
    warnings.warn(

#1151827#10
Date:
2026-10-27 10:31:37 UTC
From:
To:
This was a temporary problem, fixed by rebuilding lxml against Python
3.15.  I've confirmed that python-sepaxml builds again now.

Thanks,