jmrivas86 / django-json-widget

An alternative widget that makes it easy to edit the new Django's field JSONField (PostgreSQL specific model fields)
MIT License
433 stars 88 forks source link

Python 2.7 compatibility is broken due to the use of super() without any argument #15

Closed avoiney closed 5 years ago

avoiney commented 5 years ago

Description

Hello,

I just run the new 0.2.0 version on my django 1.11 and python2.7 project

Thanks

What I Did

The 0.2.0 version breaks the python2 compatibility because of the use of super() without class and instance arguments.

  File "/usr/local/lib/python2.7/site-packages/django/forms/fields.py", line 228, in __init__
    super(CharField, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/django/forms/fields.py", line 96, in __init__
    widget = widget()
  File "/usr/local/lib/python2.7/site-packages/django_json_widget/widgets.py", line 20, in __init__
    super().__init__(attrs=attrs)
TypeError: Error when calling the metaclass bases
    super() takes at least 1 argument (0 given)
ERROR: Job failed: exit code 1
ramonsaraiva commented 5 years ago

Same issue here.

jmrivas86 commented 5 years ago

Solved with PR https://github.com/jmrivas86/django-json-widget/pull/16

barseghyanartur commented 5 years ago

@jmrivas86:

What about new PyPI release?

lisza commented 5 years ago

Same problem here, when pip installing. @jmrivas86 would be super sweet if you could update PyPI!