Skip to content

Commit

Permalink
5.0: Update django.http (#2064)
Browse files Browse the repository at this point in the history
* 5.0: Update `django.http`

* Update django-stubs/http/multipartparser.pyi

---------

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
  • Loading branch information
sudosubin and sobolevn committed Apr 15, 2024
1 parent c0e4cff commit 236dbdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions django-stubs/http/multipartparser.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class InputStreamExhausted(Exception): ...
RAW: Literal["raw"]
FILE: Literal["file"]
FIELD: Literal["field"]
FIELD_TYPES: frozenset[str]

class MultiPartParser:
def __init__(
Expand Down
4 changes: 3 additions & 1 deletion django-stubs/http/request.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import datetime
from collections.abc import Iterable, Mapping
from io import BytesIO
from re import Pattern
from typing import Any, BinaryIO, Literal, NoReturn, TypeVar, overload, type_check_only
from typing import Any, BinaryIO, Callable, Literal, NoReturn, TypeVar, overload, type_check_only

from django.contrib.auth.base_user import AbstractBaseUser
from django.contrib.auth.models import AnonymousUser
Expand Down Expand Up @@ -56,6 +56,8 @@ class HttpRequest(BytesIO):
current_app: str
# django.contrib.auth.middleware.AuthenticationMiddleware:
user: AbstractBaseUser | AnonymousUser
# django.contrib.auth.middleware.AuthenticationMiddleware:
auser: Callable[[], AbstractBaseUser | AnonymousUser]
# django.middleware.locale.LocaleMiddleware:
LANGUAGE_CODE: str
# django.contrib.sites.middleware.CurrentSiteMiddleware
Expand Down

0 comments on commit 236dbdd

Please sign in to comment.