[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2020-05-28 Thread miss-islington
miss-islington added the comment: New changeset 6a478641c00e5a52be9d595ad804bf848a498d96 by Miss Islington (bot) in branch '3.9': bpo-37878: PyThreadState_DeleteCurrent() was not removed (GH-20489) https://github.com/python/cpython/commit/6a478641c00e5a52be9d595ad804bf848a498d96 --

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: I was very confused by the history of this issue. To be clear, PyThreadState_DeleteCurrent() is now documented in Python 3.9: https://docs.python.org/dev/c-api/init.html#c.PyThreadState_DeleteCurrent -- ___ Python

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset fda7f6d61b13c68f59806db674e892fda4013348 by Victor Stinner in branch 'master': bpo-37878: PyThreadState_DeleteCurrent() was not removed (GH-20489) https://github.com/python/cpython/commit/fda7f6d61b13c68f59806db674e892fda4013348 --

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2020-05-28 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19745 pull_request: https://github.com/python/cpython/pull/20496 ___ Python tracker

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2020-05-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19738 pull_request: https://github.com/python/cpython/pull/20489 ___ Python tracker ___

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: > "when we un-revert we should be sure to move PyThreadState_DeleteCurrent() > from Include/pystate.h to Include/cpython/pystate.h." Ah, I didn't see this comment. If Eric endorses this change, I'm fine with it :-) I close the issue. If someone wants to

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-04 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: > Oh, I didn't notice something in the review: the revert moved > >PyThreadState_DeleteCurrent() definition from Include/pystate.h to > >Include/cpython/pystate.h. Previously, it was defined in > > Include/pystate.h, see the commit removing it: I made

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: To be clear: this issue only impacts Python 3.8. The function was only removed from the master branch. It was still in the 3.8 branch. -- ___ Python tracker

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: > bpo-38266: Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal > (GH-16558) Oh, I didn't notice something in the review: the revert moved PyThreadState_DeleteCurrent() definition from Include/pystate.h to Include/cpython/pystate.h. Previously,

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8855e47d09d4db1206c65b24efc8ad0df585ac46 by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-38266: Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal (GH-16558)

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-03 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- pull_requests: +16149 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16558 ___ Python tracker ___

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-09-27 Thread Eric Snow
Eric Snow added the comment: I've re-opened this issue to address the original point: documenting PyThreadState_DeleteCurrent(). FWIW, I don't see a problem with documenting it if we're keeping it around (which it looks like we are). We will address reverting GH-15315 in #38266.

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-09-24 Thread Wenzel Jakob
Wenzel Jakob added the comment: Hi, pybind11 developer here. A bit on context of our usage of this function: Pybind11 supports some advanced GIL-related tricks that *require* access this function. For instance, pybind11 can intercept a Python function call on the `main()` thread and delete

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-09-24 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: Update, Some user of this function just complained on the merged pull requests here : https://github.com/python/cpython/pull/15315#issuecomment-534522962. Do we revert and deprecate ? cc @victor -- ___ Python

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-09-05 Thread STINNER Victor
STINNER Victor added the comment: Thanks Joannah. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-09-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2bc43cdc015eda4f1a651bb2b308a17a83c38e14 by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-37878: Remove PyThreadState_DeleteCurrent() function (GH-15315)

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-08-29 Thread STINNER Victor
STINNER Victor added the comment: I did a GitHub code search on "PyThreadState_DeleteCurrent" in C code: https://github.com/search?l=C=PyThreadState_DeleteCurrent=Code I looked at the first 6 pages: I only found copies of the Python source code, but no *call* to this function. It seems like

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-08-28 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I updated the PR to make the function internal. -- ___ Python tracker ___ ___ Python-bugs-list

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-08-19 Thread STINNER Victor
STINNER Victor added the comment: Is it safe to call PyThreadState_DeleteCurrent()? -- keywords: -easy ___ Python tracker ___ ___

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-08-19 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: >From what I know the GIL is released by calling PyEval_ReleaseThread() or >PyEval_SaveThread(). I see we can use PyThreadState_Delete() to clean up-specifically destroy thread state but does not release the GIL and requires a thread state. On the other

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-08-19 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure why PyThreadState_DeleteCurrent() is exposed. Why would anyone use it? It is used internally by the _thread module when the thread function completes. I suggest to make the function internal instead of documenting it. Eric, Joannah: what do

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-08-16 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- keywords: +patch pull_requests: +15034 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15315 ___ Python tracker

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-08-16 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- title: Sub-ineterpreters : Document PyThreadState_DeleteCurrent() ? -> Sub-Interpreters : Document PyThreadState_DeleteCurrent() ___ Python tracker