1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #33872 -- Removed django.contrib.postgres.fields.CIText/CICharField/CIEmailField/CITextField.

Per deprecation timeline.
This commit is contained in:
Mariusz Felisiak
2023-09-13 14:03:45 +02:00
parent 6e4e5523a8
commit 04eb1b4567
12 changed files with 49 additions and 286 deletions

View File

@@ -104,46 +104,42 @@ class DeprecatedFieldsTests(SimpleTestCase):
self.assertEqual(
PostgresCIFieldsModel.check(),
[
checks.Warning(
"django.contrib.postgres.fields.CICharField is deprecated. Support "
"for it (except in historical migrations) will be removed in "
"Django 5.1.",
checks.Error(
"django.contrib.postgres.fields.CICharField is removed except for "
"support in historical migrations.",
hint=(
'Use CharField(db_collation="") with a case-insensitive '
"non-deterministic collation instead."
),
obj=PostgresCIFieldsModel._meta.get_field("ci_char"),
id="fields.W905",
id="fields.E905",
),
checks.Warning(
"django.contrib.postgres.fields.CIEmailField is deprecated. "
"Support for it (except in historical migrations) will be removed "
"in Django 5.1.",
checks.Error(
"django.contrib.postgres.fields.CIEmailField is removed except for "
"support in historical migrations.",
hint=(
'Use EmailField(db_collation="") with a case-insensitive '
"non-deterministic collation instead."
),
obj=PostgresCIFieldsModel._meta.get_field("ci_email"),
id="fields.W906",
id="fields.E906",
),
checks.Warning(
"django.contrib.postgres.fields.CITextField is deprecated. Support "
"for it (except in historical migrations) will be removed in "
"Django 5.1.",
checks.Error(
"django.contrib.postgres.fields.CITextField is removed except for "
"support in historical migrations.",
hint=(
'Use TextField(db_collation="") with a case-insensitive '
"non-deterministic collation instead."
),
obj=PostgresCIFieldsModel._meta.get_field("ci_text"),
id="fields.W907",
id="fields.E907",
),
checks.Warning(
"Base field for array has warnings:\n"
" django.contrib.postgres.fields.CITextField is deprecated. "
"Support for it (except in historical migrations) will be removed "
"in Django 5.1. (fields.W907)",
checks.Error(
"Base field for array has errors:\n"
" django.contrib.postgres.fields.CITextField is removed except "
"for support in historical migrations. (fields.E907)",
obj=PostgresCIFieldsModel._meta.get_field("array_ci_text"),
id="postgres.W004",
id="postgres.E001",
),
],
)