Skip to content

Commit

Permalink
Drop six as a requirement; add six_shim.py (#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
willkg committed Oct 28, 2024
1 parent 6a2ec5c commit 5a47907
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 19 additions & 0 deletions bleach/six_shim.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
Replacement module for what html5lib uses six for.
"""

import http.client
import operator
import urllib


PY3 = True
binary_type = bytes
string_types = (str,)
text_type = str
unichr = chr
viewkeys = operator.methodcaller("keys")

http_client = http.client
urllib = urllib
urllib_parse = urllib.parse
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def get_version():

INSTALL_REQUIRES = [
# html5lib requirements
"six>=1.9.0",
"webencodings",
]

Expand Down

0 comments on commit 5a47907

Please sign in to comment.