openwisp-radius icon indicating copy to clipboard operation
openwisp-radius copied to clipboard

[bug] Deprecation warnings from dj_rest_auth in logs

Open Dhanus3133 opened this issue 4 months ago • 5 comments

While running openwisp-radius, the logs show multiple deprecation warnings coming from dj_rest_auth serializers:

.../site-packages/dj_rest_auth/registration/serializers.py:228: UserWarning: app_settings.USERNAME_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['username']['required']
  required=allauth_account_settings.USERNAME_REQUIRED,
.../site-packages/dj_rest_auth/registration/serializers.py:230: UserWarning: app_settings.EMAIL_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['email']['required']
  email = serializers.EmailField(required=allauth_account_settings.EMAIL_REQUIRED)
.../site-packages/dj_rest_auth/registration/serializers.py:288: UserWarning: app_settings.EMAIL_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['email']['required']
  email = serializers.EmailField(required=allauth_account_settings.EMAIL_REQUIRED)
.../site-packages/dj_rest_auth/registration/serializers.py:228: UserWarning: app_settings.USERNAME_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['username']['required']
  required=allauth_account_settings.USERNAME_REQUIRED,
.../site-packages/dj_rest_auth/registration/serializers.py:230: UserWarning: app_settings.EMAIL_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['email']['required']
  email = serializers.EmailField(required=allauth_account_settings.EMAIL_REQUIRED)
.../site-packages/dj_rest_auth/registration/serializers.py:288: UserWarning: app_settings.EMAIL_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['email']['required']
  email = serializers.EmailField(required=allauth_account_settings.EMAIL_REQUIRED)
Watching for file changes with StatReloader
Performing system checks...

Dhanus3133 avatar Aug 26 '25 16:08 Dhanus3133

@Dhanus3133 @nemesifier Shall we also update dj-rest-auth to ≥7.1 as we drop the old config flags USERNAME_REQUIRED and EMAIL_REQUIRED. the current version is <7.1

jevinjojo avatar Oct 04 '25 01:10 jevinjojo

@jevinjojo 7.0.1 is the latest release of dj_rest_auth so it can't be upgraded.

vishwasvk35 avatar Oct 08 '25 11:10 vishwasvk35

@Dhanus3133 It seems that dj_rest_auth is already at it's latest version. the deprecation errors are related to files present in openwisp-radius/env/lib/python3.10/site-packages/dj_rest_auth path. So I don't understand what we can do to resolve this error?

vishwasvk35 avatar Oct 08 '25 12:10 vishwasvk35

I think we should wait till a newer version of dj_rest_auth is released.

Dhanus3133 avatar Oct 08 '25 12:10 Dhanus3133

https://github.com/iMerica/dj-rest-auth/pull/711

nemesifier avatar Oct 08 '25 17:10 nemesifier