Skip to content

Commit 236dbdd

Browse files
sudosubinsobolevn
andauthored
5.0: Update django.http (#2064)
* 5.0: Update `django.http` * Update django-stubs/http/multipartparser.pyi --------- Co-authored-by: Nikita Sobolev <[email protected]>
1 parent c0e4cff commit 236dbdd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

django-stubs/http/multipartparser.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class InputStreamExhausted(Exception): ...
1010
RAW: Literal["raw"]
1111
FILE: Literal["file"]
1212
FIELD: Literal["field"]
13+
FIELD_TYPES: frozenset[str]
1314

1415
class MultiPartParser:
1516
def __init__(

django-stubs/http/request.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import datetime
22
from collections.abc import Iterable, Mapping
33
from io import BytesIO
44
from re import Pattern
5-
from typing import Any, BinaryIO, Literal, NoReturn, TypeVar, overload, type_check_only
5+
from typing import Any, BinaryIO, Callable, Literal, NoReturn, TypeVar, overload, type_check_only
66

77
from django.contrib.auth.base_user import AbstractBaseUser
88
from django.contrib.auth.models import AnonymousUser
@@ -56,6 +56,8 @@ class HttpRequest(BytesIO):
5656
current_app: str
5757
# django.contrib.auth.middleware.AuthenticationMiddleware:
5858
user: AbstractBaseUser | AnonymousUser
59+
# django.contrib.auth.middleware.AuthenticationMiddleware:
60+
auser: Callable[[], AbstractBaseUser | AnonymousUser]
5961
# django.middleware.locale.LocaleMiddleware:
6062
LANGUAGE_CODE: str
6163
# django.contrib.sites.middleware.CurrentSiteMiddleware

0 commit comments

Comments
 (0)