Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error with Python 3.10 #28631

Closed
faulesocke opened this issue Nov 26, 2021 · 3 comments · Fixed by #28649
Closed

Build error with Python 3.10 #28631

faulesocke opened this issue Nov 26, 2021 · 3 comments · Fixed by #28649
Labels
A-mach L-python Python is required

Comments

@faulesocke
Copy link

% ./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.

@jdm jdm added the L-python Python is required label Nov 26, 2021
@nobodywasishere
Copy link

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.

@jdm
Copy link
Member

jdm commented Dec 21, 2021

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.

bors-servo added a commit that referenced this issue Dec 21, 2021
Vendor mach-1.0.0.

This will allow us to fork the package and make the changes necessary to solve #28631.
@jdm
Copy link
Member

jdm commented Dec 21, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mach L-python Python is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants