This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Travis Lazar
Recipients Travis Lazar
Date 2019-11-08.01:30:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1573176655.79.0.0781577229762.issue38739@roundup.psfhosted.org>
In-reply-to
Content
When running pyperformance html5lib test, the application crashes with "ImportError: cannot import name 'Mapping' from 'collections' (/py3buildpath/lib/python3.9/collections/__init__.py)"

To reproduce:

1 - Build Python from source. I produced with git commit befa032d8869e0fab4732d910f3887642879d644 from cpython GitHub.

2 - Run pyperformance with: /py3buildpath/bin/pyperformance run --python=/py3buildpath/bin/python3 --venv venvpath -b html5lib -o output.json

3 - Immediate crash is seen with message:

#!/bin/sh
  File "/usr/local/src/pyperf-tot-no-venv/lib/python3.9/site-packages/html5lib/_tokenizer.py", line 16, in <module>
    from ._trie import Trie
  File "/usr/local/src/pyperf-tot-no-venv/lib/python3.9/site-packages/html5lib/_trie/__init__.py", line 3, in <module>
    from .py import Trie as PyTrie
  File "/usr/local/src/pyperf-tot-no-venv/lib/python3.9/site-packages/html5lib/_trie/py.py", line 6, in <module>
    from ._base import Trie as ABCTrie
  File "/usr/local/src/pyperf-tot-no-venv/lib/python3.9/site-packages/html5lib/_trie/_base.py", line 3, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/root/py3-tot-no/lib/python3.9/collections/__init__.py)
ERROR: Benchmark html5lib failed: Benchmark died
Traceback (most recent call last):
  File "/usr/local/src/pyperf-tot-no-venv/lib/python3.9/site-packages/pyperformance/run.py", line 132, in run_benchmarks
    bench = func(cmd_prefix, options)
  File "/usr/local/src/pyperf-tot-no-venv/lib/python3.9/site-packages/pyperformance/benchmarks/__init__.py", line 244, in BM_html5lib
    return run_perf_script(python, options, "html5lib")
  File "/usr/local/src/pyperf-tot-no-venv/lib/python3.9/site-packages/pyperformance/run.py", line 98, in run_perf_script
    run_command(cmd, hide_stderr=not options.verbose)
  File "/usr/local/src/pyperf-tot-no-venv/lib/python3.9/site-packages/pyperformance/run.py", line 66, in run_command
    raise RuntimeError("Benchmark died")
RuntimeError: Benchmark died
History
Date User Action Args
2019-11-08 01:30:55Travis Lazarsetrecipients: + Travis Lazar
2019-11-08 01:30:55Travis Lazarsetmessageid: <1573176655.79.0.0781577229762.issue38739@roundup.psfhosted.org>
2019-11-08 01:30:55Travis Lazarlinkissue38739 messages
2019-11-08 01:30:55Travis Lazarcreate