[spyne] Spyne and customized classes

Rinat Shigapov rinatshigapov at gmail.com
Wed Oct 7 11:58:46 UTC 2015


Hi!

I've just adapted my project to spyne 2.12.9 and see a bunch of 'seems to
be a customized class. They are not supposed to be instantiated.' warnings.

What does it mean?

Most of my complex spyne types are constructed from `OrderedComplexModel`
and `OrderedDjangoComplexModel` to guarantee consistent field ordering.

The definition of these types:

class OrderedComplexModel(ComplexModelBase):

    """Complex model with ordered fields.

    See https://github.com/arskom/spyne/pull/356 for more info.

    """

    __metaclass__ = ComplexModelMeta

    class Attributes(ComplexModelBase.Attributes):
        declare_order = 'declared'


class OrderedDjangoComplexModel(ComplexModelBase):

    """Complex spyne model with ordered fields that maps to given Django
model.

    See https://github.com/arskom/spyne/pull/356 for more info.

    """

    __metaclass__ = DjangoComplexModelMeta
    __abstract__ = True

    class Attributes(ComplexModelBase.Attributes):
        declare_order = 'declared'

Thanks!

With kindest regards, Rinat Shigapov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spyne.io/archives/people/attachments/20151007/003d4f6f/attachment.html>


More information about the people mailing list