Skip to content

cerbero: fix exception with Python 3.10

Andoni Morales Alastruey requested to merge ylatuya/cerbero:fix-3_10 into main

I ran into this exception with python 3.10:

➜  cerbero git:(master) ✗ ./cerbero-uninstalled bootstrap
Loading default configuration from /Users/andoni/.cerbero/cerbero.cbc
Build tools install prefix will be /Users/andoni/git/cerbero/build/build-tools
Install prefix will be /Users/andoni/git/cerbero/build/dist/darwin_arm64
File /Users/andoni/.cache/cerbero-sources/cpanm already downloaded.
Installing XML::Parser, may require a password for running 'sudo /Users/andoni/.cache/cerbero-sources/cpanm XML::Parser'
Password:
Sorry, try again.
Password:
XML::Parser is up to date. (2.46)
WARNING: detected setuptools >= 49.0.0, installing fallback site.py file. See https://github.com/pypa/setuptools/issues/2295
Building the following recipes: m4 autoconf gettext-m4 automake libtool pkg-config ninja meson orc-tool intltool sed gperf bison flex moltenvk-tools nasm
Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File "/Users/andoni/git/cerbero/cerbero/main.py", line 183, in main
    Main(sys.argv[1:])
  File "/Users/andoni/git/cerbero/cerbero/main.py", line 53, in __init__
    self.run_command()
  File "/Users/andoni/git/cerbero/cerbero/main.py", line 152, in run_command
    res = commands.run(command, self.config, self.args)
  File "/Users/andoni/git/cerbero/cerbero/commands/__init__.py", line 78, in run
    return _commands[command].run(config, args)
  File "/Users/andoni/git/cerbero/cerbero/commands/bootstrap.py", line 79, in run
    bootstrapper.start(jobs=args.jobs)
  File "/Users/andoni/git/cerbero/cerbero/bootstrap/build_tools.py", line 131, in start
    oven.start_cooking()
  File "/Users/andoni/git/cerbero/cerbero/build/oven.py", line 157, in start_cooking
    run_until_complete(self._cook_recipes(ordered_recipes))
  File "/Users/andoni/git/cerbero/cerbero/utils/__init__.py", line 684, in run_until_complete
    result = loop.run_until_complete(tasks)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/Users/andoni/git/cerbero/cerbero/build/oven.py", line 376, in _cook_recipes
    queues[BuildSteps.COMPILE[1]] = asyncio.PriorityQueue(loop=loop)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/queues.py", line 34, in __init__
    super().__init__(loop=loop)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/mixins.py", line 17, in __init__
    raise TypeError(
TypeError: As of 3.10, the *loop* parameter was removed from PriorityQueue() since it is no longer necessary

cc: @nirbheek

Merge request reports

Loading