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

I still got mails every minute from cronjob
Date: Fri, 1 Aug 2025 18:57:02 +0000 (UTC)
System check identified some issues:
WARNINGS: ?: settings.ACCOUNT_EMAIL_REQUIRED is deprecated, use: settings.ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
My # Mailman Web configuration file: # /etc/mailman3/settings.py
# Get the default settings. from mailman_web.settings.base import * from mailman_web.settings.mailman import *
# Settings below supplement or override the defaults. # see https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/U... del ACCOUNT_AUTHENTICATION_METHOD ACCOUNT_LOGIN_METHODS = {'email', 'username'}

The following lines in settings.py appear to fix the issue(s):
# Mailman Web configuration file. # /etc/mailman3/settings.py
# Get the default settings. from mailman_web.settings.base import * from mailman_web.settings.mailman import *
# Settings below supplement or override the defaults.
# see https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/U... del ACCOUNT_AUTHENTICATION_METHOD ACCOUNT_LOGIN_METHODS = {'email', 'username'} del ACCOUNT_EMAIL_REQUIRED ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']

On 2025-08-01 19:10, Wikinaut wrote:
# Settings below supplement or override the defaults.
# see https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/U... del ACCOUNT_AUTHENTICATION_METHOD ACCOUNT_LOGIN_METHODS = {'email', 'username'} del ACCOUNT_EMAIL_REQUIRED ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
Does this help?
/opt/mailman/venv/lib/python3.11/site-packages/mailman_web/settings/mailman.py
#: Django Allauth #ACCOUNT_AUTHENTICATION_METHOD = "username_email" #ACCOUNT_EMAIL_REQUIRED = True #ACCOUNT_EMAIL_VERIFICATION = "mandatory" #ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_LOGIN_METHODS = {'email', 'username'} ACCOUNT_SIGNUP_FIELDS = ['username*', 'email*', 'password1*', 'password2*'] ACCOUNT_EMAIL_VERIFICATION = "mandatory" ACCOUNT_UNIQUE_EMAIL = True ACCOUNT_EMAIL_UNKNOWN_ACCOUNTS = False
Then restart mailman3 and mailmanweb.

On 8/1/25 11:58, Wikinaut wrote:
WARNINGS: ?: settings.ACCOUNT_EMAIL_REQUIRED is deprecated, use: settings.ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
My # Mailman Web configuration file: # /etc/mailman3/settings.py
# Get the default settings. from mailman_web.settings.base import * from mailman_web.settings.mailman import *
# Settings below supplement or override the defaults. # see https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/U... del ACCOUNT_AUTHENTICATION_METHOD ACCOUNT_LOGIN_METHODS = {'email', 'username'}
In addition to the above add
del ACCOUNT_EMAIL_REQUIRED
ACCOUNT_SIGNUP_FIELDS = ['username*', 'email*', 'password1*', 'password2*']
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (4)
-
Andreas Vetter
-
Mark
-
Mark Sapiro
-
Wikinaut