On Thu, Jul 2, 2020 at 8:05 PM Inada Naoki <songofaca...@gmail.com> wrote:

> On Thu, Jul 2, 2020 at 7:28 PM Victor Stinner <vstin...@python.org> wrote:
> >
> > Hi,
> >
> > Last time I looked at PyEval_AcquireLock(), it was used in the wild,
> > but I don't recall exactly where, sorry :-( Before removing the
> > functions, I suggest to first notify impacted projects of the incoming
> > removal, and maybe even propose a fix.
>
> Thank you for suggestion.
>
> I had grepped PyEval_AcquireLock in top4000 packages and I confirmed
> it is not used.
> But I had not checked PyEval_ReleaseLock because I thought it is used
> only pair with PyEval_AcquireLock.
>
> Actually, PyEval_ReleaseLock is used in three packages:
>
> pydevd-pycharm-202.5103.19/pydevd_attach_to_process/windows/attach.cpp
> 330:        DEFINE_PROC(releaseLock, PyEval_Lock*, "PyEval_ReleaseLock",
> -160);
>
> jep-3.9.0/src/main/c/Jep/pyembed.c
> 836:    PyEval_ReleaseLock();
>
>
> ptvsd-4.3.2.zip/ptvsd-4.3.2/src/ptvsd/_vendored/pydevd/pydevd_attach_to_process/windows/attach.cpp
> 330:        DEFINE_PROC(releaseLock, PyEval_Lock*, "PyEval_ReleaseLock",
> -160);
>

As the dev manager for ptvsd I can officially tell not to worry about it as
the project has been superseded by debugpy.

-Brett


>
>
> I will keep PyEval_ReleaseLock.
>
> >
> > Getting rid of PyEval_AcquireLock() and PyEval_ReleaseLock() in JEP
> > doesn't seem trivial. This project uses subinterpreters and uses/used
> > daemon threads.
> >
>
> I think they use only PyEval_ReleaseLock().  Do they use
> PyEval_AcquireLock() too?
>
> Regards,
> --
> Inada Naoki  <songofaca...@gmail.com>
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/HMDNL4MC2UMOGRMJ7PVDBWRRFOV7NPAO/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/QJN4S6OTOOE3ZFQSWKJV6CSGX77THEDE/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to