1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,7 @@
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 "
--- a/vobject/base.py
+++ b/vobject/base.py
@@ -6,7 +6,7 @@
import codecs
import logging
import re
-import six
+import io
import sys
# Package version
@@ -881,7 +881,7 @@
else:
quotedPrintable = False
- newbuffer = six.StringIO
+ newbuffer = io.StringIO
logicalLine = newbuffer()
lineNumber = 0
lineStartNumber = 0
@@ -996,7 +996,7 @@
"""
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 @@
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 @@
Generate one Component at a time from a stream.
"""
if isinstance(streamOrString, basestring):
- stream = six.StringIO(streamOrString)
+ stream = io.StringIO(streamOrString)
else:
stream = streamOrString
--- a/vobject/hcalendar.py
+++ b/vobject/hcalendar.py
@@ -28,7 +28,7 @@
</span>
"""
-import six
+import io
from datetime import date, datetime, timedelta
@@ -45,7 +45,7 @@
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
--- a/vobject/icalendar.py
+++ b/vobject/icalendar.py
@@ -10,7 +10,7 @@
import base64
from dateutil import rrule, tz
-import six
+import io
try:
import pytz
@@ -56,7 +56,7 @@
"""
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 @@
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 @@
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 @@
transformed = obj
undoTransform = False
out = None
- outbuf = buf or six.StringIO()
+ outbuf = buf or io.StringIO()
if obj.group is None:
groupString = ''
else:
|