#25068: Metaclass conflict when doing createmigrations in ModelState.render
-------------------------------------+-------------------------------------
Reporter: kosz85 | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.8
Severity: Release blocker | Resolution:
Keywords: metaclass conflict | Triage Stage:
createmigrations | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by kosz85):
I updated example, I used six to make it more generic. The problem exists
in both python 2.7 and 3.4, I added new method
{{{six_with_metaclassmaker}}} it's similar to {{{six.with_metaclass}}} but
more specific for this case, as {{{six.with_metaclass}}} and
{{{six.add_metaclass}}} aren't made for such cases:
- The first (correct) approach is assuming that meta is already a class,
and not function like in 2.7, but metaclassmaker is just a factory of
proper type and not type class itself.
- Second approach (incorrect) can't deal with class that rise error itself
because of metaclass inheritance we want to deal with.
- So third approach is copy of first approach but using {{{type}}} as base
for proxy class for {{{metaclassmaker}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25068#comment:5>
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/064.f1d6c485b306e01c48c07af6a54d8a8b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.