Closed glyph closed 1 month ago
Interesting, I did not know that. But I will not rename this module for several obvious reasons:
python-multipart
authors must have known about this project and still opted for a conflicting package name. That's on them.python-multipart
into starlette, so the problem may go away on its own. cgi.FieldStorage
parser.The naming conflict caused by the python-multipart
authors is definitely affecting people. Both starlette and FastAPI (based on starlette) have detection code that checks for this conflict at runtime and shows a detailed error massage. There are also warnings in their documentation explaining how to fix the issue. I did not know that those two very popular libraries depend on python-multipart
, that probably explains why the download stats for it are so high.
I just proposed to the starlette project to switch to multipart
or vendor it. They planned to drop the dependency on python-multipart
anyway, so I took that opportunity. The new non-blocking parser in multipart 1.0 would actually make the switch possible. Edit: Nah, python-multipart is from the starlette maintainer, that won't happen.
I'm happy to announce that this should no longer be an issue. The python-multipart project changed its import name to python_multipart
and both Starlette and FastAPI support the new import name. There is a clever fallback if multipart.py
is not installed to support legacy apps, but that will also be removed in a couple off releases once most apps have updated their import statements.
As filed in https://github.com/twisted/treq/issues/399, these packages both define
import multipart
. This one is older, but, it seems, less popular. One of them should rename itsimport
name.