From 5bc22b21a34879efed5feeee05f55199632c8ec6 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 2 Mar 2022 21:46:04 +0530 Subject: cerbero: Unpack asyncio queue args as dict, not as list Otherwise we will only pass `'loop'` as a positional argument, instead of passing `loop=` as the keyword argument. This broke in d8afc8b5ee5d08144fb314a247a238f07abab2a4. Part-of: --- cerbero/build/oven.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cerbero/build/oven.py b/cerbero/build/oven.py index 99046630..0d29cfa4 100644 --- a/cerbero/build/oven.py +++ b/cerbero/build/oven.py @@ -322,7 +322,7 @@ class Oven (object): # https://docs.python.org/3/whatsnew/3.10.html#whatsnew310-removed if sys.version_info < (3, 7, 0): asyncio_queue_args = {'loop': asyncio.get_event_loop()} - default_queue = asyncio.PriorityQueue(*asyncio_queue_args) + default_queue = asyncio.PriorityQueue(**asyncio_queue_args) queues = {step : default_queue for step in all_steps} # find the install steps for ensuring consistency between all of them @@ -335,21 +335,21 @@ class Oven (object): # allocate jobs job_allocation = collections.defaultdict(lambda : 0) if self.jobs > 4: - queues[BuildSteps.COMPILE[1]] = asyncio.PriorityQueue(*asyncio_queue_args) + queues[BuildSteps.COMPILE[1]] = asyncio.PriorityQueue(**asyncio_queue_args) job_allocation[BuildSteps.COMPILE[1]] = 2 if self.jobs > 5: job_allocation[BuildSteps.COMPILE[1]] = 3 if self.jobs > 7: - install_queue = asyncio.PriorityQueue(*asyncio_queue_args) + install_queue = asyncio.PriorityQueue(**asyncio_queue_args) for step in install_steps: queues[step] = install_queue job_allocation[BuildSteps.INSTALL[1]] = 1 if self.jobs > 8: job_allocation[BuildSteps.EXTRACT[1]] = 1 - queues[BuildSteps.EXTRACT[1]] = asyncio.PriorityQueue(*asyncio_queue_args) + queues[BuildSteps.EXTRACT[1]] = asyncio.PriorityQueue(**asyncio_queue_args) if self.jobs > 9: job_allocation[BuildSteps.FETCH[1]] = 1 - queues[BuildSteps.FETCH[1]] = asyncio.PriorityQueue(*asyncio_queue_args) + queues[BuildSteps.FETCH[1]] = asyncio.PriorityQueue(**asyncio_queue_args) # async locks used to synchronize step execution locks = collections.defaultdict(lambda : None) -- cgit v1.2.3