Open Kludex opened 9 months ago
@Kludex, I'd like to take on this task, please assign me. I've understood the parser classes and written test cases for them. I've also started implementing the parser functionality to phase out the dependency on python-multipart. I will try to complete this in some days and will submit a PR then.
Could you provide any specific things or best practices I should follow during the implementation? Additionally, would it be preferable to push the entire change at once or make smaller, incremental PRs?
Thanks!
what's wrong with python-multipart
?
Nothing.
I think the point is that even if nothing is wrong with it Starlette should still absorb that functionality since it's quite core to what Starlette does.
I'd rather extract functions like this from existing projects, for greater modularization and to facilitate re-use, but you be you.
You could also consider switching from python-multipart
to the (significantly smaller and faster) multipart project, or even vendor it if you prefer. The MIT license would allow shipping multipart.py
as part of starlette.
Disclaimer: I'm the author of multipart
and recently learned that the python-multipart
project causes name conflicts for people because they decided to choose a package name that was already taken. I took that as an opportunity to clean up the project, release a new non-blocking parser that I was working on for a while now, increase test coverage to 100% and today I finally published the 1.0 release. I would obviously love to see starlette depend on multipart
instead of python-multipart
, but I'm probably biased ;)
We should have the multipart parsing on Starlette itself.