Remove deprecated stdlib cgi usage, replace pipenv with uv, bundle requirements in pyproject.toml#100
Remove deprecated stdlib cgi usage, replace pipenv with uv, bundle requirements in pyproject.toml#100spwoodcock wants to merge 2 commits intoopengisch:masterfrom
cgi usage, replace pipenv with uv, bundle requirements in pyproject.toml#100Conversation
A commonly recommended replacement for the deprecated cgi package in PEP594. Using an email Message object to parse an HTTP header is a little hacky, but since HTTP's Content-Disposition syntax was derived from MIME, they're compatible enough in practice
|
Thanks! Saved me a few hours, I am using The only question I have is whether the publishing on PyPi will work, but this is something we should worry about. Will be merged soon, just be a bit patient. BTW, you had to modify the library because you extended QFC on your own, or because it's current behaviour had shortcomings? |
|
I think publishing to PyPi shouldn't be affected, as it's using Yesterday I work working on adding an API to QFC to create new users, including updating to this lib to allow doing it via the SDK too. I planned to make a PR for both & see what your thoughts were (not certain how it fits into the roadmap / current thinking internally. I can keep it custom for now if needed, or we can find a way forward for it) |
cgimodule was deprecated in Python 3.11 and removed in 3.13. I replaced the single instance of usage with the stdlibemailpackage, a pretty common approach (albiet somewhat hacky). See the detailed commit message for more info.pipenvwithuv. Pipenv was a great project at the time. Now imo the alternatives are uv, poetry, pdm (with better conformance to subsequent PEPs).requirements.txtand instead listed the requirements directly in thepyproject.tomlfile. Now when I install a custom version (from a git branch), the dependencies come along with it).cgiusage is removed.Checks:
ENVIRONMENT=test uv run python -m unittest tests.test_cli_client