refactor compatibility, learned from requests

This commit is contained in:
debugtalk
2018-03-25 21:15:43 +08:00
parent 1c44ae764b
commit 261169b70e
12 changed files with 80 additions and 38 deletions

View File

@@ -7,12 +7,8 @@ import string
import time
try:
string_type = basestring
PYTHON_VERSION = 2
import urllib
except NameError:
string_type = str
PYTHON_VERSION = 3
import urllib.parse as urllib
SECRET_KEY = "DebugTalk"