﻿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
37259	Model.from_db() overrides without fetch_mode argument crash with TypeError on any query	Adam Johnson	Adam Johnson	"The fetch modes feature added in Django 6.1 (#28586) made every query
iteration path pass a new `fetch_mode` keyword argument to
`Model.from_db()`. Any model that overrides `from_db()` with the
signature documented in the model instance reference —
`from_db(cls, db, field_names, values)`, including the documented
`_loaded_values` example — now crashes on **any** database fetch:

{{{
TypeError: MyModel.from_db() got an unexpected keyword argument 'fetch_mode'
}}}

This worked on Django 6.0 and all earlier versions.

The proposed fix is to deprecate `from_db()` overrides that do not accept the new `fetch_mode` keyword argument, using `django.utils.inspect` to detect the override signature and conditionally pass `fetch_mode` or not, emitting a `RemovedInDjango70Warning` for old-signature overrides."	Bug	assigned	Database layer (models, ORM)	6.1	Release blocker				Unreviewed	1	0	0	0	0	0
