#27025: Python 3.6 compatibility
------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Comment (by Anthony King):
py3.6 breaks calling `super()` (in the python3 style) inside Models with:
`RuntimeError: super(): empty __class__ cell`
This is also present on 1.8 and 1.10
{{{
class ModelToBreak(models.Model):
def save(self, *args, **kwargs):
return super().save(*args, **kwargs)
}}}
{{{#!python
>>> m = ModelToBreak()
>>> m.save()
Traceback (most recent call last):
File "/home/cybo/work/3.6-test/testing/d/tests.py", line 9, in
test_empty_class_fail
m.save()
File "/home/cybo/work/3.6-test/testing/d/models.py", line 5, in save
return super().save(*args, **kwargs)
RuntimeError: super(): empty __class__ cell
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27025#comment:15>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.1c4635afeac69fe14068c58def845d62%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.