Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

versions of six lower than 1.9.0 not working #74

Open
mikeywaites opened this issue Sep 30, 2015 · 0 comments
Open

versions of six lower than 1.9.0 not working #74

mikeywaites opened this issue Sep 30, 2015 · 0 comments

Comments

@mikeywaites
Copy link
Owner

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 mikeywaites added this to the release 1.0.0 milestone Sep 30, 2015
@mikeywaites mikeywaites removed this from the release 1.0.0 milestone Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant