On Mon, 28 Dec 2020 11:07:46 +0900 Inada Naoki <songofaca...@gmail.com> wrote: > > Additionally, if we introduce the customizable lazy str object, it's > very easy to release GIL during basic Unicode operations. Many third > parties may assume PyUnicode_Compare doesn't release GIL if both > operands are Unicode objects.
1) You have to prove such "many third parties" exist. I've written my share of C extension code and I don't remember assuming that PyUnicode_Compare doesn't release the GIL. 2) Even if there is such third party code, it is clearly making assumptions about undocumented implementation details. It is therefore ok to break it in new versions of CPython. However, I agree that having to call PyUnicode_READY() before calling C unicode APIs is probably an obscure detail that few people remember about. Regards Antoine. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/O6IUNWSAIL3C6BKIP7IBZXJN3P43GH67/ Code of Conduct: http://python.org/psf/codeofconduct/