Skip to content

Build error with Python 3.10 #28631

Closed

Description

@faulesocke
% ./mach bootstrap
Dependencies were already installed!
% ./mach build
Traceback (most recent call last):
  File "/home/socke/projects/servo/./mach", line 47, in <module>
    main(sys.argv)
  File "/home/socke/projects/servo/./mach", line 29, in main
    mach = mach_bootstrap.bootstrap(topdir)
  File "/home/socke/projects/servo/python/mach_bootstrap.py", line 306, in bootstrap
    import mach.main
  File "/home/socke/projects/servo/python/_virtualenv3.10/lib/python3.10/site-packages/mach/main.py", line 19, in <module>
    from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

OS: Void Linux x64 glibc

mach bootstrap successfully installed dependencies on the first run. Building does not work however, as you can see above.

Further down the line I also get an error deep inside mozjs_sys also related to Python 3.10: collections.Sequence was moved to collections.abc.Sequence in 3.10. This error occurred to me when I tried embedding servo into another project but I guess it will also occur after the above error is fixed.

Activity

  1. added
    L-python
    on Nov 26, 2021
  2. nobodywasishere commented on Dec 18, 2021

    @nobodywasishere

    This seems like a problem with the upstream package mach, which hasn't been updated with the latest version of mach in the Firefox source code, which (after a quick look) has fixes for these issues.

  3. jdm commented on Dec 21, 2021

    @jdm
    Member

    I asked whether the Firefox build developers could publish a new version, but they recommend vendoring the current package and cherry-picking/fixing whatever is blocking us. That's the path I intend to follow.

  4. added a commit that references this issue on Dec 21, 2021
  5. jdm commented on Dec 21, 2021

    @jdm
    Member

    Once #28648 merges, we'll be able to apply any fixes necessary to support new python versions inside python/mach/mach.

  6. added a commit that references this issue on Dec 22, 2021
    10fa308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-machL-python

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions