14
0

- add 0001-Always-use-base64.encodebytes-base64.encodestring-ha.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysaml2?expand=0&rev=58
This commit is contained in:
2021-04-26 12:55:15 +00:00
committed by Git OBS Bridge
parent 668f0875bf
commit 9fc22e6e49
3 changed files with 45 additions and 3 deletions

View File

@@ -0,0 +1,36 @@
From 3debe07ef5c1571f9cfb85985ab4889ab286c35b Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dirk@dmllr.de>
Date: Mon, 26 Apr 2021 14:40:50 +0200
Subject: [PATCH] Always use base64.encodebytes; base64.encodestring has been
dropped
---
tests/test_60_sp.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/test_60_sp.py b/tests/test_60_sp.py
index 78e88400..b1eaa7c6 100644
--- a/tests/test_60_sp.py
+++ b/tests/test_60_sp.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-import base64
+from base64 import encodebytes as b64encode
+
import pytest
from saml2.authn_context import INTERNETPROTOCOLPASSWORD
from saml2.saml import NAMEID_FORMAT_TRANSIENT
@@ -73,7 +74,7 @@ class TestSP():
"urn:mace:example.com:saml:roland:sp", trans_name_policy,
"foba0001@example.com", authn=AUTHN)
- resp_str = base64.encodestring(resp_str.encode('utf-8'))
+ resp_str = b64encode(resp_str.encode('utf-8'))
self.sp.outstanding_queries = {"id1": "http://www.example.com/service"}
session_info = self.sp._eval_authn_response(
{}, {"SAMLResponse": [resp_str]})
--
2.31.1

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Apr 26 12:55:01 UTC 2021 - Dirk Müller <dmueller@suse.com>
- add 0001-Always-use-base64.encodebytes-base64.encodestring-ha.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jan 25 15:06:45 UTC 2021 - Dirk Müller <dmueller@suse.com> Mon Jan 25 15:06:45 UTC 2021 - Dirk Müller <dmueller@suse.com>

View File

@@ -26,6 +26,8 @@ Summary: Python implementation of SAML Version 2 to be used in a WSGI env
License: Apache-2.0 License: Apache-2.0
URL: https://github.com/IdentityPython/pysaml2 URL: https://github.com/IdentityPython/pysaml2
Source: https://github.com/IdentityPython/pysaml2/archive/v%{version}.tar.gz Source: https://github.com/IdentityPython/pysaml2/archive/v%{version}.tar.gz
# PATCH-FIX-UPSTREAM: https://github.com/IdentityPython/pysaml2/pull/797
Patch1: 0001-Always-use-base64.encodebytes-base64.encodestring-ha.patch
BuildRequires: %{python_module Paste} BuildRequires: %{python_module Paste}
BuildRequires: %{python_module cryptography >= 1.4} BuildRequires: %{python_module cryptography >= 1.4}
BuildRequires: %{python_module dbm} BuildRequires: %{python_module dbm}
@@ -64,7 +66,7 @@ Requires: python-six
Requires: python-xmlschema Requires: python-xmlschema
Requires: python-zope.interface Requires: python-zope.interface
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun): update-alternatives Requires(postun):update-alternatives
# We need to have arch build to make ifarch condition below working # We need to have arch build to make ifarch condition below working
# BuildArch: noarch # BuildArch: noarch
%python_subpackages %python_subpackages
@@ -76,8 +78,7 @@ SAML2 service provider or an identity provider.
%prep %prep
%setup -q -n %{modname}-%{version} %setup -q -n %{modname}-%{version}
%ifarch %{ix86} %autopatch -p1
%endif
# delete shebang of files not in executable path # delete shebang of files not in executable path
find src/ -name '*.py' -print0 | xargs -0 sed -i '1s/#!.*$//' find src/ -name '*.py' -print0 | xargs -0 sed -i '1s/#!.*$//'