Victor Stinner

Results 702 comments of Victor Stinner

Please don't close an issue too fast. The [PR 1368](https://github.com/python/cpython/pull/1368) is still open and contains valuable code. Moreover, I don't see anyone here saying that the feature is a bad...

I suggest to rename the function to: `PyObject_ClearWeakRefs()`. * I don't think that it deserves to belong to the unstable API, since it's stable for many years. * It doesn't...

Why do you want to put it in the PyUnstable API?

I suggest to only do the revert in 3.13, and add the function only in 3.14.

Congrats @colesbury :-) PyTorch should be happy with this new API if I understood correctly.

Currently, you can use `git grep` to detect usage of `METH_VARARGS`. I'm not sure that a warning is worth it for all of these usage. A big part comes from...

``` Modules/clinic/grpmodule.c.h: {"getgrgid", (PyCFunction)(void(*)(void))grp_getgrgid, METH_VARARGS|METH_KEYWORDS, grp_getgrgid__doc__}, Modules/clinic/grpmodule.c.h: {"getgrnam", (PyCFunction)(void(*)(void))grp_getgrnam, METH_VARARGS|METH_KEYWORDS, grp_getgrnam__doc__}, ``` I wrote PR gh-118010 for the `grp` extension module.

``` Modules/_multiprocessing/clinic/posixshmem.c.h: {"shm_open", (PyCFunction)(void(*)(void))_posixshmem_shm_open, METH_VARARGS|METH_KEYWORDS, _posixshmem_shm_open__doc__}, Modules/_multiprocessing/clinic/posixshmem.c.h: {"shm_unlink", (PyCFunction)(void(*)(void))_posixshmem_shm_unlink, METH_VARARGS|METH_KEYWORDS, _posixshmem_shm_unlink__doc__}, ``` I wrote PR gh-118012 for the `_posixshmem` extension module.

> I used VS Code to detect the usage of METH_KEYWORDS in private functions, (but potentially exported as public). METH_VARARGS is inefficient, but I don't see why do you want...

> @vstinner: I'm not sure we should add changes like https://github.com/python/cpython/pull/118010 and https://github.com/python/cpython/pull/118012 this late in the 3.13 alpha phase; the feature freeze is imminent. IMO, if we are to...