[Python-Dev] [RFC] Removing pure Python implementation of OrderedDict
Serhiy Storchaka
storchaka at gmail.com
Tue Sep 5 07:48:32 EDT 2017
05.09.17 11:38, INADA Naoki пише:
> ## Cons
>
> * All Python 3.7 implementations should provide _collections.OrderedDict
> PyPy has it already. But I don't know about micropython.
Current C implementation of OrderedDict is not safe regarding using
mutating dict methods (or dict C API) like dict.__setitem__ or
PyDict_SetItem. Using them can cause hangs or segfaults. See issue24726
and issue25410. I hope your implementation will solve these issues, but
there may be others. While the C implementation still is not enough
mature, we should allow users that encountered one of such issues to use
pure Python implementation which is free from hangs and segfaults.
More information about the Python-Dev
mailing list