#32156: Add __class_getitem__ to support runtime type parameters for more
classes
-------------------------------------+-------------------------------------
Reporter: Brady Kieffer | Owner: Brady
| Kieffer
Type: New feature | Status: closed
Component: Utilities | Version: 2.2
Severity: Normal | Resolution: wontfix
Keywords: types, mypy, | Triage Stage:
django-stubs | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* resolution: => wontfix
Comment:
Hi Brady. Thanks for the follow-up.
Given the previous discussion, this is a wontfix issue. The correct
workflow to change that is to go via the DevelopersMailingList (see
TicketClosingReasons/DontReopenTickets)
Of your options, I'll just say here, that:
* I worry about 1 — We're enforcing a structure that's never been there
and never been needed. Typing is meant to serve the code, not the other
way round. (I'm not convinced that ModelAdmin is best modelled as a
statically typed generic...)
* 4 actually seems like a good option here. This stuff is still evolving.
If we change Django now and find it goes a different way, we'll be stuck.
What do the core devs say on this kind of example? Typing is meant to be
optional, an add-on. Surely the goal is to be able to work with code such
as Django's without the requirement that we retrofit all this stuff?
The promise of stubs was to keep the typing stuff out of the code: it
seems like a valid bug report on mypy or typing that "We can't implement
X, Y, Z in django-stubs without requiring change A, B, C in Django." — If
you make that kind of point, what response do you get?
Thanks again.
--
Ticket URL: <https://code.djangoproject.com/ticket/32156#comment:7>
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/070.3553f231da09291d3b77852c700043e6%40djangoproject.com.