Your message dated Mon, 24 Feb 2025 01:34:25 +0000
with message-id <e1tmnmx-00h39x...@fasolo.debian.org>
and subject line Bug#1098600: fixed in python-marshmallow-polyfield 5.11-1
has caused the Debian Bug report #1098600,
regarding python-marshmallow-polyfield: FTBFS: E           TypeError: Failed to 
serialize object. Error: 'NoneType' object is not iterable
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1098600: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098600
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: src:python-marshmallow-polyfield
Version: 5.10-1
Severity: serious
Tags: ftbfs trixie sid

Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --with python3 --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
I: pybuild base:311: python3.12 setup.py clean 
running clean
removing '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_marshmallow-polyfield/build' 
(and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.12' does not exist -- can't clean it
I: pybuild base:311: python3.13 setup.py clean 
running clean
removing '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_marshmallow-polyfield/build' 
(and everything under it)
'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 --with python3 --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:311: python3.12 setup.py config 
running config
I: pybuild base:311: python3.13 setup.py config 
running config
   dh_auto_build -O--buildsystem=pybuild
I: pybuild base:311: /usr/bin/python3.12 setup.py build 
running build
running build_py
creating 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_marshmallow-polyfield/build/marshmallow_polyfield
copying marshmallow_polyfield/__init__.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_marshmallow-polyfield/build/marshmallow_polyfield
copying marshmallow_polyfield/polyfield.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_marshmallow-polyfield/build/marshmallow_polyfield
I: pybuild base:311: /usr/bin/python3 setup.py build 
running build
running build_py
creating 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_marshmallow-polyfield/build/marshmallow_polyfield
copying marshmallow_polyfield/__init__.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_marshmallow-polyfield/build/marshmallow_polyfield
copying marshmallow_polyfield/polyfield.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_marshmallow-polyfield/build/marshmallow_polyfield
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_marshmallow-polyfield/build; python3.12 
-m pytest -c /dev/null
============================= test session starts ==============================
platform linux -- Python 3.12.9, pytest-8.3.4, pluggy-1.5.0
rootdir: /dev
configfile: null
plugins: typeguard-4.4.1
collected 19 items

../../../../../../dev/tests/test_deserialization.py ...........          [ 57%]
../../../../../../dev/tests/test_polyfield_base.py .                     [ 63%]
../../../../../../dev/tests/test_serialization.py ..F.F.F                [100%]

=================================== FAILURES ===================================
_____________________ test_serializing_polyfield_rectangle _____________________

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = <tests.shapes.Rectangle object at 0x7f229588ae10>, key = 'shape'
obj = Sticker(shape=<tests.shapes.Rectangle object at 0x7f229588ae10>, 
image='marshmallow.png')
kwargs = {}, schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
                    schema.context.update(getattr(self, 'context', {}))
                    res.append(schema.dump(v))
                return res
            else:
                schema = self.serialization_schema_selector(value, obj)
>               schema.context.update(getattr(self, 'context', {}))
E               TypeError: 'NoneType' object is not iterable

marshmallow_polyfield/polyfield.py:74: TypeError

During handling of the above exception, another exception occurred:

args_ = ()

    def wrapped(*args_):
        return [
>           func(*(args_ + (a,)))
            for a in args
        ]

tests/polyclasses.py:15: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_serialization.py:52: in test_serializing_polyfield_rectangle
    rect_dict = field.serialize('shape', marshmallow_sticker)
/usr/lib/python3/dist-packages/marshmallow/fields.py:348: in serialize
    return self._serialize(value, attr, obj, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = <tests.shapes.Rectangle object at 0x7f229588ae10>, key = 'shape'
obj = Sticker(shape=<tests.shapes.Rectangle object at 0x7f229588ae10>, 
image='marshmallow.png')
kwargs = {}, schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
                    schema.context.update(getattr(self, 'context', {}))
                    res.append(schema.dump(v))
                return res
            else:
                schema = self.serialization_schema_selector(value, obj)
                schema.context.update(getattr(self, 'context', {}))
                return schema.dump(value)
        except Exception as err:
>           raise TypeError(
                'Failed to serialize object. Error: {0}\n'
                ' Ensure the serialization_schema_selector exists and '
                ' returns a Schema and that schema'
                ' can serialize this value {1}'.format(err, value))
E           TypeError: Failed to serialize object. Error: 'NoneType' object is 
not iterable
E            Ensure the serialization_schema_selector exists and  returns a 
Schema and that schema can serialize this value <tests.shapes.Rectangle object 
at 0x7f229588ae10>

marshmallow_polyfield/polyfield.py:77: TypeError
_______________________ test_serializing_polyfield_many ________________________

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = [<tests.shapes.Rectangle object at 0x7f2295752030>, 
<tests.shapes.Triangle object at 0x7f2295752180>]
key = 'shapes'
obj = StickerCollection(shapes=[<tests.shapes.Rectangle object at 
0x7f2295752030>, <tests.shapes.Triangle object at 0x7f2295752180>], 
image='marshmallow.png')
kwargs = {}, res = [], v = <tests.shapes.Rectangle object at 0x7f2295752030>
schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
>                   schema.context.update(getattr(self, 'context', {}))
E                   TypeError: 'NoneType' object is not iterable

marshmallow_polyfield/polyfield.py:69: TypeError

During handling of the above exception, another exception occurred:

args_ = ()

    def wrapped(*args_):
        return [
>           func(*(args_ + (a,)))
            for a in args
        ]

tests/polyclasses.py:15: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_serialization.py:79: in test_serializing_polyfield_many
    shapes = field.serialize('shapes', marshmallow_sticker_collection)
/usr/lib/python3/dist-packages/marshmallow/fields.py:348: in serialize
    return self._serialize(value, attr, obj, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = [<tests.shapes.Rectangle object at 0x7f2295752030>, 
<tests.shapes.Triangle object at 0x7f2295752180>]
key = 'shapes'
obj = StickerCollection(shapes=[<tests.shapes.Rectangle object at 
0x7f2295752030>, <tests.shapes.Triangle object at 0x7f2295752180>], 
image='marshmallow.png')
kwargs = {}, res = [], v = <tests.shapes.Rectangle object at 0x7f2295752030>
schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
                    schema.context.update(getattr(self, 'context', {}))
                    res.append(schema.dump(v))
                return res
            else:
                schema = self.serialization_schema_selector(value, obj)
                schema.context.update(getattr(self, 'context', {}))
                return schema.dump(value)
        except Exception as err:
>           raise TypeError(
                'Failed to serialize object. Error: {0}\n'
                ' Ensure the serialization_schema_selector exists and '
                ' returns a Schema and that schema'
                ' can serialize this value {1}'.format(err, value))
E           TypeError: Failed to serialize object. Error: 'NoneType' object is 
not iterable
E            Ensure the serialization_schema_selector exists and  returns a 
Schema and that schema can serialize this value [<tests.shapes.Rectangle object 
at 0x7f2295752030>, <tests.shapes.Triangle object at 0x7f2295752180>]

marshmallow_polyfield/polyfield.py:77: TypeError
__________________ test_serializing_polyfield_by_parent_type ___________________

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = <tests.shapes.Rectangle object at 0x7f2295753fe0>, key = 'shape'
obj = Sticker(shape=<tests.shapes.Rectangle object at 0x7f2295753fe0>, 
image='marshmallow.png', type='rectangle')
kwargs = {}, schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
                    schema.context.update(getattr(self, 'context', {}))
                    res.append(schema.dump(v))
                return res
            else:
                schema = self.serialization_schema_selector(value, obj)
>               schema.context.update(getattr(self, 'context', {}))
E               TypeError: 'NoneType' object is not iterable

marshmallow_polyfield/polyfield.py:74: TypeError

During handling of the above exception, another exception occurred:

args_ = ()

    def wrapped(*args_):
        return [
>           func(*(args_ + (a,)))
            for a in args
        ]

tests/polyclasses.py:15: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_serialization.py:99: in test_serializing_polyfield_by_parent_type
    rect_dict = field.serialize('shape', marshmallow_sticker)
/usr/lib/python3/dist-packages/marshmallow/fields.py:348: in serialize
    return self._serialize(value, attr, obj, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = <tests.shapes.Rectangle object at 0x7f2295753fe0>, key = 'shape'
obj = Sticker(shape=<tests.shapes.Rectangle object at 0x7f2295753fe0>, 
image='marshmallow.png', type='rectangle')
kwargs = {}, schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
                    schema.context.update(getattr(self, 'context', {}))
                    res.append(schema.dump(v))
                return res
            else:
                schema = self.serialization_schema_selector(value, obj)
                schema.context.update(getattr(self, 'context', {}))
                return schema.dump(value)
        except Exception as err:
>           raise TypeError(
                'Failed to serialize object. Error: {0}\n'
                ' Ensure the serialization_schema_selector exists and '
                ' returns a Schema and that schema'
                ' can serialize this value {1}'.format(err, value))
E           TypeError: Failed to serialize object. Error: 'NoneType' object is 
not iterable
E            Ensure the serialization_schema_selector exists and  returns a 
Schema and that schema can serialize this value <tests.shapes.Rectangle object 
at 0x7f2295753fe0>

marshmallow_polyfield/polyfield.py:77: TypeError
=============================== warnings summary ===============================
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield 
returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_none
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_none 
returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserailize_polyfield_none_required
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserailize_polyfield_none_required
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_type_error
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_type_error
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_validation_error
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_validation_error
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_generic_error
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_generic_error
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_schema_returned_is_invalid
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_schema_returned_is_invalid
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_errors
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_errors 
returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyFieldDisambiguationByProperty::test_deserialize_polyfield
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyFieldDisambiguationByProperty::test_deserialize_polyfield
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_serialization.py::test_serializing_named_tuple
  
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_marshmallow-polyfield/build/tests/test_serialization.py:27:
 ChangedInMarshmallow4Warning: `Field` should not be instantiated. Use 
`fields.Raw` or  another field subclass instead.
    field = fields.Field()

tests/test_serialization.py::test_serializing_polyfield_None
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_serialization.py::test_serializing_polyfield_None returned [None, 
None], which will be an error in a future version of pytest.  Did you mean to 
use `assert` instead of `return`?
    warnings.warn(

tests/test_serialization.py::test_invalid_polyfield
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_serialization.py::test_invalid_polyfield returned [None, None], 
which will be an error in a future version of pytest.  Did you mean to use 
`assert` instead of `return`?
    warnings.warn(

../../../../../../usr/lib/python3/dist-packages/_pytest/cacheprovider.py:475
  /usr/lib/python3/dist-packages/_pytest/cacheprovider.py:475: 
PytestCacheWarning: could not create cache path 
/dev/.pytest_cache/v/cache/nodeids: [Errno 13] Permission denied: 
'/dev/pytest-cache-files-iw_04ss5'
    config.cache.set("cache/nodeids", sorted(self.cached_nodeids))

../../../../../../usr/lib/python3/dist-packages/_pytest/cacheprovider.py:429
  /usr/lib/python3/dist-packages/_pytest/cacheprovider.py:429: 
PytestCacheWarning: could not create cache path 
/dev/.pytest_cache/v/cache/lastfailed: [Errno 13] Permission denied: 
'/dev/pytest-cache-files-k2mwy9iy'
    config.cache.set("cache/lastfailed", self.lastfailed)

../../../../../../usr/lib/python3/dist-packages/_pytest/stepwise.py:51
  /usr/lib/python3/dist-packages/_pytest/stepwise.py:51: PytestCacheWarning: 
could not create cache path /dev/.pytest_cache/v/cache/stepwise: [Errno 13] 
Permission denied: '/dev/pytest-cache-files-53580col'
    session.config.cache.set(STEPWISE_CACHE_DIR, [])

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED 
../../../../../../dev/tests/test_serialization.py::test_serializing_polyfield_rectangle
FAILED 
../../../../../../dev/tests/test_serialization.py::test_serializing_polyfield_many
FAILED 
../../../../../../dev/tests/test_serialization.py::test_serializing_polyfield_by_parent_type
================== 3 failed, 16 passed, 15 warnings in 0.11s ===================
E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_marshmallow-polyfield/build; python3.12 
-m pytest -c /dev/null
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_marshmallow-polyfield/build; python3.13 
-m pytest -c /dev/null
============================= test session starts ==============================
platform linux -- Python 3.13.2, pytest-8.3.4, pluggy-1.5.0
rootdir: /dev
configfile: null
plugins: typeguard-4.4.1
collected 19 items

../../../../../../dev/tests/test_deserialization.py ...........          [ 57%]
../../../../../../dev/tests/test_polyfield_base.py .                     [ 63%]
../../../../../../dev/tests/test_serialization.py ..F.F.F                [100%]

=================================== FAILURES ===================================
_____________________ test_serializing_polyfield_rectangle _____________________

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = <tests.shapes.Rectangle object at 0x7fc64815d010>, key = 'shape'
obj = Sticker(shape=<tests.shapes.Rectangle object at 0x7fc64815d010>, 
image='marshmallow.png')
kwargs = {}, schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
                    schema.context.update(getattr(self, 'context', {}))
                    res.append(schema.dump(v))
                return res
            else:
                schema = self.serialization_schema_selector(value, obj)
>               schema.context.update(getattr(self, 'context', {}))
E               TypeError: 'NoneType' object is not iterable

marshmallow_polyfield/polyfield.py:74: TypeError

During handling of the above exception, another exception occurred:

args_ = ()

    def wrapped(*args_):
        return [
>           func(*(args_ + (a,)))
            for a in args
        ]

tests/polyclasses.py:15: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_serialization.py:52: in test_serializing_polyfield_rectangle
    rect_dict = field.serialize('shape', marshmallow_sticker)
/usr/lib/python3/dist-packages/marshmallow/fields.py:348: in serialize
    return self._serialize(value, attr, obj, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = <tests.shapes.Rectangle object at 0x7fc64815d010>, key = 'shape'
obj = Sticker(shape=<tests.shapes.Rectangle object at 0x7fc64815d010>, 
image='marshmallow.png')
kwargs = {}, schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
                    schema.context.update(getattr(self, 'context', {}))
                    res.append(schema.dump(v))
                return res
            else:
                schema = self.serialization_schema_selector(value, obj)
                schema.context.update(getattr(self, 'context', {}))
                return schema.dump(value)
        except Exception as err:
>           raise TypeError(
                'Failed to serialize object. Error: {0}\n'
                ' Ensure the serialization_schema_selector exists and '
                ' returns a Schema and that schema'
                ' can serialize this value {1}'.format(err, value))
E           TypeError: Failed to serialize object. Error: 'NoneType' object is 
not iterable
E            Ensure the serialization_schema_selector exists and  returns a 
Schema and that schema can serialize this value <tests.shapes.Rectangle object 
at 0x7fc64815d010>

marshmallow_polyfield/polyfield.py:77: TypeError
_______________________ test_serializing_polyfield_many ________________________

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = [<tests.shapes.Rectangle object at 0x7fc64815dda0>, 
<tests.shapes.Triangle object at 0x7fc6482fe8b0>]
key = 'shapes'
obj = StickerCollection(shapes=[<tests.shapes.Rectangle object at 
0x7fc64815dda0>, <tests.shapes.Triangle object at 0x7fc6482fe8b0>], 
image='marshmallow.png')
kwargs = {}, res = [], v = <tests.shapes.Rectangle object at 0x7fc64815dda0>
schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
>                   schema.context.update(getattr(self, 'context', {}))
E                   TypeError: 'NoneType' object is not iterable

marshmallow_polyfield/polyfield.py:69: TypeError

During handling of the above exception, another exception occurred:

args_ = ()

    def wrapped(*args_):
        return [
>           func(*(args_ + (a,)))
            for a in args
        ]

tests/polyclasses.py:15: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_serialization.py:79: in test_serializing_polyfield_many
    shapes = field.serialize('shapes', marshmallow_sticker_collection)
/usr/lib/python3/dist-packages/marshmallow/fields.py:348: in serialize
    return self._serialize(value, attr, obj, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = [<tests.shapes.Rectangle object at 0x7fc64815dda0>, 
<tests.shapes.Triangle object at 0x7fc6482fe8b0>]
key = 'shapes'
obj = StickerCollection(shapes=[<tests.shapes.Rectangle object at 
0x7fc64815dda0>, <tests.shapes.Triangle object at 0x7fc6482fe8b0>], 
image='marshmallow.png')
kwargs = {}, res = [], v = <tests.shapes.Rectangle object at 0x7fc64815dda0>
schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
                    schema.context.update(getattr(self, 'context', {}))
                    res.append(schema.dump(v))
                return res
            else:
                schema = self.serialization_schema_selector(value, obj)
                schema.context.update(getattr(self, 'context', {}))
                return schema.dump(value)
        except Exception as err:
>           raise TypeError(
                'Failed to serialize object. Error: {0}\n'
                ' Ensure the serialization_schema_selector exists and '
                ' returns a Schema and that schema'
                ' can serialize this value {1}'.format(err, value))
E           TypeError: Failed to serialize object. Error: 'NoneType' object is 
not iterable
E            Ensure the serialization_schema_selector exists and  returns a 
Schema and that schema can serialize this value [<tests.shapes.Rectangle object 
at 0x7fc64815dda0>, <tests.shapes.Triangle object at 0x7fc6482fe8b0>]

marshmallow_polyfield/polyfield.py:77: TypeError
__________________ test_serializing_polyfield_by_parent_type ___________________

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = <tests.shapes.Rectangle object at 0x7fc64804d730>, key = 'shape'
obj = Sticker(shape=<tests.shapes.Rectangle object at 0x7fc64804d730>, 
image='marshmallow.png', type='rectangle')
kwargs = {}, schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
                    schema.context.update(getattr(self, 'context', {}))
                    res.append(schema.dump(v))
                return res
            else:
                schema = self.serialization_schema_selector(value, obj)
>               schema.context.update(getattr(self, 'context', {}))
E               TypeError: 'NoneType' object is not iterable

marshmallow_polyfield/polyfield.py:74: TypeError

During handling of the above exception, another exception occurred:

args_ = ()

    def wrapped(*args_):
        return [
>           func(*(args_ + (a,)))
            for a in args
        ]

tests/polyclasses.py:15: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_serialization.py:99: in test_serializing_polyfield_by_parent_type
    rect_dict = field.serialize('shape', marshmallow_sticker)
/usr/lib/python3/dist-packages/marshmallow/fields.py:348: in serialize
    return self._serialize(value, attr, obj, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <fields.PolyField(dump_default=<marshmallow.missing>, attribute=None, 
validate=None, required=False, load_only=False, ...equired': 'Missing data for 
required field.', 'null': 'Field may not be null.', 'validator_failed': 
'Invalid value.'})>
value = <tests.shapes.Rectangle object at 0x7fc64804d730>, key = 'shape'
obj = Sticker(shape=<tests.shapes.Rectangle object at 0x7fc64804d730>, 
image='marshmallow.png', type='rectangle')
kwargs = {}, schema = <RectangleSchema(many=False)>

    def _serialize(self, value, key, obj, **kwargs):
        if value is None:
            return None
        try:
            if self.many:
                res = []
                for v in value:
                    schema = self.serialization_schema_selector(v, obj)
                    schema.context.update(getattr(self, 'context', {}))
                    res.append(schema.dump(v))
                return res
            else:
                schema = self.serialization_schema_selector(value, obj)
                schema.context.update(getattr(self, 'context', {}))
                return schema.dump(value)
        except Exception as err:
>           raise TypeError(
                'Failed to serialize object. Error: {0}\n'
                ' Ensure the serialization_schema_selector exists and '
                ' returns a Schema and that schema'
                ' can serialize this value {1}'.format(err, value))
E           TypeError: Failed to serialize object. Error: 'NoneType' object is 
not iterable
E            Ensure the serialization_schema_selector exists and  returns a 
Schema and that schema can serialize this value <tests.shapes.Rectangle object 
at 0x7fc64804d730>

marshmallow_polyfield/polyfield.py:77: TypeError
=============================== warnings summary ===============================
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield 
returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_none
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_none 
returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserailize_polyfield_none_required
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserailize_polyfield_none_required
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_type_error
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_type_error
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_validation_error
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_validation_error
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_generic_error
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_generic_error
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_schema_returned_is_invalid
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_invalid_schema_returned_is_invalid
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_errors
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyField::test_deserialize_polyfield_errors 
returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_deserialization.py::TestPolyFieldDisambiguationByProperty::test_deserialize_polyfield
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_deserialization.py::TestPolyFieldDisambiguationByProperty::test_deserialize_polyfield
 returned [None, None], which will be an error in a future version of pytest.  
Did you mean to use `assert` instead of `return`?
    warnings.warn(

tests/test_serialization.py::test_serializing_named_tuple
  
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_marshmallow-polyfield/build/tests/test_serialization.py:27:
 ChangedInMarshmallow4Warning: `Field` should not be instantiated. Use 
`fields.Raw` or  another field subclass instead.
    field = fields.Field()

tests/test_serialization.py::test_serializing_polyfield_None
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_serialization.py::test_serializing_polyfield_None returned [None, 
None], which will be an error in a future version of pytest.  Did you mean to 
use `assert` instead of `return`?
    warnings.warn(

tests/test_serialization.py::test_invalid_polyfield
  /usr/lib/python3/dist-packages/_pytest/python.py:163: 
PytestReturnNotNoneWarning: Expected None, but 
tests/test_serialization.py::test_invalid_polyfield returned [None, None], 
which will be an error in a future version of pytest.  Did you mean to use 
`assert` instead of `return`?
    warnings.warn(

../../../../../../usr/lib/python3/dist-packages/_pytest/cacheprovider.py:475
  /usr/lib/python3/dist-packages/_pytest/cacheprovider.py:475: 
PytestCacheWarning: could not create cache path 
/dev/.pytest_cache/v/cache/nodeids: [Errno 13] Permission denied: 
'/dev/pytest-cache-files-yosx16aa'
    config.cache.set("cache/nodeids", sorted(self.cached_nodeids))

../../../../../../usr/lib/python3/dist-packages/_pytest/cacheprovider.py:429
  /usr/lib/python3/dist-packages/_pytest/cacheprovider.py:429: 
PytestCacheWarning: could not create cache path 
/dev/.pytest_cache/v/cache/lastfailed: [Errno 13] Permission denied: 
'/dev/pytest-cache-files-rp2itp0t'
    config.cache.set("cache/lastfailed", self.lastfailed)

../../../../../../usr/lib/python3/dist-packages/_pytest/stepwise.py:51
  /usr/lib/python3/dist-packages/_pytest/stepwise.py:51: PytestCacheWarning: 
could not create cache path /dev/.pytest_cache/v/cache/stepwise: [Errno 13] 
Permission denied: '/dev/pytest-cache-files-cxb835s0'
    session.config.cache.set(STEPWISE_CACHE_DIR, [])

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED 
../../../../../../dev/tests/test_serialization.py::test_serializing_polyfield_rectangle
FAILED 
../../../../../../dev/tests/test_serialization.py::test_serializing_polyfield_many
FAILED 
../../../../../../dev/tests/test_serialization.py::test_serializing_polyfield_by_parent_type
================== 3 failed, 16 passed, 15 warnings in 0.10s ===================
E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_marshmallow-polyfield/build; python3.13 
-m pytest -c /dev/null
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.12 
3.13" returned exit code 13
make: *** [debian/rules:10: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:

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

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 could not 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-marshmallow-polyfield, so that this 
is still
visible in the BTS web page for this package.

Thanks.

--- End Message ---
--- Begin Message ---
Source: python-marshmallow-polyfield
Source-Version: 5.11-1
Done: Colin Watson <cjwat...@debian.org>

We believe that the bug you reported is fixed in the latest version of
python-marshmallow-polyfield, 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 1098...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <cjwat...@debian.org> (supplier of updated 
python-marshmallow-polyfield 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 ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 24 Feb 2025 01:08:39 +0000
Source: python-marshmallow-polyfield
Architecture: source
Version: 5.11-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+pyt...@tracker.debian.org>
Changed-By: Colin Watson <cjwat...@debian.org>
Closes: 1098600
Changes:
 python-marshmallow-polyfield (5.11-1) unstable; urgency=medium
 .
   * Team upload.
   * New upstream release.
     - Fix serializing selected fields without 'dump' methods (closes:
       #1098600).
   * Use dh-sequence-python3.
   * Use pybuild-plugin-pyproject.
Checksums-Sha1:
 5adffdf7e18f21c43ae7f789305302730278bc53 2493 
python-marshmallow-polyfield_5.11-1.dsc
 d983f735db0c87816826186aeb712ed0263841e2 11006 
python-marshmallow-polyfield_5.11.orig.tar.gz
 d7971423465cb14d1f0f1be719e7b3e988b5ce57 2828 
python-marshmallow-polyfield_5.11-1.debian.tar.xz
Checksums-Sha256:
 f5fcc96c1861728ff6750ecc25f4b5ac9ea6516331bcb1b34f5c5050b40fc307 2493 
python-marshmallow-polyfield_5.11-1.dsc
 cb9c782ab40b23a900f129c3676a8f327ac2cf28ce1436c119e1aaf5667e4dea 11006 
python-marshmallow-polyfield_5.11.orig.tar.gz
 5d5821ecac5c00ef18289282b73414dc4dca2e45c68929acc9b5bbc16b4a675a 2828 
python-marshmallow-polyfield_5.11-1.debian.tar.xz
Files:
 85e556d2efa75e260a4d21408a947588 2493 python optional 
python-marshmallow-polyfield_5.11-1.dsc
 80ea26c3f5373b011d46a8b47e31c5c1 11006 python optional 
python-marshmallow-polyfield_5.11.orig.tar.gz
 dcf91d83f5a3767a0cf5f37863b0cbc4 2828 python optional 
python-marshmallow-polyfield_5.11-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEErApP8SYRtvzPAcEROTWH2X2GUAsFAme7xtgACgkQOTWH2X2G
UAv3SBAAlVqHtkGc74dMYjaLMAjVxlh+8mg++YhCgNRlrfNizo9cm9oDjiCKXOVG
OlcFxwxiNs/kmSytv/Ikqj1C9SbP4EG+12FnV/VnwGWPU3EmZb+fJjN2H1c/HHmE
XgDlcYzPpGj6eQl++yE2Nid8x3MzASb8T2AtzZ8rP2gPlUwXW7AdIXmLhkCghk+z
LPxO3AVkLpZi9p9EBGgyrS0a/YrVi3Jfhx0NVLOglH4PdmNohDWpnCjqW2TfXcLh
dJlRExatu4xmgiSFP+WfmI+PI1Hsf6X3BP1InBRF+ptphZWn1VrWrkYrsCb6vgRB
trnefPtAY/5tb56Ygm9dRXMEqMXeMw8u1miYH4DNZR6H4MDX/eucXWJ+Rlzi96wL
RllxDpe/DCJg5kcFHT17cBfdWRV++lGCRGKjut11RCxNFSu6/xAzGswNRaeN70WN
Akh18Lt8HKIWwKU+VKetQKPIQpcM+SibYAdSgGQY1o75zjKRt3Ufq6YcdQ1B5gJP
LCFmv6P1giIwtA7dgA4ra2AwNHIxrFGtVcRDWgj0DBW7ezM/u5aEndSOPTSnCZ5h
biC8tUvqE9lWmsXgFktIS7H61w0eN4BP3bUivxMye8zIIOiNebeZ/4Ca2OYlZk+J
sgHTPLS1QRC0XXTMriBZq5uRu4KwIjME5NP+ePgDQkO6tVM+zRY=
=L9UQ
-----END PGP SIGNATURE-----

Attachment: pgp0wmWKLl62T.pgp
Description: PGP signature


--- End Message ---

Reply via email to