Restore support for Python 2.6
This commit is contained in:
parent
eb0324cb68
commit
e622312a79
2 changed files with 5 additions and 1 deletions
|
|
@ -7,6 +7,10 @@ try:
|
||||||
from urlparse import urlparse as parse_url
|
from urlparse import urlparse as parse_url
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from urllib.parse import urlparse as parse_url
|
from urllib.parse import urlparse as parse_url
|
||||||
|
try:
|
||||||
|
memoryview = memoryview
|
||||||
|
except NameError:
|
||||||
|
memoryview = buffer
|
||||||
|
|
||||||
|
|
||||||
def get_character(x, index):
|
def get_character(x, index):
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from .exceptions import ConnectionError, TimeoutError
|
||||||
from .parsers import (
|
from .parsers import (
|
||||||
encode_engineIO_content, decode_engineIO_content,
|
encode_engineIO_content, decode_engineIO_content,
|
||||||
format_packet_text, parse_packet_text)
|
format_packet_text, parse_packet_text)
|
||||||
from .symmetries import format_query, parse_url
|
from .symmetries import format_query, memoryview, parse_url
|
||||||
|
|
||||||
|
|
||||||
if not hasattr(websocket, 'create_connection'):
|
if not hasattr(websocket, 'create_connection'):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue