You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 2 went EOL on 1/1/2020 and we receive no more support from the
Python Core Team after Python 2.7.18 even for known security issues.
This removes the six package from dependencies.
assertPY3## Still using python2? Write an issue on the github issue tracker, and I will consider to offer some limited python2-support for the 1.x-series of caldav - otherwise I will start cleaning away code for supporting python2 in the 1.1-release
5
-
6
-
7
-
defisPython3():
8
-
"""Deprecated. Use six.PY3"""
9
-
returnPY3
10
-
11
-
12
1
defto_wire(text):
13
2
iftextisNone:
14
3
returnNone
15
-
ifisinstance(text, string_types) andPY3:
4
+
ifisinstance(text, str):
16
5
text=bytes(text, "utf-8")
17
-
elifnotPY3:
18
-
text=to_unicode(text).encode("utf-8")
19
6
text=text.replace(b"\n", b"\r\n")
20
7
text=text.replace(b"\r\r\n", b"\r\n")
21
8
returntext
@@ -24,7 +11,7 @@ def to_wire(text):
24
11
defto_local(text):
25
12
iftextisNone:
26
13
returnNone
27
-
ifnotisinstance(text, string_types):
14
+
ifnotisinstance(text, str):
28
15
text=text.decode("utf-8")
29
16
text=text.replace("\r\n", "\n")
30
17
returntext
@@ -35,28 +22,17 @@ def to_local(text):
35
22
36
23
defto_normal_str(text):
37
24
"""
38
-
A str object is a unicode on python3 and a byte string on python2.
39
-
Make sure we return a normal string, no matter what version of
0 commit comments