From b368f8e244df15e261abceecfdf0bf0a57c9b73c Mon Sep 17 00:00:00 2001 From: Matias Aguirre Date: Thu, 5 Aug 2021 12:00:47 -0300 Subject: [PATCH] Version bump 5.0.0 --- CHANGELOG.md | 4 +++- requirements.txt | 2 +- social_django/__init__.py | 2 +- social_django/utils.py | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 806721b6..5649c336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [Unreleased](https://github.com/python-social-auth/social-app-django/) +## [5.0.0](https://github.com/python-social-auth/social-app-django/releases/tag/5.0.0) - 2021-08-05 ### Changed - Removed compat shims for obsolete Django versions @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added testing for Django 3.0 - Drop support for Python 2 - Django generic `JSONField` support, details documented [here](https://python-social-auth.readthedocs.io/en/latest/configuration/django.html#json-field-support) +- Django 3.2+ compatibility +- Use `_default_manager` instead of `objects` ## [4.0.0](https://github.com/python-social-auth/social-app-django/releases/tag/4.0.0) - 2020-06-20 diff --git a/requirements.txt b/requirements.txt index 5c4bcce4..760080cf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -social-auth-core >= 4.0.2 +social-auth-core >= 4.1.0 diff --git a/social_django/__init__.py b/social_django/__init__.py index ee706589..d6726570 100644 --- a/social_django/__init__.py +++ b/social_django/__init__.py @@ -1,4 +1,4 @@ -__version__ = '4.0.0' +__version__ = '5.0.0' import django diff --git a/social_django/utils.py b/social_django/utils.py index 72a07119..911a4761 100644 --- a/social_django/utils.py +++ b/social_django/utils.py @@ -21,8 +21,7 @@ def load_strategy(request=None): def load_backend(strategy, name, redirect_uri): - Backend = get_backend(settings.AUTHENTICATION_BACKENDS, name) - return Backend(strategy, redirect_uri) + return strategy.get_backend(name, redirect_uri=redirect_uri) def psa(redirect_uri=None, load_strategy=load_strategy): @@ -40,7 +39,8 @@ def wrapper(request, backend, *args, **kwargs): try: request.backend = load_backend(request.social_strategy, - backend, uri) + backend, + redirect_uri=uri) except MissingBackend: raise Http404('Backend not found') return func(request, backend, *args, **kwargs)