diff -rU 3 a/vobject/base.py b/vobject/base.py --- a/vobject/base.py 2024-12-16 08:15:20.000000000 +0100 +++ b/vobject/base.py 2025-05-08 10:54:19.517509757 +0200 @@ -6,7 +6,7 @@ import codecs import logging import re -import six +import io import sys # Package version @@ -858,7 +858,7 @@ 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 @@ 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 diff -rU 3 a/vobject/hcalendar.py b/vobject/hcalendar.py --- a/vobject/hcalendar.py 2024-10-01 16:46:45.000000000 +0200 +++ b/vobject/hcalendar.py 2025-05-08 10:55:12.047890349 +0200 @@ -28,7 +28,7 @@ """ -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 diff -rU 3 a/vobject/icalendar.py b/vobject/icalendar.py --- a/vobject/icalendar.py 2024-12-16 08:09:54.000000000 +0100 +++ b/vobject/icalendar.py 2025-05-08 10:57:12.542858557 +0200 @@ -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: