Skip to content

Commit 000c8e6

Browse files
fix(starlette): Prefer python_multipart import over multipart (#3710)
See also releases 0.0.13 through 0.0.16 at https://github.com/Kludex/python-multipart/releases. --------- Co-authored-by: Daniel Szoke <[email protected]>
1 parent c21962e commit 000c8e6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sentry_sdk/integrations/starlette.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@
6565

6666
try:
6767
# Optional dependency of Starlette to parse form data.
68-
import multipart # type: ignore
68+
try:
69+
# python-multipart 0.0.13 and later
70+
import python_multipart as multipart # type: ignore
71+
except ImportError:
72+
# python-multipart 0.0.12 and earlier
73+
import multipart # type: ignore
6974
except ImportError:
7075
multipart = None
7176

0 commit comments

Comments
 (0)