Skip to content

Commit

Permalink
Merge branch 'master' into pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani authored Aug 25, 2022
2 parents 9ee8883 + 2e26a46 commit c02aabc
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
django-version: ['3.2', '4.0', 'main']
django-version: ['3.2', '4.0', '4.1', 'main']

exclude:
- python-version: '3.7'
django-version: '4.0'
- python-version: '3.7'
django-version: '4.1'
- python-version: '3.7'
django-version: 'main'
- python-version: '3.10'
django-version: '3.1'

services:

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
language_version: python3.8

- repo: https://github.com/pycqa/flake8
rev: 5.0.3
rev: 5.0.4
hooks:
- id: flake8
args:
Expand Down
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Authors
- Amartis Gladius (`Amartis <https://github.com/amartis>`_)
- Ben Lawson (`blawson <https://github.com/blawson>`_)
- Benjamin Mampaey (`bmampaey <https://github.com/bmampaey>`_)
- Bheesham Persaud (`bheesham <https://github.com/bheesham>`_)
- `bradford281 <https://github.com/bradford281>`_
- Brian Armstrong (`barm <https://github.com/barm>`_)
- Buddy Lindsey, Jr.
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Unreleased
- Fixed typos in the docs
- Removed n+1 query from ``bulk_create_with_history`` utility (gh-975)
- Started using ``exists`` query instead of ``count`` in ``populate_history`` command (gh-982)
- Added support for Django 4.1 (gh-1021)

3.1.1 (2022-04-23)
------------------
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ This app supports the following combinations of Django and Python:
========== ========================
3.2 3.7, 3.8, 3.9, 3.10
4.0 3.8, 3.9, 3.10
4.1 3.8, 3.9, 3.10
========== ========================

Getting Help
Expand Down
2 changes: 0 additions & 2 deletions docs/common_issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ Using custom OneToOneFields
If you are using a custom OneToOneField that has additional arguments and receiving
the the following ``TypeError``::

.. code=block:: python
TypeError: __init__() got an unexpected keyword argument

This is because Django Simple History coerces ``OneToOneField`` into ``ForeignKey``
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ This app supports the following combinations of Django and Python:
========== =======================
3.2 3.7, 3.8, 3.9
4.0 3.8, 3.9, 3.10
4.1 3.8, 3.9, 3.10
========== =======================

Contribute
Expand Down
2 changes: 1 addition & 1 deletion requirements/coverage.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
coverage==6.4.2
coverage==6.4.4
toml==0.10.2
2 changes: 1 addition & 1 deletion requirements/lint.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
black==22.6.0
flake8==5.0.3
flake8==5.0.4
isort==5.10.1
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
Expand Down
10 changes: 2 additions & 8 deletions simple_history/tests/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,14 +1324,8 @@ def test_migrations_include_order(self):

model_state = state.ModelState.from_model(SeriesWork.history.model)
found = False
# `fields` is a dict in Django 3.1
fields = None
if isinstance(model_state.fields, dict):
fields = model_state.fields.items()
else:
fields = model_state.fields

for name, field in fields:

for name, field in model_state.fields.items():
if name == "_order":
found = True
self.assertEqual(type(field), models.IntegerField)
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py{37,38,39,310}-dj32-{sqlite3,postgres,mysql,mariadb},
py{38,39,310}-dj{40,main}-{sqlite3,postgres,mysql,mariadb},
py{38,39,310}-dj{40,41,main}-{sqlite3,postgres,mysql,mariadb},
docs,
lint

Expand All @@ -16,6 +16,7 @@ python =
DJANGO =
3.2: dj32
4.0: dj40
4.1: dj41
main: djmain

[flake8]
Expand All @@ -29,6 +30,7 @@ deps =
-rrequirements/test.txt
dj32: Django>=3.2,<3.3
dj40: Django>=4.0,<4.1
dj41: Django>=4.1,<4.2
djmain: https://github.com/django/django/tarball/main
postgres: -rrequirements/postgres.txt
mysql: -rrequirements/mysql.txt
Expand Down

0 comments on commit c02aabc

Please sign in to comment.