bpo-39245: Switch to public API for Vectorcall (GH-18460)

The bulk of this patch was generated automatically with:

    for name in \
        PyObject_Vectorcall \
        Py_TPFLAGS_HAVE_VECTORCALL \
        PyObject_VectorcallMethod \
        PyVectorcall_Function \
        PyObject_CallOneArg \
        PyObject_CallMethodNoArgs \
        PyObject_CallMethodOneArg \
    ;
    do
        echo $name
        git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g"
    done

    old=_PyObject_FastCallDict
    new=PyObject_VectorcallDict
    git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g"

and then cleaned up:

- Revert changes to in docs & news
- Revert changes to backcompat defines in headers
- Nudge misaligned comments
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index 2e29375..5aea743 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -142,7 +142,7 @@
        Do this check after 'future_init()'; in case we need to raise
        an error, __del__ needs a properly initialized object.
     */
-    PyObject *res = _PyObject_CallOneArg(asyncio_iscoroutine_func, coro);
+    PyObject *res = PyObject_CallOneArg(asyncio_iscoroutine_func, coro);
     if (res == NULL) {
         return -1;
     }
@@ -367,7 +367,7 @@
         }
         stack[nargs] = (PyObject *)ctx;
 
-        handle = _PyObject_Vectorcall(callable, stack, nargs, context_kwname);
+        handle = PyObject_Vectorcall(callable, stack, nargs, context_kwname);
         Py_DECREF(callable);
     }
 
@@ -1287,7 +1287,7 @@
 _asyncio_Future__repr_info_impl(FutureObj *self)
 /*[clinic end generated code: output=fa69e901bd176cfb input=f21504d8e2ae1ca2]*/
 {
-    return _PyObject_CallOneArg(asyncio_future_repr_info_func, (PyObject *)self);
+    return PyObject_CallOneArg(asyncio_future_repr_info_func, (PyObject *)self);
 }
 
 static PyObject *
@@ -1363,7 +1363,7 @@
 
     func = _PyObject_GetAttrId(fut->fut_loop, &PyId_call_exception_handler);
     if (func != NULL) {
-        PyObject *res = _PyObject_CallOneArg(func, context);
+        PyObject *res = PyObject_CallOneArg(func, context);
         if (res == NULL) {
             PyErr_WriteUnraisable(func);
         }
@@ -2126,13 +2126,13 @@
             Py_DECREF(current_task_func);
             return NULL;
         }
-        ret = _PyObject_CallOneArg(current_task_func, loop);
+        ret = PyObject_CallOneArg(current_task_func, loop);
         Py_DECREF(current_task_func);
         Py_DECREF(loop);
         return ret;
     }
     else {
-        ret = _PyObject_CallOneArg(current_task_func, loop);
+        ret = PyObject_CallOneArg(current_task_func, loop);
         Py_DECREF(current_task_func);
         return ret;
     }
@@ -2168,7 +2168,7 @@
         return NULL;
     }
 
-    res = _PyObject_CallOneArg(all_tasks_func, loop);
+    res = PyObject_CallOneArg(all_tasks_func, loop);
     Py_DECREF(all_tasks_func);
     return res;
 }
@@ -2181,7 +2181,7 @@
 _asyncio_Task__repr_info_impl(TaskObj *self)
 /*[clinic end generated code: output=6a490eb66d5ba34b input=3c6d051ed3ddec8b]*/
 {
-    return _PyObject_CallOneArg(asyncio_task_repr_info_func, (PyObject *)self);
+    return PyObject_CallOneArg(asyncio_task_repr_info_func, (PyObject *)self);
 }
 
 /*[clinic input]
@@ -2431,7 +2431,7 @@
 
     func = _PyObject_GetAttrId(task->task_loop, &PyId_call_exception_handler);
     if (func != NULL) {
-        PyObject *res = _PyObject_CallOneArg(func, context);
+        PyObject *res = PyObject_CallOneArg(func, context);
         if (res == NULL) {
             PyErr_WriteUnraisable(func);
         }
@@ -2571,7 +2571,7 @@
         return NULL;
     }
 
-    PyObject *e = _PyObject_CallOneArg(et, msg);
+    PyObject *e = PyObject_CallOneArg(et, msg);
     Py_DECREF(msg);
     if (e == NULL) {
         return NULL;
@@ -2841,7 +2841,7 @@
         PyObject *stack[2];
         stack[0] = wrapper;
         stack[1] = (PyObject *)task->task_context;
-        res = _PyObject_Vectorcall(add_cb, stack, 1, context_kwname);
+        res = PyObject_Vectorcall(add_cb, stack, 1, context_kwname);
         Py_DECREF(add_cb);
         Py_DECREF(wrapper);
         if (res == NULL) {
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index 25e4c96..057d404 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -512,7 +512,7 @@
         return NULL;
     }
     if (old_deque->maxlen < 0)
-        result = _PyObject_CallOneArg((PyObject *)(Py_TYPE(deque)), deque);
+        result = PyObject_CallOneArg((PyObject *)(Py_TYPE(deque)), deque);
     else
         result = PyObject_CallFunction((PyObject *)(Py_TYPE(deque)), "Oi",
                                        deque, old_deque->maxlen, NULL);
diff --git a/Modules/_csv.c b/Modules/_csv.c
index 2d541bb..4243772 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -514,10 +514,10 @@
 {
     PyObject *type = (PyObject *)&Dialect_Type;
     if (dialect_inst) {
-        return _PyObject_FastCallDict(type, &dialect_inst, 1, kwargs);
+        return PyObject_VectorcallDict(type, &dialect_inst, 1, kwargs);
     }
     else {
-        return _PyObject_FastCallDict(type, NULL, 0, kwargs);
+        return PyObject_VectorcallDict(type, NULL, 0, kwargs);
     }
 }
 
@@ -1240,7 +1240,7 @@
     if (line == NULL) {
         return NULL;
     }
-    result = _PyObject_CallOneArg(self->write, line);
+    result = PyObject_CallOneArg(self->write, line);
     Py_DECREF(line);
     return result;
 }
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index 65c6eb1..5f29f95 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -945,7 +945,7 @@
     if (!checker || !retval)
         return retval;
 
-    v = _PyObject_CallOneArg(checker, retval);
+    v = PyObject_CallOneArg(checker, retval);
     if (v == NULL)
         _PyTraceback_Add("GetResult", "_ctypes/callproc.c", __LINE__-2);
     Py_DECREF(retval);
@@ -1138,7 +1138,7 @@
         if (argtypes && argtype_count > i) {
             PyObject *v;
             converter = PyTuple_GET_ITEM(argtypes, i);
-            v = _PyObject_CallOneArg(converter, arg);
+            v = PyObject_CallOneArg(converter, arg);
             if (v == NULL) {
                 _ctypes_extend_error(PyExc_ArgError, "argument %zd: ", i+1);
                 goto cleanup;
@@ -1835,7 +1835,7 @@
 
     typ = PyDict_GetItemWithError(_ctypes_ptrtype_cache, (PyObject *)Py_TYPE(arg));
     if (typ) {
-        return _PyObject_CallOneArg(typ, arg);
+        return PyObject_CallOneArg(typ, arg);
     }
     else if (PyErr_Occurred()) {
         return NULL;
@@ -1843,7 +1843,7 @@
     typ = POINTER(NULL, (PyObject *)Py_TYPE(arg));
     if (typ == NULL)
         return NULL;
-    result = _PyObject_CallOneArg(typ, arg);
+    result = PyObject_CallOneArg(typ, arg);
     Py_DECREF(typ);
     return result;
 }
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index c096eab..a04b295 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -2671,7 +2671,7 @@
         PyObject *event = PyTuple_Pack(2, action, node);
         if (event == NULL)
             return -1;
-        res = _PyObject_CallOneArg(self->events_append, event);
+        res = PyObject_CallOneArg(self->events_append, event);
         Py_DECREF(event);
         if (res == NULL)
             return -1;
@@ -2837,7 +2837,7 @@
     }
 
     if (self->comment_factory) {
-        comment = _PyObject_CallOneArg(self->comment_factory, text);
+        comment = PyObject_CallOneArg(self->comment_factory, text);
         if (!comment)
             return NULL;
 
@@ -3179,7 +3179,7 @@
     if (errmsg == NULL)
         return;
 
-    error = _PyObject_CallOneArg(st->parseerror_obj, errmsg);
+    error = PyObject_CallOneArg(st->parseerror_obj, errmsg);
     Py_DECREF(errmsg);
     if (!error)
         return;
@@ -3242,7 +3242,7 @@
                 (TreeBuilderObject*) self->target, value
                 );
         else if (self->handle_data)
-            res = _PyObject_CallOneArg(self->handle_data, value);
+            res = PyObject_CallOneArg(self->handle_data, value);
         else
             res = NULL;
         Py_XDECREF(res);
@@ -3353,7 +3353,7 @@
         /* shortcut */
         res = treebuilder_handle_data((TreeBuilderObject*) self->target, data);
     else if (self->handle_data)
-        res = _PyObject_CallOneArg(self->handle_data, data);
+        res = PyObject_CallOneArg(self->handle_data, data);
     else
         res = NULL;
 
@@ -3380,7 +3380,7 @@
     else if (self->handle_end) {
         tag = makeuniversal(self, tag_in);
         if (tag) {
-            res = _PyObject_CallOneArg(self->handle_end, tag);
+            res = PyObject_CallOneArg(self->handle_end, tag);
             Py_DECREF(tag);
         }
     }
@@ -3467,7 +3467,7 @@
         if (!prefix)
             return;
 
-        res = _PyObject_CallOneArg(self->handle_end_ns, prefix);
+        res = PyObject_CallOneArg(self->handle_end_ns, prefix);
         Py_DECREF(prefix);
     }
 
@@ -3499,7 +3499,7 @@
         if (!comment)
             return;
 
-        res = _PyObject_CallOneArg(self->handle_comment, comment);
+        res = PyObject_CallOneArg(self->handle_comment, comment);
         Py_XDECREF(res);
         Py_DECREF(comment);
     }
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index 50d8c58..88c02d8 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -213,7 +213,7 @@
 static void
 partial_setvectorcall(partialobject *pto)
 {
-    if (_PyVectorcall_Function(pto->fn) == NULL) {
+    if (PyVectorcall_Function(pto->fn) == NULL) {
         /* Don't use vectorcall if the underlying function doesn't support it */
         pto->vectorcall = NULL;
     }
@@ -440,7 +440,7 @@
     0,                                  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
         Py_TPFLAGS_BASETYPE |
-        _Py_TPFLAGS_HAVE_VECTORCALL,    /* tp_flags */
+        Py_TPFLAGS_HAVE_VECTORCALL,     /* tp_flags */
     partial_doc,                        /* tp_doc */
     (traverseproc)partial_traverse,     /* tp_traverse */
     0,                                  /* tp_clear */
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index ddd17a2..6f55577 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -461,7 +461,7 @@
 buffered_simple_flush(buffered *self, PyObject *args)
 {
     CHECK_INITIALIZED(self)
-    return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_flush);
+    return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_flush);
 }
 
 static int
@@ -513,7 +513,7 @@
     }
     /* flush() will most probably re-take the lock, so drop it first */
     LEAVE_BUFFERED(self)
-    res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+    res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
     if (!ENTER_BUFFERED(self))
         return NULL;
     if (res == NULL)
@@ -521,7 +521,7 @@
     else
         Py_DECREF(res);
 
-    res = _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_close);
+    res = PyObject_CallMethodNoArgs(self->raw, _PyIO_str_close);
 
     if (self->buffer) {
         PyMem_Free(self->buffer);
@@ -545,7 +545,7 @@
 {
     PyObject *raw, *res;
     CHECK_INITIALIZED(self)
-    res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+    res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
     if (res == NULL)
         return NULL;
     Py_DECREF(res);
@@ -562,21 +562,21 @@
 buffered_seekable(buffered *self, PyObject *Py_UNUSED(ignored))
 {
     CHECK_INITIALIZED(self)
-    return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_seekable);
+    return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_seekable);
 }
 
 static PyObject *
 buffered_readable(buffered *self, PyObject *Py_UNUSED(ignored))
 {
     CHECK_INITIALIZED(self)
-    return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_readable);
+    return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_readable);
 }
 
 static PyObject *
 buffered_writable(buffered *self, PyObject *Py_UNUSED(ignored))
 {
     CHECK_INITIALIZED(self)
-    return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_writable);
+    return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_writable);
 }
 
 static PyObject *
@@ -599,14 +599,14 @@
 buffered_fileno(buffered *self, PyObject *Py_UNUSED(ignored))
 {
     CHECK_INITIALIZED(self)
-    return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_fileno);
+    return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_fileno);
 }
 
 static PyObject *
 buffered_isatty(buffered *self, PyObject *Py_UNUSED(ignored))
 {
     CHECK_INITIALIZED(self)
-    return _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_isatty);
+    return PyObject_CallMethodNoArgs(self->raw, _PyIO_str_isatty);
 }
 
 /* Forward decls */
@@ -670,7 +670,7 @@
 {
     Py_off_t n;
     PyObject *res;
-    res = _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_tell);
+    res = PyObject_CallMethodNoArgs(self->raw, _PyIO_str_tell);
     if (res == NULL)
         return -1;
     n = PyNumber_AsOff_t(res, PyExc_ValueError);
@@ -1324,7 +1324,7 @@
             goto end;
         Py_CLEAR(res);
     }
-    res = _PyObject_CallMethodOneArg(self->raw, _PyIO_str_truncate, pos);
+    res = PyObject_CallMethodOneArg(self->raw, _PyIO_str_truncate, pos);
     if (res == NULL)
         goto end;
     /* Reset cached position */
@@ -1351,7 +1351,7 @@
         line = _buffered_readline(self, -1);
     }
     else {
-        line = _PyObject_CallMethodNoArgs((PyObject *)self,
+        line = PyObject_CallMethodNoArgs((PyObject *)self,
                                              _PyIO_str_readline);
         if (line && !PyBytes_Check(line)) {
             PyErr_Format(PyExc_OSError,
@@ -1470,7 +1470,7 @@
        raised (see issue #10956).
     */
     do {
-        res = _PyObject_CallMethodOneArg(self->raw, _PyIO_str_readinto, memobj);
+        res = PyObject_CallMethodOneArg(self->raw, _PyIO_str_readinto, memobj);
     } while (res == NULL && _PyIO_trap_eintr());
     Py_DECREF(memobj);
     if (res == NULL)
@@ -1569,7 +1569,7 @@
         }
 
         /* Read until EOF or until read() would block. */
-        data = _PyObject_CallMethodNoArgs(self->raw, _PyIO_str_read);
+        data = PyObject_CallMethodNoArgs(self->raw, _PyIO_str_read);
         if (data == NULL)
             goto cleanup;
         if (data != Py_None && !PyBytes_Check(data)) {
@@ -1818,7 +1818,7 @@
     */
     do {
         errno = 0;
-        res = _PyObject_CallMethodOneArg(self->raw, _PyIO_str_write, memobj);
+        res = PyObject_CallMethodOneArg(self->raw, _PyIO_str_write, memobj);
         errnum = errno;
     } while (res == NULL && _PyIO_trap_eintr());
     Py_DECREF(memobj);
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
index d51fc94..1ff3564 100644
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -235,7 +235,7 @@
         Py_RETURN_NONE;
     }
 
-    res = _PyObject_CallMethodNoArgs(self, _PyIO_str_flush);
+    res = PyObject_CallMethodNoArgs(self, _PyIO_str_flush);
 
     PyErr_Fetch(&exc, &val, &tb);
     rc = _PyObject_SetAttrId(self, &PyId___IOBase_closed, Py_True);
@@ -281,7 +281,7 @@
            finalization process. */
         if (_PyObject_SetAttrId(self, &PyId__finalizing, Py_True))
             PyErr_Clear();
-        res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_close);
+        res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_close);
         /* Silencing I/O errors is bad, but printing spurious tracebacks is
            equally as bad, and potentially more frequent (because of
            shutdown issues). */
@@ -382,7 +382,7 @@
 PyObject *
 _PyIOBase_check_seekable(PyObject *self, PyObject *args)
 {
-    PyObject *res  = _PyObject_CallMethodNoArgs(self, _PyIO_str_seekable);
+    PyObject *res  = PyObject_CallMethodNoArgs(self, _PyIO_str_seekable);
     if (res == NULL)
         return NULL;
     if (res != Py_True) {
@@ -415,7 +415,7 @@
 PyObject *
 _PyIOBase_check_readable(PyObject *self, PyObject *args)
 {
-    PyObject *res = _PyObject_CallMethodNoArgs(self, _PyIO_str_readable);
+    PyObject *res = PyObject_CallMethodNoArgs(self, _PyIO_str_readable);
     if (res == NULL)
         return NULL;
     if (res != Py_True) {
@@ -448,7 +448,7 @@
 PyObject *
 _PyIOBase_check_writable(PyObject *self, PyObject *args)
 {
-    PyObject *res = _PyObject_CallMethodNoArgs(self, _PyIO_str_writable);
+    PyObject *res = PyObject_CallMethodNoArgs(self, _PyIO_str_writable);
     if (res == NULL)
         return NULL;
     if (res != Py_True) {
@@ -477,7 +477,7 @@
 static PyObject *
 iobase_exit(PyObject *self, PyObject *args)
 {
-    return _PyObject_CallMethodNoArgs(self, _PyIO_str_close);
+    return PyObject_CallMethodNoArgs(self, _PyIO_str_close);
 }
 
 /* Lower-level APIs */
@@ -556,7 +556,7 @@
         PyObject *b;
 
         if (peek != NULL) {
-            PyObject *readahead = _PyObject_CallOneArg(peek, _PyLong_One);
+            PyObject *readahead = PyObject_CallOneArg(peek, _PyLong_One);
             if (readahead == NULL) {
                 /* NOTE: PyErr_SetFromErrno() calls PyErr_CheckSignals()
                    when EINTR occurs so we needn't do it ourselves. */
@@ -655,7 +655,7 @@
 static PyObject *
 iobase_iternext(PyObject *self)
 {
-    PyObject *line = _PyObject_CallMethodNoArgs(self, _PyIO_str_readline);
+    PyObject *line = PyObject_CallMethodNoArgs(self, _PyIO_str_readline);
 
     if (line == NULL)
         return NULL;
diff --git a/Modules/_io/stringio.c b/Modules/_io/stringio.c
index 89b29bb..28d54e0 100644
--- a/Modules/_io/stringio.c
+++ b/Modules/_io/stringio.c
@@ -408,7 +408,7 @@
     }
     else {
         /* XXX is subclassing StringIO really supported? */
-        line = _PyObject_CallMethodNoArgs((PyObject *)self,
+        line = PyObject_CallMethodNoArgs((PyObject *)self,
                                              _PyIO_str_readline);
         if (line && !PyUnicode_Check(line)) {
             PyErr_Format(PyExc_OSError,
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index c4c56cb..1d45c7a 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -527,7 +527,7 @@
     unsigned long long flag;
 
     if (self->decoder != Py_None) {
-        PyObject *state = _PyObject_CallMethodNoArgs(self->decoder,
+        PyObject *state = PyObject_CallMethodNoArgs(self->decoder,
            _PyIO_str_getstate);
         if (state == NULL)
             return NULL;
@@ -601,7 +601,7 @@
     self->seennl = 0;
     self->pendingcr = 0;
     if (self->decoder != Py_None)
-        return _PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
+        return PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
     else
         Py_RETURN_NONE;
 }
@@ -963,7 +963,7 @@
 
     self->encoding_start_of_stream = 1;
 
-    PyObject *cookieObj = _PyObject_CallMethodNoArgs(
+    PyObject *cookieObj = PyObject_CallMethodNoArgs(
         self->buffer, _PyIO_str_tell);
     if (cookieObj == NULL) {
         return -1;
@@ -977,7 +977,7 @@
 
     if (cmp == 0) {
         self->encoding_start_of_stream = 0;
-        PyObject *res = _PyObject_CallMethodOneArg(
+        PyObject *res = PyObject_CallMethodOneArg(
             self->encoder, _PyIO_str_setstate, _PyLong_Zero);
         if (res == NULL) {
             return -1;
@@ -1386,7 +1386,7 @@
         return NULL;
     }
 
-    PyObject *res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+    PyObject *res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
     if (res == NULL) {
         return NULL;
     }
@@ -1525,7 +1525,7 @@
 {
     PyObject *buffer, *res;
     CHECK_ATTACHED(self);
-    res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+    res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
     if (res == NULL)
         return NULL;
     Py_DECREF(res);
@@ -1597,7 +1597,7 @@
 
     PyObject *ret;
     do {
-        ret = _PyObject_CallMethodOneArg(self->buffer, _PyIO_str_write, b);
+        ret = PyObject_CallMethodOneArg(self->buffer, _PyIO_str_write, b);
     } while (ret == NULL && _PyIO_trap_eintr());
     Py_DECREF(b);
     if (ret == NULL)
@@ -1667,7 +1667,7 @@
         self->encoding_start_of_stream = 0;
     }
     else
-        b = _PyObject_CallMethodOneArg(self->encoder, _PyIO_str_encode, text);
+        b = PyObject_CallMethodOneArg(self->encoder, _PyIO_str_encode, text);
 
     Py_DECREF(text);
     if (b == NULL)
@@ -1718,7 +1718,7 @@
     }
 
     if (needflush) {
-        ret = _PyObject_CallMethodNoArgs(self->buffer, _PyIO_str_flush);
+        ret = PyObject_CallMethodNoArgs(self->buffer, _PyIO_str_flush);
         if (ret == NULL)
             return NULL;
         Py_DECREF(ret);
@@ -1808,7 +1808,7 @@
         /* To prepare for tell(), we need to snapshot a point in the file
          * where the decoder's input buffer is empty.
          */
-        PyObject *state = _PyObject_CallMethodNoArgs(self->decoder,
+        PyObject *state = PyObject_CallMethodNoArgs(self->decoder,
                                                      _PyIO_str_getstate);
         if (state == NULL)
             return -1;
@@ -1849,7 +1849,7 @@
     if (chunk_size == NULL)
         goto fail;
 
-    input_chunk = _PyObject_CallMethodOneArg(self->buffer,
+    input_chunk = PyObject_CallMethodOneArg(self->buffer,
         (self->has_read1 ? _PyIO_str_read1: _PyIO_str_read),
         chunk_size);
     Py_DECREF(chunk_size);
@@ -2393,7 +2393,7 @@
        utf-16, that we are expecting a BOM).
     */
     if (cookie->start_pos == 0 && cookie->dec_flags == 0)
-        res = _PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
+        res = PyObject_CallMethodNoArgs(self->decoder, _PyIO_str_reset);
     else
         res = _PyObject_CallMethodId(self->decoder, &PyId_setstate,
                                      "((yi))", "", cookie->dec_flags);
@@ -2408,11 +2408,11 @@
 {
     PyObject *res;
     if (start_of_stream) {
-        res = _PyObject_CallMethodNoArgs(self->encoder, _PyIO_str_reset);
+        res = PyObject_CallMethodNoArgs(self->encoder, _PyIO_str_reset);
         self->encoding_start_of_stream = 1;
     }
     else {
-        res = _PyObject_CallMethodOneArg(self->encoder, _PyIO_str_setstate,
+        res = PyObject_CallMethodOneArg(self->encoder, _PyIO_str_setstate,
                                         _PyLong_Zero);
         self->encoding_start_of_stream = 0;
     }
@@ -2537,7 +2537,7 @@
         goto fail;
     }
 
-    res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+    res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
     if (res == NULL)
         goto fail;
     Py_DECREF(res);
@@ -2552,7 +2552,7 @@
     posobj = PyLong_FromOff_t(cookie.start_pos);
     if (posobj == NULL)
         goto fail;
-    res = _PyObject_CallMethodOneArg(self->buffer, _PyIO_str_seek, posobj);
+    res = PyObject_CallMethodOneArg(self->buffer, _PyIO_str_seek, posobj);
     Py_DECREF(posobj);
     if (res == NULL)
         goto fail;
@@ -2700,14 +2700,14 @@
     chars_to_skip = self->decoded_chars_used;
 
     /* Decoder state will be restored at the end */
-    saved_state = _PyObject_CallMethodNoArgs(self->decoder,
+    saved_state = PyObject_CallMethodNoArgs(self->decoder,
                                              _PyIO_str_getstate);
     if (saved_state == NULL)
         goto fail;
 
 #define DECODER_GETSTATE() do { \
         PyObject *dec_buffer; \
-        PyObject *_state = _PyObject_CallMethodNoArgs(self->decoder, \
+        PyObject *_state = PyObject_CallMethodNoArgs(self->decoder, \
             _PyIO_str_getstate); \
         if (_state == NULL) \
             goto fail; \
@@ -2870,12 +2870,12 @@
 
     CHECK_ATTACHED(self)
 
-    res = _PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
+    res = PyObject_CallMethodNoArgs((PyObject *)self, _PyIO_str_flush);
     if (res == NULL)
         return NULL;
     Py_DECREF(res);
 
-    return _PyObject_CallMethodOneArg(self->buffer, _PyIO_str_truncate, pos);
+    return PyObject_CallMethodOneArg(self->buffer, _PyIO_str_truncate, pos);
 }
 
 static PyObject *
@@ -3084,7 +3084,7 @@
         line = _textiowrapper_readline(self, -1);
     }
     else {
-        line = _PyObject_CallMethodNoArgs((PyObject *)self,
+        line = PyObject_CallMethodNoArgs((PyObject *)self,
                                           _PyIO_str_readline);
         if (line && !PyUnicode_Check(line)) {
             PyErr_Format(PyExc_OSError,
diff --git a/Modules/_json.c b/Modules/_json.c
index a70043b..ee2070c 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -777,14 +777,14 @@
     *next_idx_ptr = idx + 1;
 
     if (has_pairs_hook) {
-        val = _PyObject_CallOneArg(s->object_pairs_hook, rval);
+        val = PyObject_CallOneArg(s->object_pairs_hook, rval);
         Py_DECREF(rval);
         return val;
     }
 
     /* if object_hook is not None: rval = object_hook(rval) */
     if (s->object_hook != Py_None) {
-        val = _PyObject_CallOneArg(s->object_hook, rval);
+        val = PyObject_CallOneArg(s->object_hook, rval);
         Py_DECREF(rval);
         return val;
     }
@@ -890,7 +890,7 @@
         return NULL;
 
     /* rval = parse_constant(constant) */
-    rval = _PyObject_CallOneArg(s->parse_constant, cstr);
+    rval = PyObject_CallOneArg(s->parse_constant, cstr);
     idx += PyUnicode_GET_LENGTH(cstr);
     Py_DECREF(cstr);
     *next_idx_ptr = idx;
@@ -989,7 +989,7 @@
                                            idx - start);
         if (numstr == NULL)
             return NULL;
-        rval = _PyObject_CallOneArg(custom_func, numstr);
+        rval = PyObject_CallOneArg(custom_func, numstr);
     }
     else {
         Py_ssize_t i, n;
@@ -1399,7 +1399,7 @@
     if (s->fast_encode) {
         return s->fast_encode(NULL, obj);
     }
-    encoded = _PyObject_CallOneArg(s->encoder, obj);
+    encoded = PyObject_CallOneArg(s->encoder, obj);
     if (encoded != NULL && !PyUnicode_Check(encoded)) {
         PyErr_Format(PyExc_TypeError,
                      "encoder() must return a string, not %.80s",
@@ -1485,7 +1485,7 @@
                 return -1;
             }
         }
-        newobj = _PyObject_CallOneArg(s->defaultfn, obj);
+        newobj = PyObject_CallOneArg(s->defaultfn, obj);
         if (newobj == NULL) {
             Py_XDECREF(ident);
             return -1;
diff --git a/Modules/_operator.c b/Modules/_operator.c
index 5aa229f..adee5fd 100644
--- a/Modules/_operator.c
+++ b/Modules/_operator.c
@@ -1682,7 +1682,7 @@
 
         newargs[0] = (PyObject *)Py_TYPE(mc);
         newargs[1] = mc->name;
-        constructor = _PyObject_FastCallDict(partial, newargs, 2, mc->kwds);
+        constructor = PyObject_VectorcallDict(partial, newargs, 2, mc->kwds);
 
         Py_DECREF(partial);
         return Py_BuildValue("NO", constructor, mc->args);
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 5f11fe5..2ba7a16 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -359,7 +359,7 @@
 {
     PyObject *result;
 
-    result = _PyObject_CallOneArg(func, obj);
+    result = PyObject_CallOneArg(func, obj);
     Py_DECREF(obj);
     return result;
 }
@@ -420,7 +420,7 @@
         return PyObject_CallFunctionObjArgs(func, self, obj, NULL);
     }
     else {
-        return _PyObject_CallOneArg(func, obj);
+        return PyObject_CallOneArg(func, obj);
     }
 }
 
@@ -2298,7 +2298,7 @@
                 return -1;
             }
         }
-        result = _PyObject_CallOneArg(self->write, payload);
+        result = PyObject_CallOneArg(self->write, payload);
         Py_XDECREF(mem);
         if (result == NULL) {
             return -1;
@@ -2506,7 +2506,7 @@
     }
     int in_band = 1;
     if (self->buffer_callback != NULL) {
-        PyObject *ret = _PyObject_CallOneArg(self->buffer_callback, obj);
+        PyObject *ret = PyObject_CallOneArg(self->buffer_callback, obj);
         if (ret == NULL) {
             return -1;
         }
@@ -4323,7 +4323,7 @@
      * regular reduction mechanism.
      */
     if (self->reducer_override != NULL) {
-        reduce_value = _PyObject_CallOneArg(self->reducer_override, obj);
+        reduce_value = PyObject_CallOneArg(self->reducer_override, obj);
         if (reduce_value == NULL) {
             goto error;
         }
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index 80bb44d..2aed79e 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -80,7 +80,7 @@
 
     if (need_to_reenable_gc) {
         PyErr_Fetch(&exctype, &val, &tb);
-        result = _PyObject_CallMethodNoArgs(
+        result = PyObject_CallMethodNoArgs(
             gc_module, _posixsubprocessstate_global->enable);
         if (exctype != NULL) {
             PyErr_Restore(exctype, val, tb);
@@ -657,7 +657,7 @@
         gc_module = PyImport_ImportModule("gc");
         if (gc_module == NULL)
             return NULL;
-        result = _PyObject_CallMethodNoArgs(
+        result = PyObject_CallMethodNoArgs(
             gc_module, _posixsubprocessstate_global->isenabled);
         if (result == NULL) {
             Py_DECREF(gc_module);
@@ -669,7 +669,7 @@
             Py_DECREF(gc_module);
             return NULL;
         }
-        result = _PyObject_CallMethodNoArgs(
+        result = PyObject_CallMethodNoArgs(
             gc_module, _posixsubprocessstate_global->disable);
         if (result == NULL) {
             Py_DECREF(gc_module);
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index 1f4bf74..f0fdb03 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -287,7 +287,7 @@
         /* Calling int.__abs__() prevents calling arg.__abs__(), which might
            return an invalid value. See issue #31478. */
         args[0] = arg;
-        n = _PyObject_Vectorcall(_randomstate_global->Long___abs__, args, 0,
+        n = PyObject_Vectorcall(_randomstate_global->Long___abs__, args, 0,
                                          NULL);
     }
     else {
diff --git a/Modules/_sqlite/cache.c b/Modules/_sqlite/cache.c
index 7552d1b..758fc02 100644
--- a/Modules/_sqlite/cache.c
+++ b/Modules/_sqlite/cache.c
@@ -183,7 +183,7 @@
             }
         }
 
-        /* We cannot replace this by _PyObject_CallOneArg() since
+        /* We cannot replace this by PyObject_CallOneArg() since
          * PyObject_CallFunction() has a special case when using a
          * single tuple as argument. */
         data = PyObject_CallFunction(self->factory, "O", key);
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 6405166..697295d 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -308,7 +308,7 @@
         factory = (PyObject*)&pysqlite_CursorType;
     }
 
-    cursor = _PyObject_CallOneArg(factory, (PyObject *)self);
+    cursor = PyObject_CallOneArg(factory, (PyObject *)self);
     if (cursor == NULL)
         return NULL;
     if (!PyObject_TypeCheck(cursor, &pysqlite_CursorType)) {
@@ -975,7 +975,7 @@
     py_statement = PyUnicode_DecodeUTF8(statement_string,
             strlen(statement_string), "replace");
     if (py_statement) {
-        ret = _PyObject_CallOneArg((PyObject*)user_arg, py_statement);
+        ret = PyObject_CallOneArg((PyObject*)user_arg, py_statement);
         Py_DECREF(py_statement);
     }
 
@@ -1472,7 +1472,7 @@
         goto finally;
     }
 
-    retval = _PyObject_CallOneArg(pyfn_iterdump, (PyObject *)self);
+    retval = PyObject_CallOneArg(pyfn_iterdump, (PyObject *)self);
 
 finally:
     Py_XDECREF(module);
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index 06275ec..ab276db 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -266,7 +266,7 @@
                 item = PyBytes_FromStringAndSize(val_str, nbytes);
                 if (!item)
                     goto error;
-                converted = _PyObject_CallOneArg(converter, item);
+                converted = PyObject_CallOneArg(converter, item);
                 Py_DECREF(item);
             }
         } else {
diff --git a/Modules/_sqlite/microprotocols.c b/Modules/_sqlite/microprotocols.c
index bdcb174..bb0d19f 100644
--- a/Modules/_sqlite/microprotocols.c
+++ b/Modules/_sqlite/microprotocols.c
@@ -92,7 +92,7 @@
     Py_DECREF(key);
     if (adapter) {
         Py_INCREF(adapter);
-        adapted = _PyObject_CallOneArg(adapter, obj);
+        adapted = PyObject_CallOneArg(adapter, obj);
         Py_DECREF(adapter);
         return adapted;
     }
@@ -105,7 +105,7 @@
         return NULL;
     }
     if (adapter) {
-        adapted = _PyObject_CallOneArg(adapter, obj);
+        adapted = PyObject_CallOneArg(adapter, obj);
         Py_DECREF(adapter);
 
         if (adapted == Py_None) {
@@ -124,7 +124,7 @@
         return NULL;
     }
     if (adapter) {
-        adapted = _PyObject_CallOneArg(adapter, proto);
+        adapted = PyObject_CallOneArg(adapter, proto);
         Py_DECREF(adapter);
 
         if (adapted == Py_None) {
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 6518e98..80c4184 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -1081,7 +1081,7 @@
             match = pattern_new_match(self, &state, 1);
             if (!match)
                 goto error;
-            item = _PyObject_CallOneArg(filter, match);
+            item = PyObject_CallOneArg(filter, match);
             Py_DECREF(match);
             if (!item)
                 goto error;
diff --git a/Modules/_struct.c b/Modules/_struct.c
index cc536b4..0cdfe26 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -2097,7 +2097,7 @@
         return 0;
     }
 
-    s_object = _PyObject_CallOneArg(_structmodulestate_global->PyStructType, fmt);
+    s_object = PyObject_CallOneArg(_structmodulestate_global->PyStructType, fmt);
     if (s_object != NULL) {
         if (PyDict_GET_SIZE(cache) >= MAXCACHE)
             PyDict_Clear(cache);
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index e6d3034..eb31a0e 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -4846,7 +4846,7 @@
         return NULL;
     }
 
-    return _PyObject_FastCallDict(func, stack, nargs, kwargs);
+    return PyObject_VectorcallDict(func, stack, nargs, kwargs);
 }
 
 
@@ -4880,7 +4880,7 @@
         PyErr_SetString(PyExc_TypeError, "kwnames must be None or a tuple");
         return NULL;
     }
-    return _PyObject_Vectorcall(func, stack, nargs, kwnames);
+    return PyObject_Vectorcall(func, stack, nargs, kwnames);
 }
 
 
@@ -5253,7 +5253,7 @@
     if (pyargs == NULL) {
         return NULL;
     }
-    PyObject *pykwargs = _PyObject_Vectorcall((PyObject*)&PyDict_Type,
+    PyObject *pykwargs = PyObject_Vectorcall((PyObject*)&PyDict_Type,
                                               args + nargs, 0, kwargs);
     return Py_BuildValue("NNN", _null_to_none(self), pyargs, pykwargs);
 }
@@ -6133,7 +6133,7 @@
     .tp_call = PyVectorcall_Call,
     .tp_vectorcall_offset = offsetof(MethodDescriptorObject, vectorcall),
     .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
-                Py_TPFLAGS_METHOD_DESCRIPTOR | _Py_TPFLAGS_HAVE_VECTORCALL,
+                Py_TPFLAGS_METHOD_DESCRIPTOR | Py_TPFLAGS_HAVE_VECTORCALL,
     .tp_descr_get = func_descr_get,
 };
 
@@ -6172,7 +6172,7 @@
     .tp_new = MethodDescriptor2_new,
     .tp_call = PyVectorcall_Call,
     .tp_vectorcall_offset = offsetof(MethodDescriptor2Object, vectorcall),
-    .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | _Py_TPFLAGS_HAVE_VECTORCALL,
+    .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_VECTORCALL,
 };
 
 PyDoc_STRVAR(heapgctype__doc__,
diff --git a/Modules/_xxtestfuzz/fuzzer.c b/Modules/_xxtestfuzz/fuzzer.c
index dae1eae..74ba819 100644
--- a/Modules/_xxtestfuzz/fuzzer.c
+++ b/Modules/_xxtestfuzz/fuzzer.c
@@ -104,7 +104,7 @@
     if (input_bytes == NULL) {
         return 0;
     }
-    PyObject* parsed = _PyObject_CallOneArg(json_loads_method, input_bytes);
+    PyObject* parsed = PyObject_CallOneArg(json_loads_method, input_bytes);
     if (parsed == NULL) {
         /* Ignore ValueError as the fuzzer will more than likely
            generate some invalid json and values */
@@ -263,7 +263,7 @@
     PyObject* pattern = compiled_patterns[idx];
     PyObject* match_callable = PyObject_GetAttrString(pattern, "match");
 
-    PyObject* matches = _PyObject_CallOneArg(match_callable, to_match);
+    PyObject* matches = PyObject_CallOneArg(match_callable, to_match);
 
     Py_XDECREF(matches);
     Py_DECREF(match_callable);
diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h
index 7ed8365..8f6f880 100644
--- a/Modules/cjkcodecs/cjkcodecs.h
+++ b/Modules/cjkcodecs/cjkcodecs.h
@@ -291,7 +291,7 @@
     if (codecobj == NULL)
         return NULL;
 
-    r = _PyObject_CallOneArg(cofunc, codecobj);
+    r = PyObject_CallOneArg(cofunc, codecobj);
     Py_DECREF(codecobj);
 
     return r;
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c
index 2dd63a9..3bc07b2 100644
--- a/Modules/cjkcodecs/multibytecodec.c
+++ b/Modules/cjkcodecs/multibytecodec.c
@@ -92,7 +92,7 @@
     if (cb == NULL)
         return NULL;
 
-    r = _PyObject_CallOneArg(cb, exc);
+    r = PyObject_CallOneArg(cb, exc);
     Py_DECREF(cb);
     return r;
 }
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 5673f60..cf164c1 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -872,7 +872,7 @@
         _PyObject_ASSERT(op, callback != NULL);
 
         /* copy-paste of weakrefobject.c's handle_callback() */
-        temp = _PyObject_CallOneArg(callback, (PyObject *)wr);
+        temp = PyObject_CallOneArg(callback, (PyObject *)wr);
         if (temp == NULL)
             PyErr_WriteUnraisable(callback);
         else
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 0dafb65..c00c274 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -134,7 +134,7 @@
         newkey = newvalue;
         Py_INCREF(newvalue);
     } else {
-        newkey = _PyObject_CallOneArg(gbo->keyfunc, newvalue);
+        newkey = PyObject_CallOneArg(gbo->keyfunc, newvalue);
         if (newkey == NULL) {
             Py_DECREF(newvalue);
             return -1;
@@ -1219,7 +1219,7 @@
         if (lz->start == 1)
             return item;
 
-        good = _PyObject_CallOneArg(lz->func, item);
+        good = PyObject_CallOneArg(lz->func, item);
         if (good == NULL) {
             Py_DECREF(item);
             return NULL;
@@ -1382,7 +1382,7 @@
     if (item == NULL)
         return NULL;
 
-    good = _PyObject_CallOneArg(lz->func, item);
+    good = PyObject_CallOneArg(lz->func, item);
     if (good == NULL) {
         Py_DECREF(item);
         return NULL;
@@ -3918,7 +3918,7 @@
             ok = PyObject_IsTrue(item);
         } else {
             PyObject *good;
-            good = _PyObject_CallOneArg(lz->func, item);
+            good = PyObject_CallOneArg(lz->func, item);
             if (good == NULL) {
                 Py_DECREF(item);
                 return NULL;
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index 9016734..a7f8b50 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -119,7 +119,7 @@
                                   XML_ErrorString(code), lineno, column);
     if (buffer == NULL)
         return NULL;
-    err = _PyObject_CallOneArg(ErrorObject, buffer);
+    err = PyObject_CallOneArg(ErrorObject, buffer);
     Py_DECREF(buffer);
     if (  err != NULL
           && set_error_attr(err, "code", code)