Various python errors with python 3.10
Categories
(Firefox Build System :: Task Configuration, defect)
Tracking
(firefox91 fixed)
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Lots of errors like:
AttributeError: module 'collections' has no attribute 'Mapping'
File "/home/emilio/src/moz/gecko-2/python/mozbuild/mozbuild/artifact_commands.py", line 390, in artifact_toolchain
tasks = toolchain_task_definitions()
File "/home/emilio/src/moz/gecko-2/python/mozbuild/mozbuild/toolchains.py", line 11, in toolchain_task_definitions
from taskgraph.generator import load_tasks_for_kind
File "/home/emilio/src/moz/gecko-2/taskcluster/taskgraph/generator.py", line 13, in <module>
from . import filter_tasks
File "/home/emilio/src/moz/gecko-2/taskcluster/taskgraph/filter_tasks.py", line 9, in <module>
from . import target_tasks
File "/home/emilio/src/moz/gecko-2/taskcluster/taskgraph/target_tasks.py", line 16, in <module>
from taskgraph.parameters import Parameters
File "/home/emilio/src/moz/gecko-2/taskcluster/taskgraph/parameters.py", line 17, in <module>
from taskgraph.util.schema import validate_schema
File "/home/emilio/src/moz/gecko-2/taskcluster/taskgraph/util/schema.py", line 238, in <module>
{voluptuous.Required("task-reference"): text_type},
File "/home/emilio/src/moz/gecko-2/third_party/python/voluptuous/voluptuous/schema_builder.py", line 1145, in __init__
super(Required, self).__init__(schema, msg=msg,
File "/home/emilio/src/moz/gecko-2/third_party/python/voluptuous/voluptuous/schema_builder.py", line 978, in __init__
self._schema = Schema(schema_)
File "/home/emilio/src/moz/gecko-2/third_party/python/voluptuous/voluptuous/schema_builder.py", line 202, in __init__
self._compiled = self._compile(schema)
File "/home/emilio/src/moz/gecko-2/third_party/python/voluptuous/voluptuous/schema_builder.py", line 283, in _compile
if isinstance(schema, collections.Mapping):
Since those live now in collections.abc
rather than collections
.
Assignee | ||
Comment 1•3 years ago
|
||
These are enough for me to run bootstrap+configure+build.
Some touch third-party code, not sure what the right way to deal with
that is though.
Comment 2•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox Build System::Task Configuration' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Assignee | ||
Comment 3•3 years ago
|
||
Depends on D119080
Comment 5•3 years ago
|
||
Backed out for causing build bustages
Backout link: https://hg.mozilla.org/integration/autoland/rev/61ce4881f734b578d99385f32a9d6df73582f4b0
Assignee | ||
Comment 6•3 years ago
|
||
Hmm, it seems we build some stuff with versions of python < 3.3, is that expected? If so, should I just do the version check a la https://hg.mozilla.org/integration/autoland/rev/8e4b00b9d57c#l11.12? Seems quite unfortunate / ugly...
Comment 7•3 years ago
|
||
The error says python3.7. The problem is you don't get collections.abc
unless you import it.
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import collections
>>> collections.abc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/collections/__init__.py", line 55, in __getattr__
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
AttributeError: module 'collections' has no attribute 'abc'
>>> import collections.abc
>>> collections.abc
<module 'collections.abc' from '/usr/lib/python3.7/collections/abc.py'>
Assignee | ||
Comment 8•3 years ago
|
||
Hmmwat, ok, will fix, thanks so much Mike :)
Assignee | ||
Updated•3 years ago
|
Comment 10•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2418633d529c
https://hg.mozilla.org/mozilla-central/rev/c3b650ea51c9
Comment 11•3 years ago
|
||
Comment 12•3 years ago
|
||
Comment 13•3 years ago
|
||
bugherder |
Description
•