summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2022-03-02 21:46:04 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2022-03-02 21:46:04 +0530
commit5bc22b21a34879efed5feeee05f55199632c8ec6 (patch)
treeb4b216768030395cf14f9bbed27b1f61b48977b9
parentcb0f93f4666fe0405a797f83b6a8aad278d4abf4 (diff)
cerbero: Unpack asyncio queue args as dict, not as list1.18
Otherwise we will only pass `'loop'` as a positional argument, instead of passing `loop=<value>` as the keyword argument. This broke in d8afc8b5ee5d08144fb314a247a238f07abab2a4. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/822>
-rw-r--r--cerbero/build/oven.py10
1 files 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)