You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple pyperformance tests are incompatible with Python 3.9 #74
Changes in Python 3.9 break html5lib, django_template, and tornado_http tests with this error:
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
How to reproduce the issue
I've been building Python 3 from source and encountered it through the standard build process.
Build Python from source. I produced with git commit befa032d8869e0fab4732d910f3887642879d644 from cpython GitHub.
Run pyperformance with one of the following parameter sets:
/py3buildpath/bin/pyperformance run --python=/py3buildpath/bin/python3 --venv venvpath -b html5lib -o output.json
/py3buildpath/bin/pyperformance run --python=/py3buildpath/bin/python3 --venv venvpath -b django_template -o output.json
/py3buildpath/bin/pyperformance run --python=/py3buildpath/bin/python3 --venv venvpath -b tornado_http -o output.json
Error message is shown.
What you expected to happen
I expected these pyperformance benchmark to complete successfully and produce a result (without error).
What actually happens
Benchmark dies trying to import from collections.
I believe with Python 3.9 these packages need to be directly imported from collections.abc.
Looks like these issues are in the imported libraries themselves. The only thing pyperformance could do is disable the tests in the benchmarks/init.py. I'll file additional issues in the django_template and tornado_http repositories.
Activity
TravisLazar commentedon Nov 13, 2019
Looks like these issues are in the imported libraries themselves. The only thing pyperformance could do is disable the tests in the benchmarks/init.py. I'll file additional issues in the django_template and tornado_http repositories.
I believe a patch was already submitted to html5lib: html5lib/html5lib-python@4f92357
TravisLazar commentedon Nov 13, 2019
I cannot reproduce on django_template or tornado_http anymore. It's possible that I got some logs crossed.
The html5lib issue still remains.
lazka commentedon Nov 13, 2019
note that html5lib is disabled on master