From 8a0285b795660659b13f69a73da6054bb2400eca Mon Sep 17 00:00:00 2001 From: sobolevn Date: Wed, 18 Sep 2024 17:17:32 +0300 Subject: [PATCH] [3.13] gh-102511: Change the `os.path.splitroot` param name from `path` back to `p` (GH-124097) (cherry picked from commit 3b6bfa77aa4da2ce1f3a15e39831f8b85882698c) Co-authored-by: sobolevn --- Modules/clinic/posixmodule.c.h | 8 ++++---- Modules/posixmodule.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index 14a6efb9ac96d8..d7af87dc946aeb 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -2367,7 +2367,7 @@ os__path_isjunction(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P #endif /* defined(MS_WINDOWS) */ PyDoc_STRVAR(os__path_splitroot_ex__doc__, -"_path_splitroot_ex($module, /, path)\n" +"_path_splitroot_ex($module, /, p)\n" "--\n" "\n" "Split a pathname into drive, root and tail.\n" @@ -2393,7 +2393,7 @@ os__path_splitroot_ex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) - .ob_item = { &_Py_ID(path), }, + .ob_item = { _Py_LATIN1_CHR('p'), }, }; #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) @@ -2402,7 +2402,7 @@ os__path_splitroot_ex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, # define KWTUPLE NULL #endif // !Py_BUILD_CORE - static const char * const _keywords[] = {"path", NULL}; + static const char * const _keywords[] = {"p", NULL}; static _PyArg_Parser _parser = { .keywords = _keywords, .fname = "_path_splitroot_ex", @@ -12819,4 +12819,4 @@ os__is_inputhook_installed(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #define OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #endif /* !defined(OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF) */ -/*[clinic end generated code: output=b2ffb856bcada7c9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ee0e3772de1bf216 input=a9049054013a1b77]*/ diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 51e34b5f4b74fc..1b5dc278e9d41b 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -5503,7 +5503,7 @@ os__path_isjunction_impl(PyObject *module, path_t *path) /*[clinic input] os._path_splitroot_ex - path: path_t(make_wide=True, nonstrict=True) + p as path: path_t(make_wide=True, nonstrict=True) Split a pathname into drive, root and tail. @@ -5512,7 +5512,7 @@ The tail contains anything after the root. static PyObject * os__path_splitroot_ex_impl(PyObject *module, path_t *path) -/*[clinic end generated code: output=4b0072b6cdf4b611 input=6eb76e9173412c92]*/ +/*[clinic end generated code: output=4b0072b6cdf4b611 input=4556b615c7cc13f2]*/ { Py_ssize_t drvsize, rootsize; PyObject *drv = NULL, *root = NULL, *tail = NULL, *result = NULL;