Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-django-guardian for openSUSE:Factory checked in at 2021-05-15 01:24:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-django-guardian (Old) and /work/SRC/openSUSE:Factory/.python-django-guardian.new.2988 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-guardian" Sat May 15 01:24:34 2021 rev:18 rq:893154 version:2.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-django-guardian/python-django-guardian.changes 2020-06-10 00:51:40.463456414 +0200 +++ /work/SRC/openSUSE:Factory/.python-django-guardian.new.2988/python-django-guardian.changes 2021-05-15 01:24:52.158881252 +0200 @@ -1,0 +2,5 @@ +Fri May 14 14:29:48 UTC 2021 - Mark??ta Machov?? <mmach...@suse.com> + +- Add django32.patch to fix build + +------------------------------------------------------------------- New: ---- django32.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-django-guardian.spec ++++++ --- /var/tmp/diff_new_pack.ghVE1O/_old 2021-05-15 01:24:52.682879410 +0200 +++ /var/tmp/diff_new_pack.ghVE1O/_new 2021-05-15 01:24:52.686879396 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-django-guardian # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,7 +25,8 @@ License: BSD-3-Clause URL: https://github.com/lukaszb/django-guardian Source: https://files.pythonhosted.org/packages/source/d/django-guardian/django-guardian-%{version}.tar.gz -BuildRequires: %{python_module Django >= 2.0} +Patch0: django32.patch +BuildRequires: %{python_module Django >= 2.2} BuildRequires: %{python_module django-environ} BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest-django} @@ -33,7 +34,7 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-Django >= 2.0 +Requires: python-Django >= 2.2 BuildArch: noarch %python_subpackages @@ -43,6 +44,7 @@ %prep %setup -q -n django-guardian-%{version} +%autopatch -p1 %build %python_build ++++++ django32.patch ++++++ >From 5ac8be19d484e389ee43a72759e3308771b19660 Mon Sep 17 00:00:00 2001 From: David Smith <smit...@gmail.com> Date: Fri, 9 Oct 2020 20:52:54 +0100 Subject: [PATCH] Fixed headers test for Django 3.2 The response.headers interface is added in Django 3.2 https://github.com/django/django/commit/dcb69043d0de45bb55998fc418d93c28bc7689ae --- guardian/testapp/tests/test_decorators.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/guardian/testapp/tests/test_decorators.py b/guardian/testapp/tests/test_decorators.py index c1de6de1..ea487b5b 100644 --- a/guardian/testapp/tests/test_decorators.py +++ b/guardian/testapp/tests/test_decorators.py @@ -1,3 +1,4 @@ +import django from django.conf import global_settings from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, AnonymousUser @@ -383,8 +384,12 @@ def dummy_view(request, project_name): pass response = dummy_view(request, project_name='foobar') self.assertTrue(isinstance(response, HttpResponseRedirect)) - self.assertTrue(response._headers['location'][1].startswith( - '/foobar/')) + if django.VERSION >= (3, 2): + self.assertTrue(response.headers['location'].startswith( + '/foobar/')) + else: + self.assertTrue(response._headers['location'][1].startswith( + '/foobar/')) @override_settings(LOGIN_URL='django.contrib.auth.views.login') def test_redirection_class(self):