This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients brett.cannon, eric.snow, grahamd, ncoghlan, steve.dower
Date 2016-12-29.06:53:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Currently there isn't any way to uniquely identify an interpreter.  This patch adds a new "id" field to the PyInterpreterState struct.  The ID for every new interpreter is set to the value of an increasing global counter.  That means that the ID is unique within the process.

IIRC, the availability of unique ID would help tools that make use of subinterpreters, like mod_wsgi.  It is also necessary for any effort to expose interpreters in Python-level code (which is the subject of other ongoing work).

The patch also adds:

unsigned long PyInterpreterState_GetID(PyInterpreterState *interp)

Note that, without a Python-level interpreters module, testing this change is limited to extending the existing test code in test_capi.
Date User Action Args
2016-12-29 06:53:42eric.snowsetrecipients: + eric.snow, brett.cannon, ncoghlan, grahamd, steve.dower
2016-12-29 06:53:42eric.snowsetmessageid: <>
2016-12-29 06:53:42eric.snowlinkissue29102 messages
2016-12-29 06:53:41eric.snowcreate