public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python3-openid] epel10: use BytesIO to write the response
@ 2026-10-30 21:38
0 siblings, 0 replies; only message in thread
From: @ 2026-10-30 21:38 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python3-openid
Branch : epel10
Commit : 9ba0d542c290342f016202f6b207e8ee868b21e0
Author : Jakub Dorňák <jdornak@redhat.com>
Date : 2015-06-17T16:20:09+02:00
Stats : +50/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python3-openid/c/9ba0d542c290342f016202f6b207e8ee868b21e0?branch=epel10
Log:
use BytesIO to write the response
Resolves: 1232809
---
diff --git a/python3-openid-3.0.2-pycurl.patch b/python3-openid-3.0.2-pycurl.patch
new file mode 100644
index 0000000..c03a8f8
--- /dev/null
+++ b/python3-openid-3.0.2-pycurl.patch
@@ -0,0 +1,43 @@
+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 c11b6ac..c75c278 100644
--- a/python3-openid.spec
+++ b/python3-openid.spec
@@ -1,6 +1,6 @@
Name: python3-openid
Version: 3.0.2
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Python 3 port of the python-openid library
Group: Development/Libraries
License: ASL 2.0
@@ -9,6 +9,7 @@ Source0: http://github.srcurl.net/necaris/%{name}/v%{version}/%{name}-%{v
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
@@ -27,6 +28,7 @@ including cleanups and updates to the code in general.
%patch0 -p1 -b .cryptutil-bytes
%patch1 -p1 -b .admin-runtests-python3
%patch2 -p1 -b .parseXRDS
+%patch3 -p1 -b .pycurl
%build
@@ -78,6 +80,10 @@ LC_ALL=en_US.UTF-8 %{__python3} admin/runtests
%changelog
+* Wed Jun 17 2015 Jakub Dorňák <jdornak@redhat.com> - 3.0.2-4
+- use BytesIO to write the response (instead of StringIO)
+ Resolves: 1232809
+
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-30 21:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 21:38 [rpms/python3-openid] epel10: use BytesIO to write the response
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox