Skip to content

Commit

Permalink
Add Django 4.0 support, drop official Django 3.1 support (#236)
Browse files Browse the repository at this point in the history
* 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.

* Review suggestion
  • Loading branch information
amureki committed Jan 3, 2022
1 parent 98d1bbc commit 0c00715
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Expand Up @@ -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/)

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1 +1 @@
django>=2.2,<4.0
django>=2.2
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -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",
Expand Down
15 changes: 6 additions & 9 deletions 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 =
Expand All @@ -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

0 comments on commit 0c00715

Please sign in to comment.