Hello community,

here is the log from the commit of package python-vobject for openSUSE:Factory 
checked in at 2018-11-26 10:34:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-vobject (Old)
 and      /work/SRC/openSUSE:Factory/.python-vobject.new.19453 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-vobject"

Mon Nov 26 10:34:17 2018 rev:3 rq:651635 version:0.9.6.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-vobject/python-vobject.changes    
2017-08-24 18:45:56.991903573 +0200
+++ /work/SRC/openSUSE:Factory/.python-vobject.new.19453/python-vobject.changes 
2018-11-26 10:36:58.336559640 +0100
@@ -1,0 +2,28 @@
+Tue Nov 20 21:23:56 UTC 2018 - Hans-Peter Jansen <h...@urpla.net>
+
+- update to version 0.9.6.1:
+  * Revert too-strict serialization of timestamp values
+    - broke too many other implementations
+
+- update to version 0.9.6:
+  * Correctly order calendar properties before calendar components
+    (#98)
+  * Correctly serialize timestamp values (i.e. REV) (#99)
+  * Pass correct formatting string to logger (#102) 
+    - thanks @CruzR!
+  * RRULE: Fix floating UNTIL with dateutil > 2.6.1 (#115) 
+    - thanks @Unrud!
+  * Encode params if necessary in serialization (#109) 
+    - thanks @matthias-k!
+  * Ignore escaped semi-colons in UNTIL value (#114) 
+    - thanks @Unrud!
+  * RRULE: Fix VTODO without DTSTART (#116) 
+    - thanks @Unrud!
+  * Fixed regexp for VCF Version 2.1 (#121) 
+    - thanks @farmovit!
+  * repr changed for datetime.timedelta in python 3.7 (#122) 
+    - thanks @sharkcz!
+
+- enable testing
+
+-------------------------------------------------------------------

Old:
----
  vobject-0.9.5.tar.gz

New:
----
  vobject-0.9.6.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-vobject.spec ++++++
--- /var/tmp/diff_new_pack.kWuMHs/_old  2018-11-26 10:36:59.456558330 +0100
+++ /var/tmp/diff_new_pack.kWuMHs/_new  2018-11-26 10:36:59.460558326 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-vobject
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,14 +12,16 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%bcond_without test
+
 Name:           python-vobject
 %global modname vobject
-Version:        0.9.5
+Version:        0.9.6.1
 Release:        0
 Summary:        Python package for parsing and creating iCalendar and vCard 
files
 License:        Apache-2.0
@@ -64,6 +66,11 @@
 done
 %fdupes %{buildroot}%{_prefix}
 
+%if %{with test}
+%check
+%python_exec tests.py
+%endif
+
 %post
 %python_install_alternative change_tz
 %python_install_alternative ics_diff
@@ -74,7 +81,8 @@
 
 %files %{python_files}
 %defattr(-,root,root)
-%doc ACKNOWLEDGEMENTS.txt LICENSE-2.0.txt README.md
+%license LICENSE-2.0.txt
+%doc ACKNOWLEDGEMENTS.txt README.md
 %python_alternative %{_bindir}/change_tz
 %python_alternative %{_bindir}/ics_diff
 %{python_sitelib}/%{modname}/

++++++ vobject-0.9.5.tar.gz -> vobject-0.9.6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vobject-0.9.5/PKG-INFO new/vobject-0.9.6.1/PKG-INFO
--- old/vobject-0.9.5/PKG-INFO  2017-06-29 20:59:23.000000000 +0200
+++ new/vobject-0.9.6.1/PKG-INFO        2018-07-18 18:02:11.000000000 +0200
@@ -1,12 +1,13 @@
 Metadata-Version: 1.1
 Name: vobject
-Version: 0.9.5
+Version: 0.9.6.1
 Summary: A full-featured Python package for parsing and creating iCalendar and 
vCard files
 Home-page: http://eventable.github.io/vobject/
 Author: Sameen Karim
 Author-email: sam...@eventable.com
 License: Apache
-Download-URL: https://github.com/eventable/vobject/tarball/0.9.5
+Download-URL: https://github.com/eventable/vobject/tarball/0.9.6.1
+Description-Content-Type: UNKNOWN
 Description: 
         Description
         -----------
@@ -22,13 +23,8 @@
         
         Recent changes
         --------------
-           - Make ics_diff.py work with Python 3
-           - Huge changes to text encoding for Python 2/3 compatibility
-           - Autogenerate DTSTAMP if not provided
-           - Fix getrruleset() for Python 3 and in the case that addRDate=True
-           - Update vCard property validation to match specifications
-           - Handle offset-naive and offset-aware datetimes in recurrence rules
-           - Improved documentation for multi-value properties
+            - Revert too-strict serialization of timestamp values - broke too 
many other
+               implementations
         
         For older changes, see
            - http://eventable.github.io/vobject/#release-history or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vobject-0.9.5/setup.py new/vobject-0.9.6.1/setup.py
--- old/vobject-0.9.5/setup.py  2017-06-29 20:44:49.000000000 +0200
+++ new/vobject-0.9.6.1/setup.py        2018-07-18 17:59:53.000000000 +0200
@@ -15,13 +15,8 @@
 
 Recent changes
 --------------
-   - Make ics_diff.py work with Python 3
-   - Huge changes to text encoding for Python 2/3 compatibility
-   - Autogenerate DTSTAMP if not provided
-   - Fix getrruleset() for Python 3 and in the case that addRDate=True
-   - Update vCard property validation to match specifications
-   - Handle offset-naive and offset-aware datetimes in recurrence rules
-   - Improved documentation for multi-value properties
+    - Revert too-strict serialization of timestamp values - broke too many 
other
+       implementations
 
 For older changes, see
    - http://eventable.github.io/vobject/#release-history or
@@ -33,7 +28,7 @@
 doclines = (__doc__ or '').splitlines()
 
 setup(name = "vobject",
-      version = "0.9.5",
+      version = "0.9.6.1",
       author = "Jeffrey Harris",
       author_email = "jeff...@osafoundation.org",
       maintainer = "Sameen Karim",
@@ -41,7 +36,7 @@
       license = "Apache",
       zip_safe = True,
       url = "http://eventable.github.io/vobject/";,
-      download_url = 'https://github.com/eventable/vobject/tarball/0.9.5',
+      download_url = 'https://github.com/eventable/vobject/tarball/0.9.6.1',
       bugtrack_url = "https://github.com/eventable/vobject/issues";,
       entry_points = {
             'console_scripts': [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vobject-0.9.5/test_files/simple_2_0_test.ics 
new/vobject-0.9.6.1/test_files/simple_2_0_test.ics
--- old/vobject-0.9.5/test_files/simple_2_0_test.ics    2017-06-29 
20:44:49.000000000 +0200
+++ new/vobject-0.9.6.1/test_files/simple_2_0_test.ics  2018-07-08 
03:45:00.000000000 +0200
@@ -4,6 +4,7 @@
 BEGIN:VEVENT
 UID:Not very random UID
 DTSTART:20060509T000000
+ATTENDEE;CN=Fröhlich:mailto:froel...@example.com
 CREATED:20060101T180000Z
 DESCRIPTION:Test event
 DTSTAMP:20170626T000000Z
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vobject-0.9.5/tests.py new/vobject-0.9.6.1/tests.py
--- old/vobject-0.9.5/tests.py  2017-06-29 20:44:49.000000000 +0200
+++ new/vobject-0.9.6.1/tests.py        2018-07-18 17:58:25.000000000 +0200
@@ -68,6 +68,9 @@
         cal.vevent.add('uid').value = "Not very random UID"
         cal.vevent.add('dtstamp').value = datetime.datetime(2017, 6, 26, 0, 
tzinfo=tzutc())
 
+        cal.vevent.add('attendee').value = 'mailto:froel...@example.com'
+        cal.vevent.attendee.params['CN'] = ['Fröhlich']
+
         # Note we're normalizing line endings, because no one got time for 
that.
         self.assertEqual(
             cal.serialize().replace('\r\n', '\n'),
@@ -253,7 +256,7 @@
         )
         self.assertEqual(
             
str(parseRDate(textLineToContentLine("RDATE;VALUE=PERIOD:19960403T020000Z/19960403T040000Z,19960404T010000Z/PT3H"))),
-            "<RDATE{'VALUE': ['PERIOD']}[(datetime.datetime(1996, 4, 3, 2, 0, 
tzinfo=tzutc()), datetime.datetime(1996, 4, 3, 4, 0, tzinfo=tzutc())), 
(datetime.datetime(1996, 4, 4, 1, 0, tzinfo=tzutc()), datetime.timedelta(0, 
10800))]>"
+            "<RDATE{'VALUE': ['PERIOD']}[(datetime.datetime(1996, 4, 3, 2, 0, 
tzinfo=tzutc()), datetime.datetime(1996, 4, 3, 4, 0, tzinfo=tzutc())), 
(datetime.datetime(1996, 4, 4, 1, 0, tzinfo=tzutc()), " + 
("datetime.timedelta(0, 10800)" if sys.version_info < (3,7) else 
"datetime.timedelta(seconds=10800)") + ")]>"
         )
 
     def test_periodBehavior(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vobject-0.9.5/vobject/base.py 
new/vobject-0.9.6.1/vobject/base.py
--- old/vobject-0.9.5/vobject/base.py   2017-06-29 20:44:49.000000000 +0200
+++ new/vobject-0.9.6.1/vobject/base.py 2018-07-08 03:45:00.000000000 +0200
@@ -69,7 +69,7 @@
 logger = logging.getLogger(__name__)
 if not logging.getLogger().handlers:
     handler = logging.StreamHandler()
-    formatter = logging.Formatter('{name} {levelname} {message}')
+    formatter = logging.Formatter('%(name)s %(levelname)s %(message)s')
     handler.setFormatter(formatter)
     logger.addHandler(handler)
 logger.setLevel(logging.ERROR)  # Log errors
@@ -774,7 +774,7 @@
 # get a full content line, break it up into group, name, parameters, and value
 patterns['line'] = r"""
 ^ ((?P<group> {name!s})\.)?(?P<name> {name!s}) # name group
-  (?P<params> (?: {param!s} )* )               # params group (may be empty)
+  (?P<params> ;?(?: {param!s} )* )               # params group (may be empty)
 : (?P<value> .* )$                             # value group
 """.format(**patterns)
 
@@ -1022,10 +1022,13 @@
         keys = sorted(obj.params.keys())
         for key in keys:
             paramstr = ','.join(dquoteEscape(p) for p in obj.params[key])
-            s.write(";{0}={1}".format(key, paramstr))
+            try:
+                s.write(";{0}={1}".format(key, paramstr))
+            except (UnicodeDecodeError, UnicodeEncodeError):
+                s.write(";{0}={1}".format(key, paramstr.encode('utf-8')))
         try:
             s.write(":{0}".format(obj.value))
-        except (UnicodeDecodeError, UnicodeEncodeError) as e:
+        except (UnicodeDecodeError, UnicodeEncodeError):
             s.write(":{0}".format(obj.value.encode('utf-8')))
         if obj.behavior and not startedEncoded:
             obj.behavior.decode(obj)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vobject-0.9.5/vobject/icalendar.py 
new/vobject-0.9.6.1/vobject/icalendar.py
--- old/vobject-0.9.5/vobject/icalendar.py      2017-06-29 20:44:49.000000000 
+0200
+++ new/vobject-0.9.6.1/vobject/icalendar.py    2018-07-08 03:45:00.000000000 
+0200
@@ -2,7 +2,6 @@
 
 from __future__ import print_function
 
-import codecs
 import datetime
 import logging
 import random  # for generating a UID
@@ -32,7 +31,7 @@
 from . import behavior
 from .base import (VObjectError, NativeError, ValidateError, ParseError,
                    Component, ContentLine, logger, registerBehavior,
-                   backslashEscape, foldOneLine, str_)
+                   backslashEscape, foldOneLine)
 
 
 # ------------------------------- Constants 
------------------------------------
@@ -415,7 +414,21 @@
                 if addfunc is None:
                     addfunc = getattr(rruleset, name)
 
-                dtstart = self.dtstart.value
+                try:
+                    dtstart = self.dtstart.value
+                except (AttributeError, KeyError):
+                    # Special for VTODO - try DUE property instead
+                    try:
+                        if self.name == "VTODO":
+                            dtstart = self.due.value
+                        else:
+                            # if there's no dtstart, just return None
+                            logging.error('failed to get dtstart with VTODO')
+                            return None
+                    except (AttributeError, KeyError):
+                        # if there's no due, just return None
+                        logging.error('failed to find DUE at all.')
+                        return None
 
                 if name in DATENAMES:
                     if type(line.value[0]) == datetime.datetime:
@@ -427,31 +440,22 @@
                         # ignore RDATEs with PERIOD values for now
                         pass
                 elif name in RULENAMES:
-                    try:
-                        dtstart = self.dtstart.value
-                    except (AttributeError, KeyError):
-                        # Special for VTODO - try DUE property instead
-                        try:
-                            if self.name == "VTODO":
-                                dtstart = self.due.value
-                            else:
-                                # if there's no dtstart, just return None
-                                logging.error('failed to get dtstart with 
VTODO')
-                                return None
-                        except (AttributeError, KeyError):
-                            # if there's no due, just return None
-                            logging.error('failed to find DUE at all.')
-                            return None
-
                     # a Ruby iCalendar library escapes semi-colons in rrules,
                     # so also remove any backslashes
                     value = line.value.replace('\\', '')
-                    rule = rrule.rrulestr(
-                        value, dtstart=dtstart,
-                        # If dtstart has no time zone, `until`
-                        # shouldn't get one, either:
-                        ignoretz=isinstance(dtstart, datetime.date))
-                    until = rule._until
+                    # If dtstart has no time zone, `until`
+                    # shouldn't get one, either:
+                    ignoretz = (not isinstance(dtstart, datetime.datetime) or
+                                dtstart.tzinfo is None)
+                    try:
+                        until = rrule.rrulestr(value, ignoretz=ignoretz)._until
+                    except ValueError:
+                        # WORKAROUND: dateutil<=2.7.2 doesn't set the time zone
+                        # of dtstart
+                        if ignoretz:
+                            raise
+                        utc_now = datetime.datetime.now(datetime.timezone.utc)
+                        until = rrule.rrulestr(value, dtstart=utc_now)._until
 
                     if until is not None and isinstance(dtstart,
                                                         datetime.datetime) and 
\
@@ -459,7 +463,7 @@
                         # dateutil converts the UNTIL date to a datetime,
                         # check to see if the UNTIL parameter value was a date
                         vals = dict(pair.split('=') for pair in
-                                    line.value.upper().split(';'))
+                                    value.upper().split(';'))
                         if len(vals.get('UNTIL', '')) == 8:
                             until = datetime.datetime.combine(until.date(),
                                                               dtstart.time())
@@ -489,7 +493,12 @@
                         if dtstart.tzinfo is None:
                             until = until.replace(tzinfo=None)
 
-                        rule._until = until
+                    value_without_until = ';'.join(
+                        pair for pair in value.split(';')
+                        if pair.split('=')[0].upper() != 'UNTIL')
+                    rule = rrule.rrulestr(value_without_until,
+                                          dtstart=dtstart, ignoretz=ignoretz)
+                    rule._until = until
 
                     # add the rrule or exrule to the rruleset
                     addfunc(rule)
@@ -974,6 +983,65 @@
             tzid = toUnicode(tzid)
             if tzid != u'UTC' and tzid not in oldtzids:
                 obj.add(TimezoneComponent(tzinfo=getTzid(tzid)))
+
+    @classmethod
+    def serialize(cls, obj, buf, lineLength, validate=True):
+        """
+        Set implicit parameters, do encoding, return unicode string.
+
+        If validate is True, raise VObjectError if the line doesn't validate
+        after implicit parameters are generated.
+
+        Default is to call base.defaultSerialize.
+
+        """
+
+        cls.generateImplicitParameters(obj)
+        if validate:
+            cls.validate(obj, raiseException=True)
+        if obj.isNative:
+            transformed = obj.transformFromNative()
+            undoTransform = True
+        else:
+            transformed = obj
+            undoTransform = False
+        out = None
+        outbuf = buf or six.StringIO()
+        if obj.group is None:
+            groupString = ''
+        else:
+            groupString = obj.group + '.'
+        if obj.useBegin:
+            foldOneLine(outbuf, "{0}BEGIN:{1}".format(groupString, obj.name),
+                        lineLength)
+
+        try:
+            first_props = [s for s in cls.sortFirst if s in obj.contents \
+                                    and not isinstance(obj.contents[s][0], 
Component)]
+            first_components = [s for s in cls.sortFirst if s in obj.contents \
+                                    and isinstance(obj.contents[s][0], 
Component)]
+        except Exception:
+            first_props = first_components = []
+            # first_components = []
+
+        prop_keys = sorted(list(k for k in obj.contents.keys() if k not in 
first_props \
+                                         and not 
isinstance(obj.contents[k][0], Component)))
+        comp_keys = sorted(list(k for k in obj.contents.keys() if k not in 
first_components \
+                                        and isinstance(obj.contents[k][0], 
Component)))
+
+        sorted_keys = first_props + prop_keys + first_components + comp_keys
+        children = [o for k in sorted_keys for o in obj.contents[k]]
+
+        for child in children:
+            # validate is recursive, we only need to validate once
+            child.serialize(outbuf, lineLength, validate=False)
+        if obj.useBegin:
+            foldOneLine(outbuf, "{0}END:{1}".format(groupString, obj.name),
+                        lineLength)
+        out = buf or outbuf.getvalue()
+        if undoTransform:
+            obj.transformToNative()
+        return out
 registerBehavior(VCalendar2_0)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vobject-0.9.5/vobject.egg-info/PKG-INFO 
new/vobject-0.9.6.1/vobject.egg-info/PKG-INFO
--- old/vobject-0.9.5/vobject.egg-info/PKG-INFO 2017-06-29 20:59:22.000000000 
+0200
+++ new/vobject-0.9.6.1/vobject.egg-info/PKG-INFO       2018-07-18 
18:02:11.000000000 +0200
@@ -1,12 +1,13 @@
 Metadata-Version: 1.1
 Name: vobject
-Version: 0.9.5
+Version: 0.9.6.1
 Summary: A full-featured Python package for parsing and creating iCalendar and 
vCard files
 Home-page: http://eventable.github.io/vobject/
 Author: Sameen Karim
 Author-email: sam...@eventable.com
 License: Apache
-Download-URL: https://github.com/eventable/vobject/tarball/0.9.5
+Download-URL: https://github.com/eventable/vobject/tarball/0.9.6.1
+Description-Content-Type: UNKNOWN
 Description: 
         Description
         -----------
@@ -22,13 +23,8 @@
         
         Recent changes
         --------------
-           - Make ics_diff.py work with Python 3
-           - Huge changes to text encoding for Python 2/3 compatibility
-           - Autogenerate DTSTAMP if not provided
-           - Fix getrruleset() for Python 3 and in the case that addRDate=True
-           - Update vCard property validation to match specifications
-           - Handle offset-naive and offset-aware datetimes in recurrence rules
-           - Improved documentation for multi-value properties
+            - Revert too-strict serialization of timestamp values - broke too 
many other
+               implementations
         
         For older changes, see
            - http://eventable.github.io/vobject/#release-history or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vobject-0.9.5/vobject.egg-info/pbr.json 
new/vobject-0.9.6.1/vobject.egg-info/pbr.json
--- old/vobject-0.9.5/vobject.egg-info/pbr.json 2017-06-29 20:59:23.000000000 
+0200
+++ new/vobject-0.9.6.1/vobject.egg-info/pbr.json       2018-07-18 
18:02:11.000000000 +0200
@@ -1 +1 @@
-{"is_release": false, "git_version": "bffb99c"}
\ No newline at end of file
+{"is_release": false, "git_version": "ab1d7fd"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vobject-0.9.5/vobject.egg-info/requires.txt 
new/vobject-0.9.6.1/vobject.egg-info/requires.txt
--- old/vobject-0.9.5/vobject.egg-info/requires.txt     2017-06-29 
20:59:22.000000000 +0200
+++ new/vobject-0.9.6.1/vobject.egg-info/requires.txt   2018-07-18 
18:02:11.000000000 +0200
@@ -1 +1 @@
-python-dateutil >= 2.4.0
+python-dateutil>=2.4.0


Reply via email to