Skip to content

Scheduled biweekly dependency update for week 08 #1129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion example/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand Down
1 change: 0 additions & 1 deletion example/migrations/0002_taggeditem.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class Migration(migrations.Migration):

dependencies = [
("contenttypes", "0002_remove_content_type_name"),
("example", "0001_initial"),
Expand Down
1 change: 0 additions & 1 deletion example/migrations/0003_polymorphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class Migration(migrations.Migration):

dependencies = [
("contenttypes", "0002_remove_content_type_name"),
("example", "0002_taggeditem"),
Expand Down
1 change: 0 additions & 1 deletion example/migrations/0004_auto_20171011_0631.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class Migration(migrations.Migration):

dependencies = [
("example", "0003_polymorphics"),
]
Expand Down
1 change: 0 additions & 1 deletion example/migrations/0005_auto_20180922_1508.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("example", "0004_auto_20171011_0631"),
]
Expand Down
1 change: 0 additions & 1 deletion example/migrations/0006_auto_20181228_0752.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("example", "0005_auto_20180922_1508"),
]
Expand Down
1 change: 0 additions & 1 deletion example/migrations/0007_artproject_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("example", "0006_auto_20181228_0752"),
]
Expand Down
1 change: 0 additions & 1 deletion example/migrations/0008_labresults.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("example", "0007_artproject_description"),
]
Expand Down
1 change: 0 additions & 1 deletion example/migrations/0009_labresults_author.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("example", "0008_labresults"),
]
Expand Down
1 change: 0 additions & 1 deletion example/migrations/0010_auto_20210714_0809.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("example", "0009_labresults_author"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("contenttypes", "0002_remove_content_type_name"),
("example", "0010_auto_20210714_0809"),
Expand Down
1 change: 0 additions & 1 deletion example/migrations/0012_author_full_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("example", "0011_rename_type_author_author_type_and_more"),
]
Expand Down
1 change: 0 additions & 1 deletion example/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ class JSONAPIMeta:


class EntryDRFSerializers(drf_serilazers.ModelSerializer):

tags = TaggedItemDRFSerializer(many=True, read_only=True)
url = drf_serilazers.HyperlinkedIdentityField(
view_name="drf-entry-blog-detail",
Expand Down
2 changes: 0 additions & 2 deletions example/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

@pytest.fixture
def single_entry(blog, author, entry_factory, comment_factory, tagged_item_factory):

entry = entry_factory(blog=blog, authors=(author,))
comment_factory(entry=entry)
tagged_item_factory(content_object=entry)
Expand All @@ -40,7 +39,6 @@ def single_entry(blog, author, entry_factory, comment_factory, tagged_item_facto

@pytest.fixture
def multiple_entries(blog_factory, author_factory, entry_factory, comment_factory):

entries = [
entry_factory(blog=blog_factory(), authors=(author_factory(),)),
entry_factory(blog=blog_factory(), authors=(author_factory(),)),
Expand Down
2 changes: 0 additions & 2 deletions example/tests/integration/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


def test_top_level_meta_for_list_view(blog, client):

expected = {
"data": [
{
Expand Down Expand Up @@ -37,7 +36,6 @@ def test_top_level_meta_for_list_view(blog, client):


def test_top_level_meta_for_detail_view(blog, client):

expected = {
"data": {
"type": "blogs",
Expand Down
2 changes: 0 additions & 2 deletions example/tests/integration/test_model_resource_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def _check_relationship_and_included_comment_type_are_the_same(django_client, ur

@pytest.mark.usefixtures("single_entry")
class TestModelResourceName:

create_data = {
"data": {
"type": "resource_name_from_JSONAPIMeta",
Expand Down Expand Up @@ -147,7 +146,6 @@ def teardown_method(self, method):

@pytest.mark.usefixtures("single_entry")
class TestResourceNameConsistency:

# Included rename tests
def test_type_match_on_included_and_inline_base(self, client):
_check_relationship_and_included_comment_type_are_the_same(
Expand Down
1 change: 0 additions & 1 deletion example/tests/integration/test_non_paginated_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
new=lambda s: [],
)
def test_multiple_entries_no_pagination(multiple_entries, client):

expected = {
"data": [
{
Expand Down
1 change: 0 additions & 1 deletion example/tests/integration/test_pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
new=lambda s: [],
)
def test_pagination_with_single_entry(single_entry, client):

expected = {
"data": [
{
Expand Down
4 changes: 0 additions & 4 deletions example/tests/unit/test_default_drf_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def test_render_format_field_names(db, settings, entry):

@pytest.mark.django_db
def test_blog_create(client):

url = reverse("drf-entry-blog-list")
name = "Dummy Name"

Expand Down Expand Up @@ -107,7 +106,6 @@ def test_blog_create(client):

@pytest.mark.django_db
def test_get_object_gives_correct_blog(client, blog, entry):

url = reverse("drf-entry-blog-detail", kwargs={"entry_pk": entry.id})
resp = client.get(url)
expected = {
Expand All @@ -126,7 +124,6 @@ def test_get_object_gives_correct_blog(client, blog, entry):

@pytest.mark.django_db
def test_get_object_patches_correct_blog(client, blog, entry):

url = reverse("drf-entry-blog-detail", kwargs={"entry_pk": entry.id})
new_name = blog.name + " update"
assert not new_name == blog.name
Expand Down Expand Up @@ -163,7 +160,6 @@ def test_get_object_patches_correct_blog(client, blog, entry):

@pytest.mark.django_db
def test_get_object_deletes_correct_blog(client, entry):

url = reverse("drf-entry-blog-detail", kwargs={"entry_pk": entry.id})

resp = client.delete(url)
Expand Down
6 changes: 3 additions & 3 deletions requirements/requirements-codestyle.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
black==22.12.0
black==23.1.0
flake8==6.0.0
flake8-bugbear==23.1.14
flake8-bugbear==23.2.13
flake8-isort==6.0.0
isort==5.11.4
isort==5.12.0
4 changes: 2 additions & 2 deletions requirements/requirements-documentation.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
recommonmark==0.7.1
Sphinx==5.3.0
sphinx_rtd_theme==1.1.1
Sphinx==6.1.3
sphinx_rtd_theme==1.2.0
2 changes: 1 addition & 1 deletion requirements/requirements-testing.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
factory-boy==3.2.1
Faker==16.4.0
Faker==17.0.0
pytest==7.2.1
pytest-cov==4.0.0
pytest-django==4.5.2
Expand Down
2 changes: 0 additions & 2 deletions rest_framework_json_api/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ def render_errors(self, data, accepted_media_type=None, renderer_context=None):
)

def render(self, data, accepted_media_type=None, renderer_context=None):

renderer_context = renderer_context or {}

view = renderer_context.get("view", None)
Expand Down Expand Up @@ -545,7 +544,6 @@ def render(self, data, accepted_media_type=None, renderer_context=None):
included_resources = utils.get_included_resources(request, serializer)

if serializer is not None:

# Extract root meta for any type of serializer
json_api_meta.update(self.extract_root_meta(serializer, serializer_data))

Expand Down
5 changes: 2 additions & 3 deletions rest_framework_json_api/schemas/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,8 @@ def get_schema(self, request=None, public=False):
if components_schemas[k] == components[k]:
continue
warnings.warn(
'Schema component "{}" has been overriden with a different value.'.format(
k
)
f'Schema component "{k}" has been overriden with a different value.',
stacklevel=1,
)

components_schemas.update(components)
Expand Down
1 change: 0 additions & 1 deletion rest_framework_json_api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ def format_drf_errors(response, context, exc):
def format_error_object(message, pointer, response):
errors = []
if isinstance(message, dict):

# as there is no required field in error object we check that all fields are string
# except links, source or meta which might be a dict
is_custom_error = all(
Expand Down
2 changes: 0 additions & 2 deletions rest_framework_json_api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def get_queryset(self, *args, **kwargs):
self.request, self.get_serializer_class()
)
for included in included_resources + ["__all__"]:

select_related = self.get_select_related(included)
if select_related is not None:
qs = qs.select_related(*select_related)
Expand Down Expand Up @@ -110,7 +109,6 @@ def get_queryset(self, *args, **kwargs):
if level == levels[-1]:
included_model = field
else:

if issubclass(field_class, ReverseOneToOneDescriptor):
model_field = field.related.field
else:
Expand Down