From b64c9afb6e478686ec78d742a2bb74116dca072a Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:03 +0400 Subject: [PATCH 01/17] Update black from 23.3.0 to 23.9.1 --- requirements/requirements-codestyle.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-codestyle.txt b/requirements/requirements-codestyle.txt index 8eba9fae..3a7b1eff 100644 --- a/requirements/requirements-codestyle.txt +++ b/requirements/requirements-codestyle.txt @@ -1,4 +1,4 @@ -black==23.3.0 +black==23.9.1 flake8==6.0.0 flake8-bugbear==23.3.23 flake8-isort==6.0.0 From b11c755810a1d813c2eab33ee776934c350eeb8c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:04 +0400 Subject: [PATCH 02/17] Update flake8 from 6.0.0 to 6.1.0 --- requirements/requirements-codestyle.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-codestyle.txt b/requirements/requirements-codestyle.txt index 3a7b1eff..681e0976 100644 --- a/requirements/requirements-codestyle.txt +++ b/requirements/requirements-codestyle.txt @@ -1,5 +1,5 @@ black==23.9.1 -flake8==6.0.0 +flake8==6.1.0 flake8-bugbear==23.3.23 flake8-isort==6.0.0 isort==5.12.0 From db76f670f6ef4bd3e437e8c968e63f0952461c20 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:04 +0400 Subject: [PATCH 03/17] Update flake8-bugbear from 23.3.23 to 23.9.16 --- requirements/requirements-codestyle.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-codestyle.txt b/requirements/requirements-codestyle.txt index 681e0976..c16d3a03 100644 --- a/requirements/requirements-codestyle.txt +++ b/requirements/requirements-codestyle.txt @@ -1,5 +1,5 @@ black==23.9.1 flake8==6.1.0 -flake8-bugbear==23.3.23 +flake8-bugbear==23.9.16 flake8-isort==6.0.0 isort==5.12.0 From 04d71d91dfe1514f19e0752197e62a8627b7581a Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:05 +0400 Subject: [PATCH 04/17] Update flake8-isort from 6.0.0 to 6.1.0 --- requirements/requirements-codestyle.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-codestyle.txt b/requirements/requirements-codestyle.txt index c16d3a03..cc8adaed 100644 --- a/requirements/requirements-codestyle.txt +++ b/requirements/requirements-codestyle.txt @@ -1,5 +1,5 @@ black==23.9.1 flake8==6.1.0 flake8-bugbear==23.9.16 -flake8-isort==6.0.0 +flake8-isort==6.1.0 isort==5.12.0 From e462b52a583d5ae5146e954608f045f8ad29b88f Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:05 +0400 Subject: [PATCH 05/17] Update sphinx from 6.1.3 to 7.2.6 --- requirements/requirements-documentation.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-documentation.txt b/requirements/requirements-documentation.txt index 36e96657..d0d108e4 100644 --- a/requirements/requirements-documentation.txt +++ b/requirements/requirements-documentation.txt @@ -1,3 +1,3 @@ recommonmark==0.7.1 -Sphinx==6.1.3 +Sphinx==7.2.6 sphinx_rtd_theme==1.2.0 From fa8ba83f476fe1db464ac17040373f9afcb021f1 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:06 +0400 Subject: [PATCH 06/17] Update sphinx_rtd_theme from 1.2.0 to 1.3.0 --- requirements/requirements-documentation.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-documentation.txt b/requirements/requirements-documentation.txt index d0d108e4..8dc46ee5 100644 --- a/requirements/requirements-documentation.txt +++ b/requirements/requirements-documentation.txt @@ -1,3 +1,3 @@ recommonmark==0.7.1 Sphinx==7.2.6 -sphinx_rtd_theme==1.2.0 +sphinx_rtd_theme==1.3.0 From 4b8d1c8d62d3e1d157a44920f7a8d2d0c7480bd7 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:06 +0400 Subject: [PATCH 07/17] Update django-filter from 23.1 to 23.3 --- requirements/requirements-optionals.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-optionals.txt b/requirements/requirements-optionals.txt index b8a8b54d..63486f0b 100644 --- a/requirements/requirements-optionals.txt +++ b/requirements/requirements-optionals.txt @@ -1,4 +1,4 @@ -django-filter==23.1 +django-filter==23.3 django-polymorphic==3.1.0 pyyaml==6.0 uritemplate==4.1.1 From 2cebbce3cb88672f069ea8ad444abd7fd750fa53 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:07 +0400 Subject: [PATCH 08/17] Update pyyaml from 6.0 to 6.0.1 --- requirements/requirements-optionals.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-optionals.txt b/requirements/requirements-optionals.txt index 63486f0b..fc16b02c 100644 --- a/requirements/requirements-optionals.txt +++ b/requirements/requirements-optionals.txt @@ -1,4 +1,4 @@ django-filter==23.3 django-polymorphic==3.1.0 -pyyaml==6.0 +pyyaml==6.0.1 uritemplate==4.1.1 From 2c3f1af2ca8bb30debdf5a161ebe9d4bbb699eee Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:07 +0400 Subject: [PATCH 09/17] Update factory-boy from 3.2.1 to 3.3.0 --- requirements/requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt index 7fac28a4..40be35f4 100644 --- a/requirements/requirements-testing.txt +++ b/requirements/requirements-testing.txt @@ -1,4 +1,4 @@ -factory-boy==3.2.1 +factory-boy==3.3.0 Faker==18.4.0 pytest==7.3.1 pytest-cov==4.0.0 From e0947fa8702ac02da9316401601ff738d08e2832 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:08 +0400 Subject: [PATCH 10/17] Update faker from 18.4.0 to 19.6.1 --- requirements/requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt index 40be35f4..56e7bf7e 100644 --- a/requirements/requirements-testing.txt +++ b/requirements/requirements-testing.txt @@ -1,5 +1,5 @@ factory-boy==3.3.0 -Faker==18.4.0 +Faker==19.6.1 pytest==7.3.1 pytest-cov==4.0.0 pytest-django==4.5.2 From 80630252068150de7a6395d151252e2f7aa5379b Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:08 +0400 Subject: [PATCH 11/17] Update pytest from 7.3.1 to 7.4.2 --- requirements/requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt index 56e7bf7e..841dfa42 100644 --- a/requirements/requirements-testing.txt +++ b/requirements/requirements-testing.txt @@ -1,6 +1,6 @@ factory-boy==3.3.0 Faker==19.6.1 -pytest==7.3.1 +pytest==7.4.2 pytest-cov==4.0.0 pytest-django==4.5.2 pytest-factoryboy==2.5.1 From c87eeed44772eb384f4178eb7062338c371fd06c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:09 +0400 Subject: [PATCH 12/17] Update pytest-cov from 4.0.0 to 4.1.0 --- requirements/requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt index 841dfa42..cc580ff0 100644 --- a/requirements/requirements-testing.txt +++ b/requirements/requirements-testing.txt @@ -1,7 +1,7 @@ factory-boy==3.3.0 Faker==19.6.1 pytest==7.4.2 -pytest-cov==4.0.0 +pytest-cov==4.1.0 pytest-django==4.5.2 pytest-factoryboy==2.5.1 syrupy==3.0.6 From b320c41f1da02498869fe0977991365b1dc8a476 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Sep 2023 18:06:09 +0400 Subject: [PATCH 13/17] Update syrupy from 3.0.6 to 4.5.0 --- requirements/requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt index cc580ff0..64cb57b7 100644 --- a/requirements/requirements-testing.txt +++ b/requirements/requirements-testing.txt @@ -4,4 +4,4 @@ pytest==7.4.2 pytest-cov==4.1.0 pytest-django==4.5.2 pytest-factoryboy==2.5.1 -syrupy==3.0.6 +syrupy==4.5.0 From 15ef04f927e962e2212f97367e714243dc0655bd Mon Sep 17 00:00:00 2001 From: Oliver Sauder Date: Thu, 21 Sep 2023 16:56:54 +0400 Subject: [PATCH 14/17] Adopt to updated versions --- example/factories.py | 4 ++++ example/tests/__snapshots__/test_errors.ambr | 1 + example/tests/__snapshots__/test_openapi.ambr | 1 + setup.cfg | 3 +++ 4 files changed, 9 insertions(+) diff --git a/example/factories.py b/example/factories.py index 37340df4..87698fa2 100644 --- a/example/factories.py +++ b/example/factories.py @@ -37,6 +37,7 @@ class Meta: class AuthorFactory(factory.django.DjangoModelFactory): class Meta: + skip_postgeneration_save = True model = Author name = factory.LazyAttribute(lambda x: faker.name()) @@ -49,6 +50,7 @@ class Meta: class AuthorBioFactory(factory.django.DjangoModelFactory): class Meta: model = AuthorBio + skip_postgeneration_save = True author = factory.SubFactory(AuthorFactory) body = factory.LazyAttribute(lambda x: faker.text()) @@ -69,6 +71,7 @@ class Meta: class EntryFactory(factory.django.DjangoModelFactory): class Meta: model = Entry + skip_postgeneration_save = True headline = factory.LazyAttribute(lambda x: faker.sentence(nb_words=4)) body_text = factory.LazyAttribute(lambda x: faker.text()) @@ -130,6 +133,7 @@ class Meta: class CompanyFactory(factory.django.DjangoModelFactory): class Meta: model = Company + skip_postgeneration_save = True name = factory.LazyAttribute(lambda x: faker.company()) current_project = factory.SubFactory(ArtProjectFactory) diff --git a/example/tests/__snapshots__/test_errors.ambr b/example/tests/__snapshots__/test_errors.ambr index fe872b46..5dca2771 100644 --- a/example/tests/__snapshots__/test_errors.ambr +++ b/example/tests/__snapshots__/test_errors.ambr @@ -1,3 +1,4 @@ +# serializer version: 1 # name: test_first_level_attribute_error dict({ 'errors': list([ diff --git a/example/tests/__snapshots__/test_openapi.ambr b/example/tests/__snapshots__/test_openapi.ambr index 18aec07f..1de8057b 100644 --- a/example/tests/__snapshots__/test_openapi.ambr +++ b/example/tests/__snapshots__/test_openapi.ambr @@ -1,3 +1,4 @@ +# serializer version: 1 # name: test_delete_request ''' { diff --git a/setup.cfg b/setup.cfg index d3ea5ebc..f55ed558 100644 --- a/setup.cfg +++ b/setup.cfg @@ -68,6 +68,9 @@ filterwarnings = # can be removed once fixed in django polymorphic ignore:pkg_resources is deprecated as an API ignore:Deprecated call to `pkg_resource + # Django filter schema generation. Can be removed once we remove + # schema support + ignore:Built-in schema generation is deprecated. testpaths = example tests From 9cdc23e0bf2dbf23c3a08ce1a94052d5566301a0 Mon Sep 17 00:00:00 2001 From: Oliver Sauder Date: Thu, 21 Sep 2023 16:57:00 +0400 Subject: [PATCH 15/17] Use Python 3.9 for build --- .github/workflows/tests.yml | 4 ++-- .readthedocs.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f90480ac..b167fde5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,10 +42,10 @@ jobs: tox-env: ["black", "lint", "docs"] steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.readthedocs.yaml b/.readthedocs.yaml index d70a3ae5..997afe3f 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,7 +3,7 @@ version: 2 build: os: "ubuntu-22.04" tools: - python: "3.8" + python: "3.9" sphinx: configuration: docs/conf.py From 7b7d82e85d6840616cd6186ec62208f9e3ed52c8 Mon Sep 17 00:00:00 2001 From: Oliver Sauder Date: Thu, 21 Sep 2023 16:58:59 +0400 Subject: [PATCH 16/17] Removed duplicated entry in set --- example/tests/integration/test_polymorphism.py | 1 - 1 file changed, 1 deletion(-) diff --git a/example/tests/integration/test_polymorphism.py b/example/tests/integration/test_polymorphism.py index 116243f1..836a9046 100644 --- a/example/tests/integration/test_polymorphism.py +++ b/example/tests/integration/test_polymorphism.py @@ -50,7 +50,6 @@ def test_polymorphism_on_included_relations(single_company, client): for rel in content["data"]["relationships"]["futureProjects"]["data"] } == {"researchProjects", "artProjects"} assert {x.get("type") for x in content.get("included")} == { - "artProjects", "artProjects", "researchProjects", }, "Detail included types are incorrect" From 6a92dcae40ac11d95b8751cd2d9de49468aecf9f Mon Sep 17 00:00:00 2001 From: Oliver Sauder Date: Thu, 21 Sep 2023 17:02:49 +0400 Subject: [PATCH 17/17] Increased tox base python to 3.9 --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 9fb72d1c..8d6df244 100644 --- a/tox.ini +++ b/tox.ini @@ -28,13 +28,13 @@ commands = pytest --cov --no-cov-on-fail --cov-report xml {posargs} [testenv:black] -basepython = python3.8 +basepython = python3.9 deps = -rrequirements/requirements-codestyle.txt commands = black --check . [testenv:lint] -basepython = python3.8 +basepython = python3.9 deps = -rrequirements/requirements-codestyle.txt -rrequirements/requirements-testing.txt @@ -43,7 +43,7 @@ commands = flake8 [testenv:docs] # keep in sync with .readthedocs.yml -basepython = python3.8 +basepython = python3.9 deps = -rrequirements/requirements-optionals.txt -rrequirements/requirements-documentation.txt