gh-102511: Change the `os.path.splitroot` param name from `path` back to `p` (GH-124097)

This commit is contained in:
sobolevn 2024-09-18 17:17:32 +03:00 committed by GitHub
parent 0c4884d8aa
commit 3b6bfa77aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -2367,7 +2367,7 @@ exit:
#endif /* defined(MS_WINDOWS) */ #endif /* defined(MS_WINDOWS) */
PyDoc_STRVAR(os__path_splitroot_ex__doc__, PyDoc_STRVAR(os__path_splitroot_ex__doc__,
"_path_splitroot_ex($module, /, path)\n" "_path_splitroot_ex($module, /, p)\n"
"--\n" "--\n"
"\n" "\n"
"Split a pathname into drive, root and tail.\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]; PyObject *ob_item[NUM_KEYWORDS];
} _kwtuple = { } _kwtuple = {
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
.ob_item = { &_Py_ID(path), }, .ob_item = { _Py_LATIN1_CHR('p'), },
}; };
#undef NUM_KEYWORDS #undef NUM_KEYWORDS
#define KWTUPLE (&_kwtuple.ob_base.ob_base) #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 # define KWTUPLE NULL
#endif // !Py_BUILD_CORE #endif // !Py_BUILD_CORE
static const char * const _keywords[] = {"path", NULL}; static const char * const _keywords[] = {"p", NULL};
static _PyArg_Parser _parser = { static _PyArg_Parser _parser = {
.keywords = _keywords, .keywords = _keywords,
.fname = "_path_splitroot_ex", .fname = "_path_splitroot_ex",
@ -12837,4 +12837,4 @@ os__create_environ(PyObject *module, PyObject *Py_UNUSED(ignored))
#ifndef OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #ifndef OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF
#define OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #define OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF
#endif /* !defined(OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF) */ #endif /* !defined(OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF) */
/*[clinic end generated code: output=2fafa0d2814948f8 input=a9049054013a1b77]*/ /*[clinic end generated code: output=a736ad3f7205176e input=a9049054013a1b77]*/

View File

@ -5497,7 +5497,7 @@ os__path_isjunction_impl(PyObject *module, path_t *path)
/*[clinic input] /*[clinic input]
os._path_splitroot_ex 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. Split a pathname into drive, root and tail.
@ -5506,7 +5506,7 @@ The tail contains anything after the root.
static PyObject * static PyObject *
os__path_splitroot_ex_impl(PyObject *module, path_t *path) 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; Py_ssize_t drvsize, rootsize;
PyObject *drv = NULL, *root = NULL, *tail = NULL, *result = NULL; PyObject *drv = NULL, *root = NULL, *tail = NULL, *result = NULL;