Skip to content

Commit

Permalink
Added tests for psycopg3 support (releated to #421)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlio committed Jul 20, 2024
1 parent 5f24b5f commit 1bd739a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.python.org/downloads/release/python-3717/>`_ received its last security update more than a year ago (from the date of this release).


Version 2.6.0 (14 May 2023)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[testoptions]
requires = psycopg3
1 change: 1 addition & 0 deletions pylint_django/tests/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SECRET_KEY = "fake-key"
USE_TZ = False

INSTALLED_APPS = [
"django.contrib.auth",
Expand Down

0 comments on commit 1bd739a

Please sign in to comment.