﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31223	Add __class_getitem__ to support runtime type parameters for some classes	Sobolev Nikita	Sobolev Nikita	"We (in django-stubs) treat several types as Generics. We provide type parameters to them like so: `QuerySet[MyModel]`

Currently it is impossible without a monkeypatch from our side, because these classes do not have `__class_getitem__` method.
Suggested patch will address this problem for:

- cached_property
- Lookup
- Field
- QuerySet
- BaseManager

Implementation detail: `__class_getitem__` will be a no-op for django runtime. Since types are only required during `mypy` check.

django-stubs: https://github.com/typeddjango/django-stubs
monkey-patching: https://github.com/typeddjango/django-stubs/blob/5b3088a17a76a77cb56a9c2241c2ddc6ccc8153a/mypy_django_plugin/django/context.py#L60-L61
Related DEP: https://github.com/django/deps/pull/65"	New feature	closed	Utilities	dev	Normal	fixed	types, mypy, django-stubs	David Foster	Ready for checkin	1	0	0	0	0	0
