ValuesQuerySet
and QuerySetAny
are now deprecated (django-stubs 5.0.1)
#2194
intgr
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Beginning with django-stubs version 5.0.1, the type aliases
ValuesQuerySet
andQuerySetAny
(exported fromdjango_stubs_ext
) are no longer needed.The ordinary
QuerySet
type (exported fromdjango.db.models
) now replaces both use cases:ValuesQuerySet[MyModel, int]
->QuerySet[MyModel, int]
isinstance(x, QuerySetAny)
->isinstance(x, QuerySet)
There are no immediate plans to remove the old type aliases, but we probaby will remove them eventually.
Related PRs:
Historical background for
QuerySetAny
:QuerySetAny
type for QuerySet isinstance checks #1199Beta Was this translation helpful? Give feedback.
All reactions