[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Terry Reedy
On 1/19/2021 10:01 AM, Mark Shannon wrote: The following program will run safely to completion: I interpreted this to mean 'works now', on whatever system you tested this on. You question suggests that you meant "fails now but will work with a successful patch for the PEP".

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Pablo Galindo Salgado
Hi Mark, Thanks for gathering this proposal! Looks very interesting. I have some preliminary questions: how is this going to affect the "py-bt" command of the gdb helpers (https://github.com/python/cpython/blob/master/Tools/gdb/libpython.py#L1876-L1897) and other similar tools that produce a

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Guido van Rossum
On Tue, Jan 19, 2021 at 10:08 AM Mark Shannon wrote: > > > On 19/01/2021 5:48 pm, Guido van Rossum wrote: > > I'm not clear on how you plan to implement this in CPython. > > > > I can totally see that if a Python function calls another Python > > function, you can avoid the C stack frame and

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Mark Shannon
On 19/01/2021 5:48 pm, Guido van Rossum wrote: I'm not clear on how you plan to implement this in CPython. I can totally see that if a Python function calls another Python function, you can avoid the C stack frame and hence you can have as many Python call levels as you want. However,

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Sebastian Berg
On Tue, 2021-01-19 at 16:22 +, Mark Shannon wrote: > > > On 19/01/2021 3:43 pm, Sebastian Berg wrote: > > On Tue, 2021-01-19 at 13:31 +, Mark Shannon wrote: > > > Hi everyone, > > > > > > It's time for yet another PEP :) > > > > > > Fortunately, this one is a small one that doesn't

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Guido van Rossum
I'm not clear on how you plan to implement this in CPython. I can totally see that if a Python function calls another Python function, you can avoid the C stack frame and hence you can have as many Python call levels as you want. However, there are many scenarios where a Python function calls a

[Python-Dev] Re: Please explain how to migrate when a function is removed, thanks ;-)

2021-01-19 Thread Victor Stinner
A PR was proposed to document the removal of the loop parameter: https://github.com/python/cpython/pull/24256 Victor On Tue, Jan 19, 2021 at 1:34 PM Victor Stinner wrote: > > Hi, > > We are working on upgrading Python from 3.9 to 3.10 in Fedora and we > are facing many Python 3.10 incompatible

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Antoine Pitrou
On Tue, 19 Jan 2021 16:28:46 + Mark Shannon wrote: > On 19/01/2021 4:15 pm, Antoine Pitrou wrote: > > On Tue, 19 Jan 2021 15:54:39 + > > Mark Shannon wrote: > >> On 19/01/2021 3:40 pm, Antoine Pitrou wrote: > >>> On Tue, 19 Jan 2021 13:31:45 + > >>> Mark Shannon wrote: >

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Mark Shannon
On 19/01/2021 4:15 pm, Antoine Pitrou wrote: On Tue, 19 Jan 2021 15:54:39 + Mark Shannon wrote: On 19/01/2021 3:40 pm, Antoine Pitrou wrote: On Tue, 19 Jan 2021 13:31:45 + Mark Shannon wrote: Hi everyone, It's time for yet another PEP :) Fortunately, this one is a small one

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Mark Shannon
On 19/01/2021 3:43 pm, Sebastian Berg wrote: On Tue, 2021-01-19 at 13:31 +, Mark Shannon wrote: Hi everyone, It's time for yet another PEP :) Fortunately, this one is a small one that doesn't change much. It's aim is to make the VM more robust. Abstract This PEP proposes that

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Antoine Pitrou
On Tue, 19 Jan 2021 15:54:39 + Mark Shannon wrote: > On 19/01/2021 3:40 pm, Antoine Pitrou wrote: > > On Tue, 19 Jan 2021 13:31:45 + > > Mark Shannon wrote: > >> Hi everyone, > >> > >> It's time for yet another PEP :) > >> > >> Fortunately, this one is a small one that doesn't change

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Mark Shannon
On 19/01/2021 3:40 pm, Antoine Pitrou wrote: On Tue, 19 Jan 2021 13:31:45 + Mark Shannon wrote: Hi everyone, It's time for yet another PEP :) Fortunately, this one is a small one that doesn't change much. It's aim is to make the VM more robust. On the principle, no objection. In

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Sebastian Berg
On Tue, 2021-01-19 at 13:31 +, Mark Shannon wrote: > Hi everyone, > > It's time for yet another PEP :) > > Fortunately, this one is a small one that doesn't change much. > It's aim is to make the VM more robust. > > Abstract > > > This PEP proposes that machine stack overflow is

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Antoine Pitrou
On Tue, 19 Jan 2021 13:31:45 + Mark Shannon wrote: > Hi everyone, > > It's time for yet another PEP :) > > Fortunately, this one is a small one that doesn't change much. > It's aim is to make the VM more robust. On the principle, no objection. In practice, can you show how an

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Mark Shannon
On 19/01/2021 2:38 pm, Terry Reedy wrote: On 1/19/2021 8:31 AM, Mark Shannon wrote: Hi everyone, It's time for yet another PEP :) Fortunately, this one is a small one that doesn't change much. It's aim is to make the VM more robust. Abstract This PEP proposes that machine stack

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Terry Reedy
On 1/19/2021 8:31 AM, Mark Shannon wrote: It's time for yet another PEP :) Fortunately, this one is a small one that doesn't change much. It's aim is to make the VM more robust. Abstract This PEP proposes that machine stack overflow is treated differently from runaway recursion.

[Python-Dev] Re: PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Terry Reedy
On 1/19/2021 8:31 AM, Mark Shannon wrote: Hi everyone, It's time for yet another PEP :) Fortunately, this one is a small one that doesn't change much. It's aim is to make the VM more robust. Abstract This PEP proposes that machine stack overflow is treated differently from runaway

[Python-Dev] PEP 651 -- Robust Overflow Handling

2021-01-19 Thread Mark Shannon
Hi everyone, It's time for yet another PEP :) Fortunately, this one is a small one that doesn't change much. It's aim is to make the VM more robust. Abstract This PEP proposes that machine stack overflow is treated differently from runaway recursion. This would allow programs to set

[Python-Dev] Please explain how to migrate when a function is removed, thanks ;-)

2021-01-19 Thread Victor Stinner
Hi, We are working on upgrading Python from 3.9 to 3.10 in Fedora and we are facing many Python 3.10 incompatible changes. Most changes were planned with a deprecation period, but, as usual, projects are not tested with DeprecationWarning treated as errors, and so tons of packages now fail to

[Python-Dev] Re: PEP: Deferred Evaluation Of Annotations Using Descriptors

2021-01-19 Thread Antoine Pitrou
On Mon, 18 Jan 2021 15:54:32 -0800 Larry Hastings wrote: > On 1/18/21 3:42 PM, Inada Naoki wrote: > > Many type hinting use cases don't need type objects in runtime. > > So I think PEP 563 is better for type hinting user experience. > > You mean, in situations where the user doesn't want to

[Python-Dev] Re: Advantages of pattern matching - a simple comparative analysis

2021-01-19 Thread Antoine Pitrou
On Mon, 18 Jan 2021 12:41:45 -0800 Chris Barker via Python-Dev wrote: > > And in "real world" code, I've done just this -- building a system for > saving / restoring dataclasses to/from JSON. In that case, each of the > dataclasses knows how to save itself and build itself from JSON-compatible >