@@ -20,7 +20,7 @@ host_validation_re: Pattern[str]
2020class UnreadablePostError (OSError ): ...
2121class RawPostDataException (Exception ): ...
2222
23- UploadHandlerList : TypeAlias = list [uploadhandler .FileUploadHandler ] | ImmutableList [uploadhandler .FileUploadHandler ]
23+ _UploadHandlerList : TypeAlias = list [uploadhandler .FileUploadHandler ] | ImmutableList [uploadhandler .FileUploadHandler ]
2424
2525class HttpHeaders (CaseInsensitiveMapping [str ]):
2626 HTTP_PREFIX : str
@@ -80,20 +80,18 @@ class HttpRequest(BytesIO):
8080 def get_signed_cookie (
8181 self , key : str , default : Any = ..., salt : str = ..., max_age : int | datetime .timedelta | None = ...
8282 ) -> str | None : ...
83- def get_raw_uri (self ) -> str : ...
8483 def build_absolute_uri (self , location : str | None = ...) -> str : ...
8584 @property
8685 def scheme (self ) -> str | None : ...
8786 def is_secure (self ) -> bool : ...
88- def is_ajax (self ) -> bool : ...
8987 @property
9088 def encoding (self ) -> str | None : ...
9189 @encoding .setter
9290 def encoding (self , val : str ) -> None : ...
9391 @property
94- def upload_handlers (self ) -> UploadHandlerList : ...
92+ def upload_handlers (self ) -> _UploadHandlerList : ...
9593 @upload_handlers .setter
96- def upload_handlers (self , upload_handlers : UploadHandlerList ) -> None : ...
94+ def upload_handlers (self , upload_handlers : _UploadHandlerList ) -> None : ...
9795 @cached_property
9896 def accepted_types (self ) -> list [MediaType ]: ...
9997 def parse_file_upload (
@@ -105,6 +103,7 @@ class HttpRequest(BytesIO):
105103 def body (self ) -> bytes : ...
106104 def _load_post_and_files (self ) -> None : ...
107105 def accepts (self , media_type : str ) -> bool : ...
106+ def readlines (self ) -> list [bytes ]: ... # type: ignore[override]
108107
109108@type_check_only
110109class _MutableHttpRequest (HttpRequest ):
@@ -213,3 +212,4 @@ def bytes_to_text(s: None, encoding: str) -> None: ...
213212def bytes_to_text (s : bytes | str , encoding : str ) -> str : ...
214213def split_domain_port (host : str ) -> tuple [str , str ]: ...
215214def validate_host (host : str , allowed_hosts : Iterable [str ]) -> bool : ...
215+ def parse_accept_header (header : str ) -> list [MediaType ]: ...
0 commit comments