#27914: makemigrations produces incorrect path for inner classes
-------------------------------------+-------------------------------------
     Reporter:  Serge van den Boom   |                    Owner:  Hasan
                                     |  Ramezani
         Type:  New feature          |                   Status:  new
    Component:  Migrations           |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by John Bowen):

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


Comment:

 commit 6452112640081ac8838147a8ba192c45879203d8 does not resolve this
 ticket.

 The commit patched the `EnumSerializer` with `__qualname__`, which works
 for Enum members.
 However, the `serializer_factory` is returning `TypeSerializer` for the
 Enum subclass, which is still using `__name__`

 With v3.0.x introducing models.Choices, models.IntegerChoices, using
 nested enums will become a common pattern; serializing them properly
 with `__qualname__` seems prudent.

 Here's a patch for the 3.0rc1 build
 
https://github.com/django/django/files/3879265/django_db_migrations_serializer_TypeSerializer.patch.txt

-- 
Ticket URL: <https://code.djangoproject.com/ticket/27914#comment:18>
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/063.76ded22e687c222e2d92c5b15ced4c36%40djangoproject.com.

Reply via email to