Upgrading packages
Hello Mark & all,
I have the venv installation on my Debian 11 system running. I followed your suggestion to upgrade all packages. When upgrading hyperkitty by this command:
pip install --upgrade git+https://gitlab.com/mailman/hyperkitty@master
I noticed that mistune-2.0.0rc1 was upgraded to mistune-2.0.4.
All packages were upgraded fine. I applied the patch to venv/lib/python3.9/site-packages/hyperkitty/lib/renderer.py
to change the mistune import line. When I run now mailman-web migrate I get: *CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0017_auto_20220628_1132, 0018_alter_emailtemplate_language in postorius).* *To fix them run 'python manage.py makemigrations --merge'*
However, when I run the suggested command as: $ python ./venv/lib/python3.9/site-packages/mailman_web/manage.py makemigrations -- merge No conflicts detected to merge. Can I just ignore this behavior? At the moment, I don't dare to carry out these steps on my production system. Would be nice to shed some light on this.
Eggert
On 10/13/22 03:49, Eggert Ehmke wrote:
pip install --upgrade git+https://gitlab.com/mailman/hyperkitty@master
I noticed that mistune-2.0.0rc1 was upgraded to mistune-2.0.4.
All packages were upgraded fine. I applied the patch to venv/lib/python3.9/site-packages/hyperkitty/lib/renderer.py
It shouldn't have been necessary to apply any patch. The head of the GitLab hyperkitty master branch is already compatible with mistune 2.0.4
to change the mistune import line. When I run now mailman-web migrate I get: *CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0017_auto_20220628_1132, 0018_alter_emailtemplate_language in postorius).* *To fix them run 'python manage.py makemigrations --merge'*
However, when I run the suggested command as: $ python ./venv/lib/python3.9/site-packages/mailman_web/manage.py makemigrations -- merge No conflicts detected to merge.
There's something strange here. If you look at the migrations at the head of the gitlab branch at https://gitlab.com/mailman/postorius/-/tree/master/src/postorius/migrations, you'll see that migration 17 is named 0017_alter_emailtemplate_language.py, not 0017_auto_20220628_1132.
I suggest comparing the content of your postorius/migrations/ directory with the GitLab head and resolving any differences.
Can I just ignore this behavior? At the moment, I don't dare to carry out these steps on my production system. Would be nice to shed some light on this.
I'm guessing at some point you installed something which required you to manually make this migration and that produced this conflict. Do you have both 0017_alter_emailtemplate_language.py and 0017_auto_20220628_1132 in your postorius/migrations/ directory? If so, probably just removing 0017_auto_20220628_1132 will fix this?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Am Donnerstag, 13. Oktober 2022, 19:09:20 CEST schrieb Mark Sapiro:
On 10/13/22 03:49, Eggert Ehmke wrote:
pip install --upgrade git+https://gitlab.com/mailman/hyperkitty@master
I noticed that mistune-2.0.0rc1 was upgraded to mistune-2.0.4.
All packages were upgraded fine. I applied the patch to venv/lib/python3.9/site-packages/hyperkitty/lib/renderer.py
It shouldn't have been necessary to apply any patch. The head of the GitLab hyperkitty master branch is already compatible with mistune 2.0.4
strange, I still had the line with the (not working) from mistune.scanner import escape_html, escape_url
maybe because the migration step was not working at that time?
I'm guessing at some point you installed something which required you to manually make this migration and that produced this conflict. Do you have both 0017_alter_emailtemplate_language.py and 0017_auto_20220628_1132 in your postorius/migrations/ directory? If so, probably just removing 0017_auto_20220628_1132 will fix this?
That's what I did in the meantime, and it works now! Thank you.
On 10/13/22 10:55, Eggert Ehmke wrote:
It shouldn't have been necessary to apply any patch. The head of the GitLab hyperkitty master branch is already compatible with mistune 2.0.4
strange, I still had the line with the (not working) from mistune.scanner import escape_html, escape_url
maybe because the migration step was not working at that time?
It should have nothing to do with migrations. The command
pip install --upgrade git+https://gitlab.com/mailman/hyperkitty@master
run as the mailman user with your venv active should have set the content of venv/lib/python3.9/site-packages/hyperkitty/lib/renderer.py to be the same as https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/lib/renderer...., but it didn't. I wonder what else didn't get upgraded? Clearly it did do something because mistune was upgraded.
If you run pip freeze
in your active venv,, what versions do you see
for the things you upgraded? Do they look for example like
HyperKitty @
git+https://gitlab.com/mailman/hyperkitty@cf585a6588a176e714ec32bbcfe52e8a28fd7803
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Am Donnerstag, 13. Oktober 2022, 20:25:44 CEST schrieb Mark Sapiro:
On 10/13/22 10:55, Eggert Ehmke wrote:
It shouldn't have been necessary to apply any patch. The head of the GitLab hyperkitty master branch is already compatible with mistune 2.0.4
strange, I still had the line with the (not working) from mistune.scanner import escape_html, escape_url
maybe because the migration step was not working at that time?
It should have nothing to do with migrations. The command
pip install --upgrade git+https://gitlab.com/mailman/hyperkitty@master
run as the mailman user with your venv active should have set the content of venv/lib/python3.9/site-packages/hyperkitty/lib/renderer.py to be the same as https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/lib/renderer. py, but it didn't. I wonder what else didn't get upgraded? Clearly it did do something because mistune was upgraded.
In the meantime I run pip install --upgrade --force-reinstall git+https://gitlab.com/mailman/hyperkitty@master
and that installed the correct renderer.py. Should I do this with all packages?
If you run
pip freeze
in your active venv,, what versions do you see for the things you upgraded? Do they look for example likeHyperKitty @ git+https://gitlab.com/mailman/hyperkitty@cf585a6588a176e714ec32bbcfe52e8a28 fd7803 ```
Yes that version is installed.
On 10/13/22 11:34, Eggert Ehmke wrote:
In the meantime I run pip install --upgrade --force-reinstall git+https://gitlab.com/mailman/hyperkitty@master
and that installed the correct renderer.py. Should I do this with all packages?
I think that would be good just to be safe.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Eggert Ehmke
-
Mark Sapiro