New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multipart requirement conflicts with python-multipart used by starlette #27
Comments
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 |
Me reading your first message: wow, somebody uses my package |
@mgorny I do not get what is the problem. 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
In other words, if something depends on |
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. |
I'm afraid that just replaces one hell with another (vendoring hell). |
There is a related discussion in python-multipart issues Kludex/python-multipart#16 |
Gentle ping .. Any update? 🤔 Here is pytest output:+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-test-server-0.0.43-2.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-test-server-0.0.43-2.fc36.x
86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/test_server-0.0.43
configfile: pyproject.toml
testpaths: tests
collected 0 items / 2 errors
==================================== ERRORS ====================================
_______________ ERROR collecting tests/test_httpheaderstorage.py _______________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/test_server-0.0.43/tests/test_httpheaderstorage.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_httpheaderstorage.py:3: in <module>
from test_server.structure import HttpHeaderStorage
test_server/__init__.py:2: in <module>
from test_server.server import * # pylint: disable=wildcard-import # noqa: F403
test_server/server.py:17: in <module>
from multipart import parse_form_data
E ImportError: cannot import name 'parse_form_data' from 'multipart' (/usr/lib/python3.9/site-packages/multipart/__init__.py)
____________________ ERROR collecting tests/test_server.py _____________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/test_server-0.0.43/tests/test_server.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_server.py:11: in <module>
from urllib3.response import BaseHTTPResponse
E ImportError: cannot import name 'BaseHTTPResponse' from 'urllib3.response' (/usr/lib/python3.9/site-packages/urllib3/response.py)
=========================== short test summary info ============================
ERROR tests/test_httpheaderstorage.py
ERROR tests/test_server.py
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 2 errors in 0.23s =============================== |
I am lookint into this https://github.com/litestar-org/litestar/blob/main/litestar/_multipart.py |
Working on it in this pull request #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.The text was updated successfully, but these errors were encountered: