From 29ec46edf2e96619a11ff99750492db3673ebd99 Mon Sep 17 00:00:00 2001 From: Jakub Dorňák Date: Jun 17 2015 18:56:07 +0000 Subject: Update to version 3.0.5 --- diff --git a/.gitignore b/.gitignore index 0029d19..d22200b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /python3-openid-3.0.2.tar.gz +/python3-openid-3.0.5.tar.gz diff --git a/python3-openid-3.0.2-parseXRDS.patch b/python3-openid-3.0.2-parseXRDS.patch deleted file mode 100644 index 491a119..0000000 --- a/python3-openid-3.0.2-parseXRDS.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- python3-openid-3.0.2/openid/yadis/etxrd.py.orig 2014-01-10 10:00:49.974203343 +0100 -+++ python3-openid-3.0.2/openid/yadis/etxrd.py 2014-01-10 10:01:09.657206290 +0100 -@@ -66,6 +66,8 @@ def parseXRDS(text): - not contain an XRDS. - """ - try: -+ if isinstance(text, str): -+ text = text.encode('utf-8') - element = ElementTree.XML(text) - except XMLError as why: - exc = XRDSError('Error parsing document as XML') diff --git a/python3-openid-3.0.2-pycurl.patch b/python3-openid-3.0.2-pycurl.patch deleted file mode 100644 index c03a8f8..0000000 --- a/python3-openid-3.0.2-pycurl.patch +++ /dev/null @@ -1,43 +0,0 @@ -Under Python 3, as PycURL invokes the write callback with bytes argument, -the response must be written to a BytesIO object - -(see http://pycurl.sourceforge.net/doc/unicode.html) - ---- python3-openid-3.0.2/openid/fetchers.py.orig 2015-06-17 16:03:28.832613889 +0200 -+++ python3-openid-3.0.2/openid/fetchers.py 2015-06-17 16:04:25.423442851 +0200 -@@ -323,7 +323,7 @@ class CurlHTTPFetcher(HTTPFetcher): - - # Remove the status line from the beginning of the input - unused_http_status_line = header_file.readline().lower() -- if unused_http_status_line.startswith('http/1.1 100 '): -+ if unused_http_status_line.startswith(b'http/1.1 100 '): - unused_http_status_line = header_file.readline() - unused_http_status_line = header_file.readline() - -@@ -337,7 +337,7 @@ class CurlHTTPFetcher(HTTPFetcher): - headers = {} - for line in lines: - try: -- name, value = line.split(':', 1) -+ name, value = line.split(b':', 1) - except ValueError: - raise HTTPError( - "Malformed HTTP header line in response: %r" % (line,)) -@@ -386,7 +386,7 @@ class CurlHTTPFetcher(HTTPFetcher): - if not self._checkURL(url): - raise HTTPError("Fetching URL not allowed: %r" % (url,)) - -- data = io.StringIO() -+ data = io.BytesIO() - - def write_data(chunk): - if data.tell() > (1024 * MAX_RESPONSE_KB): -@@ -394,7 +394,7 @@ class CurlHTTPFetcher(HTTPFetcher): - else: - return data.write(chunk) - -- response_header_data = io.StringIO() -+ response_header_data = io.BytesIO() - c.setopt(pycurl.WRITEFUNCTION, write_data) - c.setopt(pycurl.HEADERFUNCTION, response_header_data.write) - c.setopt(pycurl.TIMEOUT, off) diff --git a/python3-openid.spec b/python3-openid.spec index c75c278..6098bc1 100644 --- a/python3-openid.spec +++ b/python3-openid.spec @@ -1,20 +1,19 @@ Name: python3-openid -Version: 3.0.2 -Release: 4%{?dist} +Version: 3.0.5 +Release: 1%{?dist} Summary: Python 3 port of the python-openid library Group: Development/Libraries License: ASL 2.0 URL: https://github.com/necaris/python3-openid -Source0: http://github.srcurl.net/necaris/%{name}/v%{version}/%{name}-%{version}.tar.gz +Source0: https://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz Patch0: python3-openid-3.0.2-cryptutil-bytes.patch Patch1: python3-openid-3.0.2-admin-runtests-python3.patch -Patch2: python3-openid-3.0.2-parseXRDS.patch -Patch3: python3-openid-3.0.2-pycurl.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3-defusedxml %description This started out as a fork of the Python OpenID library, @@ -25,10 +24,8 @@ including cleanups and updates to the code in general. %prep %setup -q -%patch0 -p1 -b .cryptutil-bytes +#%patch0 -p1 -b .cryptutil-bytes %patch1 -p1 -b .admin-runtests-python3 -%patch2 -p1 -b .parseXRDS -%patch3 -p1 -b .pycurl %build @@ -47,7 +44,7 @@ LC_ALL=en_US.UTF-8 %{__python3} admin/runtests %files -%doc CHANGES-* LICENSE NEWS.md NOTICE README.md +%doc LICENSE NEWS.md %dir %{python3_sitelib}/openid %{python3_sitelib}/openid/*.py %dir %{python3_sitelib}/openid/__pycache__ @@ -80,6 +77,9 @@ LC_ALL=en_US.UTF-8 %{__python3} admin/runtests %changelog +* Wed Jun 17 2015 Jakub Dorňák - 3.0.5-1 +- Update to version 3.0.5 + * Wed Jun 17 2015 Jakub Dorňák - 3.0.2-4 - use BytesIO to write the response (instead of StringIO) Resolves: 1232809 diff --git a/sources b/sources index 7ca5778..a5f3fc8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5230967087791a001f25913b975aeb47 python3-openid-3.0.2.tar.gz +2451572f60cbd346390f929cd4188afd python3-openid-3.0.5.tar.gz