Hello community,
here is the log from the commit of package python-aniso8601 for openSUSE:Factory checked in at 2019-06-13 23:02:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-aniso8601 (Old)
and /work/SRC/openSUSE:Factory/.python-aniso8601.new.4811 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-aniso8601"
Thu Jun 13 23:02:30 2019 rev:5 rq:709370 version:7.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-aniso8601/python-aniso8601.changes 2019-03-11 13:51:41.825254893 +0100
+++ /work/SRC/openSUSE:Factory/.python-aniso8601.new.4811/python-aniso8601.changes 2019-06-13 23:02:31.547436227 +0200
@@ -1,0 +2,7 @@
+Wed Jun 12 10:33:54 UTC 2019 - Ondřej Súkup
+
+- Update to 7.0.0
+ * Handle all fractional components as an integer number of microseconds,
+ eliminating rounding issues
+
+-------------------------------------------------------------------
Old:
----
aniso8601-6.0.0.tar.gz
New:
----
aniso8601-7.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-aniso8601.spec ++++++
--- /var/tmp/diff_new_pack.YNSHgx/_old 2019-06-13 23:02:32.127435723 +0200
+++ /var/tmp/diff_new_pack.YNSHgx/_new 2019-06-13 23:02:32.131435719 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define modname aniso8601
Name: python-%{modname}
-Version: 6.0.0
+Version: 7.0.0
Release: 0
Summary: A library for parsing ISO 8601 strings
License: BSD-3-Clause
++++++ aniso8601-6.0.0.tar.gz -> aniso8601-7.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-6.0.0/PKG-INFO new/aniso8601-7.0.0/PKG-INFO
--- old/aniso8601-6.0.0/PKG-INFO 2019-03-08 21:10:19.000000000 +0100
+++ new/aniso8601-7.0.0/PKG-INFO 2019-06-11 21:23:12.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: aniso8601
-Version: 6.0.0
+Version: 7.0.0
Summary: A library for parsing ISO 8601 strings.
Home-page: https://bitbucket.org/nielsenb/aniso8601
Author: Brandon Nielsen
@@ -286,8 +286,8 @@
The following builders are available as separate projects:
- * `RelativeTimeBuilder https://bitbucket.org/nielsenb/relativetimebuilder`_ supports parsing to `datetutil relativedelta typeshttps://dateutil.readthedocs.io/en/stable/relativedelta.html`_ for calendar level accuracy
- * `AttoTimeBuilder https://bitbucket.org/nielsenb/attotimebuilder_` supports parsing directly to `attotime attodatetime and attotimedelta types https://bitbucket.org/nielsenb/attotime`_ which support sub-nanosecond precision
+ * `RelativeTimeBuilder https://bitbucket.org/nielsenb/relativetimebuilder`_ supports parsing to `datetutil relativedelta types https://dateutil.readthedocs.io/en/stable/relativedelta.html`_ for calendar level accuracy
+ * `AttoTimeBuilder https://bitbucket.org/nielsenb/attotimebuilder`_ supports parsing directly to `attotime attodatetime and attotimedelta types https://bitbucket.org/nielsenb/attotime`_ which support sub-nanosecond precision
* `NumPyTimeBuilder https://bitbucket.org/nielsenb/numpytimebuilder`_ supports parsing directly to `NumPy datetime64 and timedelta64 types https://docs.scipy.org/doc/numpy/reference/arrays.datetime.html`_
TupleBuilder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-6.0.0/README.rst new/aniso8601-7.0.0/README.rst
--- old/aniso8601-6.0.0/README.rst 2019-03-08 21:07:09.000000000 +0100
+++ new/aniso8601-7.0.0/README.rst 2019-03-08 21:17:24.000000000 +0100
@@ -275,8 +275,8 @@
The following builders are available as separate projects:
-* `RelativeTimeBuilder https://bitbucket.org/nielsenb/relativetimebuilder`_ supports parsing to `datetutil relativedelta typeshttps://dateutil.readthedocs.io/en/stable/relativedelta.html`_ for calendar level accuracy
-* `AttoTimeBuilder https://bitbucket.org/nielsenb/attotimebuilder_` supports parsing directly to `attotime attodatetime and attotimedelta types https://bitbucket.org/nielsenb/attotime`_ which support sub-nanosecond precision
+* `RelativeTimeBuilder https://bitbucket.org/nielsenb/relativetimebuilder`_ supports parsing to `datetutil relativedelta types https://dateutil.readthedocs.io/en/stable/relativedelta.html`_ for calendar level accuracy
+* `AttoTimeBuilder https://bitbucket.org/nielsenb/attotimebuilder`_ supports parsing directly to `attotime attodatetime and attotimedelta types https://bitbucket.org/nielsenb/attotime`_ which support sub-nanosecond precision
* `NumPyTimeBuilder https://bitbucket.org/nielsenb/numpytimebuilder`_ supports parsing directly to `NumPy datetime64 and timedelta64 types https://docs.scipy.org/doc/numpy/reference/arrays.datetime.html`_
TupleBuilder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-6.0.0/aniso8601/builders/python.py new/aniso8601-7.0.0/aniso8601/builders/python.py
--- old/aniso8601-6.0.0/aniso8601/builders/python.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-7.0.0/aniso8601/builders/python.py 2019-06-11 21:12:26.000000000 +0200
@@ -7,7 +7,6 @@
# of the BSD license. See the LICENSE file for details.
import datetime
-import math
from aniso8601.builders import BaseTimeBuilder, TupleBuilder
from aniso8601.exceptions import (DayOutOfBoundsError,
@@ -18,6 +17,15 @@
WeekOutOfBoundsError, YearOutOfBoundsError)
from aniso8601.utcoffset import UTCOffset
+MICROSECONDS_PER_SECOND = int(1e6)
+
+MICROSECONDS_PER_MINUTE = 60 * MICROSECONDS_PER_SECOND
+MICROSECONDS_PER_HOUR = 60 * MICROSECONDS_PER_MINUTE
+MICROSECONDS_PER_DAY = 24 * MICROSECONDS_PER_HOUR
+MICROSECONDS_PER_WEEK = 7 * MICROSECONDS_PER_DAY
+MICROSECONDS_PER_MONTH = 30 * MICROSECONDS_PER_DAY
+MICROSECONDS_PER_YEAR = 365 * MICROSECONDS_PER_DAY
+
class PythonTimeBuilder(BaseTimeBuilder):
@classmethod
def build_date(cls, YYYY=None, MM=None, DD=None, Www=None, D=None,
@@ -78,7 +86,8 @@
if dayofyear is not None:
return PythonTimeBuilder._build_ordinal_date(year, dayofyear)
- elif weeknumber is not None:
+
+ if weeknumber is not None:
return PythonTimeBuilder._build_week_date(year, weeknumber,
isoday=dayofweek)
@@ -91,49 +100,33 @@
hours = 0
minutes = 0
seconds = 0
-
- floathours = float(0)
- floatminutes = float(0)
- floatseconds = float(0)
+ microseconds = 0
if hh is not None:
if '.' in hh:
- hours, floathours = cls._split_and_cast(hh, 'Invalid hour string.')
+ hours, remainingmicroseconds = cls._split_to_microseconds(hh, MICROSECONDS_PER_HOUR, 'Invalid hour string.')
+ microseconds += remainingmicroseconds
else:
hours = cls.cast(hh, int,
thrownmessage='Invalid hour string.')
if mm is not None:
if '.' in mm:
- minutes, floatminutes = cls._split_and_cast(mm, 'Invalid minute string.')
+ minutes, remainingmicroseconds = cls._split_to_microseconds(mm, MICROSECONDS_PER_MINUTE, 'Invalid minute string.')
+ microseconds += remainingmicroseconds
else:
minutes = cls.cast(mm, int,
thrownmessage='Invalid minute string.')
if ss is not None:
if '.' in ss:
- seconds, floatseconds = cls._split_and_cast(ss, 'Invalid second string.')
+ seconds, remainingmicroseconds = cls._split_to_microseconds(ss, MICROSECONDS_PER_SECOND, 'Invalid second string.')
+ microseconds += remainingmicroseconds
else:
seconds = cls.cast(ss, int,
thrownmessage='Invalid second string.')
- if floathours != 0:
- remainderhours, remainderminutes = cls._split_and_convert(floathours, 60)
-
- hours += remainderhours
- floatminutes += remainderminutes
-
- if floatminutes != 0:
- remainderminutes, remainderseconds = cls._split_and_convert(floatminutes, 60)
-
- minutes += remainderminutes
- floatseconds += remainderseconds
-
- if floatseconds != 0:
- totalseconds = float(seconds) + floatseconds
-
- #Truncate to maximum supported precision
- seconds = cls._truncate(totalseconds, 6)
+ hours, minutes, seconds, microseconds = PythonTimeBuilder._distribute_microseconds(microseconds, (hours, minutes, seconds), (MICROSECONDS_PER_HOUR, MICROSECONDS_PER_MINUTE, MICROSECONDS_PER_SECOND))
#Range checks
if hours == 23 and minutes == 59 and seconds == 60:
@@ -166,13 +159,15 @@
hour=hours,
minute=minutes,
tzinfo=cls._build_object(tz))
- + datetime.timedelta(seconds=seconds)
+ + datetime.timedelta(seconds=seconds,
+ microseconds=microseconds)
).timetz()
return (datetime.datetime(1, 1, 1,
hour=hours,
minute=minutes)
- + datetime.timedelta(seconds=seconds)
+ + datetime.timedelta(seconds=seconds,
+ microseconds=microseconds)
).time()
@classmethod
@@ -190,111 +185,72 @@
hours = 0
minutes = 0
seconds = 0
-
- floatyears = float(0)
- floatmonths = float(0)
- floatdays = float(0)
- floatweeks = float(0)
- floathours = float(0)
- floatminutes = float(0)
- floatseconds = float(0)
+ microseconds = 0
if PnY is not None:
if '.' in PnY:
- years, floatyears = cls._split_and_cast(PnY, 'Invalid year string.')
+ years, remainingmicroseconds = cls._split_to_microseconds(PnY, MICROSECONDS_PER_YEAR, 'Invalid year string.')
+ microseconds += remainingmicroseconds
else:
years = cls.cast(PnY, int,
thrownmessage='Invalid year string.')
if PnM is not None:
if '.' in PnM:
- months, floatmonths = cls._split_and_cast(PnM, 'Invalid month string.')
+ months, remainingmicroseconds = cls._split_to_microseconds(PnM, MICROSECONDS_PER_MONTH, 'Invalid month string.')
+ microseconds += remainingmicroseconds
else:
months = cls.cast(PnM, int,
thrownmessage='Invalid month string.')
if PnW is not None:
if '.' in PnW:
- weeks, floatweeks = cls._split_and_cast(PnW, 'Invalid week string.')
+ weeks, remainingmicroseconds = cls._split_to_microseconds(PnW, MICROSECONDS_PER_WEEK, 'Invalid week string.')
+ microseconds += remainingmicroseconds
else:
weeks = cls.cast(PnW, int,
thrownmessage='Invalid week string.')
if PnD is not None:
if '.' in PnD:
- days, floatdays = cls._split_and_cast(PnD, 'Invalid day string.')
+ days, remainingmicroseconds = cls._split_to_microseconds(PnD, MICROSECONDS_PER_DAY, 'Invalid day string.')
+ microseconds += remainingmicroseconds
else:
days = cls.cast(PnD, int,
thrownmessage='Invalid day string.')
if TnH is not None:
if '.' in TnH:
- hours, floathours = cls._split_and_cast(TnH, 'Invalid hour string.')
+ hours, remainingmicroseconds = cls._split_to_microseconds(TnH, MICROSECONDS_PER_HOUR, 'Invalid hour string.')
+ microseconds += remainingmicroseconds
else:
hours = cls.cast(TnH, int,
thrownmessage='Invalid hour string.')
if TnM is not None:
if '.' in TnM:
- minutes, floatminutes = cls._split_and_cast(TnM, 'Invalid minute string.')
+ minutes, remainingmicroseconds = cls._split_to_microseconds(TnM, MICROSECONDS_PER_MINUTE, 'Invalid minute string.')
+ microseconds += remainingmicroseconds
else:
minutes = cls.cast(TnM, int,
thrownmessage='Invalid minute string.')
if TnS is not None:
if '.' in TnS:
- seconds, floatseconds = cls._split_and_cast(TnS, 'Invalid second string.')
+ seconds, remainingmicroseconds = cls._split_to_microseconds(TnS, MICROSECONDS_PER_SECOND, 'Invalid second string.')
+ microseconds += remainingmicroseconds
else:
seconds = cls.cast(TnS, int,
thrownmessage='Invalid second string.')
- if floatyears != 0:
- remainderyears, remainderdays = cls._split_and_convert(floatyears, 365)
-
- years += remainderyears
- floatdays += remainderdays
-
- if floatmonths != 0:
- remaindermonths, remainderdays = cls._split_and_convert(floatmonths, 30)
-
- months += remaindermonths
- floatdays += remainderdays
-
- if floatweeks != 0:
- remainderweeks, remainderdays = cls._split_and_convert(floatweeks, 7)
-
- weeks += remainderweeks
- floatdays += remainderdays
-
- if floatdays != 0:
- remainderdays, remainderhours = cls._split_and_convert(floatdays, 24)
-
- days += remainderdays
- floathours += remainderhours
-
- if floathours != 0:
- remainderhours, remainderminutes = cls._split_and_convert(floathours, 60)
-
- hours += remainderhours
- floatminutes += remainderminutes
-
- if floatminutes != 0:
- remainderminutes, remainderseconds = cls._split_and_convert(floatminutes, 60)
-
- minutes += remainderminutes
- floatseconds += remainderseconds
-
- if floatseconds != 0:
- totalseconds = float(seconds) + floatseconds
-
- #Truncate to maximum supported precision
- seconds = cls._truncate(totalseconds, 6)
+ years, months, weeks, days, hours, minutes, seconds, microseconds = PythonTimeBuilder._distribute_microseconds(microseconds, (years, months, weeks, days, hours, minutes, seconds), (MICROSECONDS_PER_YEAR, MICROSECONDS_PER_MONTH, MICROSECONDS_PER_WEEK, MICROSECONDS_PER_DAY, MICROSECONDS_PER_HOUR, MICROSECONDS_PER_MINUTE, MICROSECONDS_PER_SECOND))
#Note that weeks can be handled without conversion to days
totaldays = years * 365 + months * 30 + days
return datetime.timedelta(days=totaldays,
seconds=seconds,
+ microseconds=microseconds,
minutes=minutes,
hours=hours,
weeks=weeks)
@@ -463,42 +419,40 @@
currentdate += timedelta
@classmethod
- def _split_and_cast(cls, floatstr, thrownmessage):
- #Splits a string with a decimal point into int, and
- #float portions
+ def _split_to_microseconds(cls, floatstr, conversion, thrownmessage):
+ #Splits a string with a decimal point into an int, and
+ #int representing the floating point remainder as a number
+ #of microseconds, determined by multiplying by conversion
intpart, floatpart = floatstr.split('.')
intvalue = cls.cast(intpart, int,
thrownmessage=thrownmessage)
- floatvalue = cls.cast('.' + floatpart, float,
- thrownmessage=thrownmessage)
+ preconvertedvalue = cls.cast(floatpart, int,
+ thrownmessage=thrownmessage)
- return (intvalue, floatvalue)
+ convertedvalue = ((preconvertedvalue * conversion) //
+ (10 ** len(floatpart)))
+
+ return (intvalue, convertedvalue)
@staticmethod
- def _split_and_convert(f, conversion):
- #Splits a float into an integer, and a converted float portion
- floatpart, integerpart = math.modf(f)
+ def _distribute_microseconds(todistribute, recipients, reductions):
+ #Given a number of microseconds as int, a tuple of ints length n
+ #to distribute to, and a tuple of ints length n to divide todistribute
+ #by (from largest to smallest), returns a tuple of length n + 1, with
+ #todistribute divided across recipients using the reductions, with
+ #the final remainder returned as the final tuple member
+ results = []
- return (int(integerpart), float(floatpart) * conversion)
+ remainder = todistribute
- @staticmethod
- def _truncate(f, n):
- #Truncates/pads a float f to n decimal places without rounding
- #https://stackoverflow.com/a/783927
- #This differs from the given implementation in that we expand the string
- #two additional characters, than truncate the resulting string
- #to mitigate rounding effects
- floatstr = repr(f)
+ for index, reduction in enumerate(reductions):
+ additional, remainder = divmod(remainder, reduction)
- if 'e' in floatstr or 'E' in floatstr:
- expandedfloatstr = '{0:.{1}f}'.format(f, n + 2)
- else:
- integerpartstr, _, floatpartstr = floatstr.partition('.')
+ results.append(recipients[index] + additional)
- expandedfloatstr = '.'.join([integerpartstr,
- (floatpartstr
- + '0' * (n + 2))[:n + 2]])
+ #Always return the remaining microseconds
+ results.append(remainder)
- return float(expandedfloatstr[:expandedfloatstr.index('.') + n + 1])
+ return tuple(results)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-6.0.0/aniso8601/builders/tests/test_python.py new/aniso8601-7.0.0/aniso8601/builders/tests/test_python.py
--- old/aniso8601-6.0.0/aniso8601/builders/tests/test_python.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-7.0.0/aniso8601/builders/tests/test_python.py 2019-06-11 21:12:26.000000000 +0200
@@ -142,6 +142,9 @@
({'hh': '23', 'mm': '21', 'ss': '28.512400'},
datetime.time(hour=23, minute=21, second=28,
microsecond=512400)),
+ ({'hh': '01', 'mm': '03', 'ss': '11.858714'},
+ datetime.time(hour=1, minute=3, second=11,
+ microsecond=858714)),
({'hh': '14', 'mm': '43', 'ss': '59.9999997'},
datetime.time(hour=14, minute=43, second=59,
microsecond=999999)),
@@ -267,7 +270,11 @@
PythonTimeBuilder.build_time(hh='24.1')
def test_build_datetime(self):
- testtuples = (((('1234', '2', '3', None, None, None, 'date'),
+ testtuples = (((('2019', '06', '05', None, None, None, 'date'),
+ ('01', '03', '11.858714', None, 'time')),
+ datetime.datetime(2019, 6, 5, hour=1, minute=3,
+ second=11, microsecond=858714)),
+ ((('1234', '02', '03', None, None, None, 'date'),
('23', '21', '28.512400', None, 'time')),
datetime.datetime(1234, 2, 3, hour=23, minute=21,
second=28, microsecond=512400)),
@@ -363,6 +370,9 @@
datetime.timedelta(days=428.5)),
({'TnH': '4', 'TnM': '54', 'TnS': '6.5'},
datetime.timedelta(hours=4, minutes=54, seconds=6.5)),
+ ({'TnH': '1', 'TnM': '3', 'TnS': '11.858714'},
+ datetime.timedelta(hours=1, minutes=3,
+ seconds=11, microseconds=858714)),
({'TnH': '4', 'TnM': '54', 'TnS': '28.512400'},
datetime.timedelta(hours=4, minutes=54,
seconds=28, microseconds=512400)),
@@ -948,53 +958,41 @@
datetime.date(year=2018, month=8, day=29)
+ dateindex * datetime.timedelta(days=5))
- def test_split_and_cast(self):
- result = PythonTimeBuilder._split_and_cast('12.34', 'asdf')
+ def test_split_to_microseconds(self):
+ result = PythonTimeBuilder._split_to_microseconds('1.1', int(1e6), 'dummy')
- self.assertEqual(result, (12, .34))
+ self.assertEqual(result, (1, 100000))
self.assertIsInstance(result[0], int)
- self.assertIsInstance(result[1], float)
+ self.assertIsInstance(result[1], int)
- result = PythonTimeBuilder._split_and_cast('-12.34', 'asdf')
+ result = PythonTimeBuilder._split_to_microseconds('1.000001', int(1e6), 'dummy')
- self.assertEqual(result, (-12, .34))
+ self.assertEqual(result, (1, 1))
self.assertIsInstance(result[0], int)
- self.assertIsInstance(result[1], float)
+ self.assertIsInstance(result[1], int)
- def test_split_and_cast_exception(self):
- with self.assertRaises(ISOFormatError) as e:
- PythonTimeBuilder._split_and_cast('12.df', 'asdf')
+ result = PythonTimeBuilder._split_to_microseconds('1.0000001', int(1e6), 'dummy')
- self.assertEqual(str(e.exception), 'asdf')
+ self.assertEqual(result, (1, 0))
+ self.assertIsInstance(result[0], int)
+ self.assertIsInstance(result[1], int)
+ def test_split_to_microseconds_exception(self):
with self.assertRaises(ISOFormatError) as e:
- PythonTimeBuilder._split_and_cast('as.12', 'asdf')
+ PythonTimeBuilder._split_to_microseconds('b.1', int(1e6), 'exception text')
- self.assertEqual(str(e.exception), 'asdf')
+ self.assertEqual(str(e.exception), 'exception text')
- def test_split_and_convert(self):
- result = PythonTimeBuilder._split_and_convert(12.5, 100)
-
- self.assertEqual(result, (12, .5 * 100))
- self.assertIsInstance(result[0], int)
- self.assertIsInstance(result[1], float)
-
- result = PythonTimeBuilder._split_and_convert(-12.5, 0.1)
+ with self.assertRaises(ISOFormatError) as e:
+ PythonTimeBuilder._split_to_microseconds('1.ad', int(1e6), 'exception text')
- self.assertEqual(result, (-12, -.5 * 0.1))
- self.assertIsInstance(result[0], int)
- self.assertIsInstance(result[1], float)
+ self.assertEqual(str(e.exception), 'exception text')
- def test_truncate(self):
- self.assertEqual(PythonTimeBuilder._truncate(0, 1), 0.0)
- self.assertEqual(PythonTimeBuilder._truncate(1.0, 1), 1.0)
- self.assertEqual(PythonTimeBuilder._truncate(0.1, 1), 0.1)
- self.assertEqual(PythonTimeBuilder._truncate(0.01, 1), 0.0)
- self.assertEqual(PythonTimeBuilder._truncate(0.0000000001, 1), 0.0)
- self.assertEqual(PythonTimeBuilder._truncate(0.9999999999, 1), 0.9)
- self.assertEqual(PythonTimeBuilder._truncate(0.000095, 5), 0.00009)
- self.assertEqual(PythonTimeBuilder._truncate(0.00006, 4), 0.0000)
- self.assertEqual(PythonTimeBuilder._truncate(0.00005, 4), 0.0000)
- self.assertEqual(PythonTimeBuilder._truncate(0.000005, 5), 0.00000)
- self.assertEqual(PythonTimeBuilder._truncate(0.00000051, 6), 0.000000)
- self.assertEqual(PythonTimeBuilder._truncate(28.512400, 6), 28.512400)
+ def test_distribute_microseconds(self):
+ self.assertEqual(PythonTimeBuilder._distribute_microseconds(1, (), ()), (1,))
+ self.assertEqual(PythonTimeBuilder._distribute_microseconds(11, (0,), (10,)), (1, 1))
+ self.assertEqual(PythonTimeBuilder._distribute_microseconds(211, (0, 0), (100, 10)), (2, 1, 1))
+
+ self.assertEqual(PythonTimeBuilder._distribute_microseconds(1, (), ()), (1,))
+ self.assertEqual(PythonTimeBuilder._distribute_microseconds(11, (5,), (10,)), (6, 1))
+ self.assertEqual(PythonTimeBuilder._distribute_microseconds(211, (10, 5), (100, 10)), (12, 6, 1))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-6.0.0/aniso8601/tests/test_time.py new/aniso8601-7.0.0/aniso8601/tests/test_time.py
--- old/aniso8601-6.0.0/aniso8601/tests/test_time.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-7.0.0/aniso8601/tests/test_time.py 2019-06-11 21:12:26.000000000 +0200
@@ -68,6 +68,8 @@
'ss': '00', 'tz': None}),
('23:21:28.512400', {'hh': '23', 'mm': '21',
'ss': '28.512400', 'tz': None}),
+ ('01:03:11.858714', {'hh': '01', 'mm': '03',
+ 'ss': '11.858714', 'tz': None}),
('14:43:59.9999997', {'hh': '14', 'mm': '43',
'ss': '59.9999997', 'tz': None}),
('01:23', {'hh': '01', 'mm': '23', 'tz': None}),
@@ -78,6 +80,10 @@
'ss': '45', 'tz': None}),
('240000', {'hh': '24', 'mm': '00',
'ss': '00', 'tz': None}),
+ ('232128.512400', {'hh': '23', 'mm': '21',
+ 'ss': '28.512400', 'tz': None}),
+ ('010311.858714', {'hh': '01', 'mm': '03',
+ 'ss': '11.858714', 'tz': None}),
('144359.9999997', {'hh': '14', 'mm': '43',
'ss': '59.9999997', 'tz': None}),
('0123', {'hh': '01', 'mm': '23', 'tz': None}),
@@ -197,7 +203,11 @@
mockBuilder.build_time.assert_called_once_with(**expectedargs)
def test_parse_datetime(self):
- testtuples = (('1981-04-05T23:21:28.512400Z',
+ testtuples = (('2019-06-05T01:03:11.858714',
+ (('2019', '06', '05', None, None, None, 'date'),
+ ('01', '03', '11.858714',
+ None, 'time'))),
+ ('1981-04-05T23:21:28.512400Z',
(('1981', '04', '05', None, None, None, 'date'),
('23', '21', '28.512400',
(False, True, None, None, 'Z', 'timezone'),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-6.0.0/aniso8601.egg-info/PKG-INFO new/aniso8601-7.0.0/aniso8601.egg-info/PKG-INFO
--- old/aniso8601-6.0.0/aniso8601.egg-info/PKG-INFO 2019-03-08 21:10:19.000000000 +0100
+++ new/aniso8601-7.0.0/aniso8601.egg-info/PKG-INFO 2019-06-11 21:23:12.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: aniso8601
-Version: 6.0.0
+Version: 7.0.0
Summary: A library for parsing ISO 8601 strings.
Home-page: https://bitbucket.org/nielsenb/aniso8601
Author: Brandon Nielsen
@@ -286,8 +286,8 @@
The following builders are available as separate projects:
- * `RelativeTimeBuilder https://bitbucket.org/nielsenb/relativetimebuilder`_ supports parsing to `datetutil relativedelta typeshttps://dateutil.readthedocs.io/en/stable/relativedelta.html`_ for calendar level accuracy
- * `AttoTimeBuilder https://bitbucket.org/nielsenb/attotimebuilder_` supports parsing directly to `attotime attodatetime and attotimedelta types https://bitbucket.org/nielsenb/attotime`_ which support sub-nanosecond precision
+ * `RelativeTimeBuilder https://bitbucket.org/nielsenb/relativetimebuilder`_ supports parsing to `datetutil relativedelta types https://dateutil.readthedocs.io/en/stable/relativedelta.html`_ for calendar level accuracy
+ * `AttoTimeBuilder https://bitbucket.org/nielsenb/attotimebuilder`_ supports parsing directly to `attotime attodatetime and attotimedelta types https://bitbucket.org/nielsenb/attotime`_ which support sub-nanosecond precision
* `NumPyTimeBuilder https://bitbucket.org/nielsenb/numpytimebuilder`_ supports parsing directly to `NumPy datetime64 and timedelta64 types https://docs.scipy.org/doc/numpy/reference/arrays.datetime.html`_
TupleBuilder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-6.0.0/setup.py new/aniso8601-7.0.0/setup.py
--- old/aniso8601-6.0.0/setup.py 2019-03-08 21:07:44.000000000 +0100
+++ new/aniso8601-7.0.0/setup.py 2019-06-11 21:21:31.000000000 +0200
@@ -16,7 +16,7 @@
setup(
name='aniso8601',
- version='6.0.0',
+ version='7.0.0',
description='A library for parsing ISO 8601 strings.',
long_description=README_TEXT,
author='Brandon Nielsen',