kim icon indicating copy to clipboard operation
kim copied to clipboard

versions of six lower than 1.9.0 not working

Open mikeywaites opened this issue 10 years ago • 0 comments

Some weird issue with the metaclass stuff in six was detected on version 1.6.1

/home/vagrant/.virtualenvs/vizibl-api/local/lib/python2.7/site-packages/kim/__init__.py in <module>()
      7
      8
----> 9 from .mapper import Mapper
     10 from .field import Field

/home/vagrant/.virtualenvs/vizibl-api/local/lib/python2.7/site-packages/kim/mapper.py in <module>()
    183
    184
--> 185 class Mapper(six.with_metaclass(MapperMeta, object)):
    186     """Mappers are the building blocks of Kim - they define how JSON output
    187     should look and how input JSON should be expected to look.

/home/vagrant/.virtualenvs/vizibl-api/local/lib/python2.7/site-packages/six.pyc in with_metaclass(meta, *bases)
    629 def with_metaclass(meta, *bases):
    630     """Create a base class with a metaclass."""
--> 631     return meta("NewBase", bases, {})
    632
    633 def add_metaclass(metaclass):

/home/vagrant/.virtualenvs/vizibl-api/local/lib/python2.7/site-packages/kim/mapper.py in __init__(cls, classname, bases, dict_)
    179
    180     def __init__(cls, classname, bases, dict_):
--> 181         _MapperConfig.setup_mapping(cls, classname, dict_)
    182         type.__init__(cls, classname, bases, dict_)
    183

/home/vagrant/.virtualenvs/vizibl-api/local/lib/python2.7/site-packages/kim/mapper.py in setup_mapping(cls, cls_, classname, dict_)
     85     def setup_mapping(cls, cls_, classname, dict_):
     86         cfg_cls = _MapperConfig
---> 87         cfg_cls(cls_, classname, dict_)
     88
     89     def __init__(self, cls_, classname, dict_):

/home/vagrant/.virtualenvs/vizibl-api/local/lib/python2.7/site-packages/kim/mapper.py in __init__(self, cls_, classname, dict_)
     99         # the user is looking to override the default role and dont create one
    100         # here.
--> 101         if '__default__' not in self.cls.__roles__:
    102             self.cls.roles['__default__'] = \
    103                 whitelist(*self.cls.fields.keys())

AttributeError: type object 'NewBase' has no attribute ‘__roles__’

mikeywaites avatar Sep 30 '15 19:09 mikeywaites