Change `python-multipart` import to `python_multipart` (#2733)

This commit is contained in:
Marcelo Trylesinski 2024-10-20 14:20:25 +02:00 committed by GitHub
parent 46131a1af8
commit 837720016f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -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):

View File

@ -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