Heads up: settings.ACCOUNT_AUTHENTICATION_METHOD is deprecated

Hello, I have a venv installation of: mailman postorius django-mailman3 hyperkitty mailman-web I just did a pip install -U --upgrade-strategy eager
When running mailman-web runjobs -l I get the following Warning: System check identified some issues:
WARNINGS: ?: settings.ACCOUNT_AUTHENTICATION_METHOD is deprecated, use: settings.ACCOUNT_LOGIN_METHODS = {'email', 'username'}
I guess this is from allauth (version django-allauth-65.4.1).
Changing ACCOUNT_AUTHENTICATION_METHOD to ACCOUNT_LOGIN_METHODS in /etc/mailman3/settings.py is not enough. One has to edit venv/lib/python3.11/site-packages/mailman_web/settings/mailman.py
Mit freundlichen Gruessen, Andreas Vetter

I created a new issue: https://gitlab.com/mailman/mailman-web/-/issues/35
On Freitag, 7. Februar 2025 12:19:22 CET Andreas Vetter wrote:
Hello, I have a venv installation of: mailman postorius django-mailman3 hyperkitty mailman-web I just did a pip install -U --upgrade-strategy eager
When running mailman-web runjobs -l I get the following Warning: System check identified some issues:
WARNINGS: ?: settings.ACCOUNT_AUTHENTICATION_METHOD is deprecated, use: settings.ACCOUNT_LOGIN_METHODS = {'email', 'username'}
I guess this is from allauth (version django-allauth-65.4.1).
Changing ACCOUNT_AUTHENTICATION_METHOD to ACCOUNT_LOGIN_METHODS in /etc/mailman3/settings.py is not enough. One has to edit venv/lib/python3.11/site-packages/mailman_web/settings/mailman.py
-- Mit freundlichen Gruessen, Andreas Vetter

On 2/7/25 03:19, Andreas Vetter wrote:
Changing ACCOUNT_AUTHENTICATION_METHOD to ACCOUNT_LOGIN_METHODS in /etc/mailman3/settings.py is not enough. One has to edit venv/lib/python3.11/site-packages/mailman_web/settings/mailman.py
You can do this in /etc/mailman3/settings.py only without editing venv/lib/python3.11/site-packages/mailman_web/settings/mailman.py by adding
del ACCOUNT_AUTHENTICATION_METHOD
ACCOUNT_LOGIN_METHODS = {'email', 'username'}
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Freitag, 7. Februar 2025 18:40:32 CET Mark Sapiro wrote:
On 2/7/25 03:19, Andreas Vetter wrote:
Changing ACCOUNT_AUTHENTICATION_METHOD to ACCOUNT_LOGIN_METHODS in /etc/mailman3/settings.py is not enough. One has to edit venv/lib/python3.11/site-packages/mailman_web/settings/mailman.py
You can do this in /etc/mailman3/settings.py only without editing venv/lib/python3.11/site-packages/mailman_web/settings/mailman.py by adding
del ACCOUNT_AUTHENTICATION_METHOD ACCOUNT_LOGIN_METHODS = {'email', 'username'}
That is unfortunately not enough to get rid of the Warning, because venv/lib/ python3.11/site-packages/mailman_web/settings/mailman.py contains the old ACCOUNT_AUTHENTICATION_METHOD and allauth is complains about it.
-- Mit freundlichen Gruessen, Andreas Vetter

On 2/10/25 01:07, Andreas Vetter wrote:
That is unfortunately not enough to get rid of the Warning, because venv/lib/ python3.11/site-packages/mailman_web/settings/mailman.py contains the old ACCOUNT_AUTHENTICATION_METHOD and allauth is complains about it.
In the recommended virtualenv installation, the settings that Django sees are /etc/mailman3/settings.py. That in turn contains
from mailman_web.settings.base import *
from mailman_web.settings.mailman import *
but if following those imports you have
del ACCOUNT_AUTHENTICATION_METHOD
Django won't see it and won't complain. Did you actually try this? If
so, did you put the del ACCOUNT_AUTHENTICATION_METHOD
after from mailman_web.settings.mailman import *
in /etc/mailman3/settings.py?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Montag, 10. Februar 2025 20:26:26 CET Mark Sapiro wrote:
On 2/10/25 01:07, Andreas Vetter wrote:
That is unfortunately not enough to get rid of the Warning, because venv/lib/ python3.11/site-packages/mailman_web/settings/mailman.py contains the old ACCOUNT_AUTHENTICATION_METHOD and allauth is complains about it.
In the recommended virtualenv installation, the settings that Django sees are /etc/mailman3/settings.py. That in turn contains
from mailman_web.settings.base import * from mailman_web.settings.mailman import *
but if following those imports you have
del ACCOUNT_AUTHENTICATION_METHOD
Django won't see it and won't complain. Did you actually try this? If so, did you put the
del ACCOUNT_AUTHENTICATION_METHOD
afterfrom mailman_web.settings.mailman import *
in /etc/mailman3/settings.py?
You are right, it is enough, when one does not have a typo in it. My fault.
Thanks a lot, Andreas
participants (2)
-
Andreas Vetter
-
Mark Sapiro