Remove Python 2 specific imports

This commit is contained in:
Mads Marquart
2019-08-28 21:37:16 +02:00
parent 6fb6e707ba
commit 75378bb709
2 changed files with 1 additions and 21 deletions

View File

@@ -15,11 +15,6 @@ from ._state import State
import time
import json
try:
from urllib.parse import urlparse, parse_qs
except ImportError:
from urlparse import urlparse, parse_qs
ACONTEXT = {
"action_history": [

View File

@@ -8,6 +8,7 @@ from random import random
from contextlib import contextmanager
from mimetypes import guess_type
from os.path import basename
from urllib.parse import parse_qs, urlparse
import warnings
import logging
import requests
@@ -19,22 +20,6 @@ from ._exception import (
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 = logging.getLogger("client")
log.setLevel(logging.DEBUG)