From 6d5eb7692f02743f694637899f64b3f65605f526 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 31 Mar 2015 10:29:13 -0400 Subject: [PATCH] fix bz 1204940 --- python-coverage-4.0a5-unicodefix.patch | 9 +++++++++ python-coverage.spec | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 python-coverage-4.0a5-unicodefix.patch diff --git a/python-coverage-4.0a5-unicodefix.patch b/python-coverage-4.0a5-unicodefix.patch new file mode 100644 index 0000000..ec86a81 --- /dev/null +++ b/python-coverage-4.0a5-unicodefix.patch @@ -0,0 +1,9 @@ +diff -up coverage-4.0a5/coverage/annotate.py.orig coverage-4.0a5/coverage/annotate.py +--- coverage-4.0a5/coverage/annotate.py.orig 2015-03-25 10:33:54.569942923 -0400 ++++ coverage-4.0a5/coverage/annotate.py 2015-03-25 10:34:22.775668752 -0400 +@@ -89,4 +89,4 @@ class AnnotateReporter(Reporter): + dest.write('> ') + else: + dest.write('! ') +- dest.write(line) ++ dest.write(line.encode('utf-8')) diff --git a/python-coverage.spec b/python-coverage.spec index e153097..23d5dd4 100644 --- a/python-coverage.spec +++ b/python-coverage.spec @@ -17,11 +17,13 @@ Name: python-coverage Summary: Code coverage testing module for Python Version: 4.0 -Release: 0.4.%{?prever}%{?dist} +Release: 0.5.%{?prever}%{?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}%{?prever}.tar.gz +# https://bitbucket.org/ned/coveragepy/issue/363/annotate-command-hits-unicode-happy-fun +Patch0: python-coverage-4.0a5-unicodefix.patch BuildRequires: python-setuptools, python2-devel Requires: python-setuptools %if 0%{?with_python3} @@ -52,6 +54,7 @@ have been executed. %prep %setup -q -n coverage-%{version}%{?prever} +%patch0 -p1 find . -type f -exec chmod 0644 \{\} \; sed -i 's/\r//g' README.txt @@ -121,6 +124,9 @@ popd %changelog +* Wed Mar 25 2015 Tom Callaway 4.0-0.5.a5 +- unicode fixup + * Tue Feb 17 2015 Tom Callaway 4.0-0.4.a5 - update to 4.0a5