[Python-Dev] Re: Should we pass tstate in the VECTORCALL calling convention before making it public?

2020-01-11 Thread Antoine Pitrou
On Thu, 9 Jan 2020 15:12:41 +0100 Victor Stinner wrote: > > Getting the interpreter from a Python thread state is trivial: interp > = tstate->interp. > > The problem is how to get the current Python thread state. > *Currently*, it's an atomic variable. But tomorrow with multiple > interpreters r

[Python-Dev] Re: Object deallocation during the finalization of Python program

2020-01-11 Thread Pau Freixes
HI, Thanks for the comments, really interesting use case this one [1], I've just read it in diagonal but seems that is similar to the bug that finally I've found in our program. Basically GC was clearing all of the attributes before the deallocation for unbreaking an indirect reference cycle whic

[Python-Dev] Re: Object deallocation during the finalization of Python program

2020-01-11 Thread Armin Rigo
Hi Pau, Also, the Cython documentation warns against doing this kind of things (here, accessing the Python object stored in ``foo``). From https://cython.readthedocs.io/en/latest/src/userguide/special_methods.html: You need to be careful what you do in a __dealloc__() method. By the time

[Python-Dev] Re: Requesting PR review on locale module

2020-01-11 Thread Steve Holden
I've verified this fix and changed the status to "commit review." I trust that was the correct action. Kind regards, Steve Holden On Thu, Jan 9, 2020 at 9:57 PM Cédric Krier via Python-Dev < python-dev@python.org> wrote: > Hi, > > Any chance to get this PR reviewed? It is blocking the resolutio

[Python-Dev] Is anyone aware of any existing tests for ternary_op in abstract.c?

2020-01-11 Thread Nick Coghlan
[Note: I don't think this is a high priority issue, as it only relates to doing mixed-type modular exponentiation, and that seems like an inherently bad idea anyway. But I'm also curious if anyone is able to explain the current behaviour, as I haven't come up with a better explanation than "It does