#33174: Having a model inherit from Generic[T] breaks makemigrations
--------------------------------+--------------------------------------
     Reporter:  Antoine Humeau  |                    Owner:  nobody
         Type:  Uncategorized   |                   Status:  closed
    Component:  Uncategorized   |                  Version:  3.2
     Severity:  Normal          |               Resolution:  needsinfo
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+--------------------------------------
Changes (by Carlton Gibson):

 * status:  new => closed
 * resolution:   => needsinfo


Comment:

 I’m inclined to say we should mark this as needsinfo.

 > A simple solution might be to filter out typing.Generic from bases in
 ModelState.from_model.

 Possibly. But we very much need to measure several times before cutting
 here: if we introduce the wrong fix, which is easily imaginable with these
 typing questions that are still very much in flux, then we’ll be dealing
 with a potentially worse breaking change down the line.

 > This base class list will contain typing.Generic – note: not
 typing.Generic[StripeClassT] – because it is present in
 StripeObjectModel.__bases__

 First of all I think we need a story for this (from Python?)

 Then a concrete analysis of what we need to handle in Django, and how.

 In any case I think this needs to go via the DevelopersMailingList before
 any steps can be agreed, since it touches on the Technical Board’s
 previous decision to not (currently) support type annotations in Django.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33174#comment:1>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.0bf2b5b05480dd4d58eb3858679455ad%40djangoproject.com.

Reply via email to