diff -Nru python-aniso8601-4.0.1/aniso8601/builder.py python-aniso8601-4.1.0/aniso8601/builder.py
--- python-aniso8601-4.0.1/aniso8601/builder.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/builder.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -134,28 +134,24 @@
#Shift 0s in from the left to form complete year
YYYY = YYYY.ljust(4, '0')
- year = BaseTimeBuilder.cast(YYYY, int,
- thrownmessage=
- 'Invalid year string.')
+ year = cls.cast(YYYY, int,
+ thrownmessage='Invalid year string.')
if MM is not None:
- month = BaseTimeBuilder.cast(MM, int,
- thrownmessage=
- 'Invalid month string.')
+ month = cls.cast(MM, int,
+ thrownmessage='Invalid month string.')
else:
month = 1
if DD is not None:
- day = BaseTimeBuilder.cast(DD, int,
- thrownmessage=
- 'Invalid day string.')
+ day = cls.cast(DD, int,
+ thrownmessage='Invalid day string.')
else:
day = 1
if Www is not None:
- weeknumber = BaseTimeBuilder.cast(Www, int,
- thrownmessage=
- 'Invalid week string.')
+ weeknumber = cls.cast(Www, int,
+ thrownmessage='Invalid week string.')
if weeknumber == 0 or weeknumber > 53:
raise WeekOutOfBoundsError('Week number must be between '
@@ -164,16 +160,14 @@
weeknumber = None
if DDD is not None:
- dayofyear = BaseTimeBuilder.cast(DDD, int,
- thrownmessage=
- 'Invalid day string.')
+ dayofyear = cls.cast(DDD, int,
+ thrownmessage='Invalid day string.')
else:
dayofyear = None
if D is not None:
- dayofweek = BaseTimeBuilder.cast(D, int,
- thrownmessage=
- 'Invalid day string.')
+ dayofweek = cls.cast(D, int,
+ thrownmessage='Invalid day string.')
if dayofweek == 0 or dayofweek > 7:
raise DayOutOfBoundsError('Weekday number must be between '
@@ -208,43 +202,31 @@
if hh is not None:
if '.' in hh:
- floathours = BaseTimeBuilder.cast(hh,
- float,
- thrownmessage=
- 'Invalid hour string.')
+ floathours = cls.cast(hh, float,
+ thrownmessage='Invalid hour string.')
hours = 0
else:
- hours = BaseTimeBuilder.cast(hh,
- int,
- thrownmessage=
- 'Invalid hour string.')
+ hours = cls.cast(hh, int,
+ thrownmessage='Invalid hour string.')
if mm is not None:
if '.' in mm:
- floatminutes = BaseTimeBuilder.cast(mm,
- float,
- thrownmessage=
- 'Invalid minute string.')
+ floatminutes = cls.cast(mm, float,
+ thrownmessage='Invalid minute string.')
minutes = 0
else:
- minutes = BaseTimeBuilder.cast(mm,
- int,
- thrownmessage=
- 'Invalid minute string.')
+ minutes = cls.cast(mm, int,
+ thrownmessage='Invalid minute string.')
if ss is not None:
if '.' in ss:
#Truncate to maximum supported precision
- floatseconds = BaseTimeBuilder.cast(ss[0:ss.index('.') + 7],
- float,
- thrownmessage=
- 'Invalid second string.')
+ floatseconds = cls.cast(ss[0:ss.index('.') + 7], float,
+ thrownmessage='Invalid second string.')
seconds = 0
else:
- seconds = BaseTimeBuilder.cast(ss,
- int,
- thrownmessage=
- 'Invalid second string.')
+ seconds = cls.cast(ss, int,
+ thrownmessage='Invalid second string.')
#Range checks
if (hours == 23 and floathours == 0 and minutes == 59
@@ -311,70 +293,49 @@
seconds = 0
if PnY is not None:
- years = BaseTimeBuilder.cast(PnY,
- float,
- thrownmessage=
- 'Invalid year string.')
+ years = cls.cast(PnY, float,
+ thrownmessage='Invalid year string.')
if PnM is not None:
- months = BaseTimeBuilder.cast(PnM,
- float,
- thrownmessage=
- 'Invalid month string.')
+ months = cls.cast(PnM, float,
+ thrownmessage='Invalid month string.')
+
if PnD is not None:
- days = BaseTimeBuilder.cast(PnD,
- float,
- thrownmessage=
- 'Invalid day string.')
+ days = cls.cast(PnD, float,
+ thrownmessage='Invalid day string.')
if PnW is not None:
if '.' in PnW:
- weeks = BaseTimeBuilder.cast(PnW,
- float,
- thrownmessage=
- 'Invalid week string.')
- else:
- weeks = BaseTimeBuilder.cast(PnW,
- int,
- thrownmessage=
- 'Invalid week string.')
+ weeks = cls.cast(PnW, float,
+ thrownmessage='Invalid week string.')
+ else:
+ weeks = cls.cast(PnW, int,
+ thrownmessage='Invalid week string.')
if TnH is not None:
if '.' in TnH:
- hours = BaseTimeBuilder.cast(TnH,
- float,
- thrownmessage=
- 'Invalid hour string.')
- else:
- hours = BaseTimeBuilder.cast(TnH,
- int,
- thrownmessage=
- 'Invalid hour string.')
+ hours = cls.cast(TnH, float,
+ thrownmessage='Invalid hour string.')
+ else:
+ hours = cls.cast(TnH, int,
+ thrownmessage='Invalid hour string.')
if TnM is not None:
if '.' in TnM:
- minutes = BaseTimeBuilder.cast(TnM,
- float,
- thrownmessage=
- 'Invalid minute string.')
- else:
- minutes = BaseTimeBuilder.cast(TnM,
- int,
- thrownmessage=
- 'Invalid minute string.')
+ minutes = cls.cast(TnM, float,
+ thrownmessage='Invalid minute string.')
+ else:
+ minutes = cls.cast(TnM, int,
+ thrownmessage='Invalid minute string.')
if TnS is not None:
if '.' in TnS:
#Truncate to maximum supported precision
- seconds = BaseTimeBuilder.cast(TnS[0:TnS.index('.') + 7],
- float,
- thrownmessage=
- 'Invalid second string.')
- else:
- seconds = BaseTimeBuilder.cast(TnS,
- int,
- thrownmessage=
- 'Invalid second string.')
+ seconds = cls.cast(TnS[0:TnS.index('.') + 7], float,
+ thrownmessage='Invalid second string.')
+ else:
+ seconds = cls.cast(TnS, int,
+ thrownmessage='Invalid second string.')
#Note that weeks can be handled without conversion to days
totaldays = years * 365 + months * 30 + days
@@ -450,8 +411,8 @@
return cls._date_generator_unbounded(endobject,
-durationobject)
- iterations = BaseTimeBuilder.cast(Rnn, int,
- thrownmessage='Invalid iterations.')
+ iterations = cls.cast(Rnn, int,
+ thrownmessage='Invalid iterations.')
if startobject is not None:
return cls._date_generator(startobject, durationobject, iterations)
@@ -465,16 +426,14 @@
return UTCOffset(name='UTC', minutes=0)
if hh is not None:
- tzhour = BaseTimeBuilder.cast(hh, int,
- thrownmessage=
- 'Invalid hour string.')
+ tzhour = cls.cast(hh, int,
+ thrownmessage='Invalid hour string.')
else:
tzhour = 0
if mm is not None:
- tzminute = BaseTimeBuilder.cast(mm, int,
- thrownmessage=
- 'Invalid minute string.')
+ tzminute = cls.cast(mm, int,
+ thrownmessage='Invalid minute string.')
else:
tzminute = 0
@@ -574,79 +533,57 @@
microseconds = 0
if PnY is not None:
- years = BaseTimeBuilder.cast(PnY,
- int,
- thrownmessage=
- 'Invalid year string.')
+ years = cls.cast(PnY, int,
+ thrownmessage='Invalid year string.')
if PnM is not None:
- months = BaseTimeBuilder.cast(PnM,
- int,
- thrownmessage=
- 'Invalid month string.')
+ months = cls.cast(PnM, int,
+ thrownmessage='Invalid month string.')
if PnD is not None:
- days = BaseTimeBuilder.cast(PnD,
- float,
- thrownmessage=
- 'Invalid day string.')
+ days = cls.cast(PnD, float,
+ thrownmessage='Invalid day string.')
if PnW is not None:
if '.' in PnW:
- weeks = BaseTimeBuilder.cast(PnW,
- float,
- thrownmessage=
- 'Invalid week string.')
- else:
- weeks = BaseTimeBuilder.cast(PnW,
- int,
- thrownmessage=
- 'Invalid week string.')
+ weeks = cls.cast(PnW, float,
+ thrownmessage='Invalid week string.')
+ else:
+ weeks = cls.cast(PnW, int,
+ thrownmessage='Invalid week string.')
if TnH is not None:
if '.' in TnH:
- hours = BaseTimeBuilder.cast(TnH,
- float,
- thrownmessage=
- 'Invalid hour string.')
- else:
- hours = BaseTimeBuilder.cast(TnH,
- int,
- thrownmessage=
- 'Invalid hour string.')
+ hours = cls.cast(TnH, float,
+ thrownmessage='Invalid hour string.')
+ else:
+ hours = cls.cast(TnH, int,
+ thrownmessage='Invalid hour string.')
if TnM is not None:
if '.' in TnM:
- minutes = BaseTimeBuilder.cast(TnM,
- float,
- thrownmessage=
- 'Invalid minute string.')
- else:
- minutes = BaseTimeBuilder.cast(TnM,
- int,
- thrownmessage=
- 'Invalid minute string.')
+ minutes = cls.cast(TnM, float,
+ thrownmessage='Invalid minute string.')
+ else:
+ minutes = cls.cast(TnM, int,
+ thrownmessage='Invalid minute string.')
if TnS is not None:
if '.' in TnS:
#Split into seconds and microseconds
- seconds = BaseTimeBuilder.cast(TnS[0:TnS.index('.')],
- int,
- thrownmessage=
- 'Invalid second string.')
+ seconds = cls.cast(TnS[0:TnS.index('.')], int,
+ thrownmessage='Invalid second string.')
#Truncate to maximum supported precision
- microseconds = (BaseTimeBuilder.cast(TnS[TnS.index('.'):
- TnS.index('.') + 7],
- float,
- thrownmessage=
- 'Invalid second string.')
+ microseconds = (cls.cast(TnS[TnS.index('.'):
+ TnS.index('.') + 7],
+ float,
+ thrownmessage=
+ 'Invalid second string.')
* 1e6)
else:
- seconds = BaseTimeBuilder.cast(TnS,
- int,
- thrownmessage=
- 'Invalid second string.')
+ seconds = cls.cast(TnS, int,
+ thrownmessage='Invalid second string.')
return dateutil.relativedelta.relativedelta(years=years,
months=months,
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/builder.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/builder.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/compat.py python-aniso8601-4.1.0/aniso8601/compat.py
--- python-aniso8601-4.0.1/aniso8601/compat.py 2018-03-09 03:31:07.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/compat.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/compat.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/compat.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/date.py python-aniso8601-4.1.0/aniso8601/date.py
--- python-aniso8601-4.0.1/aniso8601/date.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/date.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/date.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/date.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/duration.py python-aniso8601-4.1.0/aniso8601/duration.py
--- python-aniso8601-4.0.1/aniso8601/duration.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/duration.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/duration.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/duration.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/exceptions.py python-aniso8601-4.1.0/aniso8601/exceptions.py
--- python-aniso8601-4.0.1/aniso8601/exceptions.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/exceptions.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/exceptions.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/exceptions.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/__init__.py python-aniso8601-4.1.0/aniso8601/__init__.py
--- python-aniso8601-4.0.1/aniso8601/__init__.py 2018-03-09 03:31:07.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/__init__.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/__init__.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/__init__.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/interval.py python-aniso8601-4.1.0/aniso8601/interval.py
--- python-aniso8601-4.0.1/aniso8601/interval.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/interval.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/interval.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/interval.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/__pycache__/builder.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/__pycache__/builder.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/__pycache__/compat.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/__pycache__/compat.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/__pycache__/date.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/__pycache__/date.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/__pycache__/duration.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/__pycache__/duration.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/__pycache__/exceptions.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/__pycache__/exceptions.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/__pycache__/__init__.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/__pycache__/__init__.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/__pycache__/interval.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/__pycache__/interval.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/__pycache__/resolution.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/__pycache__/resolution.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/__pycache__/time.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/__pycache__/time.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/__pycache__/timezone.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/__pycache__/timezone.cpython-36.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/resolution.py python-aniso8601-4.1.0/aniso8601/resolution.py
--- python-aniso8601-4.0.1/aniso8601/resolution.py 2018-03-09 03:31:07.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/resolution.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/resolution.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/resolution.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/tests/compat.py python-aniso8601-4.1.0/aniso8601/tests/compat.py
--- python-aniso8601-4.0.1/aniso8601/tests/compat.py 1970-01-01 00:00:00.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/tests/compat.py 2019-01-08 21:27:49.000000000 +0000
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2019, Brandon Nielsen
+# All rights reserved.
+#
+# This software may be modified and distributed under the terms
+# of the BSD license. See the LICENSE file for details.
+
+import sys
+
+PY2 = sys.version_info[0] == 2
+
+if PY2:
+ import mock
+else:
+ from unittest import mock
diff -Nru python-aniso8601-4.0.1/aniso8601/tests/__init__.py python-aniso8601-4.1.0/aniso8601/tests/__init__.py
--- python-aniso8601-4.0.1/aniso8601/tests/__init__.py 1970-01-01 00:00:00.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/tests/__init__.py 2019-01-08 21:27:49.000000000 +0000
@@ -0,0 +1,7 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2019, Brandon Nielsen
+# All rights reserved.
+#
+# This software may be modified and distributed under the terms
+# of the BSD license. See the LICENSE file for details.
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/__pycache__/test_builder.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/__pycache__/test_builder.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/__pycache__/test_date.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/__pycache__/test_date.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/__pycache__/test_duration.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/__pycache__/test_duration.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/__pycache__/test_init.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/__pycache__/test_init.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/__pycache__/test_interval.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/__pycache__/test_interval.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/__pycache__/test_time.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/__pycache__/test_time.cpython-36.pyc differ
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/__pycache__/test_timezone.cpython-36.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/__pycache__/test_timezone.cpython-36.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/tests/test_builder.py python-aniso8601-4.1.0/aniso8601/tests/test_builder.py
--- python-aniso8601-4.0.1/aniso8601/tests/test_builder.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/tests/test_builder.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -9,7 +9,6 @@
import datetime
import pickle
import unittest
-import mock
import aniso8601
import dateutil.relativedelta
@@ -21,6 +20,7 @@
MidnightBoundsError, MinutesOutOfBoundsError,
RelativeValueError, SecondsOutOfBoundsError,
WeekOutOfBoundsError, YearOutOfBoundsError)
+from aniso8601.tests.compat import mock
class TestBaseTimeBuilder(unittest.TestCase):
def test_build_date(self):
@@ -820,6 +820,21 @@
datetime.datetime(year=2014, month=11, day=11,
hour=19, minute=5, second=53,
microsecond=500000)),
+ ({'end': (('2050', '03', '01',
+ None, None, None, 'date'),
+ ('13', '00', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime'),
+ 'duration': (None, None, None,
+ None, '10', None, None, 'duration')},
+ datetime.datetime(year=2050, month=3, day=1,
+ hour=13,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0)),
+ datetime.datetime(year=2050, month=3, day=1,
+ hour=3,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0))),
#Make sure we truncate, not round
#https://bitbucket.org/nielsenb/aniso8601/issues/10/sub-microsecond-precision-in-durations-is
({'end': ('2018', '03', '06', None, None, None, 'date'),
@@ -873,6 +888,21 @@
datetime.datetime(year=2014, month=11, day=12,
hour=4, minute=54, second=6,
microsecond=500000)),
+ ({'start': (('2050', '03', '01',
+ None, None, None, 'date'),
+ ('13', '00', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime'),
+ 'duration': (None, None, None,
+ None, '10', None, None, 'duration')},
+ datetime.datetime(year=2050, month=3, day=1,
+ hour=13,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0)),
+ datetime.datetime(year=2050, month=3, day=1,
+ hour=23,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0))),
#Make sure we truncate, not round
#https://bitbucket.org/nielsenb/aniso8601/issues/10/sub-microsecond-precision-in-durations-is
({'start': ('2018', '03', '06',
@@ -933,6 +963,24 @@
None, None, None, 'date')},
datetime.date(year=1981, month=4, day=5),
datetime.date(year=1980, month=3, day=5)),
+ ({'start': (('2050', '03', '01',
+ None, None, None, 'date'),
+ ('13', '00', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime'),
+ 'end': (('2050', '05', '11',
+ None, None, None, 'date'),
+ ('15', '30', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime')},
+ datetime.datetime(year=2050, month=3, day=1,
+ hour=13,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0)),
+ datetime.datetime(year=2050, month=5, day=11,
+ hour=15, minute=30,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0))),
#Make sure we truncate, not round
#https://bitbucket.org/nielsenb/aniso8601/issues/10/sub-microsecond-precision-in-durations-is
({'start': (('1980', '03', '05',
@@ -1268,6 +1316,21 @@
datetime.datetime(year=2014, month=11, day=11,
hour=19, minute=5, second=53,
microsecond=500000)),
+ ({'end': (('2050', '03', '01',
+ None, None, None, 'date'),
+ ('13', '00', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime'),
+ 'duration': (None, None, None,
+ None, '10', None, None, 'duration')},
+ datetime.datetime(year=2050, month=3, day=1,
+ hour=13,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0)),
+ datetime.datetime(year=2050, month=3, day=1,
+ hour=3,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0))),
#Make sure we truncate, not round
#https://bitbucket.org/nielsenb/aniso8601/issues/10/sub-microsecond-precision-in-durations-is
({'end': ('2018', '03', '06', None, None, None, 'date'),
@@ -1337,6 +1400,21 @@
datetime.datetime(year=2014, month=11, day=12,
hour=4, minute=54, second=6,
microsecond=500000)),
+ ({'start': (('2050', '03', '01',
+ None, None, None, 'date'),
+ ('13', '00', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime'),
+ 'duration': (None, None, None,
+ None, '10', None, None, 'duration')},
+ datetime.datetime(year=2050, month=3, day=1,
+ hour=13,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0)),
+ datetime.datetime(year=2050, month=3, day=1,
+ hour=23,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0))),
({'start': (('1980', '03', '05',
None, None, None, 'date'),
('01', '01', '00.0000001', None, 'time'),
@@ -1350,6 +1428,24 @@
datetime.datetime(year=1981, month=4, day=5,
hour=14, minute=43, second=59,
microsecond=999999)),
+ ({'start': (('2050', '03', '01',
+ None, None, None, 'date'),
+ ('13', '00', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime'),
+ 'end': (('2050', '05', '11',
+ None, None, None, 'date'),
+ ('15', '30', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime')},
+ datetime.datetime(year=2050, month=3, day=1,
+ hour=13,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0)),
+ datetime.datetime(year=2050, month=5, day=11,
+ hour=15, minute=30,
+ tzinfo=UTCOffset(name='UTC',
+ minutes=0))),
#Some relativedelta examples
#http://dateutil.readthedocs.org/en/latest/examples.html#relativedelta-examples
({'start': ('2003', '1', '27',
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/test_builder.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/test_builder.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/tests/test_date.py python-aniso8601-4.1.0/aniso8601/tests/test_date.py
--- python-aniso8601-4.0.1/aniso8601/tests/test_date.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/tests/test_date.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,13 +1,12 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the BSD license. See the LICENSE file for details.
import unittest
-import mock
import aniso8601
from aniso8601.exceptions import ISOFormatError
@@ -16,6 +15,7 @@
_parse_week, _parse_ordinal_date,
get_date_resolution)
from aniso8601.resolution import DateResolution
+from aniso8601.tests.compat import mock
class TestDateResolutionFunctions(unittest.TestCase):
def test_get_date_resolution_year(self):
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/test_date.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/test_date.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/tests/test_duration.py python-aniso8601-4.1.0/aniso8601/tests/test_duration.py
--- python-aniso8601-4.0.1/aniso8601/tests/test_duration.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/tests/test_duration.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,13 +1,12 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the BSD license. See the LICENSE file for details.
import unittest
-import mock
import aniso8601
from aniso8601.exceptions import ISOFormatError, NegativeDurationError
@@ -17,6 +16,7 @@
_parse_duration_prescribed_time,
_parse_duration_element,
_has_any_component, _component_order_correct)
+from aniso8601.tests.compat import mock
class TestDurationParserFunctions(unittest.TestCase):
def test_parse_duration(self):
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/test_duration.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/test_duration.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/tests/test_init.py python-aniso8601-4.1.0/aniso8601/tests/test_init.py
--- python-aniso8601-4.0.1/aniso8601/tests/test_init.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/tests/test_init.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/test_init.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/test_init.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/tests/test_interval.py python-aniso8601-4.1.0/aniso8601/tests/test_interval.py
--- python-aniso8601-4.0.1/aniso8601/tests/test_interval.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/tests/test_interval.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,18 +1,18 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the BSD license. See the LICENSE file for details.
import unittest
-import mock
import aniso8601
from aniso8601.exceptions import ISOFormatError
from aniso8601.interval import (_parse_interval, parse_interval,
parse_repeating_interval)
+from aniso8601.tests.compat import mock
class TestIntervalParserFunctions(unittest.TestCase):
def test_parse_interval(self):
@@ -37,6 +37,14 @@
{'end': ('2014', '11', '12', None, None, None, 'date'),
'duration': (None, None, None, None, '4', '54', '6.5',
'duration')}),
+ ('PT10H/2050-03-01T13:00:00Z',
+ {'end': (('2050', '03', '01',
+ None, None, None, 'date'),
+ ('13', '00', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime'),
+ 'duration': (None, None, None,
+ None, '10', None, None, 'duration')}),
#Make sure we truncate, not round
#https://bitbucket.org/nielsenb/aniso8601/issues/10/sub-microsecond-precision-in-durations-is
('PT0.0000001S/2018-03-06',
@@ -76,6 +84,14 @@
None, None, None, 'date'),
'duration': (None, None, None,
None, '4', '54', '6.5', 'duration')}),
+ ('2050-03-01T13:00:00Z/PT10H',
+ {'start': (('2050', '03', '01',
+ None, None, None, 'date'),
+ ('13', '00', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime'),
+ 'duration': (None, None, None,
+ None, '10', None, None, 'duration')}),
#Make sure we truncate, not round
#https://bitbucket.org/nielsenb/aniso8601/issues/10/sub-microsecond-precision-in-durations-is
('2018-03-06/PT0.0000001S',
@@ -123,6 +139,17 @@
None, None, None, 'date'),
'end': ('1980', '03', '05',
None, None, None, 'date')}),
+ ('2050-03-01T13:00:00Z/2050-05-11T15:30:00Z',
+ {'start': (('2050', '03', '01',
+ None, None, None, 'date'),
+ ('13', '00', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime'),
+ 'end': (('2050', '05', '11',
+ None, None, None, 'date'),
+ ('15', '30', '00',
+ (False, True, None, None,
+ 'Z', 'timezone'), 'time'), 'datetime')}),
#Make sure we truncate, not round
#https://bitbucket.org/nielsenb/aniso8601/issues/10/sub-microsecond-precision-in-durations-is
('1980-03-05T01:01:00.0000001/'
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/test_interval.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/test_interval.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/tests/test_time.py python-aniso8601-4.1.0/aniso8601/tests/test_time.py
--- python-aniso8601-4.0.1/aniso8601/tests/test_time.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/tests/test_time.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,19 +1,19 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the BSD license. See the LICENSE file for details.
import unittest
-import mock
import aniso8601
from aniso8601.resolution import TimeResolution
from aniso8601.time import (get_time_resolution, parse_datetime, parse_time,
_parse_hour, _parse_minute_time,
_parse_second_time, _split_tz)
+from aniso8601.tests.compat import mock
class TestTimeParserFunctions(unittest.TestCase):
def test_get_time_resolution(self):
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/test_time.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/test_time.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/tests/test_timezone.py python-aniso8601-4.1.0/aniso8601/tests/test_timezone.py
--- python-aniso8601-4.0.1/aniso8601/tests/test_timezone.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/tests/test_timezone.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the BSD license. See the LICENSE file for details.
import unittest
-import mock
import aniso8601
from aniso8601.exceptions import ISOFormatError
from aniso8601.timezone import parse_timezone
+from aniso8601.tests.compat import mock
class TestTimezoneParserFunctions(unittest.TestCase):
def test_parse_timezone(self):
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/tests/test_timezone.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/tests/test_timezone.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/time.py python-aniso8601-4.1.0/aniso8601/time.py
--- python-aniso8601-4.0.1/aniso8601/time.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/time.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/time.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/time.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601/timezone.py python-aniso8601-4.1.0/aniso8601/timezone.py
--- python-aniso8601-4.0.1/aniso8601/timezone.py 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601/timezone.py 2019-01-08 21:27:49.000000000 +0000
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Brandon Nielsen
+# Copyright (c) 2019, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
Binary files /tmp/tmpcQNJRX/GuAlctAHqB/python-aniso8601-4.0.1/aniso8601/timezone.pyc and /tmp/tmpcQNJRX/s3HUehJG7K/python-aniso8601-4.1.0/aniso8601/timezone.pyc differ
diff -Nru python-aniso8601-4.0.1/aniso8601.egg-info/PKG-INFO python-aniso8601-4.1.0/aniso8601.egg-info/PKG-INFO
--- python-aniso8601-4.0.1/aniso8601.egg-info/PKG-INFO 2018-10-25 15:03:31.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601.egg-info/PKG-INFO 2019-01-08 21:33:22.000000000 +0000
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: aniso8601
-Version: 4.0.1
+Version: 4.1.0
Summary: A library for parsing ISO 8601 strings.
Home-page: https://bitbucket.org/nielsenb/aniso8601
Author: Brandon Nielsen
@@ -609,20 +609,16 @@
It is recommended to develop using a `virtualenv `_.
- The tests require the :code:`dev` and :code:`relative` features to be enabled, install the necessary dependencies using pip::
+ The tests require the :code:`relative` feature to be enabled, install the necessary dependencies using pip::
- $ pip install .[dev,relative]
+ $ pip install .[relative]
Tests
-----
- To run the unit tests, navigate to the source directory and run the tests for the python version being worked on (python2, python3)::
+ Tests can be run using `setuptools `::
- $ python2 -m unittest discover aniso8601/tests/
-
- or::
-
- $ python3 -m unittest discover aniso8601/tests/
+ $ python setup.py test
Contributing
============
@@ -654,6 +650,6 @@
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Provides-Extra: dev
Provides-Extra: relative
diff -Nru python-aniso8601-4.0.1/aniso8601.egg-info/requires.txt python-aniso8601-4.1.0/aniso8601.egg-info/requires.txt
--- python-aniso8601-4.0.1/aniso8601.egg-info/requires.txt 2018-10-25 15:03:31.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601.egg-info/requires.txt 2019-01-08 21:33:22.000000000 +0000
@@ -1,6 +1,3 @@
-[dev]
-mock>=2.0.0
-
[relative]
python-dateutil>=2.7.3
diff -Nru python-aniso8601-4.0.1/aniso8601.egg-info/SOURCES.txt python-aniso8601-4.1.0/aniso8601.egg-info/SOURCES.txt
--- python-aniso8601-4.0.1/aniso8601.egg-info/SOURCES.txt 2018-10-25 15:03:31.000000000 +0000
+++ python-aniso8601-4.1.0/aniso8601.egg-info/SOURCES.txt 2019-01-08 21:33:22.000000000 +0000
@@ -4,58 +4,26 @@
setup.cfg
setup.py
aniso8601/__init__.py
-aniso8601/__init__.pyc
aniso8601/builder.py
-aniso8601/builder.pyc
aniso8601/compat.py
-aniso8601/compat.pyc
aniso8601/date.py
-aniso8601/date.pyc
aniso8601/duration.py
-aniso8601/duration.pyc
aniso8601/exceptions.py
-aniso8601/exceptions.pyc
aniso8601/interval.py
-aniso8601/interval.pyc
aniso8601/resolution.py
-aniso8601/resolution.pyc
aniso8601/time.py
-aniso8601/time.pyc
aniso8601/timezone.py
-aniso8601/timezone.pyc
aniso8601.egg-info/PKG-INFO
aniso8601.egg-info/SOURCES.txt
aniso8601.egg-info/dependency_links.txt
aniso8601.egg-info/requires.txt
aniso8601.egg-info/top_level.txt
-aniso8601/__pycache__/__init__.cpython-36.pyc
-aniso8601/__pycache__/builder.cpython-36.pyc
-aniso8601/__pycache__/compat.cpython-36.pyc
-aniso8601/__pycache__/date.cpython-36.pyc
-aniso8601/__pycache__/duration.cpython-36.pyc
-aniso8601/__pycache__/exceptions.cpython-36.pyc
-aniso8601/__pycache__/interval.cpython-36.pyc
-aniso8601/__pycache__/resolution.cpython-36.pyc
-aniso8601/__pycache__/time.cpython-36.pyc
-aniso8601/__pycache__/timezone.cpython-36.pyc
+aniso8601/tests/__init__.py
+aniso8601/tests/compat.py
aniso8601/tests/test_builder.py
-aniso8601/tests/test_builder.pyc
aniso8601/tests/test_date.py
-aniso8601/tests/test_date.pyc
aniso8601/tests/test_duration.py
-aniso8601/tests/test_duration.pyc
aniso8601/tests/test_init.py
-aniso8601/tests/test_init.pyc
aniso8601/tests/test_interval.py
-aniso8601/tests/test_interval.pyc
aniso8601/tests/test_time.py
-aniso8601/tests/test_time.pyc
-aniso8601/tests/test_timezone.py
-aniso8601/tests/test_timezone.pyc
-aniso8601/tests/__pycache__/test_builder.cpython-36.pyc
-aniso8601/tests/__pycache__/test_date.cpython-36.pyc
-aniso8601/tests/__pycache__/test_duration.cpython-36.pyc
-aniso8601/tests/__pycache__/test_init.cpython-36.pyc
-aniso8601/tests/__pycache__/test_interval.cpython-36.pyc
-aniso8601/tests/__pycache__/test_time.cpython-36.pyc
-aniso8601/tests/__pycache__/test_timezone.cpython-36.pyc
\ No newline at end of file
+aniso8601/tests/test_timezone.py
\ No newline at end of file
diff -Nru python-aniso8601-4.0.1/debian/changelog python-aniso8601-4.1.0/debian/changelog
--- python-aniso8601-4.0.1/debian/changelog 2018-10-30 12:01:18.000000000 +0000
+++ python-aniso8601-4.1.0/debian/changelog 2019-01-10 07:58:23.000000000 +0000
@@ -1,3 +1,11 @@
+python-aniso8601 (4.1.0-1) unstable; urgency=medium
+
+ * New upstream release
+ * Update standards version to 4.3.0
+ * Update copyright years, maintainer e-mail address
+
+ -- Jonathan Carter Thu, 10 Jan 2019 09:58:23 +0200
+
python-aniso8601 (4.0.1-1) unstable; urgency=medium
* New upstream release
diff -Nru python-aniso8601-4.0.1/debian/control python-aniso8601-4.1.0/debian/control
--- python-aniso8601-4.0.1/debian/control 2018-10-30 12:01:18.000000000 +0000
+++ python-aniso8601-4.1.0/debian/control 2019-01-10 07:58:23.000000000 +0000
@@ -7,11 +7,13 @@
dh-python,
python-all,
python-dateutil,
+ python-mock,
python-setuptools,
python3-all,
python3-dateutil,
+ python3-mock,
python3-setuptools
-Standards-Version: 4.2.1
+Standards-Version: 4.3.0
Homepage: https://bitbucket.org/nielsenb/aniso8601
Vcs-Git: https://salsa.debian.org/python-team/modules/python-aniso8601.git
Vcs-Browser: https://salsa.debian.org/python-team/modules/python-aniso8601
diff -Nru python-aniso8601-4.0.1/debian/copyright python-aniso8601-4.1.0/debian/copyright
--- python-aniso8601-4.0.1/debian/copyright 2018-10-30 11:57:43.000000000 +0000
+++ python-aniso8601-4.1.0/debian/copyright 2019-01-10 07:58:23.000000000 +0000
@@ -3,11 +3,11 @@
Source: https://bitbucket.org/nielsenb/aniso8601
Files: *
-Copyright: 2016-2018 Brandon Nielsen
+Copyright: 2016-2019 Brandon Nielsen
License: BSD-3-Clause
Files: debian/*
-Copyright: 2016-2018 Jonathan Carter
+Copyright: 2016-2019 Jonathan Carter
License: BSD-3-Clause
License: BSD-3-Clause
diff -Nru python-aniso8601-4.0.1/LICENSE python-aniso8601-4.1.0/LICENSE
--- python-aniso8601-4.0.1/LICENSE 2018-02-23 16:50:36.000000000 +0000
+++ python-aniso8601-4.1.0/LICENSE 2019-01-08 21:27:49.000000000 +0000
@@ -1,4 +1,4 @@
-Copyright (c) 2018, Brandon Nielsen
+Copyright (c) 2019, Brandon Nielsen
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff -Nru python-aniso8601-4.0.1/MANIFEST.in python-aniso8601-4.1.0/MANIFEST.in
--- python-aniso8601-4.0.1/MANIFEST.in 2017-09-01 19:21:51.000000000 +0000
+++ python-aniso8601-4.1.0/MANIFEST.in 2019-01-08 21:27:49.000000000 +0000
@@ -1,3 +1,2 @@
include LICENSE
include README.rst
-recursive-include aniso8601 *
diff -Nru python-aniso8601-4.0.1/PKG-INFO python-aniso8601-4.1.0/PKG-INFO
--- python-aniso8601-4.0.1/PKG-INFO 2018-10-25 15:03:31.000000000 +0000
+++ python-aniso8601-4.1.0/PKG-INFO 2019-01-08 21:33:22.000000000 +0000
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: aniso8601
-Version: 4.0.1
+Version: 4.1.0
Summary: A library for parsing ISO 8601 strings.
Home-page: https://bitbucket.org/nielsenb/aniso8601
Author: Brandon Nielsen
@@ -609,20 +609,16 @@
It is recommended to develop using a `virtualenv `_.
- The tests require the :code:`dev` and :code:`relative` features to be enabled, install the necessary dependencies using pip::
+ The tests require the :code:`relative` feature to be enabled, install the necessary dependencies using pip::
- $ pip install .[dev,relative]
+ $ pip install .[relative]
Tests
-----
- To run the unit tests, navigate to the source directory and run the tests for the python version being worked on (python2, python3)::
+ Tests can be run using `setuptools `::
- $ python2 -m unittest discover aniso8601/tests/
-
- or::
-
- $ python3 -m unittest discover aniso8601/tests/
+ $ python setup.py test
Contributing
============
@@ -654,6 +650,6 @@
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Provides-Extra: dev
Provides-Extra: relative
diff -Nru python-aniso8601-4.0.1/README.rst python-aniso8601-4.1.0/README.rst
--- python-aniso8601-4.0.1/README.rst 2018-10-25 14:56:59.000000000 +0000
+++ python-aniso8601-4.1.0/README.rst 2019-01-08 21:27:49.000000000 +0000
@@ -598,20 +598,16 @@
It is recommended to develop using a `virtualenv `_.
-The tests require the :code:`dev` and :code:`relative` features to be enabled, install the necessary dependencies using pip::
+The tests require the :code:`relative` feature to be enabled, install the necessary dependencies using pip::
- $ pip install .[dev,relative]
+ $ pip install .[relative]
Tests
-----
-To run the unit tests, navigate to the source directory and run the tests for the python version being worked on (python2, python3)::
+Tests can be run using `setuptools `::
- $ python2 -m unittest discover aniso8601/tests/
-
-or::
-
- $ python3 -m unittest discover aniso8601/tests/
+ $ python setup.py test
Contributing
============
diff -Nru python-aniso8601-4.0.1/setup.py python-aniso8601-4.1.0/setup.py
--- python-aniso8601-4.0.1/setup.py 2018-10-25 15:02:37.000000000 +0000
+++ python-aniso8601-4.1.0/setup.py 2019-01-08 21:30:37.000000000 +0000
@@ -1,7 +1,14 @@
-try:
- from setuptools import setup
-except ImportError:
- from distutils import setup
+import sys
+
+from setuptools import setup, find_packages
+
+TESTS_REQUIRE = []
+
+#Mock is only required for Python 2
+PY2 = sys.version_info[0] == 2
+
+if PY2:
+ TESTS_REQUIRE.append('mock>=2.0.0')
readme = open('README.rst', 'r')
README_TEXT = readme.read()
@@ -9,17 +16,18 @@
setup(
name='aniso8601',
- version='4.0.1',
+ version='4.1.0',
description='A library for parsing ISO 8601 strings.',
long_description=README_TEXT,
author='Brandon Nielsen',
author_email='nielsenb@jetfuse.net',
url='https://bitbucket.org/nielsenb/aniso8601',
extras_require={
- 'dev': ['mock>=2.0.0'],
'relative': ['python-dateutil>=2.7.3']
},
- packages=['aniso8601'],
+ packages=find_packages(),
+ test_suite='aniso8601',
+ tests_require=TESTS_REQUIRE,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
@@ -32,6 +40,7 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
'Topic :: Software Development :: Libraries :: Python Modules'
],
keywords='iso8601 parser',