Remove Python 2 specific imports
This commit is contained in:
@@ -15,11 +15,6 @@ from ._state import State
|
|||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
|
|
||||||
try:
|
|
||||||
from urllib.parse import urlparse, parse_qs
|
|
||||||
except ImportError:
|
|
||||||
from urlparse import urlparse, parse_qs
|
|
||||||
|
|
||||||
|
|
||||||
ACONTEXT = {
|
ACONTEXT = {
|
||||||
"action_history": [
|
"action_history": [
|
||||||
|
@@ -8,6 +8,7 @@ from random import random
|
|||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from mimetypes import guess_type
|
from mimetypes import guess_type
|
||||||
from os.path import basename
|
from os.path import basename
|
||||||
|
from urllib.parse import parse_qs, urlparse
|
||||||
import warnings
|
import warnings
|
||||||
import logging
|
import logging
|
||||||
import requests
|
import requests
|
||||||
@@ -19,22 +20,6 @@ from ._exception import (
|
|||||||
FBchatPleaseRefresh,
|
FBchatPleaseRefresh,
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
|
||||||
from urllib.parse import urlencode, parse_qs, urlparse
|
|
||||||
|
|
||||||
basestring = (str, bytes)
|
|
||||||
except ImportError:
|
|
||||||
from urllib import urlencode
|
|
||||||
from urlparse import parse_qs, urlparse
|
|
||||||
|
|
||||||
basestring = basestring
|
|
||||||
|
|
||||||
# Python 2's `input` executes the input, whereas `raw_input` just returns the input
|
|
||||||
try:
|
|
||||||
input = raw_input
|
|
||||||
except NameError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
# Log settings
|
# Log settings
|
||||||
log = logging.getLogger("client")
|
log = logging.getLogger("client")
|
||||||
log.setLevel(logging.DEBUG)
|
log.setLevel(logging.DEBUG)
|
||||||
|
Reference in New Issue
Block a user