[Python-Dev] Re: New public PyUnicodeBuilder C API

2022-05-16 Thread dw-git
Victor Stinner wrote: > My proposed API targets Python 3.12, it's too late for Python 3.11. > Maybe for Python 3.11, it's ok to add back private > _PyFloat_FormatAdvancedWriter and _PyLong_FormatAdvancedWriter > functions to the public C API to restore Cython performance. I think at this stage the

[Python-Dev] Re: Issue: 92359 - Python 3.10 IDLE 64-bit doesn't open any files names code (code.py, code.pyw) - found a partial fix but looking for input

2022-05-16 Thread Steve Dower
On 5/14/2022 8:37 PM, Terry Reedy wrote: On 5/14/2022 12:40 AM, Guido van Rossum wrote: Probably "Edit with IDLE" should be changed. I have no idea where that is defined. I presume somewhere in PCBuild.  Steve Dower knows and is in charge of the Windows installer. FTR, the behaviour for the

[Python-Dev] Re: Problems building 3.7.13 on Windows

2022-05-16 Thread Joseph L. Casale
> I commented out line 182, and that allowed .\Tools\msibuild.bat to complete, > but that appears to leave the bundle named as "python-3.7.13.7804-amd64.exe"\ > and it did not include the msi files (the final size was 1269 Kb). After reading more documentation, I realized I needed to run buildrele

[Python-Dev] Re: New public PyUnicodeBuilder C API

2022-05-16 Thread Antoine Pitrou
On Mon, 16 May 2022 14:22:44 +0200 Victor Stinner wrote: > On Mon, May 16, 2022 at 2:11 PM Antoine Pitrou wrote: > > > PyUnicodeBuilder_Init(&builder); > > > > > > // Overallocation is more efficient if the final length is > > > unknown > > > PyUnicodeBuilder_EnableOvera

[Python-Dev] Re: New public PyUnicodeBuilder C API

2022-05-16 Thread Victor Stinner
On Mon, May 16, 2022 at 2:11 PM Antoine Pitrou wrote: > > PyUnicodeBuilder_Init(&builder); > > > > // Overallocation is more efficient if the final length is unknown > > PyUnicodeBuilder_EnableOverallocation(&builder); > > PyUnicodeBuilder_WriteStr(&builder, key);

[Python-Dev] Re: New public PyUnicodeBuilder C API

2022-05-16 Thread Antoine Pitrou
On Mon, 16 May 2022 11:13:56 +0200 Victor Stinner wrote: > Hi, > > I propose adding a new C API to "build an Unicode string". What do you > think? Would it be efficient with any possible Unicode string storage > and any Python implementation? > > PyPy has an UnicodeBuilder type in Python, but he

[Python-Dev] Re: New public PyUnicodeBuilder C API

2022-05-16 Thread Victor Stinner
On Mon, May 16, 2022 at 12:51 PM wrote: > > Victor Stinner wrote: > > On Mon, May 16, 2022 at 11:40 AM dw-...@d-woods.co.uk wrote: > > > Cython used the private _PyUnicodeWriter API (and stopped using it on > > > Py3.11 when it was hidden more thoroughly) > > > I'm not aware of any change in the

[Python-Dev] Re: New public PyUnicodeBuilder C API

2022-05-16 Thread dw-git
Victor Stinner wrote: > On Mon, May 16, 2022 at 11:40 AM dw-...@d-woods.co.uk wrote: > > Cython used the private _PyUnicodeWriter API (and stopped using it on > > Py3.11 when it was hidden more thoroughly) > > I'm not aware of any change in the the private _PyUnicodeWriter API in > Python 3.11.

[Python-Dev] Re: New public PyUnicodeBuilder C API

2022-05-16 Thread Victor Stinner
On Mon, May 16, 2022 at 11:40 AM wrote: > Cython used the private _PyUnicodeWriter API (and stopped using it on Py3.11 > when it was hidden more thoroughly) I'm not aware of any change in the the private _PyUnicodeWriter API in Python 3.11. Is it just that Cython no longer wants to use private A

[Python-Dev] Re: New public PyUnicodeBuilder C API

2022-05-16 Thread dw-git
Cython used the private _PyUnicodeWriter API (and stopped using it on Py3.11 when it was hidden more thoroughly) so would probably make use of a public API to do the same thing. It's an optimization rather than an essential of course ___ Python-Dev mail

[Python-Dev] New public PyUnicodeBuilder C API

2022-05-16 Thread Victor Stinner
Hi, I propose adding a new C API to "build an Unicode string". What do you think? Would it be efficient with any possible Unicode string storage and any Python implementation? PyPy has an UnicodeBuilder type in Python, but here I only propose C API. Later, if needed, it would be easy to add a Pyt