Source: python-marshmallow-dataclass
Version: 8.5.8-2
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20220917 ftbfs-bookworm

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
>  debian/rules binary
> dh binary --with python3 --buildsystem=pybuild
>    dh_update_autotools_config -O--buildsystem=pybuild
>    dh_autoreconf -O--buildsystem=pybuild
>    dh_auto_configure -O--buildsystem=pybuild
>    dh_auto_build -O--buildsystem=pybuild
> I: pybuild plugin_pyproject:107: Building wheel for python3.10 with "build" 
> module
> I: pybuild base:240: python3.10 -m build --skip-dependency-check 
> --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10 
> running bdist_wheel
> running build
> running build_py
> creating build
> creating build/lib
> creating build/lib/marshmallow_dataclass
> copying marshmallow_dataclass/__init__.py -> build/lib/marshmallow_dataclass
> copying marshmallow_dataclass/typing.py -> build/lib/marshmallow_dataclass
> copying marshmallow_dataclass/lazy_class_attribute.py -> 
> build/lib/marshmallow_dataclass
> copying marshmallow_dataclass/union_field.py -> 
> build/lib/marshmallow_dataclass
> copying marshmallow_dataclass/mypy.py -> build/lib/marshmallow_dataclass
> copying marshmallow_dataclass/collection_field.py -> 
> build/lib/marshmallow_dataclass
> copying marshmallow_dataclass/py.typed -> build/lib/marshmallow_dataclass
> installing to build/bdist.linux-x86_64/wheel
> running install
> running install_lib
> creating build/bdist.linux-x86_64
> creating build/bdist.linux-x86_64/wheel
> creating build/bdist.linux-x86_64/wheel/marshmallow_dataclass
> copying build/lib/marshmallow_dataclass/__init__.py -> 
> build/bdist.linux-x86_64/wheel/marshmallow_dataclass
> copying build/lib/marshmallow_dataclass/py.typed -> 
> build/bdist.linux-x86_64/wheel/marshmallow_dataclass
> copying build/lib/marshmallow_dataclass/typing.py -> 
> build/bdist.linux-x86_64/wheel/marshmallow_dataclass
> copying build/lib/marshmallow_dataclass/lazy_class_attribute.py -> 
> build/bdist.linux-x86_64/wheel/marshmallow_dataclass
> copying build/lib/marshmallow_dataclass/union_field.py -> 
> build/bdist.linux-x86_64/wheel/marshmallow_dataclass
> copying build/lib/marshmallow_dataclass/mypy.py -> 
> build/bdist.linux-x86_64/wheel/marshmallow_dataclass
> copying build/lib/marshmallow_dataclass/collection_field.py -> 
> build/bdist.linux-x86_64/wheel/marshmallow_dataclass
> running install_egg_info
> running egg_info
> creating marshmallow_dataclass.egg-info
> writing marshmallow_dataclass.egg-info/PKG-INFO
> writing dependency_links to 
> marshmallow_dataclass.egg-info/dependency_links.txt
> writing requirements to marshmallow_dataclass.egg-info/requires.txt
> writing top-level names to marshmallow_dataclass.egg-info/top_level.txt
> writing manifest file 'marshmallow_dataclass.egg-info/SOURCES.txt'
> reading manifest file 'marshmallow_dataclass.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> adding license file 'LICENSE'
> writing manifest file 'marshmallow_dataclass.egg-info/SOURCES.txt'
> Copying marshmallow_dataclass.egg-info to 
> build/bdist.linux-x86_64/wheel/marshmallow_dataclass-8.5.8.egg-info
> running install_scripts
> adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
> creating 
> build/bdist.linux-x86_64/wheel/marshmallow_dataclass-8.5.8.dist-info/WHEEL
> creating 
> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/tmp8x7_jj7c/marshmallow_dataclass-8.5.8-py3-none-any.whl'
>  and adding 'build/bdist.linux-x86_64/wheel' to it
> adding 'marshmallow_dataclass/__init__.py'
> adding 'marshmallow_dataclass/collection_field.py'
> adding 'marshmallow_dataclass/lazy_class_attribute.py'
> adding 'marshmallow_dataclass/mypy.py'
> adding 'marshmallow_dataclass/py.typed'
> adding 'marshmallow_dataclass/typing.py'
> adding 'marshmallow_dataclass/union_field.py'
> adding 'marshmallow_dataclass-8.5.8.dist-info/LICENSE'
> adding 'marshmallow_dataclass-8.5.8.dist-info/METADATA'
> adding 'marshmallow_dataclass-8.5.8.dist-info/WHEEL'
> adding 'marshmallow_dataclass-8.5.8.dist-info/top_level.txt'
> adding 'marshmallow_dataclass-8.5.8.dist-info/RECORD'
> removing build/bdist.linux-x86_64/wheel
> * Building wheel...
> Successfully built marshmallow_dataclass-8.5.8-py3-none-any.whl
> I: pybuild plugin_pyproject:118: Unpacking wheel built for python3.10 with 
> "installer" module
>    dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:240: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build; 
> python3.10 -m pytest tests
> ============================= test session starts 
> ==============================
> platform linux -- Python 3.10.7, pytest-7.1.2, pluggy-1.0.0+repack
> rootdir: /<<PKGBUILDDIR>>, configfile: pyproject.toml
> collected 91 items
> 
> tests/test_attribute_copy.py ....                                        [  
> 4%]
> tests/test_city_building_examples.py ..                                  [  
> 6%]
> tests/test_class_schema.py .............F                                [ 
> 21%]
> tests/test_collection.py ....................                            [ 
> 43%]
> tests/test_field_for_schema.py .......................                   [ 
> 69%]
> tests/test_forward_references.py ..........                              [ 
> 80%]
> tests/test_optional.py ...                                               [ 
> 83%]
> tests/test_post_load.py ..                                               [ 
> 85%]
> tests/test_postdump.py ..                                                [ 
> 87%]
> tests/test_union.py ...........                                          
> [100%]
> 
> =================================== FAILURES 
> ===================================
> ___________________ TestClassSchema.test_validator_stacking 
> ____________________
> 
> class_or_instance = <function NewType.<locals>.new_type at 0x7ff08ddbba30>
> 
>     def fields(class_or_instance):
>         """Return a tuple describing the fields of this dataclass.
>     
>         Accepts a dataclass or an instance of one. Tuple elements are of
>         type Field.
>         """
>     
>         # Might it be worth caching this, per class?
>         try:
> >           fields = getattr(class_or_instance, _FIELDS)
> E           AttributeError: 'function' object has no attribute 
> '__dataclass_fields__'
> 
> /usr/lib/python3.10/dataclasses.py:1197: AttributeError
> 
> During handling of the above exception, another exception occurred:
> 
> clazz = <function NewType.<locals>.new_type at 0x7ff08ddbba30>
> base_schema = None
> clazz_frame = <frame at 0x560f10c2f210, file 
> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/tests/test_class_schema.py', 
> line 319, code test_validator_stacking>
> 
>     @lru_cache(maxsize=MAX_CLASS_SCHEMA_CACHE_SIZE)
>     def _internal_class_schema(
>         clazz: type,
>         base_schema: Optional[Type[marshmallow.Schema]] = None,
>         clazz_frame: types.FrameType = None,
>     ) -> Type[marshmallow.Schema]:
>         _RECURSION_GUARD.seen_classes[clazz] = clazz.__name__
>         try:
>             # noinspection PyDataclass
> >           fields: Tuple[dataclasses.Field, ...] = dataclasses.fields(clazz)
> 
> marshmallow_dataclass/__init__.py:370: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> class_or_instance = <function NewType.<locals>.new_type at 0x7ff08ddbba30>
> 
>     def fields(class_or_instance):
>         """Return a tuple describing the fields of this dataclass.
>     
>         Accepts a dataclass or an instance of one. Tuple elements are of
>         type Field.
>         """
>     
>         # Might it be worth caching this, per class?
>         try:
>             fields = getattr(class_or_instance, _FIELDS)
>         except AttributeError:
> >           raise TypeError('must be called with a dataclass type or 
> > instance')
> E           TypeError: must be called with a dataclass type or instance
> 
> /usr/lib/python3.10/dataclasses.py:1199: TypeError
> 
> During handling of the above exception, another exception occurred:
> 
> clazz = <function NewType.<locals>.new_type at 0x7ff08ddbba30>
> base_schema = None
> clazz_frame = <frame at 0x560f10c2f210, file 
> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/tests/test_class_schema.py', 
> line 319, code test_validator_stacking>
> 
>     @lru_cache(maxsize=MAX_CLASS_SCHEMA_CACHE_SIZE)
>     def _internal_class_schema(
>         clazz: type,
>         base_schema: Optional[Type[marshmallow.Schema]] = None,
>         clazz_frame: types.FrameType = None,
>     ) -> Type[marshmallow.Schema]:
>         _RECURSION_GUARD.seen_classes[clazz] = clazz.__name__
>         try:
>             # noinspection PyDataclass
>             fields: Tuple[dataclasses.Field, ...] = dataclasses.fields(clazz)
>         except TypeError:  # Not a dataclass
>             try:
> >               warnings.warn(
>                     "****** WARNING ****** "
>                     f"marshmallow_dataclass was called on the class {clazz}, 
> which is not a dataclass. "
>                     "It is going to try and convert the class into a 
> dataclass, which may have "
>                     "undesirable side effects. To avoid this message, make 
> sure all your classes and "
>                     "all the classes of their fields are either explicitly 
> supported by "
>                     "marshmallow_dataclass, or define the schema explicitly 
> using "
>                     "field(metadata=dict(marshmallow_field=...)). For more 
> information, see "
>                     
> "https://github.com/lovasoa/marshmallow_dataclass/issues/51 "
>                     "****** WARNING ******"
>                 )
> E               UserWarning: ****** WARNING ****** marshmallow_dataclass was 
> called on the class <function NewType.<locals>.new_type at 0x7ff08ddbba30>, 
> which is not a dataclass. It is going to try and convert the class into a 
> dataclass, which may have undesirable side effects. To avoid this message, 
> make sure all your classes and all the classes of their fields are either 
> explicitly supported by marshmallow_dataclass, or define the schema 
> explicitly using field(metadata=dict(marshmallow_field=...)). For more 
> information, see https://github.com/lovasoa/marshmallow_dataclass/issues/51 
> ****** WARNING ******
> 
> marshmallow_dataclass/__init__.py:373: UserWarning
> 
> During handling of the above exception, another exception occurred:
> 
> self = <tests.test_class_schema.TestClassSchema 
> testMethod=test_validator_stacking>
> 
>     def test_validator_stacking(self):
>         # See: https://github.com/lovasoa/marshmallow_dataclass/issues/91
>         class SimpleValidator(Validator):
>             # Marshmallow checks for valid validators at construction time 
> only using `callable`
>             def __call__(self):
>                 pass
>     
>         validator_a = SimpleValidator()
>         validator_b = SimpleValidator()
>         validator_c = SimpleValidator()
>         validator_d = SimpleValidator()
>     
>         CustomTypeOneValidator = NewType(
>             "CustomTypeOneValidator", str, validate=validator_a
>         )
>         CustomTypeNoneValidator = NewType("CustomTypeNoneValidator", str, 
> validate=None)
>         CustomTypeMultiValidator = NewType(
>             "CustomTypeNoneValidator", str, validate=[validator_a, 
> validator_b]
>         )
>     
>         @dataclasses.dataclass
>         class A:
>             data: CustomTypeNoneValidator = dataclasses.field()
>     
> >       schema_a = class_schema(A)()
> 
> tests/test_class_schema.py:319: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> marshmallow_dataclass/__init__.py:356: in class_schema
>     return _internal_class_schema(clazz, base_schema, clazz_frame)
> marshmallow_dataclass/__init__.py:402: in _internal_class_schema
>     attributes.update(
> marshmallow_dataclass/__init__.py:405: in <genexpr>
>     field_for_schema(
> marshmallow_dataclass/__init__.py:729: in field_for_schema
>     or _internal_class_schema(typ, base_schema, typ_frame)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> clazz = <function NewType.<locals>.new_type at 0x7ff08ddbba30>
> base_schema = None
> clazz_frame = <frame at 0x560f10c2f210, file 
> '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/tests/test_class_schema.py', 
> line 319, code test_validator_stacking>
> 
>     @lru_cache(maxsize=MAX_CLASS_SCHEMA_CACHE_SIZE)
>     def _internal_class_schema(
>         clazz: type,
>         base_schema: Optional[Type[marshmallow.Schema]] = None,
>         clazz_frame: types.FrameType = None,
>     ) -> Type[marshmallow.Schema]:
>         _RECURSION_GUARD.seen_classes[clazz] = clazz.__name__
>         try:
>             # noinspection PyDataclass
>             fields: Tuple[dataclasses.Field, ...] = dataclasses.fields(clazz)
>         except TypeError:  # Not a dataclass
>             try:
>                 warnings.warn(
>                     "****** WARNING ****** "
>                     f"marshmallow_dataclass was called on the class {clazz}, 
> which is not a dataclass. "
>                     "It is going to try and convert the class into a 
> dataclass, which may have "
>                     "undesirable side effects. To avoid this message, make 
> sure all your classes and "
>                     "all the classes of their fields are either explicitly 
> supported by "
>                     "marshmallow_dataclass, or define the schema explicitly 
> using "
>                     "field(metadata=dict(marshmallow_field=...)). For more 
> information, see "
>                     
> "https://github.com/lovasoa/marshmallow_dataclass/issues/51 "
>                     "****** WARNING ******"
>                 )
>                 created_dataclass: type = dataclasses.dataclass(clazz)
>                 return _internal_class_schema(created_dataclass, base_schema, 
> clazz_frame)
>             except Exception:
> >               raise TypeError(
>                     f"{getattr(clazz, '__name__', repr(clazz))} is not a 
> dataclass and cannot be turned into one."
>                 )
> E               TypeError: CustomTypeNoneValidator is not a dataclass and 
> cannot be turned into one.
> 
> marshmallow_dataclass/__init__.py:387: TypeError
> =========================== short test summary info 
> ============================
> FAILED tests/test_class_schema.py::TestClassSchema::test_validator_stacking
> ========================= 1 failed, 90 passed in 0.40s 
> =========================
> E: pybuild pybuild:379: test: plugin pyproject failed with: exit code=1: cd 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build; python3.10 -m pytest tests
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.10 
> returned exit code 13


The full build log is available from:
http://qa-logs.debian.net/2022/09/17/python-marshmallow-dataclass_8.5.8-2_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20220917;users=lu...@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20220917&fusertaguser=lu...@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.

Reply via email to