[Python-Dev] Re: Expected stability of PyCode_New() and types.CodeType() signatures

2019-06-12 Thread Victor Stinner
Hi Antoine, In Python 3.4, I added "void PyMem_SetAllocator(PyMemAllocatorDomain domain, PyMemAllocator *allocator)" to the public C API. Problem: we wanted to add a new "calloc" field to PyMemAllocator structure. I chose to rename the structure to PyMemAllocatorEx to ensure that all C extension

[Python-Dev] Re: Expected stability of PyCode_New() and types.CodeType() signatures

2019-06-12 Thread Antoine Pitrou
On Wed, 12 Jun 2019 00:09:10 +0200 Victor Stinner wrote: > Update. > > Le ven. 31 mai 2019 à 10:49, Petr Viktorin a écrit : > > PEP 570 (Positional-Only Parameters) changed the signatures of > > PyCode_New() and types.CodeType(), adding a new argument for "posargcount". > > > > Pablo propose

[Python-Dev] Re: Using Generic Type Constructors at Runtime

2019-06-12 Thread Brett Cannon
Yeah, you're kind of in an odd spot with that. :) You could try python-list. ___ 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/ Mes

[Python-Dev] Re: Expected stability of PyCode_New() and types.CodeType() signatures

2019-06-12 Thread Paul Ganssle
I'm not one of the people who ever shipped pre-cythonized code, but I think at this point it should be pretty safe to ship just your .pyx files and not the generated C files - at least if your reason for shipping the C code was "it will be hard for people to pip install things". For /other/ reason

[Python-Dev] Re: Expected stability of PyCode_New() and types.CodeType() signatures

2019-06-12 Thread Brett Cannon
Petr Viktorin wrote: > On 6/12/19 7:40 AM, Stefan Behnel wrote: > > Victor Stinner schrieb am 12.06.19 um 00:09: > > So yeah, the PyCode_New() change is very annoying > > in practical, since > > every single project using Cython requires a new release in practice. > > I think Cython's deal

[Python-Dev] Re: Expected stability of PyCode_New() and types.CodeType() signatures

2019-06-12 Thread Brett Cannon
Victor Stinner wrote: > Update. > > Le ven. 31 mai 2019 à 10:49, Petr Viktorin > PEP 570 (Positional-Only Parameters) changed the > > signatures of > > PyCode_New() and types.CodeType(), adding a new argument for "posargcount". > > > Pablo proposed a PR to revert PyCode_New() API to Python 3.

[Python-Dev] Re: Using Generic Type Constructors at Runtime

2019-06-12 Thread Saul Shanabrook
OK I will post this on typing-sig. I was directed to post here instead of there because apparently that's more about static typing not runtime typing: https://github.com/python/typing/issues/629#issuecomment-494028130 ___ Python-Dev mailing list -- pyth

[Python-Dev] Re: Expected stability of PyCode_New() and types.CodeType() signatures

2019-06-12 Thread Petr Viktorin
On 6/12/19 7:40 AM, Stefan Behnel wrote: Victor Stinner schrieb am 12.06.19 um 00:09: So yeah, the PyCode_New() change is very annoying in practical, since every single project using Cython requires a new release in practice. I think Cython's deal with regard to this is: """ If you use Cyt