diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 44b8a8a..55a9776 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,12 +19,13 @@ jobs: strategy: matrix: # https://github.com/actions/python-versions/blob/main/versions-manifest.json - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12.0-rc.3"] django-version: - "Django>=3.2,<4.0" - "Django>=4.1,<4.2" - "Django>=4.2,<5.0" - - "https://github.com/django/django/archive/main.tar.gz" + - "Django>=5.0,<5.1" + # - "https://github.com/django/django/archive/main.tar.gz" include: - drf: djangorestframework python-version: "3.11" @@ -32,9 +33,9 @@ jobs: - django-version: "Django<4.0,>=3.2" python-version: 3.7 exclude: - - django-version: "https://github.com/django/django/archive/main.tar.gz" + - django-version: "Django>=5.0,<5.1" python-version: 3.8 - - django-version: "https://github.com/django/django/archive/main.tar.gz" + - django-version: "Django>=5.0,<5.1" python-version: 3.9 steps: diff --git a/README.md b/README.md index 15feeb0..f284920 100644 --- a/README.md +++ b/README.md @@ -9,16 +9,16 @@ Collection of useful checks for Django Checks Frameworks - **extra-checks-config** - settings.EXTRA_CHECKS is valid config for django-extra-checks (always enabled). - **model-attribute** - Each Model in the project must have all attributes from `attrs` setting specified. - **model-meta-attribute** - Each Model.Meta in the project must have all attributes from `attrs` setting specified. -- **no-unique-together** - Use UniqueConstraint with the constraints option instead. -- **no-index-together** - Use the indexes option instead. +- **no-unique-together** - Use `UniqueConstraint` with the `constraints` option instead. +- **no-index-together** - [DEPRECATED] Use the `indexes` option instead. - **model-admin** - Each model must be registered in admin. -- **field-file-upload-to** - FileField/ImageField must have non empty `upload_to` argument. +- **field-file-upload-to** - `FileField` / `ImageField` must have non empty `upload_to` argument. - **field-verbose-name** - All model's fields must have verbose name. -- **field-verbose-name-gettext** - verbose_name must use gettext. +- **field-verbose-name-gettext** - `verbose_name` must use gettext. - **field-verbose-name-gettext-case** - Words in text wrapped with gettext must be in one case. -- **field-help-text-gettext** - help_text must use gettext. +- **field-help-text-gettext** - `help_text` must use gettext. - **field-text-null** - text fields shouldn't use `null=True`. -- **field-boolean-null** - prefer using `BooleanField(null=True)` instead of `NullBooleanField`. +- **field-boolean-null** - [DEPRECATED] prefer using `BooleanField(null=True)` instead of `NullBooleanField`. - **field-null** - don't pass `null=False` to model fields (this is django default). - **field-foreign-key-db-index** - ForeignKey fields must specify `db_index` explicitly (to apply only to fields in indexes: `when: indexes`). - **field-related-name** - Related fields must specify `related_name` explicitly. diff --git a/src/extra_checks/checks/model_checks.py b/src/extra_checks/checks/model_checks.py index ffd8d65..b420e96 100644 --- a/src/extra_checks/checks/model_checks.py +++ b/src/extra_checks/checks/model_checks.py @@ -184,6 +184,9 @@ def apply( @registry.register(django.core.checks.Tags.models) class CheckNoIndexTogether(CheckModelMeta): Id = CheckId.X014 + deprecation_warnings = [ + "`no-index-together` check is deprecated and will be removed in version 0.14.0" + ] def apply( self, model: Type[models.Model], ast: ModelASTProtocol