Skip to content

Commit cf53a47

Browse files
committed
Drop six as a requirement; add six_shim.py (#618)
1 parent 6a2ec5c commit cf53a47

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

bleach/six_shim.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""
2+
Replacement module for what html5lib uses six for.
3+
"""
4+
5+
import http.client
6+
import operator
7+
import urllib
8+
9+
10+
PY3 = True
11+
binary_type = bytes
12+
string_types = (str,)
13+
text_type = str
14+
unichr = chr
15+
viewkeys = operator.methodcaller("keys")
16+
17+
http_client = http.client
18+
urllib = urllib
19+
urllib_parse = urllib.parse

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def get_version():
2525

2626
INSTALL_REQUIRES = [
2727
# html5lib requirements
28-
"six>=1.9.0",
2928
"webencodings",
3029
]
3130

0 commit comments

Comments
 (0)