What's Changed
- Refine
Model._meta.get_field("field_name")
type inference by @UnknownPlatypus in #2748 - Adds check for too many positional arguments in
__init__
calls by @UnknownPlatypus in #2749 - Improve
settings.TEMPLATE
types by @UnknownPlatypus in #2741 - Change partition input to any iterable by @bewing in #2752
content_type_extra
containsbytes
, notstr
by @alexmv in #2754- Allow passing None to migrations.AlterOrderWithRespectTo by @niklasmohrin in #2759
- Annotate return type of
reverse_lazy()
by @pgcd in #2766 - Change
FormMixin.success_url
to_StrOrPromise
by @pgcd in #2769 - More lazy urls by @ngnpope in #2770
- Allow all error types to
BaseForm.add_error()
in documentation by @CarrotManMatt in #2774 - Remove
OrderedDict
usage, this is the default since py 3.6 by @UnknownPlatypus in #2780 - Simpler
get_current_module
util by @UnknownPlatypus in #2781 - Initial support for
to_attr
inferrence inPrefetch
calls by @UnknownPlatypus in #2779 - Reuse
get_class_init_argument_by_name
inresolve_many_to_many_arguments
by @UnknownPlatypus in #2782 - Simplify parsing of bool call arguments by @UnknownPlatypus in #2783
- Improve
Model
inference from customQuerySet
/Manager
by @UnknownPlatypus in #2784 - Declare
Prefetch
as generic and do specialization in the plugin by @UnknownPlatypus in #2786 - Update
Meta.permissions
type by @UnknownPlatypus in #2787 - Support star arg in
prefetch_related
calls by @UnknownPlatypus in #2789 - Auto inherit from
TypedModelMeta
by @UnknownPlatypus in #2788 - Improve
.select_related
stubs by @UnknownPlatypus in #2792 - Handle
.prefetch_related(..., to_attr="foo")
conflict with.annotate(foo=...)
by @UnknownPlatypus in #2791 - Detect invalid
to_attr
target (alredy defined fields) by @UnknownPlatypus in #2794 - Improve type for
order_by
/defer
/only
/distinct
/order_by
/explain
/dates
/datetimes
by @UnknownPlatypus in #2795 - Improve
prefetch_related
types with an overload by @UnknownPlatypus in #2793 - Detect more incompatible
to_attr
targets by @UnknownPlatypus in #2797 - Update django to 5.2.6 by @sobolevn in #2805
- Add lookup validation in prefetch related by @UnknownPlatypus in #2804
- Update mypy configuration by @ngnpope in #2799
- Validate
select_related
lookups by @UnknownPlatypus in #2806 - Bump mypy to 1.18.1 by @sobolevn in #2810
New Contributors
- @bewing made their first contribution in #2752
- @niklasmohrin made their first contribution in #2759
- @pgcd made their first contribution in #2766
- @CarrotManMatt made their first contribution in #2774
- @CodingWithSaksham made their first contribution in #2802
Full Changelog: 5.2.2...5.2.3