STINNER Victor <[email protected]> added the comment:
FYI pyperformance is affected by this issue:
vstinner@apu$ env/bin/python
~/prog/python/pyperformance/pyperformance/benchmarks/bm_pickle.py unpickle
--pure-python -v -p3
Traceback (most recent call last):
File
"/home/vstinner/prog/python/pyperformance/pyperformance/benchmarks/bm_pickle.py",
line 287, in <module>
import pickle
File "/home/vstinner/prog/python/master/Lib/pickle.py", line 39, in <module>
from _pickle import PickleBuffer
ModuleNotFoundError: import of _pickle halted; None in sys.modules
It is no longer possible to benchmark the pure Python implement of pickle.
--pure-python uses this code path:
def is_module_accelerated(module):
return getattr(pickle.Pickler, '__module__', '<jython>') == 'pickle'
(...)
if six.PY3:
sys.modules['_pickle'] = None
import pickle
if not is_module_accelerated(pickle):
raise RuntimeError("Unexpected C accelerators for pickle")
Should I remove the benchmark?
----------
nosy: +vstinner
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37210>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com