Leaklens

django__django-11880

Form Field’s __deepcopy__ does not (deep)copy the error messages.

Verdict: the issue points to the file or function that was changed (Tier B).

The __deepcopy__ method defined for the formfields (​https://github.com/django/django/blob/146086f219d01dbb1cd8c089b5a5667e396e1cc4/django/forms/fields.py#L200) performs a shallow copy of self and does not include additional treatment for the error_messages dictionary.

The text points to the exact place to change: “The __deepcopy__ method defined for the formfields (​https://github.com/django/django/blob/146086f219d01dbb1cd8c089b5a5667e396e1cc4/django/forms/fields.py#L200) performs…”

All SWE-bench Verified tasks · more django/django tasks · How the check works