#1139534 traittypes: FTBFS: E traitlets.traitlets.TraitError: Passing a Dataset as `data_vars` to the Dataset constructor is not supported. Use `ds.copy()` to create a copy of a Dataset.

#1139534#5
Date:
2026-06-09 10:30:25 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/202606/

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:traittypes, so that this is still
visible in the BTS web page for this package.

Thanks.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: BSD License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
  self._finalize_license_expression()
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.14' does not exist -- can't clean it
I: pybuild base:385: python3.13 setup.py clean
/usr/lib/python3/dist-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: BSD License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
  self._finalize_license_expression()
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.13' does not exist -- can't clean it
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:385: python3.14 setup.py config
/usr/lib/python3/dist-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: BSD License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
  self._finalize_license_expression()
I: pybuild base:385: python3.13 setup.py config
/usr/lib/python3/dist-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: BSD License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
  self._finalize_license_expression()
   dh_auto_build -O--buildsystem=pybuild
I: pybuild base:385: /usr/bin/python3.14 setup.py build
/usr/lib/python3/dist-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: BSD License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
  self._finalize_license_expression()
I: pybuild base:385: /usr/bin/python3 setup.py build
/usr/lib/python3/dist-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: BSD License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
  self._finalize_license_expression()
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:385: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_traittypes/build; python3.14 -m pytest
============================= test session starts ==============================
platform linux -- Python 3.14.5, pytest-9.0.3, pluggy-1.6.0
rootdir: /<<PKGBUILDDIR>>
plugins: typeguard-4.4.4
collected 26 items

traittypes/tests/test_import_errors.py .                                 [  3%]
traittypes/tests/test_traittypes.py ....................F..              [ 92%]
traittypes/tests/test_validators.py ..                                   [100%]

=================================== FAILURES ===================================
/usr/lib/python3/dist-packages/traitlets/traitlets.py:632: KeyError

During handling of the above exception, another exception occurred:

self = <traittypes.traittypes.Dataset object at 0x7f243ac5b5c0>
obj = <traittypes.tests.test_traittypes.TestDataset.test_initial_values.<locals>.Foo object at 0x7f243ac827b0>
value = <xarray.Dataset> Size: 0B
Dimensions:  ()
Data variables:
    *empty*

    def validate(self, obj, value):
        if value is None and not self.allow_none:
            self.error(obj, value)
        if value is None or value is Undefined:
            return super(XarrayType, self).validate(obj, value)
        try:
                    ^^^^^^^^^^^^^^^^^

traittypes/traittypes.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <[RecursionError('maximum recursion depth exceeded') raised in repr()] Dataset object at 0x7f243ab63150>
data_vars = <xarray.Dataset> Size: 0B
Dimensions:  ()
Data variables:
    *empty*
coords = None, attrs = None

    def __init__(
        self,
        # could make a VariableArgs to use more generally, and refine these
        # categories
        data_vars: DataVars | None = None,
        coords: Mapping[Any, Any] | None = None,
        attrs: Mapping[Any, Any] | None = None,
    ) -> None:
        if data_vars is None:
            data_vars = {}
        if isinstance(data_vars, Dataset):
/usr/lib/python3/dist-packages/xarray/core/dataset.py:389: TypeError

During handling of the above exception, another exception occurred:

self = <traittypes.tests.test_traittypes.TestDataset testMethod=test_initial_values>

    def test_initial_values(self):
        class Foo(HasTraits):
            a = Dataset()
            b = Dataset(None, allow_none=True)
            d = Dataset(Undefined)
        foo = Foo()
                        ^^^^^

traittypes/tests/test_traittypes.py:206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/traitlets/traitlets.py:687: in __get__
    return t.cast(G, self.get(obj, cls))  # the G should encode the Optional
                     ^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/traitlets/traitlets.py:649: in get
    value = self._validate(obj, default)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/traitlets/traitlets.py:722: in _validate
    value = self.validate(obj, value)
            ^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <traittypes.traittypes.Dataset object at 0x7f243ac5b5c0>
obj = <traittypes.tests.test_traittypes.TestDataset.test_initial_values.<locals>.Foo object at 0x7f243ac827b0>
value = <xarray.Dataset> Size: 0B
Dimensions:  ()
Data variables:
    *empty*

    def validate(self, obj, value):
        if value is None and not self.allow_none:
            self.error(obj, value)
        if value is None or value is Undefined:
            return super(XarrayType, self).validate(obj, value)
        try:
            value = self.klass(value)
        except (ValueError, TypeError) as e:
traittypes/traittypes.py:224: TraitError
=============================== warnings summary ===============================
../../../../../../usr/lib/python3/dist-packages/traitlets/__init__.py:28
  /usr/lib/python3/dist-packages/traitlets/__init__.py:28: DeprecationWarning:
              Sentinel is not a public part of the traitlets API.
              It was published by mistake, and may be removed in the future.

    warn(

.pybuild/cpython3_3.14_traittypes/build/traittypes/tests/test_traittypes.py::TestArray::test_initial_values
.pybuild/cpython3_3.14_traittypes/build/traittypes/tests/test_traittypes.py::TestDataFrame::test_initial_values
.pybuild/cpython3_3.14_traittypes/build/traittypes/tests/test_traittypes.py::TestSeries::test_initial_values
.pybuild/cpython3_3.14_traittypes/build/traittypes/tests/test_traittypes.py::TestDataArray::test_initial_values
  /usr/lib/python3/dist-packages/traitlets/traitlets.py:637: DeprecationWarning: Explicit using of Undefined as the default value is deprecated in traitlets 5.0, and may cause exceptions in the future.
    warn(

.pybuild/cpython3_3.14_traittypes/build/traittypes/tests/test_traittypes.py::TestDataFrame::test_allow_none
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_traittypes/build/traittypes/traittypes.py:188: DeprecationWarning: metadata {'dtype': None} was set from the constructor. With traitlets 4.1, metadata should be set using the .tag() method, e.g., Int().tag(key1='value1', key2='value2')
    super(DataFrame, self).__init__(
/usr/lib/python3/dist-packages/traitlets/traitlets.py:632: KeyError

During handling of the above exception, another exception occurred:

self = <traittypes.traittypes.Dataset object at 0x7f8eddb196e0>
obj = <traittypes.tests.test_traittypes.TestDataset.test_initial_values.<locals>.Foo object at 0x7f8eddb78830>
value = <xarray.Dataset> Size: 0B
Dimensions:  ()
Data variables:
    *empty*

    def validate(self, obj, value):
        if value is None and not self.allow_none:
            self.error(obj, value)
        if value is None or value is Undefined:
            return super(XarrayType, self).validate(obj, value)
        try:
                    ^^^^^^^^^^^^^^^^^

traittypes/traittypes.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <[RecursionError('maximum recursion depth exceeded') raised in repr()] Dataset object at 0x7f8eddb6f8d0>
data_vars = <xarray.Dataset> Size: 0B
Dimensions:  ()
Data variables:
    *empty*
coords = None, attrs = None

    def __init__(
        self,
        # could make a VariableArgs to use more generally, and refine these
        # categories
        data_vars: DataVars | None = None,
        coords: Mapping[Any, Any] | None = None,
        attrs: Mapping[Any, Any] | None = None,
    ) -> None:
        if data_vars is None:
            data_vars = {}
        if isinstance(data_vars, Dataset):
/usr/lib/python3/dist-packages/xarray/core/dataset.py:389: TypeError

During handling of the above exception, another exception occurred:

self = <traittypes.tests.test_traittypes.TestDataset testMethod=test_initial_values>

    def test_initial_values(self):
        class Foo(HasTraits):
            a = Dataset()
            b = Dataset(None, allow_none=True)
            d = Dataset(Undefined)
        foo = Foo()
                        ^^^^^

traittypes/tests/test_traittypes.py:206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/traitlets/traitlets.py:687: in __get__
    return t.cast(G, self.get(obj, cls))  # the G should encode the Optional
                     ^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/traitlets/traitlets.py:649: in get
    value = self._validate(obj, default)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/traitlets/traitlets.py:722: in _validate
    value = self.validate(obj, value)
            ^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <traittypes.traittypes.Dataset object at 0x7f8eddb196e0>
obj = <traittypes.tests.test_traittypes.TestDataset.test_initial_values.<locals>.Foo object at 0x7f8eddb78830>
value = <xarray.Dataset> Size: 0B
Dimensions:  ()
Data variables:
    *empty*

    def validate(self, obj, value):
        if value is None and not self.allow_none:
            self.error(obj, value)
        if value is None or value is Undefined:
            return super(XarrayType, self).validate(obj, value)
        try:
            value = self.klass(value)
        except (ValueError, TypeError) as e:
traittypes/traittypes.py:224: TraitError
=============================== warnings summary ===============================
../../../../../../usr/lib/python3/dist-packages/traitlets/__init__.py:28
  /usr/lib/python3/dist-packages/traitlets/__init__.py:28: DeprecationWarning:
              Sentinel is not a public part of the traitlets API.
              It was published by mistake, and may be removed in the future.

    warn(

.pybuild/cpython3_3.13_traittypes/build/traittypes/tests/test_traittypes.py::TestArray::test_initial_values
.pybuild/cpython3_3.13_traittypes/build/traittypes/tests/test_traittypes.py::TestDataFrame::test_initial_values
.pybuild/cpython3_3.13_traittypes/build/traittypes/tests/test_traittypes.py::TestSeries::test_initial_values
.pybuild/cpython3_3.13_traittypes/build/traittypes/tests/test_traittypes.py::TestDataArray::test_initial_values
  /usr/lib/python3/dist-packages/traitlets/traitlets.py:637: DeprecationWarning: Explicit using of Undefined as the default value is deprecated in traitlets 5.0, and may cause exceptions in the future.
    warn(

.pybuild/cpython3_3.13_traittypes/build/traittypes/tests/test_traittypes.py::TestDataFrame::test_allow_none
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_traittypes/build/traittypes/traittypes.py:188: DeprecationWarning: metadata {'dtype': None} was set from the constructor. With traitlets 4.1, metadata should be set using the .tag() method, e.g., Int().tag(key1='value1', key2='value2')
    super(DataFrame, self).__init__(

#1139534#10
Date:
2026-08-01 16:19:00 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
traittypes, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1139534@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Roland Mas <lolando@debian.org> (supplier of updated traittypes package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 01 Aug 2026 18:08:01 +0200
Source: traittypes
Architecture: source
Version: 0.2.3-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Changed-By: Roland Mas <lolando@debian.org>
Closes: 1139534
Changes:
 traittypes (0.2.3-1) unstable; urgency=medium
 .
   * New upstream release.
   * Drop patches, merged upstream.
   * Fix TraitError exception in testsuite to fix FTBFS, thanks to Santiago
     Vila (Closes: #1139534).
   * Disable one failing test (already reported upstream).
Checksums-Sha1:
 2902f7dcd91d3db54d40190b1f65246a7ee76188 2069 traittypes_0.2.3-1.dsc
 5cb37d9c6401a048d8733fba364bbfa1032dffbb 16003 traittypes_0.2.3.orig.tar.gz
 0e486c6e9236d8ae0b4bf22cf66bc7e2725ad737 3044 traittypes_0.2.3-1.debian.tar.xz
 0703e34cc220b5ec366ca82f2479e462e9dc4f1c 7086 traittypes_0.2.3-1_amd64.buildinfo
Checksums-Sha256:
 e7324c591a8cce15894f9a23d63a0151c0269c6f6e337fc0d2ff7699767434d4 2069 traittypes_0.2.3-1.dsc
 212feed38d566d772648768b78d3347c148ef23915b91c02078188e631316c86 16003 traittypes_0.2.3.orig.tar.gz
 10e0438d9dd36fd33d31a3d4eb172530d002f0fc58e33826ffdc87f2343f46b5 3044 traittypes_0.2.3-1.debian.tar.xz
 622187cb52fb656b69340db307ef5ede0e42f1b53d79a4e17938cc89b1599085 7086 traittypes_0.2.3-1_amd64.buildinfo
Files:
 d80e493c97d5acc1282b80ada773fb73 2069 python optional traittypes_0.2.3-1.dsc
 ec1388fa5d0c383bce1c96e781aaab72 16003 python optional traittypes_0.2.3.orig.tar.gz
 57ae2165633b2d3355b1a1458c9e2293 3044 python optional traittypes_0.2.3-1.debian.tar.xz
 2e4c78a701296664dc87c1d9c151b30f 7086 python optional traittypes_0.2.3-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEtBU2D1kett1zr/uD0w3s0lmTIvwFAmpuGj4ACgkQ0w3s0lmT
IvzPlg/8D4jb2awNjlvTorCa+7I+zMhXoGXyUIu7KtAhj8/ELEHzqaQ1GyFWC0tv
esHJH0Nu2k+Mv5LXato1BGSU7m3S3sC9/xkxZxbeaPFtnzhViJXNlUG7pzm7RnJy
9pk/UZjaz7OUxuewFZybmRj/bwx5c41nS8vd+V6qUrj41fKRkx/1yCHLD138CjQY
0y+Y8w4xZxWgnYQzEsL/ng/8D75xDbt92yXzrNm6LFjuXrU+DCBwnEgvr09m7gfj
1i4R6JjDl74P4QXVqwmbi7r6M4Dyt3TNM6qxYAMmjaDhbe3vVi3D2gXphq9in3Xq
vDDjazaI1c3yfWR4694+D+Y0+f9Ni8K3Z6Gc20Vxhbejw24gsoUHG45k4R3XASzi
GhdGy+I5QlZc9oN/aDp9e0ih7ewv7yOq4gSMWpiZgNG9hLLiQ7Lw/+0wUlIhfh14
kV15gDne+M0M9XdmcZLPnfJsIW+IXvfY9+z1ji1oVQ+D0DQ8vd+ZXw/z8MgUq8bU
KOVa5nTJgrL7ctMQHuDl7SV56oTWYO9KMI01P7e5Vw1FYheYHsPdga77Vj9Fbhmw
W5t1NGmwR6mHm37QqiahYNGm/kIXeyWMfnyq1nYk3wuz/q565N+chrjYeCt6IznY
1+XwwaLEDYR6I0/rpiCUBEmppSPzjdcA9KY69GUlP2uiFbRPk9k=
=tczk
-----END PGP SIGNATURE-----