Browse Source

Drop support for Python 3.4

pull/1297/head
Hugo van Kemenade 1 year ago
parent
commit
a852890f81
  1. 12
      src/socketio/tornado.py
  2. 2
      tests/async/test_client.py
  3. 2
      tests/async/test_manager.py
  4. 2
      tests/async/test_pubsub_manager.py
  5. 2
      tests/async/test_server.py

12
src/socketio/tornado.py

@ -1,10 +1,8 @@
import sys
if sys.version_info >= (3, 5):
try:
from engineio.async_drivers.tornado import get_tornado_handler as \
get_engineio_handler
except ImportError: # pragma: no cover
get_engineio_handler = None
try:
from engineio.async_drivers.tornado import get_tornado_handler as \
get_engineio_handler
except ImportError: # pragma: no cover
get_engineio_handler = None
def get_tornado_handler(socketio_server): # pragma: no cover

2
tests/async/test_client.py

@ -1,5 +1,4 @@
import asyncio
import sys
import unittest
from unittest import mock
@ -13,7 +12,6 @@ from socketio import packet
from .helpers import AsyncMock, _run
@unittest.skipIf(sys.version_info < (3, 5), 'only for Python 3.5+')
class TestAsyncClient(unittest.TestCase):
def test_is_asyncio_based(self):
c = async_client.AsyncClient()

2
tests/async/test_manager.py

@ -1,4 +1,3 @@
import sys
import unittest
from unittest import mock
@ -7,7 +6,6 @@ from socketio import packet
from .helpers import AsyncMock, _run
@unittest.skipIf(sys.version_info < (3, 5), 'only for Python 3.5+')
class TestAsyncManager(unittest.TestCase):
def setUp(self):
id = 0

2
tests/async/test_pubsub_manager.py

@ -1,6 +1,5 @@
import asyncio
import functools
import sys
import unittest
from unittest import mock
@ -12,7 +11,6 @@ from socketio import packet
from .helpers import AsyncMock, _run
@unittest.skipIf(sys.version_info < (3, 5), 'only for Python 3.5+')
class TestAsyncPubSubManager(unittest.TestCase):
def setUp(self):
id = 0

2
tests/async/test_server.py

@ -1,6 +1,5 @@
import asyncio
import logging
import sys
import unittest
from unittest import mock
@ -16,7 +15,6 @@ from socketio import packet
from .helpers import AsyncMock, _run
@unittest.skipIf(sys.version_info < (3, 5), 'only for Python 3.5+')
@mock.patch('socketio.server.engineio.AsyncServer', **{
'return_value.generate_id.side_effect': [str(i) for i in range(1, 10)],
'return_value.send_packet': AsyncMock()})

Loading…
Cancel
Save