diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2ed8a863..bb486bfe 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,7 +7,7 @@ Version 2.7.0 NOTICE ~~~~~~ -This version drops support for Python 3.7 - latest Pylint no longer supports 3.7, and CI tasks were taking hours under 3.7 +This version drops support for Python 3.7 - latest Pylint no longer supports 3.7, and CI tasks were taking hours under 3.7. `Python 3.7 `_ received its last security update more than a year ago (from the date of this release). Version 2.6.0 (14 May 2023) diff --git a/pylint_django/tests/input/external_psycopg3_noerror_postgres_fields.py b/pylint_django/tests/input/external_psycopg3_noerror_postgres_fields.py new file mode 100644 index 00000000..5febb28e --- /dev/null +++ b/pylint_django/tests/input/external_psycopg3_noerror_postgres_fields.py @@ -0,0 +1,16 @@ +""" +Checks that Pylint does not complain Postgres model fields. +""" +# pylint: disable=C0111,W5101 +from __future__ import print_function + +from django.contrib.postgres import fields +from django.db import models + + +class PostgresFieldsModel(models.Model): + period = fields.DateRangeField(null=False, blank=False) + + def rangefield_tests(self): + print(self.period.lower) + print(self.period.upper) diff --git a/pylint_django/tests/input/external_psycopg3_noerror_postgres_fields.rc b/pylint_django/tests/input/external_psycopg3_noerror_postgres_fields.rc new file mode 100644 index 00000000..148979b4 --- /dev/null +++ b/pylint_django/tests/input/external_psycopg3_noerror_postgres_fields.rc @@ -0,0 +1,2 @@ +[testoptions] +requires = psycopg3 diff --git a/pylint_django/tests/settings.py b/pylint_django/tests/settings.py index 075f4207..394c910b 100644 --- a/pylint_django/tests/settings.py +++ b/pylint_django/tests/settings.py @@ -1,4 +1,5 @@ SECRET_KEY = "fake-key" +USE_TZ = False INSTALLED_APPS = [ "django.contrib.auth",