From c9ff591a7f925da453d47b7bfdbe6ff07df341f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 3 Mar 2015 15:16:00 -0500 Subject: [PATCH] Patch for string handling in tzstr --- python-dateutil-timelex-string.patch | 13 +++++++++++++ python-dateutil.spec | 9 ++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 python-dateutil-timelex-string.patch diff --git a/python-dateutil-timelex-string.patch b/python-dateutil-timelex-string.patch new file mode 100644 index 0000000..bccec4a --- /dev/null +++ b/python-dateutil-timelex-string.patch @@ -0,0 +1,13 @@ +diff --git dateutil/parser.py~ dateutil/parser.py +index 8b6c2d28b8..75453ef49e 100644 +--- dateutil/parser.py~ ++++ dateutil/parser.py +@@ -32,7 +32,7 @@ __all__ = ["parse", "parserinfo"] + class _timelex(object): + + def __init__(self, instream): +- if isinstance(instream, text_type): ++ if not hasattr(instream, 'read'): + instream = StringIO(instream) + self.instream = instream + self.wordchars = ('abcdfeghijklmnopqrstuvwxyz' diff --git a/python-dateutil.spec b/python-dateutil.spec index 6eaacb1..220630a 100644 --- a/python-dateutil.spec +++ b/python-dateutil.spec @@ -1,6 +1,6 @@ Name: python-dateutil Version: 2.4.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Summary: Powerful extensions to the standard datetime module @@ -10,6 +10,7 @@ URL: https://github.com/dateutil/dateutil Source0: https://github.com/dateutil/dateutil/archive/2.4.0.tar.gz # https://github.com/dateutil/dateutil/issues/11 Patch0: python-dateutil-system-zoneinfo.patch +Patch1: python-dateutil-timelex-string.patch BuildArch: noarch BuildRequires: python2-devel @@ -48,8 +49,7 @@ Summary: API documentation for python-dateutil This package contains %{summary}. %prep -%setup -q -n dateutil-%{version} -%patch0 -p0 +%autosetup -p0 -n dateutil-%{version} iconv --from=ISO-8859-1 --to=UTF-8 NEWS > NEWS.new mv NEWS.new NEWS @@ -83,6 +83,9 @@ make -C docs html %doc docs/_build/html %changelog +* Tue Mar 3 2015 Zbigniew Jędrzejewski-Szmek - 1:2.4.0-3 +- Add patch for string handling in dateutil.tz.tzstr (#1197791) + * Wed Jan 21 2015 Zbigniew Jędrzejewski-Szmek - 1:2.4.0-2 - Add python3 subpackage. - Conflict with python-vobject <= 0.8.1c-10 (workaround until #1183377