Django-allauth compatibility (ACCOUNT_AUTHENTICATION_METHOD and ACCOUNT_EMAIL_REQUIRED)

Hi,
after installing Mailman 3 in a new virtual environment, I ran into the compatibility issues with django-allauth discussed by Andreas Vetter and Mark Sapira on this list in February[1] and in March[2] –
WARNINGS: settings.ACCOUNT_AUTHENTICATION_METHOD is deprecated, use: settings.ACCOUNT_LOGIN_METHODS = {'email', 'username'} settings.ACCOUNT_EMAIL_REQUIRED is deprecated, use: settings.ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
– and solved them with the additions to /etc/mailman3/settings.py suggested by Mark:
del ACCOUNT_AUTHENTICATION_METHOD ACCOUNT_LOGIN_METHODS = {'email', 'username'} del ACCOUNT_EMAIL_REQUIRED ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
In the second list thread, Mark linked to the current (patched) version of mailman-web's mailman.py[3], which addresses the deprecation of ACCOUNT_AUTHENTICATION_METHOD, but not of ACCOUNT_EMAIL_REQUIRED. Is there any reason why the patch fixes only one of the two issues?
- Jan
[1] https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/U... [2] https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/T... [3] https://gitlab.com/mailman/mailman-web/-/blob/c8b9aef1704b75b1cb6d0c925855a1...

On 5/14/25 11:50, Jan Eden via Mailman-users wrote:
– and solved them with the additions to /etc/mailman3/settings.py suggested by Mark:
del ACCOUNT_AUTHENTICATION_METHOD ACCOUNT_LOGIN_METHODS = {'email', 'username'}
I suggested the above.
del ACCOUNT_EMAIL_REQUIRED ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
I didn't suggest these. That was from another poster in that thread. We don't set
ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
in mailman_web/settings/mailman.py because the default is
ACCOUNT_SIGNUP_FIELDS = ['username*', 'email', 'password1*', 'password2*']
and that plus
ACCOUNT_EMAIL_REQUIRED = True
is the same thing. However, it appears that there is a deprecation warning with django-allauth >= 65.5. I haven't seen this because the sites I manage are all using django-allauth 65.4.1
So to avoid the deprecations with django-allauth >= 65.5 it is appropriate to drop ACCOUNT_EMAIL_REQUIRED and set
ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
However, that setting doesn't exist in django-allauth < 65.5 so we also need to require django-allauth >= 65.5. I will do this.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

I have django-allauth 65.9.0 and still the same problem. mailman-web runjobs minutely throws it each minute, which is annoying.

On 6/16/25 15:26, Eggert Ehmke via Mailman-users wrote:
I have django-allauth 65.9.0 and still the same problem. mailman-web runjobs minutely throws it each minute, which is annoying.
Do you have
ACCOUNT_LOGIN_METHODS = {'email', 'username'}
ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
in your django settings?
What releases of HyperKitty, Postorius and Django-Mailman3 are you running? Current releases do not have any minutely jobs.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 2025-06-16 17:29, Mark Sapiro wrote:
On 6/16/25 15:26, Eggert Ehmke via Mailman-users wrote:
I have django-allauth 65.9.0 and still the same problem. mailman-web runjobs minutely throws it each minute, which is annoying.
Do you have
ACCOUNT_LOGIN_METHODS = {'email', 'username'} ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
in your django settings?
What releases of HyperKitty, Postorius and Django-Mailman3 are you running? Current releases do not have any minutely jobs.
I did have the same issue about a month ago[1] with the current versions of the above components, and these are the cronjobs I installed according to the docs[2]:
@daily /opt/mailman/venv/bin/mailman digests --periodic @daily /opt/mailman/venv/bin/mailman notify
0,15,30,45 * * * * /opt/mailman/venv/bin/mailman-web runjobs quarter_hourly @hourly /opt/mailman/venv/bin/mailman-web runjobs hourly @daily /opt/mailman/venv/bin/mailman-web runjobs daily @weekly /opt/mailman/venv/bin/mailman-web runjobs weekly @monthly /opt/mailman/venv/bin/mailman-web runjobs monthly @yearly /opt/mailman/venv/bin/mailman-web runjobs yearly/opt/mailman/venv/bin/mailman-web runjobs minutely
- Jan
[1] https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/3... [2] https://docs.mailman3.org/en/latest/install/virtualenv.html#cron-jobs-for-ma...

Jan Eden via Mailman-users writes:
I did have the same issue about a month ago[1] with the current versions
That's the thread that Eggert replied to! ;-)
As Mark explains there, the fix is mildly complicated because *both* settings are incompatible with some version or other of django-allauth that Mailman 3 (I think only mailman-web and django-mailman3) claims compatibility with. At some point there will be a release of at least mailman-web that changes both the default mailman-web settings and the required version of django-allauth, but we need to be careful about that.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
participants (4)
-
Eggert Ehmke
-
Jan Eden
-
Mark Sapiro
-
Stephen J. Turnbull