[Python-Dev] Re: A better way to freeze modules

2021-09-02 Thread Guido van Rossum
Quick reaction: This feels like a bait and switch to me. Also, there are many advantages to using a standard format like zip (many formats are really zip with some conventions). Finally, the bytecode format you are using is “marshal”, and is fully portable — as is zip. On Thu, Sep 2, 2021 at 21:44

[Python-Dev] A better way to freeze modules

2021-09-02 Thread Gregory Szorc
Over in https://bugs.python.org/issue45020 there is some exciting work around expanding the use of the frozen importer to speed up Python interpreter startup. I wholeheartedly support the effort and don't want to discourage progress in this area. Simultaneously, I've been down this path before wit

[Python-Dev] Re: Discrepancy between what aiter() and `async for` requires on purpose?

2021-09-02 Thread Yury Selivanov
Comments inlined: On Thu, Sep 2, 2021 at 6:23 PM Guido van Rossum wrote: > First of all, we should ping Yury, who implemented `async for` about 6 > years ago (see PEP 492), and Joshua Bronson, who implemented aiter() and > anext() about 5 months ago (see https://bugs.python.org/issue31861). I've

[Python-Dev] Re: Discrepancy between what aiter() and `async for` requires on purpose?

2021-09-02 Thread Guido van Rossum
First of all, we should ping Yury, who implemented `async for` about 6 years ago (see PEP 492), and Joshua Bronson, who implemented aiter() and anext() about 5 months ago (see https://bugs.python.org/issue31861). I've CC'ed them here. My own view: A. iter() doesn't check that the thing returned i

[Python-Dev] Re: Making code object APIs unstable

2021-09-02 Thread Guido van Rossum
FWIW I've applied for an exception from the two-release deprecation policy from the SC: https://github.com/python/steering-council/issues/75 On Thu, Sep 2, 2021 at 1:12 AM Greg Ewing wrote: > On 2/09/21 7:46 pm, Antoine Pitrou wrote: > > Tracebacks are linked in a single direction, to go the oth

[Python-Dev] Re: PEP-535 (Rich comparison chaining) Discussion?

2021-09-02 Thread Angus Hollands
Thanks Nick, I am strongly advocating for the sentiment of PEP 535, but I have not given strong thought to the implementation details established in PEP 532. I'll read through 532 properly, and come back with some thoughts. ___ Python-Dev mailing list

[Python-Dev] Re: Making code object APIs unstable

2021-09-02 Thread Greg Ewing
On 2/09/21 7:46 pm, Antoine Pitrou wrote: Tracebacks are linked in a single direction, to go the other direction you need to walk the frames attached to the traceback. So a (fake or not) frame object is still desirable, IMHO. Could we at least remove the necessity for a fake code object? --

[Python-Dev] Re: Making code object APIs unstable

2021-09-02 Thread Antoine Pitrou
On Thu, 2 Sep 2021 13:31:32 +1200 Greg Ewing wrote: > On 2/09/21 4:46 am, Victor Stinner wrote: > > If creating a fake frame is a common use case, we can maybe write a > > public C API for that. For example, I saw parser injecting frames to > > show the file name and line number of the parsed file

[Python-Dev] Re: Making code object APIs unstable

2021-09-02 Thread Petr Viktorin
On 01. 09. 21 22:28, Guido van Rossum wrote: I apologize, I keep making the same mistake. The PyCode_New[WithPosArgs] functions are *not* in the stable ABI or in the limited API, so there's no need to petition the SC, nor do I need Petr's approval. We may be bound by backwards compatibilit