Skip to content

Commit 25866f7

Browse files
committed
Removing the queue as its deprecated for 3.10
1 parent 8dec501 commit 25866f7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

azure_functions_worker/testutils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,15 +444,14 @@ class _WorkerResponseMessages(typing.NamedTuple):
444444
class _MockWebHost:
445445

446446
def __init__(self, loop, scripts_dir):
447-
self._loop = loop
448447
self._scripts_dir = scripts_dir
449448

450449
self._available_functions = {}
451450
self._read_available_functions()
452451

453452
self._connected_fut = loop.create_future()
454-
self._in_queue = queue.Queue()
455-
self._out_aqueue = asyncio.Queue(loop=self._loop)
453+
self._in_queue: queue.Queue = queue.Queue()
454+
self._out_aqueue: asyncio.Queue = asyncio.Queue()
456455
self._threadpool = concurrent.futures.ThreadPoolExecutor(max_workers=1)
457456
self._server = grpc.server(self._threadpool)
458457
self._servicer = _MockWebHostServicer(self)
@@ -894,7 +893,8 @@ def start_webhost(*, script_dir=None, stdout=None):
894893
time.sleep(2)
895894
break
896895
else:
897-
print(f'Failed to ping {health_check_endpoint}', flush=True)
896+
print(f'Failed to ping {health_check_endpoint} Please check the'
897+
f' log file for details: {stdout.name}', flush=True)
898898
except requests.exceptions.ConnectionError:
899899
pass
900900
time.sleep(2)

tests/unittests/test_utilities.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,16 +314,16 @@ def parse_int_no_raise(value: str):
314314

315315
def test_is_python_version(self):
316316
# Should pass at least 1 test
317-
is_python_version_36 = common.is_python_version('3.6')
318317
is_python_version_37 = common.is_python_version('3.7')
319318
is_python_version_38 = common.is_python_version('3.8')
320319
is_python_version_39 = common.is_python_version('3.9')
320+
is_python_version_310 = common.is_python_version('3.10')
321321

322322
self.assertTrue(any([
323-
is_python_version_36,
324323
is_python_version_37,
325324
is_python_version_38,
326-
is_python_version_39
325+
is_python_version_39,
326+
is_python_version_310
327327
]))
328328

329329
def test_get_sdk_from_sys_path(self):

0 commit comments

Comments
 (0)