Showing content from http://mail.python.org/pipermail/python-dev/attachments/20171120/c49d1fcd/attachment.html below:
<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On Nov 18, 2017 19:20, "Nick Coghlan" <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">
<br>
</div>OK, in that case I think the answer to Victor's question is:<br>
<br>
1. Breaking calling Py_DecodeLocale() before calling Py_Initialize()<br>
is a compatibility break with the API implied by our own usage<br>
examples, and we'll need to revert the breakage for 3.7, </blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">+1</div><div dir="auto"><br></div><div dir="auto">The break was certainly unintentional. :/ Fortunately, Py_DecodeLocale() should be the only "Process-wide parameter" needing repair. I suppose, PyMem_RawMalloc() and PyMem_RawFree() *could* be considered too, but my understanding is that they aren't really intended for direct use (especially pre-init).</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">and ensure at<br>
least one release's worth of DeprecationWarning before requiring<br>
either the use of an alternative API (where the caller controls the<br>
memory management), or else a new lower level pre-initialization API<br>
(i.e. making `PyRuntime_Initialize` a public API)<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">There shouldn't be a need to deprecate anything, right? We just need to restore the pre-init behavior of Py_DecodeLocale.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. We should provide a consolidated list of these functions in the C<br>
API initialization docs<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">+1</div><div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif">PyMem_Raw*() do not belong in that group, right? Again, my understanding is that they aren't intended for direct third-party use (are they even a part of the C-API?), and particularly pre-init. That Py_DecodeLocale() can use PyMem_RawMalloc() pre-init is an implementation detail.</span></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3. We should add more test cases to _testembed.c that ensure they all<br>
work correctly prior to Py_Initialize (some of them are already tested<br>
there, but definitely not all of them)<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">+1</div><div dir="auto"><br></div><div dir="auto">-eric</div></div>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4