Skip to content

Commit 9fa5253

Browse files
committed
Update tested versions, remove some compatability code, bump version
1 parent 30bda26 commit 9fa5253

File tree

7 files changed

+15
-19
lines changed

7 files changed

+15
-19
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
py:
18+
- "3.11"
1819
- "3.10"
1920
- "3.9"
2021
- "3.8"
2122
- "3.7"
2223
postgres-version:
23-
- 11-bullseye
24+
# - 11-bullseye - Postgres 11 is still supported, but Django 4.2 doesn't support it anymore, to keep simpler stop testing here
2425
- 12
2526
- 13
2627
- 14
28+
- 15
2729
steps:
2830
- name: Setup python for test ${{ matrix.py }}
2931
uses: actions/setup-python@v4

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/ambv/black
3-
rev: "22.10.0"
3+
rev: "23.1.0"
44
hooks:
55
- id: black
66
language_version: python3.7

django_pgviews/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
import django
2-
3-
if django.VERSION < (3, 2):
4-
default_app_config = "django_pgviews.apps.ViewConfig"

django_pgviews/view.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -363,18 +363,13 @@ def __new__(metacls, name, bases, attrs):
363363
return view_cls
364364

365365
def add_to_class(self, name, value):
366-
if django.VERSION >= (1, 10) and name == "_base_manager":
366+
if name == "_base_manager":
367367
return
368368
super(ViewMeta, self).add_to_class(name, value)
369369

370370

371-
if django.VERSION >= (1, 10):
372-
373-
class BaseManagerMeta:
374-
base_manager_name = "objects"
375-
376-
else:
377-
BaseManagerMeta = object
371+
class BaseManagerMeta:
372+
base_manager_name = "objects"
378373

379374

380375
class View(models.Model, metaclass=ViewMeta):

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name="django-pgviews-redux",
16-
version="0.9.0",
16+
version="0.9.1",
1717
description="Create and manage Postgres SQL Views in Django",
1818
long_description=LONG_DESCRIPTION,
1919
long_description_content_type="text/markdown",
@@ -30,9 +30,11 @@
3030
"Programming Language :: Python :: 3.8",
3131
"Programming Language :: Python :: 3.9",
3232
"Programming Language :: Python :: 3.10",
33+
"Programming Language :: Python :: 3.11",
3334
"Framework :: Django",
3435
"Framework :: Django :: 3.2",
3536
"Framework :: Django :: 4.0",
3637
"Framework :: Django :: 4.1",
38+
"Framework :: Django :: 4.2",
3739
],
3840
)

tests/requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# Django 2.2 breaks on psycopg2>=2.9 (https://github.com/psycopg/psycopg2/issues/1293#issuecomment-862835147)
2-
psycopg2<2.9
1+
psycopg2>2.9

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
[tox]
22
envlist =
33
py{37,38,39,310}-dj{32},
4-
py{38,39,310}-dj{40,41}
4+
py{38,39,310,311}-dj{40,41,42}
55

66
[gh]
77
python =
88
"3.7" = py37
99
"3.8" = py38
1010
"3.9" = py39
1111
"3.10" = py310
12+
"3.11" = py311
1213

1314
[testenv]
1415
usedevelop = true
@@ -20,6 +21,7 @@ deps=
2021
dj32: https://github.com/django/django/archive/stable/3.2.x.tar.gz#egg=django
2122
dj40: https://github.com/django/django/archive/stable/4.0.x.tar.gz#egg=django
2223
dj41: https://github.com/django/django/archive/stable/4.1.x.tar.gz#egg=django
24+
dj42: https://github.com/django/django/archive/stable/4.2.x.tar.gz#egg=django
2325
commands=
2426
python manage.py test {posargs:test_project.viewtest test_project.multidbtest}
25-
passenv = DB_NAME DB_USER DB_PASSWORD
27+
passenv = DB_NAME,DB_USER,DB_PASSWORD

0 commit comments

Comments
 (0)