[Python-Dev] What is the purpose of the _PyThreadState_Current symbol in Python 3?

2018-09-28 Thread Gabriele
Hi Victor, > I understand that you are writing a debugger and you can only *read* > modify, not execute code, right? I'm working on a frame stack sampler that runs independently from the Python process. The project is "Austin" (https://github.com/P403n1x87/austin). Whilst I could, in principle, e

Re: [Python-Dev] Documenting the private C API (was Re: Questions about signal handling.)

2018-09-28 Thread Nick Coghlan
On Wed, 26 Sep 2018 at 00:33, Barry Warsaw wrote: > > On Sep 25, 2018, at 10:18, Antoine Pitrou wrote: > > > > Not really. Many are just like "static" (i.e. module-private) > > functions, except that they need to be shared by two or three different > > C modules. It's definitely the case for _P

[Python-Dev] Summary of Python tracker Issues

2018-09-28 Thread Python tracker
ACTIVITY SUMMARY (2018-09-21 - 2018-09-28) Python tracker at https://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open6781 (-14) closed 39803 (+80) total 46584 (+66) Open issues wi

[Python-Dev] bpo-34837: Multiprocessing.Pool API Extension - Pass Data to Workers w/o Globals

2018-09-28 Thread Sean Harrington
I am proposing an extension to the multiprocessing.Pool API that allows for an alternative way to pass data to Pool worker processes, *without* using globals. A PR has been opened , extensive test coverage is also included, with all tests & CI passing o

Re: [Python-Dev] What is the purpose of the _PyThreadState_Current symbol in Python 3?

2018-09-28 Thread Nathaniel Smith
What information do you wish the interpreter provided, that would make your program simpler and more reliable? On Fri, Sep 28, 2018, 07:21 Gabriele wrote: > Hi Victor, > > > I understand that you are writing a debugger and you can only *read* > > modify, not execute code, right? > > I'm working

Re: [Python-Dev] What is the purpose of the _PyThreadState_Current symbol in Python 3?

2018-09-28 Thread Gabriele
On Fri, 28 Sep 2018 at 23:12, Nathaniel Smith wrote: > What information do you wish the interpreter provided, that would make your > program simpler and more reliable? An exported global variable that points to the head of the PyInterpreterState linked list (i.e. the return value of PyInterprete

Re: [Python-Dev] bpo-34837: Multiprocessing.Pool API Extension - Pass Data to Workers w/o Globals

2018-09-28 Thread Antoine Pitrou
Hi, On Fri, 28 Sep 2018 17:07:33 -0400 Sean Harrington wrote: > > In *short*, the implementation of the feature works as follows: > >1. Exposes a kwarg on Pool.__init__ called `expect_initret`, that >defaults to False. When set to True: > 1. Capture the return value of the initi

Re: [Python-Dev] bpo-34837: Multiprocessing.Pool API Extension - Pass Data to Workers w/o Globals

2018-09-28 Thread Sean Harrington
Hi Antoine - see inline below for my response...thanks for your time! On Fri, Sep 28, 2018 at 6:45 PM Antoine Pitrou wrote: > > Hi, > > On Fri, 28 Sep 2018 17:07:33 -0400 > Sean Harrington wrote: > > > > In *short*, the implementation of the feature works as follows: > > > >1. Exposes a kwa

Re: [Python-Dev] bpo-34837: Multiprocessing.Pool API Extension - Pass Data to Workers w/o Globals

2018-09-28 Thread Michael Selik
On Fri, Sep 28, 2018 at 2:11 PM Sean Harrington wrote: > kwarg on Pool.__init__ called `expect_initret`, that defaults to False. When > set to True: > Capture the return value of the initializer kwarg of Pool > Pass this value to the function being applied, as a kwarg. The parameter name you cho