diff --git a/starlette/formparsers.py b/starlette/formparsers.py index 0d7e5616..2817a7b6 100644 --- a/starlette/formparsers.py +++ b/starlette/formparsers.py @@ -9,14 +9,14 @@ from urllib.parse import unquote_plus from starlette.datastructures import FormData, Headers, UploadFile try: - import multipart - from multipart.multipart import parse_options_header + import python_multipart as multipart + from python_multipart.multipart import parse_options_header except ModuleNotFoundError: # pragma: no cover parse_options_header = None # type: ignore multipart = None # type: ignore if typing.TYPE_CHECKING: - from multipart.multipart import MultipartCallbacks, QuerystringCallbacks + from python_multipart.multipart import MultipartCallbacks, QuerystringCallbacks class FormMessage(Enum): diff --git a/starlette/requests.py b/starlette/requests.py index 9c6776f0..8decb207 100644 --- a/starlette/requests.py +++ b/starlette/requests.py @@ -13,7 +13,7 @@ from starlette.formparsers import FormParser, MultiPartException, MultiPartParse from starlette.types import Message, Receive, Scope, Send try: - from multipart.multipart import parse_options_header + from python_multipart.multipart import parse_options_header except ModuleNotFoundError: # pragma: no cover parse_options_header = None # type: ignore