Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 790353 - net-libs/nodejs-16.1.0 ImportError: cannot import name 'Mapping' from 'collections'
Summary: net-libs/nodejs-16.1.0 ImportError: cannot import name 'Mapping' from 'collec...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-15 12:34 UTC by Alessandro Barbieri
Modified: 2021-05-16 20:54 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge_info (emerge_info,42.19 KB, text/plain)
2021-05-15 12:34 UTC, Alessandro Barbieri
Details
nodejs-16.1.0:20210515-054858.log (nodejs-16.1.0:20210515-054858.log,99.64 KB, text/plain)
2021-05-15 12:34 UTC, Alessandro Barbieri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Barbieri 2021-05-15 12:34:02 UTC
This package fails to compile on an unstable system. Attached relevant logs and emerge --info
Comment 1 Alessandro Barbieri 2021-05-15 12:34:15 UTC
Created attachment 708759 [details]
emerge_info

emerge --info
Comment 2 Alessandro Barbieri 2021-05-15 12:34:17 UTC
Created attachment 708762 [details]
nodejs-16.1.0:20210515-054858.log

build log
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-15 12:43:06 UTC
Traceback (most recent call last):
  File "/var/tmp/portage/net-libs/nodejs-16.1.0/work/node-v16.1.0/tools/inspector_protocol/code_generator.py", line 690, in <module>
    main()
  File "/var/tmp/portage/net-libs/nodejs-16.1.0/work/node-v16.1.0/tools/inspector_protocol/code_generator.py", line 574, in main
    jinja_env = initialize_jinja_env(jinja_dir, config.protocol.output, config)
  File "/var/tmp/portage/net-libs/nodejs-16.1.0/work/node-v16.1.0/tools/inspector_protocol/code_generator.py", line 177, in initialize_jinja_env
    import jinja2
  File "/var/tmp/portage/net-libs/nodejs-16.1.0/work/node-v16.1.0/tools/inspector_protocol/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/var/tmp/portage/net-libs/nodejs-16.1.0/work/node-v16.1.0/tools/inspector_protocol/jinja2/environment.py", line 16, in <module>
    from jinja2.defaults import BLOCK_START_STRING, \
  File "/var/tmp/portage/net-libs/nodejs-16.1.0/work/node-v16.1.0/tools/inspector_protocol/jinja2/defaults.py", line 32, in <module>
    from jinja2.tests import TESTS as DEFAULT_TESTS
  File "/var/tmp/portage/net-libs/nodejs-16.1.0/work/node-v16.1.0/tools/inspector_protocol/jinja2/tests.py", line 13, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
tools/v8_gypfiles/torque_base.target.mk:134: *** [2b82adf29aee78e01d4abb733e3a16d878d9763a.intermediate] error 1

Please mention what changes you’re making to ease triage and debugging.
Comment 4 Alessandro Barbieri 2021-05-15 13:07:48 UTC
I've just upgrading the system. What changed is GCC11, USE="-lto" and now some packages are pulling in python3.10
Comment 5 Ionen Wolkens gentoo-dev 2021-05-15 15:43:33 UTC
selected bare python3.10 (nothing else built for 3_10) is fine here for the most parts, but not with USE=inspector
Comment 6 Stephan Hartmann (RETIRED) gentoo-dev 2021-05-15 16:24:24 UTC
Looks like a jinja problem and jinja wasn't updated for a long time in nodejs. This commit could fix it (untested):
https://github.com/pallets/jinja/commit/0f5f2010bb10bb10a7f8ac93d0ba68294f07c413
Comment 7 Marek Szuba archtester gentoo-dev 2021-05-16 20:54:38 UTC
My bad, my patch was not complete and I did not notice it because I forgot to test the USE=inspector case. Should be fine since commit 395a79e92252013dc32270969a3338e1d191b962, though.