Hello community, here is the log from the commit of package python-iso8601 for openSUSE:Factory checked in at 2020-03-08 22:21:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-iso8601 (Old) and /work/SRC/openSUSE:Factory/.python-iso8601.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-iso8601" Sun Mar 8 22:21:54 2020 rev:16 rq:780406 version:0.1.12 Changes: -------- --- /work/SRC/openSUSE:Factory/python-iso8601/python-iso8601.changes 2019-03-29 20:39:29.994686647 +0100 +++ /work/SRC/openSUSE:Factory/.python-iso8601.new.26092/python-iso8601.changes 2020-03-08 22:21:58.179997208 +0100 @@ -1,0 +2,6 @@ +Fri Dec 20 19:22:41 UTC 2019 - Dirk Mueller <dmuel...@suse.com> + +- update to 0.1.12: + * Fix class reference for iso8601.Utc in module docstring + +------------------------------------------------------------------- Old: ---- iso8601-0.1.11.tar.gz New: ---- iso8601-0.1.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-iso8601.spec ++++++ --- /var/tmp/diff_new_pack.4COMoX/_old 2020-03-08 22:21:58.663997506 +0100 +++ /var/tmp/diff_new_pack.4COMoX/_new 2020-03-08 22:21:58.667997509 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-iso8601 # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-iso8601 -Version: 0.1.11 +Version: 0.1.12 Release: 0 Summary: Python module to parse ISO 8601 dates License: MIT ++++++ iso8601-0.1.11.tar.gz -> iso8601-0.1.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iso8601-0.1.11/PKG-INFO new/iso8601-0.1.12/PKG-INFO --- old/iso8601-0.1.11/PKG-INFO 2015-11-03 17:11:42.000000000 +0100 +++ new/iso8601-0.1.12/PKG-INFO 2017-07-28 00:04:32.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: iso8601 -Version: 0.1.11 +Version: 0.1.12 Summary: Simple module to parse ISO 8601 dates Home-page: https://bitbucket.org/micktwomey/pyiso8601 Author: Michael Twomey @@ -103,6 +103,7 @@ - Python 3.3 - Python 3.4 - Python 3.5 + - Python 3.6 - PyPy - PyPy 3 @@ -115,6 +116,11 @@ Changes ======= + 0.1.12 + ------ + + * Fix class reference for iso8601.Utc in module docstring (thanks to felixschwarz in https://bitbucket.org/micktwomey/pyiso8601/pull-requests/7/fix-class-reference-for-iso8601utc-in/diff) + 0.1.11 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iso8601-0.1.11/README.rst new/iso8601-0.1.12/README.rst --- old/iso8601-0.1.11/README.rst 2015-11-03 17:03:37.000000000 +0100 +++ new/iso8601-0.1.12/README.rst 2017-07-27 23:51:06.000000000 +0200 @@ -95,6 +95,7 @@ - Python 3.3 - Python 3.4 - Python 3.5 +- Python 3.6 - PyPy - PyPy 3 @@ -107,6 +108,11 @@ Changes ======= +0.1.12 +------ + +* Fix class reference for iso8601.Utc in module docstring (thanks to felixschwarz in https://bitbucket.org/micktwomey/pyiso8601/pull-requests/7/fix-class-reference-for-iso8601utc-in/diff) + 0.1.11 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iso8601-0.1.11/dev-requirements.txt new/iso8601-0.1.12/dev-requirements.txt --- old/iso8601-0.1.11/dev-requirements.txt 2015-11-03 13:01:03.000000000 +0100 +++ new/iso8601-0.1.12/dev-requirements.txt 2017-07-27 23:52:52.000000000 +0200 @@ -1,5 +1,6 @@ devpi>=1.2.1 pytest>=2.5.2 Sphinx>=1.2.1 +tox-pyenv>=1.0.3 tox>=1.7.0 wheel>=0.22.0 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iso8601-0.1.11/iso8601/iso8601.py new/iso8601-0.1.12/iso8601/iso8601.py --- old/iso8601-0.1.11/iso8601/iso8601.py 2015-11-03 13:07:12.000000000 +0100 +++ new/iso8601-0.1.12/iso8601/iso8601.py 2017-07-27 23:41:48.000000000 +0200 @@ -3,21 +3,18 @@ Basic usage: >>> import iso8601 >>> iso8601.parse_date("2007-01-25T12:00:00Z") -datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.iso8601.Utc ...>) +datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.Utc ...>) >>> """ -from datetime import ( - datetime, - timedelta, - tzinfo -) +import datetime from decimal import Decimal import sys import re -__all__ = ["parse_date", "ParseError", "UTC"] +__all__ = ["parse_date", "ParseError", "UTC", + "FixedOffset"] if sys.version_info >= (3, 0, 0): _basestring = str @@ -73,61 +70,69 @@ class ParseError(Exception): """Raised when there is a problem parsing a date string""" -# Yoinked from python docs -ZERO = timedelta(0) -class Utc(tzinfo): - """UTC Timezone - - """ - def utcoffset(self, dt): - return ZERO - - def tzname(self, dt): - return "UTC" - - def dst(self, dt): - return ZERO - - def __repr__(self): - return "<iso8601.Utc>" - -UTC = Utc() - -class FixedOffset(tzinfo): - """Fixed offset in hours and minutes from UTC - - """ - def __init__(self, offset_hours, offset_minutes, name): - self.__offset_hours = offset_hours # Keep for later __getinitargs__ - self.__offset_minutes = offset_minutes # Keep for later __getinitargs__ - self.__offset = timedelta(hours=offset_hours, minutes=offset_minutes) - self.__name = name - - def __eq__(self, other): - if isinstance(other, FixedOffset): - return ( - (other.__offset == self.__offset) - and - (other.__name == self.__name) - ) - if isinstance(other, tzinfo): - return other == self - return False - - def __getinitargs__(self): - return (self.__offset_hours, self.__offset_minutes, self.__name) +if sys.version_info >= (3, 2, 0): + UTC = datetime.timezone.utc + def FixedOffset(offset_hours, offset_minutes, name): + return datetime.timezone( + datetime.timedelta( + hours=offset_hours, minutes=offset_minutes), + name) +else: + # Yoinked from python docs + ZERO = datetime.timedelta(0) + class Utc(datetime.tzinfo): + """UTC Timezone + + """ + def utcoffset(self, dt): + return ZERO + + def tzname(self, dt): + return "UTC" + + def dst(self, dt): + return ZERO + + def __repr__(self): + return "<iso8601.Utc>" + + UTC = Utc() + + class FixedOffset(datetime.tzinfo): + """Fixed offset in hours and minutes from UTC + + """ + def __init__(self, offset_hours, offset_minutes, name): + self.__offset_hours = offset_hours # Keep for later __getinitargs__ + self.__offset_minutes = offset_minutes # Keep for later __getinitargs__ + self.__offset = datetime.timedelta( + hours=offset_hours, minutes=offset_minutes) + self.__name = name + + def __eq__(self, other): + if isinstance(other, FixedOffset): + return ( + (other.__offset == self.__offset) + and + (other.__name == self.__name) + ) + return NotImplemented + + def __getinitargs__(self): + return (self.__offset_hours, self.__offset_minutes, self.__name) + + def utcoffset(self, dt): + return self.__offset - def utcoffset(self, dt): - return self.__offset + def tzname(self, dt): + return self.__name - def tzname(self, dt): - return self.__name + def dst(self, dt): + return ZERO - def dst(self, dt): - return ZERO + def __repr__(self): + return "<FixedOffset %r %r>" % (self.__name, self.__offset) - def __repr__(self): - return "<FixedOffset %r %r>" % (self.__name, self.__offset) def to_int(d, key, default_to_zero=False, default=None, required=True): """Pull a value from the dict and convert to int @@ -195,7 +200,7 @@ groups["second_fraction"] = int(Decimal("0.%s" % (groups["second_fraction"] or 0)) * Decimal("1000000.0")) try: - return datetime( + return datetime.datetime( year=to_int(groups, "year"), month=to_int(groups, "month", default=to_int(groups, "monthdash", required=False, default=1)), day=to_int(groups, "day", default=to_int(groups, "daydash", required=False, default=1)), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iso8601-0.1.11/iso8601/test_iso8601.py new/iso8601-0.1.12/iso8601/test_iso8601.py --- old/iso8601-0.1.11/iso8601/test_iso8601.py 2015-11-03 13:01:03.000000000 +0100 +++ new/iso8601-0.1.12/iso8601/test_iso8601.py 2017-07-27 23:41:48.000000000 +0200 @@ -12,6 +12,10 @@ def test_iso8601_regex(): assert iso8601.ISO8601_REGEX.match("2006-10-11T00:14:33Z") +def test_fixedoffset_eq(): + # See https://bitbucket.org/micktwomey/pyiso8601/issues/19 + datetime.tzinfo() == iso8601.FixedOffset(2, 0, '+2:00') + def test_parse_no_timezone_different_default(): tz = iso8601.FixedOffset(2, 0, "test offset") d = iso8601.parse_date("2007-01-01T08:00:00", default_timezone=tz) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iso8601-0.1.11/iso8601.egg-info/PKG-INFO new/iso8601-0.1.12/iso8601.egg-info/PKG-INFO --- old/iso8601-0.1.11/iso8601.egg-info/PKG-INFO 2015-11-03 17:11:42.000000000 +0100 +++ new/iso8601-0.1.12/iso8601.egg-info/PKG-INFO 2017-07-28 00:04:32.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: iso8601 -Version: 0.1.11 +Version: 0.1.12 Summary: Simple module to parse ISO 8601 dates Home-page: https://bitbucket.org/micktwomey/pyiso8601 Author: Michael Twomey @@ -103,6 +103,7 @@ - Python 3.3 - Python 3.4 - Python 3.5 + - Python 3.6 - PyPy - PyPy 3 @@ -115,6 +116,11 @@ Changes ======= + 0.1.12 + ------ + + * Fix class reference for iso8601.Utc in module docstring (thanks to felixschwarz in https://bitbucket.org/micktwomey/pyiso8601/pull-requests/7/fix-class-reference-for-iso8601utc-in/diff) + 0.1.11 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iso8601-0.1.11/setup.cfg new/iso8601-0.1.12/setup.cfg --- old/iso8601-0.1.11/setup.cfg 2015-11-03 17:11:42.000000000 +0100 +++ new/iso8601-0.1.12/setup.cfg 2017-07-28 00:04:32.000000000 +0200 @@ -1,5 +1,4 @@ [egg_info] tag_build = -tag_svn_revision = 0 tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iso8601-0.1.11/setup.py new/iso8601-0.1.12/setup.py --- old/iso8601-0.1.11/setup.py 2015-08-10 16:04:15.000000000 +0200 +++ new/iso8601-0.1.12/setup.py 2017-07-27 23:41:48.000000000 +0200 @@ -9,7 +9,7 @@ setup( name="iso8601", - version="0.1.11", + version="0.1.12", description=long_description.split("\n")[0], long_description=long_description, author="Michael Twomey", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iso8601-0.1.11/tox.ini new/iso8601-0.1.12/tox.ini --- old/iso8601-0.1.11/tox.ini 2015-11-03 16:37:45.000000000 +0100 +++ new/iso8601-0.1.12/tox.ini 2017-07-27 23:46:49.000000000 +0200 @@ -1,5 +1,5 @@ [tox] -envlist = py26,py27,py32,py33,py34,py35,pypy,pypy3 +envlist = py26,py27,py32,py33,py34,py35,py36,pypy,pypy3 [testenv] deps=pytest>=2.4.2