Open mgorny opened 1 year ago
Oh, I've just noticed that we don't actually need this package anymore, so please feel free to disregard the problem, though some of other test_server
users may hit a similar problem. Unfortunately, this is just a proof of how rotten pypi is at the core.
Me reading your first message: wow, somebody uses my package Me reading your second message: or maybe not :D
@mgorny I do not get what is the problem. There is "multipart" and "python-multipart' packages in pypi. Why it is bad? Except the fact that it causes some problems in buildings packages for gentoo.
Regarding "multipart" package. I'll take a look on "python-multipart", maybe I should switch to it. The only reason I have introduced multipart dependency is that builtin module cgi (which contains things to parse multipart data) will be removed in python 3.13
The problem is that one installs as multipart
whereas the other installs as multipart.py
. Therefore, if you end up having both installed, only one of them will be importable:
>>> import multipart
>>> multipart
<module 'multipart' from '/tmp/.venv/lib/python3.11/site-packages/multipart/__init__.py'>
In other words, if something depends on python-multipart
, you'd end up using that instead because it will be impossible to import multipart.py
without resorting to awful hacks.
I see. Both pypi packages provide their API as "multipart" python package making impossible to coexist these packages in same environmet like python virtualenv or gentoo default python environment. Maybe I should vendor source code of one of these multipart packages into test_server package to avoid being a participant of package hell party.
I'm afraid that just replaces one hell with another (vendoring hell).
There is a related discussion in python-multipart issues https://github.com/andrew-d/python-multipart/issues/16
Gentle ping .. Any update? 🤔 Seems I've git the same issue
I am lookint into this https://github.com/litestar-org/litestar/blob/main/litestar/_multipart.py I will copy-paste it into test_server package. It is already annotated with types and I think it is well tested because it is a part of production web server framework.
Working on it in this pull request https://github.com/lorien/test_server/pull/31
The recently introduced dependency on
multipart
made it impossible to package the new version on Gentoo Linux since we already packagepython-multipart
which uses the same package name (sic!) and is required by the more popular starlette package.