Skip to content

Commit

Permalink
Django 5.0 compatibility
Browse files Browse the repository at this point in the history
Support and test against Django 5 with psycopg2 and psycopg3.

Type: feature
Co-authored-by: Pascal F <[email protected]>
  • Loading branch information
wesleykendall and pfouque committed Nov 26, 2023
1 parent 3d01ed7 commit 2e1366e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ If triggers are new to you, don't worry. The [pgtrigger docs](https://django-pgt

## Compatibility

`django-pgtrigger` is compatible with Python 3.8 - 3.12, Django 3.2 - 4.2, Psycopg 2 - 3, and Postgres 12 - 16.
`django-pgtrigger` is compatible with Python 3.8 - 3.12, Django 3.2 - 5.0, Psycopg 2 - 3, and Postgres 12 - 16.

## Documentation

Expand Down Expand Up @@ -111,3 +111,4 @@ For information on setting up django-pgtrigger for development and contributing
- @danifus
- @kekekekule
- @peterthomassen
- @pfouque
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Triggers are installed like other database objects. Run `python manage.py makemi

## Compatibility

`django-pgtrigger` is compatible with Python 3.8 - 3.12, Django 3.2 - 4.2, Psycopg 2 - 3, and Postgres 12 - 16.
`django-pgtrigger` is compatible with Python 3.8 - 3.12, Django 3.2 - 5.0, Psycopg 2 - 3, and Postgres 12 - 16.

## Next steps

Expand Down
2 changes: 1 addition & 1 deletion footing.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
_extensions:
- jinja2_time.TimeExtension
_template: [email protected]:Opus10/public-django-app-template.git
_version: 61fb54bab32508ca0cc5d70a9155f49d124f04c0
_version: a2f39d5ad54f2ef63172d2b43756a85ec66eb12e
module_name: pgtrigger
repo_name: django-pgtrigger
short_description: Postgres trigger support integrated with Django models.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ classifiers = [
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
Expand Down
15 changes: 11 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
[tox]
isolated_build = true
envlist = py{38,39,310,311,312}-django{32,42}-psycopg2,py312-django42-psycopg3,report
envlist =
py{38,39,310,311,312}-django32-psycopg2
py{38,39,310,311,312}-django42-psycopg2
py312-django42-psycopg3
py{310,311,312}-django50-psycopg2
py312-django50-psycopg3
report

[testenv]
install_command = pip install {opts} --no-compile {packages}
deps =
django32: Django>=3.2,<3.3
django42: Django>=4.2,<4.3
django50: Django>=5.0rc1,<5.1
psycopg2: psycopg2-binary
psycopg3: psycopg[binary]
allowlist_externals =
Expand All @@ -20,16 +27,16 @@ skip_install = true
commands =
bash -c 'poetry export --with dev --without-hashes -f requirements.txt | grep -v "^[dD]jango==" | grep -v "^psycopg2-binary==" | pip install --no-compile -q --no-deps -r /dev/stdin'
pip install --no-compile -q --no-deps --no-build-isolation -e .
pytest --create-db --cov --cov-fail-under=0 --cov-append --cov-config pyproject.toml pgtrigger/
pytest --create-db --cov --cov-fail-under=0 --cov-append --cov-config pyproject.toml {posargs}
# There are some tests that must run independently of the original test suite because of making
# dynamic models
pytest --create-db --cov --cov-fail-under=0 --cov-append --cov-config pyproject.toml -m independent pgtrigger/
pytest --create-db --cov --cov-fail-under=0 --cov-append --cov-config pyproject.toml -m independent {posargs}

[testenv:report]
allowlist_externals =
coverage
skip_install = true
depends = py{38,39,310,311,312}-django{32,42}-psycopg2,py312-django42-psycopg3
depends = py{38,39,310,311,312}-django{32,42}-psycopg2,py312-django42-psycopg3-py{310,311,312}-django50-psycopg2-py312-django50-psycopg3
parallel_show_output = true
commands =
coverage report --fail-under 100
Expand Down

0 comments on commit 2e1366e

Please sign in to comment.