Hello community,
here is the log from the commit of package python3-dateutil for openSUSE:Factory checked in at 2014-01-07 14:38:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-dateutil (Old)
and /work/SRC/openSUSE:Factory/.python3-dateutil.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-dateutil"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-dateutil/python3-dateutil.changes 2013-06-21 19:01:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-dateutil.new/python3-dateutil.changes 2014-01-07 14:38:20.000000000 +0100
@@ -1,0 +2,11 @@
+Mon Jan 6 15:15:36 UTC 2014 - ocefpaf@gmail.com
+
+- Dropped python3-dateutil-utf8.patch. Fixed in upstream
+- Replace python3-distribute with python3-setuptools
+- Removed Requires:python(abi) = %{py3_ver}
+- Updated to version 2.2
+ - Updated zoneinfo to 2013h
+ - fuzzy_with_tokens parse addon from Christopher Corley
+ - Bug with LANG=C fixed by Mike Gilbert
+
+-------------------------------------------------------------------
Old:
----
python-dateutil-2.1.tar.gz
python3-dateutil-utf8.patch
New:
----
python-dateutil-2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-dateutil.spec ++++++
--- /var/tmp/diff_new_pack.6RNL02/_old 2014-01-07 14:38:20.000000000 +0100
+++ /var/tmp/diff_new_pack.6RNL02/_new 2014-01-07 14:38:20.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python3-dateutil
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -22,18 +22,16 @@
Summary: A Python Datetime Library
License: BSD-3-Clause
Group: Development/Libraries/Python
-Version: 2.1
+Version: 2.2
Release: 0
Source0: http://pypi.python.org/packages/source/p/%{tarname}/%{tarname}-%{version}.tar.gz
-Patch0: %{name}-utf8.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://labix.org/python-dateutil
BuildRequires: python3
BuildRequires: python3-devel
-BuildRequires: python3-distribute
+BuildRequires: python3-setuptools
BuildRequires: python3-six
BuildArch: noarch
-Requires: python(abi) = %{py3_ver}
Requires: python3-six
%description
@@ -67,7 +65,6 @@
%prep
%setup -q -n %{tarname}-%{version}
-%patch0 -p1
%build
rm setup.cfg
++++++ python-dateutil-2.1.tar.gz -> python-dateutil-2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.1/NEWS new/python-dateutil-2.2/NEWS
--- old/python-dateutil-2.1/NEWS 2012-03-28 17:57:55.000000000 +0200
+++ new/python-dateutil-2.2/NEWS 2013-10-31 15:00:03.000000000 +0100
@@ -1,3 +1,12 @@
+Version 2.2
+-----------
+
+- Updated zoneinfo to 2013h
+
+- fuzzy_with_tokens parse addon from Christopher Corley
+
+- Bug with LANG=C fixed by Mike Gilbert
+
Version 2.1
-----------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.1/PKG-INFO new/python-dateutil-2.2/PKG-INFO
--- old/python-dateutil-2.1/PKG-INFO 2012-03-28 18:03:08.000000000 +0200
+++ new/python-dateutil-2.2/PKG-INFO 2013-11-01 09:33:53.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-dateutil
-Version: 2.1
+Version: 2.2
Summary: Extensions to the standard Python datetime module
Home-page: http://labix.org/python-dateutil
Author: Tomi Pievilaeinen
@@ -10,4 +10,15 @@
datetime module available in the Python standard library.
Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Topic :: Software Development :: Libraries
Requires: six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.1/README new/python-dateutil-2.2/README
--- old/python-dateutil-2.1/README 2012-03-28 16:25:43.000000000 +0200
+++ new/python-dateutil-2.2/README 2013-11-01 09:31:13.000000000 +0100
@@ -80,7 +80,9 @@
* attachment:python-dateutil-1.0-1.noarch.rpm
== Author ==
-The dateutil module was written by GustavoNiemeyer .
+The dateutil module was written by Gustavo Niemeyer and
+is currently maintained by Tomi Pieviläinen . The latest
+code is available in [https://launchpad.net/dateutil Launchpad].
== Documentation ==
The following modules are available.
@@ -1204,6 +1206,10 @@
If {{{fuzzy}}} is set to True, unknown tokens in the string
will be ignored.
+ fuzzy_with_tokens::
+ Similar to {{{fuzzy}}}, but will result a tuple of the normal
+ results and the skipped tokens.
+
parserinfo::
This parameter allows one to change how the string is parsed,
by using a different parserinfo class instance. Using it you
@@ -1967,4 +1973,21 @@
tzfile('Brazil/East')
}}}
+== Building ==
+When you get the source, it does not contain the internal zoneinfo
+database. To get (and update) the database, run the updatezinfo.py script. Make sure
+that the zic command is in your path, and that you have network connectivity
+to get the latest timezone information from IANA. If you have downloaded
+the timezone data earlier, you can give the tarball as a parameter to
+updatezinfo.py.
+
+
+== Testing ==
+dateutil has a comprehensive test suite, which can be run simply by running the
+test.py script in the project root. Note that if you don't have the internal
+zoneinfo database, some tests will fail. Apart from that, all tests should pass.
+
+To easily test dateutil against all supported Python versions, you can use
+[[[http://tox.readthedocs.org/en/latest/ tox]]].
+
## vim:ft=moin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.1/dateutil/__init__.py new/python-dateutil-2.2/dateutil/__init__.py
--- old/python-dateutil-2.1/dateutil/__init__.py 2012-03-28 16:25:44.000000000 +0200
+++ new/python-dateutil-2.2/dateutil/__init__.py 2013-10-31 14:59:43.000000000 +0100
@@ -7,4 +7,4 @@
"""
__author__ = "Tomi Pieviläinen "
__license__ = "Simplified BSD"
-__version__ = "2.1"
+__version__ = "2.2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.1/dateutil/parser.py new/python-dateutil-2.2/dateutil/parser.py
--- old/python-dateutil-2.1/dateutil/parser.py 2012-03-28 16:25:44.000000000 +0200
+++ new/python-dateutil-2.2/dateutil/parser.py 2013-10-31 14:53:37.000000000 +0100
@@ -174,7 +174,7 @@
# m from a.m/p.m, t from ISO T separator
JUMP = [" ", ".", ",", ";", "-", "/", "'",
"at", "on", "and", "ad", "m", "t", "of",
- "st", "nd", "rd", "th"]
+ "st", "nd", "rd", "th"]
WEEKDAYS = [("Mon", "Monday"),
("Tue", "Tuesday"),
@@ -305,7 +305,10 @@
if not default:
default = datetime.datetime.now().replace(hour=0, minute=0,
second=0, microsecond=0)
- res = self._parse(timestr, **kwargs)
+
+
+ res, skipped_tokens = self._parse(timestr, **kwargs)
+
if res is None:
raise ValueError("unknown string format")
repl = {}
@@ -339,6 +342,10 @@
ret = ret.replace(tzinfo=tz.tzutc())
elif res.tzoffset:
ret = ret.replace(tzinfo=tz.tzoffset(res.tzname, res.tzoffset))
+
+ if skipped_tokens:
+ return ret, skipped_tokens
+
return ret
class _result(_resultbase):
@@ -346,7 +353,10 @@
"hour", "minute", "second", "microsecond",
"tzname", "tzoffset"]
- def _parse(self, timestr, dayfirst=None, yearfirst=None, fuzzy=False):
+ def _parse(self, timestr, dayfirst=None, yearfirst=None, fuzzy=False, fuzzy_with_tokens=False):
+ if fuzzy_with_tokens:
+ fuzzy = True
+
info = self.info
if dayfirst is None:
dayfirst = info.dayfirst
@@ -354,6 +364,13 @@
yearfirst = info.yearfirst
res = self._result()
l = _timelex.split(timestr)
+
+
+ # keep up with the last token skipped so we can recombine
+ # consecutively skipped tokens (-2 for when i begins at 0).
+ last_skipped_token_i = -2
+ skipped_tokens = list()
+
try:
# year/month/day list
@@ -387,7 +404,7 @@
res.minute = int(s[2:])
elif len_li == 6 or (len_li > 6 and l[i-1].find('.') == 6):
# YYMMDD or HHMMSS[.ss]
- s = l[i-1]
+ s = l[i-1]
if not ymd and l[i-1].find('.') == -1:
ymd.append(info.convertyear(int(s[:2])))
ymd.append(int(s[2:4]))
@@ -636,6 +653,13 @@
if not (info.jump(l[i]) or fuzzy):
return None
+ if last_skipped_token_i == i - 1:
+ # recombine the tokens
+ skipped_tokens[-1] += l[i]
+ else:
+ # just append
+ skipped_tokens.append(l[i])
+ last_skipped_token_i = i
i += 1
# Process year/month/day
@@ -705,7 +729,11 @@
if not info.validate(res):
return None
- return res
+
+ if fuzzy_with_tokens:
+ return res, tuple(skipped_tokens)
+
+ return res, None
DEFAULTPARSER = parser()
def parse(timestr, parserinfo=None, **kwargs):
@@ -888,7 +916,7 @@
except (IndexError, ValueError, AssertionError):
return None
-
+
return res
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.1/dateutil/zoneinfo/__init__.py new/python-dateutil-2.2/dateutil/zoneinfo/__init__.py
--- old/python-dateutil-2.1/dateutil/zoneinfo/__init__.py 2012-03-28 17:57:55.000000000 +0200
+++ new/python-dateutil-2.2/dateutil/zoneinfo/__init__.py 2013-10-31 14:53:17.000000000 +0100
@@ -5,9 +5,12 @@
This module offers extensions to the standard Python
datetime module.
"""
-from dateutil.tz import tzfile
-from tarfile import TarFile
+import logging
import os
+from subprocess import call
+from tarfile import TarFile
+
+from dateutil.tz import tzfile
__author__ = "Tomi Pieviläinen "
__license__ = "Simplified BSD"
@@ -58,6 +61,11 @@
return tzinfo
def rebuild(filename, tag=None, format="gz"):
+ """Rebuild the internal timezone info in dateutil/zoneinfo/zoneinfo*tar*
+
+ filename is the timezone tarball from ftp.iana.org/tz.
+
+ """
import tempfile, shutil
tmpdir = tempfile.mkdtemp()
zonedir = os.path.join(tmpdir, "zoneinfo")
@@ -75,7 +83,18 @@
name == "leapseconds"):
tf.extract(name, tmpdir)
filepath = os.path.join(tmpdir, name)
- os.system("zic -d %s %s" % (zonedir, filepath))
+ try:
+ # zic will return errors for nontz files in the package
+ # such as the Makefile or README, so check_call cannot
+ # be used (or at least extra checks would be needed)
+ call(["zic", "-d", zonedir, filepath])
+ except OSError as e:
+ if e.errno == 2:
+ logging.error(
+ "Could not find zic. Perhaps you need to install "
+ "libc-bin or some other package that provides it, "
+ "or it's not in your PATH?")
+ raise
tf.close()
target = os.path.join(moduledir, targetname)
for entry in os.listdir(moduledir):
Files old/python-dateutil-2.1/dateutil/zoneinfo/zoneinfo--latest.tar.gz and new/python-dateutil-2.2/dateutil/zoneinfo/zoneinfo--latest.tar.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.1/python_dateutil.egg-info/PKG-INFO new/python-dateutil-2.2/python_dateutil.egg-info/PKG-INFO
--- old/python-dateutil-2.1/python_dateutil.egg-info/PKG-INFO 2012-03-28 18:03:08.000000000 +0200
+++ new/python-dateutil-2.2/python_dateutil.egg-info/PKG-INFO 2013-11-01 09:33:53.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-dateutil
-Version: 2.1
+Version: 2.2
Summary: Extensions to the standard Python datetime module
Home-page: http://labix.org/python-dateutil
Author: Tomi Pievilaeinen
@@ -10,4 +10,15 @@
datetime module available in the Python standard library.
Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Topic :: Software Development :: Libraries
Requires: six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.1/setup.py new/python-dateutil-2.2/setup.py
--- old/python-dateutil-2.1/setup.py 2012-03-28 17:57:55.000000000 +0200
+++ new/python-dateutil-2.2/setup.py 2013-11-01 09:32:03.000000000 +0100
@@ -1,5 +1,6 @@
#!/usr/bin/python
from os.path import isfile, join
+import codecs
import glob
import os
import re
@@ -13,7 +14,7 @@
TOPDIR = os.path.dirname(__file__) or "."
VERSION = re.search('__version__ = "([^"]+)"',
- open(TOPDIR + "/dateutil/__init__.py").read()).group(1)
+ codecs.open(TOPDIR + "/dateutil/__init__.py", encoding='utf-8').read()).group(1)
setup(name="python-dateutil",
@@ -34,4 +35,17 @@
zip_safe = False,
requires = ["six"],
install_requires = ["six"], # XXX fix when packaging is sane again
+ classifiers = [
+ 'Development Status :: 5 - Production/Stable',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: BSD License',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.2',
+ 'Programming Language :: Python :: 3.3',
+ 'Topic :: Software Development :: Libraries',
+ ]
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.1/test.py new/python-dateutil-2.2/test.py
--- old/python-dateutil-2.1/test.py 2012-03-28 16:25:46.000000000 +0200
+++ new/python-dateutil-2.2/test.py 2013-11-01 09:29:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
@@ -10,14 +10,14 @@
# Add build directory to search path
if os.path.exists("build"):
- from distutils.util import get_platform
- import sys
- if sys.version_info >= (3, 2):
- s = "build/lib"
- else:
- s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
- s = os.path.join(os.getcwd(), s)
- sys.path.insert(0, s)
+ from distutils.util import get_platform
+ import sys
+ if sys.version_info >= (3, 2):
+ s = "build/lib"
+ else:
+ s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
+ s = os.path.join(os.getcwd(), s)
+ sys.path.insert(0, s)
from dateutil.relativedelta import *
from dateutil.parser import *
@@ -3447,7 +3447,7 @@
def testLongMonth(self):
self.assertEqual(parse("October", default=self.default),
datetime(2003, 10, 25))
-
+
def testZeroYear(self):
self.assertEqual(parse("31-Dec-00", default=self.default),
datetime(2000, 12, 31))
@@ -3458,6 +3458,16 @@
self.assertEqual(parse(s, fuzzy=True),
datetime(2003, 9, 25, 10, 49, 41,
tzinfo=self.brsttz))
+ def testFuzzyWithTokens(self):
+ s = "Today is 25 of September of 2003, exactly " \
+ "at 10:49:41 with timezone -03:00."
+ self.assertEqual(parse(s, fuzzy_with_tokens=True),
+ (datetime(2003, 9, 25, 10, 49, 41,
+ tzinfo=self.brsttz),
+ ('Today is ', 'of ', ', exactly at ',
+ ' with timezone ', '.')
+ )
+ )
def testExtraSpace(self):
self.assertEqual(parse(" July 4 , 1976 12:01:02 am "),
@@ -3907,7 +3917,7 @@
def testStrCmp1(self):
self.assertEqual(tzstr("EST5EDT"),
tzstr("EST5EDT4,M4.1.0/02:00:00,M10-5-0/02:00"))
-
+
def testStrCmp2(self):
self.assertEqual(tzstr("EST5EDT"),
tzstr("EST5EDT,4,1,0,7200,10,-1,0,7200,3600"))
@@ -3930,7 +3940,7 @@
tz = tzfile(BytesIO(base64.decodestring(self.TZFILE_EST5EDT)))
self.assertEqual(datetime(2003, 4, 6, 1, 59, tzinfo=tz).tzname(), "EST")
self.assertEqual(datetime(2003, 4, 6, 2, 00, tzinfo=tz).tzname(), "EDT")
-
+
def testFileEnd1(self):
tz = tzfile(BytesIO(base64.decodestring(self.TZFILE_EST5EDT)))
self.assertEqual(datetime(2003, 10, 26, 0, 59, tzinfo=tz).tzname(), "EDT")
@@ -4007,6 +4017,6 @@
if __name__ == "__main__":
- unittest.main()
+ unittest.main()
# vim:ts=4:sw=4
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org