Skip to content

Commit

Permalink
Change python-multipart import to python_multipart (#2733)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex authored Oct 20, 2024
1 parent 46131a1 commit 8377200
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions starlette/formparsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
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):
Expand Down
2 changes: 1 addition & 1 deletion starlette/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
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

Expand Down

1 comment on commit 8377200

@zhu0629
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a release for this change please.

Please sign in to comment.