Skip to content

Commit

Permalink
5.0: Update django.core.serializers (#2068)
Browse files Browse the repository at this point in the history
  • Loading branch information
sudosubin authored Apr 16, 2024
1 parent df8aded commit f969742
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
5 changes: 0 additions & 5 deletions django-stubs/contrib/sessions/serializers.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
from django.core.signing import JSONSerializer as BaseJSONSerializer
from django.db.models.base import Model
from typing_extensions import TypeAlias

class PickleSerializer:
def dumps(self, obj: dict[str, Model]) -> bytes: ...
def loads(self, data: bytes) -> dict[str, Model]: ...

JSONSerializer: TypeAlias = BaseJSONSerializer
7 changes: 0 additions & 7 deletions django-stubs/core/serializers/base.pyi
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
from collections.abc import Collection, Iterable, Sequence
from typing import IO, Any

from _typeshed import ReadableBuffer
from django.db.models.base import Model
from django.db.models.fields import Field
from django.db.models.fields.related import ForeignKey, ManyToManyField

DEFER_FIELD: object

class PickleSerializer:
protocol: int
def __init__(self, protocol: int | None = ...) -> None: ...
def dumps(self, obj: Any) -> bytes: ...
def loads(self, data: ReadableBuffer) -> Any: ...

class SerializerDoesNotExist(KeyError): ...
class SerializationError(Exception): ...

Expand Down
2 changes: 0 additions & 2 deletions scripts/stubtest/allowlist_todo_django50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ django.contrib.messages.test
django.contrib.redirects.migrations.0001_initial
django.contrib.redirects.migrations.0002_alter_redirect_new_path_help_text
django.contrib.sessions.migrations.0001_initial
django.contrib.sessions.serializers.PickleSerializer
django.contrib.sitemaps.PING_URL
django.contrib.sitemaps.SitemapNotFound
django.contrib.sitemaps.management
Expand All @@ -57,7 +56,6 @@ django.contrib.sites.migrations.0001_initial
django.contrib.sites.migrations.0002_alter_domain_unique
django.contrib.staticfiles.checks.E005
django.contrib.staticfiles.checks.check_storages
django.core.serializers.base.PickleSerializer
django.db.backends.base.features.BaseDatabaseFeatures.delete_can_self_reference_subquery
django.db.backends.base.features.BaseDatabaseFeatures.insert_test_table_with_defaults
django.db.backends.base.features.BaseDatabaseFeatures.supports_default_keyword_in_bulk_insert
Expand Down

0 comments on commit f969742

Please sign in to comment.