From 837720016fee8453985f638a72f1e4afe3315844 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Sun, 20 Oct 2024 14:20:25 +0200 Subject: [PATCH] Change `python-multipart` import to `python_multipart` (#2733) --- starlette/formparsers.py | 6 +++--- starlette/requests.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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