Le ven. 3 juil. 2020 à 11:19, Victor Stinner <vstin...@python.org> a écrit :
> Le ven. 3 juil. 2020 à 04:51, Inada Naoki <songofaca...@gmail.com> a écrit :
> > 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);
> >
> > I will keep PyEval_ReleaseLock.
>
> The PEP 620 doesn't require to keep a deprecated forever: only to
> notify projects that the function is going to be removed, and try to
> help them to replace it.
>
> pydevd-pycharm

Oops, I sent the email by mistake while I was typing :-(

pydevd-pycharm doesn't *need* PyEval_ReleaseLock() on Python 3.10: it
only uses PyEval_ReleaseLock() on Python 3.1 and older!

                         if (version >= PythonVersion_32) {
                             // we will release the GIL here
                            gilRelease(gilState);
                         } else {
                             releaseLock();
                         }

Maybe it's time for pydevd-pycharm to remove support for Python 2.7.
Or the code can be made optional using "#if PY_VERSION_HEX <
0x03020000".

So it seems possible to fix JEP and pydevd-pycharm. IMHO it's fine to
remove PyEval_ReleaseLock() in Python 3.10. The deprecation warning is
there since Python 3.2.

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
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/CENAKUYFY6BQFVDCUWMDZW6LAWD5UH24/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to