Monkeypatch some more generics. (#1050)

* Add generic monkeypatching for `FileProxyMixin`.

This fixes `TypeError: 'type' object is not subscriptable` for
`django.core.files.File` and `django.core.files.base.ContentFile`.

* Add generic monkeypatching for `ForeignKey`.

This matches the change coming in Django 4.1.

See https://github.com/django/django/pull/15571
This commit is contained in:
Nick Pope authored and GitHub committed 2022-07-06 01:19:51 +03:00
1 parent 516deba2fa
commit e8d52fe7da
2 files changed
+7

No files matched your search

@@ -82,6 +82,8 @@ def test_patched_extra_classes_generics(make_generic_classes: _MakeGenericClasse
(3, 0),
(3, 1),
(3, 2),
(4, 0),
(4, 1),
],
)
def test_patched_version_specific(