[python-coverage/f17] Upstream patch to fix using coverage for python2 and python3 in the same

Toshio くらとみ toshio at fedoraproject.org
Thu Oct 11 06:23:37 UTC 2012


commit 1591ad152d7a172da98c0dd892d63f4ec5ad7287
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date:   Wed Oct 10 23:23:18 2012 -0700

    Upstream patch to fix using coverage for python2 and python3 in the same
    
      directory https://bugzilla.redhat.com/show_bug.cgi?id=865080

 python-coverage-3.5.3-pickle.patch |   20 ++++++++++++++++++++
 python-coverage.spec               |    9 ++++++++-
 2 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/python-coverage-3.5.3-pickle.patch b/python-coverage-3.5.3-pickle.patch
new file mode 100644
index 0000000..7f456d2
--- /dev/null
+++ b/python-coverage-3.5.3-pickle.patch
@@ -0,0 +1,20 @@
+# HG changeset patch
+# User Ned Batchelder <ned at nedbatchelder.com>
+# Date 1349312975 14400
+# Node ID 16020b834643bb8b9953b8d4bcc09691deb549b9
+# Parent  70e174f7312c87101b0b5be7ec7dd1acf7869f12
+Fix #193: The status.dat file written by py2 can't be read by py3
+
+Index: coverage-3.5.1b1/coverage/html.py
+===================================================================
+--- coverage-3.5.1b1.orig/coverage/html.py
++++ coverage-3.5.1b1/coverage/html.py
+@@ -247,7 +247,7 @@ class HtmlStatus(object):
+         try:
+             status_file = os.path.join(directory, self.STATUS_FILE)
+             status = pickle.load(open(status_file, "rb"))
+-        except IOError:
++        except (IOError, ValueError):
+             usable = False
+         else:
+             usable = True
diff --git a/python-coverage.spec b/python-coverage.spec
index 23a4037..62ed82c 100644
--- a/python-coverage.spec
+++ b/python-coverage.spec
@@ -14,11 +14,12 @@
 Name:           python-coverage
 Summary:        Code coverage testing module for Python
 Version:        3.5.1
-Release:        0.2.%{betaver}%{?dist}
+Release:        0.3.%{betaver}%{?dist}
 License:        BSD and (MIT or GPLv2)
 Group:          System Environment/Libraries
 URL:            http://nedbatchelder.com/code/modules/coverage.html
 Source0:        http://pypi.python.org/packages/source/c/coverage/coverage-%{version}%{betaver}.tar.gz
+Patch0:         python-coverage-3.5.3-pickle.patch
 BuildRequires:  python-setuptools, python-devel
 Requires:       python-setuptools
 %if 0%{?with_python3}
@@ -50,6 +51,8 @@ have been executed.
 %prep
 %setup -q -n coverage-%{version}%{betaver}
 
+%patch0 -p1
+
 find . -type f -exec chmod 0644 \{\} \;
 sed -i 's/\r//g' README.txt
 
@@ -95,6 +98,10 @@ popd
 
 
 %changelog
+* Wed Oct 10 2012 Toshio Kuratomi <toshio at fedoraproject.org> - 3.5.1-0.3.b1
+- Upstream patch to fix using coverage for python2 and python3 in the same
+  directory https://bugzilla.redhat.com/show_bug.cgi?id=865080
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.5.1-0.2.b1
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list