Please forgive a dumb question from a non-programmer: How to apply the !1130.diff patch to a venv installation?
https://gitlab.com/mailman/mailman/-/merge_requests/1130
I am looking to upgrade Debian 11 to 12. The latter uses python3.11, which no longer has a dependency on importlib_resources. As a result, MM3 won't start unless all references to importlib_resources instead call importlib.resources, now part of stdlib.
I tried patching all importlib.resource references by hand, and MM3 starts – but that can't be the "right" way to do this. Also, the diff references a src directory that doesn't exist under /opt/mailman.
Thanks in advance for patching clues.
dn
David Newman writes:
I tried patching all importlib.resource references by hand, and MM3 starts ? but that can't be the "right" way to do this. Also, the diff references a src directory that doesn't exist under /opt/mailman.
The "right" way to do this kind of thing is to clone the git repository, apply the patch there, make a branch for it and commit it, build a wheel, and use pip to install that wheel to the venv.
Thanks in advance for patching clues.
I'm in a hurry so that's all the clue for now, but further inquiries are welcome if you need more detail or something doesn't go as expected.
Steve
On 8/20/23 9:34 PM, Stephen J. Turnbull wrote:
David Newman writes:
I tried patching all importlib.resource references by hand, and MM3 starts ? but that can't be the "right" way to do this. Also, the diff references a src directory that doesn't exist under /opt/mailman.
The "right" way to do this kind of thing is to clone the git repository, apply the patch there, make a branch for it and commit it, build a wheel, and use pip to install that wheel to the venv.
Thanks in advance for patching clues.
I'm in a hurry so that's all the clue for now, but further inquiries are welcome if you need more detail or something doesn't go as expected.
Thanks for your response, Steve.
One detail that doesn't seem right is that the 1130.patch from GitLab references at least one file, .gitlab-ci.yml, that doesn't exist in the 3.3.8 production release that's installed when using 'pip install mailman' in the venv installation docs.
Just running 'git apply 1130.patch' on a local copy of the production 3.3.8 code fails because the file .gitlab-ci.yml isn't part of that code. There may be other errors too but the patch fails on that first one.
I'm looking to patch an existing production server running 3.3.8 so it will be able to start under Python 3.11 on Debian 12. Thanks in advance for additional clues on what seems like a fairly standard problem.
dn
On 8/21/23 12:45 PM, David Newman wrote:
I'm looking to patch an existing production server running 3.3.8 so it will be able to start under Python 3.11 on Debian 12. Thanks in advance for additional clues on what seems like a fairly standard problem.
Since !1130 is merged, just pip install
from the gitlab head.
pip install git+https://gitlab.com/mailman/mailman@head
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 8/21/23 7:57 PM, Mark Sapiro wrote:
On 8/21/23 12:45 PM, David Newman wrote:
I'm looking to patch an existing production server running 3.3.8 so it will be able to start under Python 3.11 on Debian 12. Thanks in advance for additional clues on what seems like a fairly standard problem.
Since !1130 is merged, just
pip install
from the gitlab head.pip install git+https://gitlab.com/mailman/mailman@head
Perhaps something else is needed first? This is on a Debian 12 system upgraded from 11, with MM3 3.3.8 installed in a venv.
(venv) mailman@x12:~$ pip install git+https://gitlab.com/mailman/mailman@head Collecting git+https://gitlab.com/mailman/mailman@head Cloning https://gitlab.com/mailman/mailman (to revision head) to /tmp/pip-req-build-wjge_v67 Running command git clone --filter=blob:none --quiet https://gitlab.com/mailman/mailman /tmp/pip-req-build-wjge_v67 warning: redirecting to https://gitlab.com/mailman/mailman.git/ WARNING: Did not find branch or tag 'head', assuming revision or ref. Running command git checkout -q head error: pathspec 'head' did not match any file(s) known to git error: subprocess-exited-with-error
× git checkout -q head did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× git checkout -q head did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Thanks
dn
On 8/21/23 9:00 PM, David Newman wrote:
On 8/21/23 7:57 PM, Mark Sapiro wrote: >>
Since !1130 is merged, just
pip install
from the gitlab head.pip install git+https://gitlab.com/mailman/mailman@head
Perhaps something else is needed first? This is on a Debian 12 system upgraded from 11, with MM3 3.3.8 installed in a venv.
(venv) mailman@x12:~$ pip install git+https://gitlab.com/mailman/mailman@head Collecting git+https://gitlab.com/mailman/mailman@head Cloning https://gitlab.com/mailman/mailman (to revision head) to /tmp/pip-req-build-wjge_v67 Running command git clone --filter=blob:none --quiet https://gitlab.com/mailman/mailman /tmp/pip-req-build-wjge_v67 warning: redirecting to https://gitlab.com/mailman/mailman.git/ WARNING: Did not find branch or tag 'head', assuming revision or ref. Running command git checkout -q head error: pathspec 'head' did not match any file(s) known to git error: subprocess-exited-with-error
It worked for me in a virtualenv with pip 23.2.1, but try
pip install git+https://gitlab.com/mailman/mailman@master
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
David Newman
-
Mark Sapiro
-
Stephen J. Turnbull