From a12fde753a62e89145b6836f8d5d76bf4775a5db Mon Sep 17 00:00:00 2001 From: Rustem Saiargaliev Date: Mon, 13 Dec 2021 21:19:12 +0100 Subject: [PATCH 1/2] Add Django 4.0 support, drop official Django 3.1 support https://docs.djangoproject.com/en/4.0/releases/4.0/ Official Django 3.1 support stopped a couple of weeks ago. I think, it is time to drop it from test matrix. Having 2.2 and 3.2 LTS releases implies that 3.1 would work fine. I also dropped main Django branch from test matrix as I don't see much value for us here at this moment. --- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 4 +++- requirements.txt | 2 +- setup.py | 2 +- tox.ini | 15 ++++++--------- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 94c70961..b3a1c966 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dd8c7c1..5d8044e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,17 +10,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - Added postgis version to test settings - Add support for Python 3.10 [PR #244](https://github.com/model-bakers/model_bakery/pull/244) +- Support for Django 4.0 [PR #236](https://github.com/model-bakers/model_bakery/pull/236) ### Changed - Validate `increment_by` parameter of `seq` helper when `value` is an instance of `datetime` [PR #247](https://github.com/model-bakers/model_bakery/pull/247) - Fix a simple typo in `bulk_create` disclaimer in docs - Allow relation `_id` fields to use sequences [PR #253](https://github.com/model-bakers/model_bakery/pull/253/) - Fix bulk_create not working with multi-database setup [PR #252](https://github.com/model-bakers/model_bakery/pull/252) -- Conditionally support NullBooleanField, it's under deprecation and will be removed in Django 4.0 [PR #25](https://github.com/model-bakers/model_bakery/pull/250) +- Conditionally support NullBooleanField, it's under deprecation and will be removed in Django 4.0 [PR #250](https://github.com/model-bakers/model_bakery/pull/250) - Fix Django max version pin in requirements file [PR #251](https://github.com/model-bakers/model_bakery/pull/251) - Improve type hinting to return the correct type depending on `_quantity` usage [PR #261](https://github.com/model-bakers/model_bakery/pull/261) ### Removed +- Drop official Django 3.1 support. Django 2.2 is still supported, and 3.1 will likely keep working, but it’s not tested[PR #236](https://github.com/model-bakers/model_bakery/pull/236) ## [1.3.3](https://pypi.org/project/model-bakery/1.3.3/) diff --git a/requirements.txt b/requirements.txt index 94bccca7..a649b4e6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -django>=2.2,<4.0 +django>=2.2,<5 diff --git a/setup.py b/setup.py index f6a9cf11..68f17bb4 100755 --- a/setup.py +++ b/setup.py @@ -25,8 +25,8 @@ "Development Status :: 5 - Production/Stable", "Framework :: Django", "Framework :: Django :: 2.2", - "Framework :: Django :: 3.1", "Framework :: Django :: 3.2", + "Framework :: Django :: 4.0", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", diff --git a/tox.ini b/tox.ini index 62f02d49..869f7716 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,10 @@ [tox] envlist = - py{36,37,38}-django{22,31,32}-{postgresql,sqlite} - py{39,310}-django{32}-{postgresql,sqlite} - py{39,310}-djangomain + py36-django{22,32}-{postgresql,sqlite} + py37-django{22,32}-{postgresql,sqlite} + py38-django{22,32,40}-{postgresql,sqlite} + py39-django{22,32,40}-{postgresql,sqlite} + py310-django{32,40} [gh-actions] python = @@ -24,13 +26,8 @@ deps = pytest pytest-django django22: Django==2.2 - django31: Django>=3.1,<3.2 django32: Django>=3.2,<3.3 - djangomain: https://github.com/django/django/archive/main.tar.gz + django40: Django>=4.0,<4.1 postgresql: psycopg2-binary -ignore_outcome = - djangomain: True -ignore_errors = - djangomain: True commands = pytest From 021fc64800abfe59122769b3eb1dfe4c48f6c9a8 Mon Sep 17 00:00:00 2001 From: Rustem Saiargaliev Date: Mon, 3 Jan 2022 09:10:36 +0100 Subject: [PATCH 2/2] Review suggestion --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a649b4e6..8c8868a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -django>=2.2,<5 +django>=2.2