OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vobject?expand=0&rev=22
143 lines
4.7 KiB
Diff
143 lines
4.7 KiB
Diff
Index: vobject-0.9.9/vobject/base.py
|
|
===================================================================
|
|
--- vobject-0.9.9.orig/vobject/base.py
|
|
+++ vobject-0.9.9/vobject/base.py
|
|
@@ -6,7 +6,7 @@ import copy
|
|
import codecs
|
|
import logging
|
|
import re
|
|
-import six
|
|
+import io
|
|
import sys
|
|
|
|
# Package version
|
|
@@ -858,7 +858,7 @@ def getLogicalLines(fp, allowQP=True):
|
|
Quoted-printable data will be decoded in the Behavior decoding phase.
|
|
|
|
# We're leaving this test in for awhile, because the unittest was ugly and dumb.
|
|
- >>> from six import StringIO
|
|
+ >>> from io import StringIO
|
|
>>> f=StringIO(testLines)
|
|
>>> for n, l in enumerate(getLogicalLines(f)):
|
|
... print("Line %s: %s" % (n, l[0]))
|
|
@@ -881,7 +881,7 @@ def getLogicalLines(fp, allowQP=True):
|
|
|
|
else:
|
|
quotedPrintable = False
|
|
- newbuffer = six.StringIO
|
|
+ newbuffer = io.StringIO
|
|
logicalLine = newbuffer()
|
|
lineNumber = 0
|
|
lineStartNumber = 0
|
|
@@ -996,7 +996,7 @@ def defaultSerialize(obj, buf, lineLengt
|
|
"""
|
|
Encode and fold obj and its children, write to buf or return a string.
|
|
"""
|
|
- outbuf = buf or six.StringIO()
|
|
+ outbuf = buf or io.StringIO()
|
|
|
|
if isinstance(obj, Component):
|
|
if obj.group is None:
|
|
@@ -1018,7 +1018,7 @@ def defaultSerialize(obj, buf, lineLengt
|
|
if obj.behavior and not startedEncoded:
|
|
obj.behavior.encode(obj)
|
|
|
|
- s = six.StringIO()
|
|
+ s = io.StringIO()
|
|
|
|
if obj.group is not None:
|
|
s.write(obj.group + '.')
|
|
@@ -1082,7 +1082,7 @@ def readComponents(streamOrString, valid
|
|
Generate one Component at a time from a stream.
|
|
"""
|
|
if isinstance(streamOrString, basestring):
|
|
- stream = six.StringIO(streamOrString)
|
|
+ stream = io.StringIO(streamOrString)
|
|
else:
|
|
stream = streamOrString
|
|
|
|
Index: vobject-0.9.9/vobject/hcalendar.py
|
|
===================================================================
|
|
--- vobject-0.9.9.orig/vobject/hcalendar.py
|
|
+++ vobject-0.9.9/vobject/hcalendar.py
|
|
@@ -28,7 +28,7 @@ and an equivalent event in hCalendar for
|
|
</span>
|
|
"""
|
|
|
|
-import six
|
|
+import io
|
|
|
|
from datetime import date, datetime, timedelta
|
|
|
|
@@ -45,7 +45,7 @@ class HCalendar(VCalendar2_0):
|
|
Serialize iCalendar to HTML using the hCalendar microformat (http://microformats.org/wiki/hcalendar)
|
|
"""
|
|
|
|
- outbuf = buf or six.StringIO()
|
|
+ outbuf = buf or io.StringIO()
|
|
level = 0 # holds current indentation level
|
|
tabwidth = 3
|
|
|
|
Index: vobject-0.9.9/vobject/icalendar.py
|
|
===================================================================
|
|
--- vobject-0.9.9.orig/vobject/icalendar.py
|
|
+++ vobject-0.9.9/vobject/icalendar.py
|
|
@@ -10,7 +10,7 @@ import string
|
|
import base64
|
|
|
|
from dateutil import rrule, tz
|
|
-import six
|
|
+import io
|
|
|
|
try:
|
|
import pytz
|
|
@@ -56,7 +56,7 @@ def toUnicode(s):
|
|
"""
|
|
Take a string or unicode, turn it into unicode, decoding as utf-8
|
|
"""
|
|
- if isinstance(s, six.binary_type):
|
|
+ if isinstance(s, bytes):
|
|
s = s.decode('utf-8')
|
|
return s
|
|
|
|
@@ -135,7 +135,7 @@ class TimezoneComponent(Component):
|
|
good_lines = ('rdate', 'rrule', 'dtstart', 'tzname', 'tzoffsetfrom',
|
|
'tzoffsetto', 'tzid')
|
|
# serialize encodes as utf-8, cStringIO will leave utf-8 alone
|
|
- buffer = six.StringIO()
|
|
+ buffer = io.StringIO()
|
|
# allow empty VTIMEZONEs
|
|
if len(self.contents) == 0:
|
|
return None
|
|
@@ -569,7 +569,7 @@ class RecurringComponent(Component):
|
|
self.add(name).value = setlist
|
|
elif name in RULENAMES:
|
|
for rule in setlist:
|
|
- buf = six.StringIO()
|
|
+ buf = io.StringIO()
|
|
buf.write('FREQ=')
|
|
buf.write(FREQUENCIES[rule._freq])
|
|
|
|
@@ -1010,7 +1010,7 @@ class VCalendar2_0(VCalendarComponentBeh
|
|
transformed = obj
|
|
undoTransform = False
|
|
out = None
|
|
- outbuf = buf or six.StringIO()
|
|
+ outbuf = buf or io.StringIO()
|
|
if obj.group is None:
|
|
groupString = ''
|
|
else:
|
|
Index: vobject-0.9.9/setup.py
|
|
===================================================================
|
|
--- vobject-0.9.9.orig/setup.py
|
|
+++ vobject-0.9.9/setup.py
|
|
@@ -49,7 +49,7 @@ setup(name = "vobject",
|
|
include_package_data = True,
|
|
install_requires=["python-dateutil >= 2.5.0; python_version < '3.10'",
|
|
"python-dateutil >= 2.7.0; python_version >= '3.10'",
|
|
- "pytz", 'six'],
|
|
+ "pytz"],
|
|
platforms = ["any"],
|
|
packages = find_packages(),
|
|
description = "A full-featured Python package for parsing and creating "
|