Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix signature of six.with_metaclass. #54

Merged
merged 1 commit into from

2 participants

@carljm

In six 1.4, the signature of with_metaclass has changed from with_metaclass(meta, base=object) to with_metaclass(meta, *bases), allowing for multiple bases. This breaks django-jsonfield, which uses the base kwarg name explicitly. Since Django 1.6b3 updated the bundled django.utils.six to version 1.4.1, this also makes jsonfield broken with Django 1.6b3.

This pull request fixes django-jsonfield's use of six.with_metaclass to not specify the base as a kwarg, but rather as a positional arg, making it compatible with both older and newer versions of Django/six.

@bradjasper bradjasper merged commit f940c1b into bradjasper:master

1 check was pending

Details default The Travis CI build is in progress
@bradjasper
Owner

Thanks @carljm!

@jacobb jacobb referenced this pull request in python/pythondotorg
Closed

Upgrade to Django 1.5.8 #465

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 13, 2013
  1. @carljm
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  jsonfield/fields.py
View
2  jsonfield/fields.py
@@ -47,7 +47,7 @@ class JSONCharFormField(JSONFormFieldBase, fields.CharField):
pass
-class JSONFieldBase(six.with_metaclass(SubfieldBase, base=models.Field)):
+class JSONFieldBase(six.with_metaclass(SubfieldBase, models.Field)):
def __init__(self, *args, **kwargs):
self.dump_kwargs = kwargs.pop('dump_kwargs', {
Something went wrong with that request. Please try again.