From 5d7d3db44371de799c602bd311b1418175e81555 Mon Sep 17 00:00:00 2001 From: Philippe MILINK Date: Sun, 5 Nov 2023 17:25:33 +0100 Subject: [PATCH] Renomme correctement les modules `social.*` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Une partie de la migration indiquée dans https://github.com/omab/python-social-auth/blob/master/MIGRATING_TO_SOCIAL.md n'a pas été faite : renommer tous les modules `social.*` en `social_core` ou `social_django`. Ça fonctionnait jusqu'à maintenant, car le paquet Python `social` était resté installé dans les environnements virtuels des serveurs de production et bêta, mais ça ne marche plus sur la bêta, puisqu'on est reparti d'un environnement vierge en le changeant... Suppression au passage de configuration inutilement dupliquée. Tant qu'à faire, mise à jour de social-auth-app-django. Fix #6554 --- requirements.txt | 2 +- zds/settings/abstract_base/requirements.py | 20 ++++++++++---------- zds/settings/prod.py | 17 ----------------- 3 files changed, 11 insertions(+), 28 deletions(-) diff --git a/requirements.txt b/requirements.txt index 36ab7318a7..1ccc355035 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # Implicit dependencies (optional dependencies of dependencies) elasticsearch-dsl==5.4.0 elasticsearch==5.5.3 -social-auth-app-django==5.3.0 +social-auth-app-django==5.4.0 # Explicit dependencies (references in code) beautifulsoup4==4.12.2 diff --git a/zds/settings/abstract_base/requirements.py b/zds/settings/abstract_base/requirements.py index c34df71cd3..d6191176d3 100644 --- a/zds/settings/abstract_base/requirements.py +++ b/zds/settings/abstract_base/requirements.py @@ -15,17 +15,17 @@ SOCIAL_AUTH_FACEBOOK_SCOPE = ["email"] SOCIAL_AUTH_PIPELINE = ( - "social.pipeline.social_auth.social_details", - "social.pipeline.social_auth.social_uid", - "social.pipeline.social_auth.auth_allowed", - "social.pipeline.social_auth.social_user", - "social.pipeline.user.get_username", - "social.pipeline.social_auth.associate_by_email", - "social.pipeline.user.create_user", + "social_core.pipeline.social_auth.social_details", + "social_core.pipeline.social_auth.social_uid", + "social_core.pipeline.social_auth.auth_allowed", + "social_core.pipeline.social_auth.social_user", + "social_core.pipeline.user.get_username", + "social_core.pipeline.social_auth.associate_by_email", + "social_core.pipeline.user.create_user", "zds.member.models.save_profile", - "social.pipeline.social_auth.associate_user", - "social.pipeline.social_auth.load_extra_data", - "social.pipeline.user.user_details", + "social_core.pipeline.social_auth.associate_user", + "social_core.pipeline.social_auth.load_extra_data", + "social_core.pipeline.user.user_details", ) # Before adding new providers such as Facebook and Google, diff --git a/zds/settings/prod.py b/zds/settings/prod.py index dfc5ce977c..f399dbedde 100644 --- a/zds/settings/prod.py +++ b/zds/settings/prod.py @@ -122,23 +122,6 @@ def _get_version(): } -# python-social-auth -# http://psa.matiasaguirre.net/docs/configuration/django.html -SOCIAL_AUTH_PIPELINE = ( - "social.pipeline.social_auth.social_details", - "social.pipeline.social_auth.social_uid", - "social.pipeline.social_auth.auth_allowed", - "social.pipeline.social_auth.social_user", - "social.pipeline.user.get_username", - "social.pipeline.social_auth.associate_by_email", - "social.pipeline.user.create_user", - "zds.member.models.save_profile", - "social.pipeline.social_auth.associate_user", - "social.pipeline.social_auth.load_extra_data", - "social.pipeline.user.user_details", -) - - ############################################################################### # ZESTE DE SAVOIR SETTINGS