Skip to content

gh-136710: posixmodule.c: fix chdir docstring #136709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 16, 2025
Merged

Conversation

haampie
Copy link
Contributor

@haampie haampie commented Jul 16, 2025

Fixes the following issue:

>>> from docutils.core import publish_doctree
>>> from posix import chdir
>>> publish_doctree(chdir.__doc__)
<string>:5: (ERROR/3) Unexpected indentation.

Fixes the following issue:

```
>>> from docutils.core import publish_doctree
>>> from posix import chdir
>>> publish_doctree(chdir.__doc__)
<string>:5: (ERROR/3) Unexpected indentation.
```
@haampie haampie changed the title posixmodule.c: fix chdir docstring gh-136710: posixmodule.c: fix chdir docstring Jul 16, 2025
@kailando
Copy link

Hmm... You may have to update it.

At Tests / Check if generated files are up to date (pull_request):

Generated files not up to date.
Perhaps you forgot to run make regen-all or build.bat --regen. ;)
configure files must be regenerated with a specific version of autoconf.
M  Modules/clinic/posixmodule.c.h
M  Modules/posixmodule.c

diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
index 22f426c..65f5f8c 100644
--- a/Modules/clinic/posixmodule.c.h
+++ b/Modules/clinic/posixmodule.c.h
@@ -380,7 +380,7 @@ PyDoc_STRVAR(os_chdir__doc__,
 "\n"
 "path may always be specified as a string.\n"
 "On some platforms, path may also be specified as an open file descriptor.\n"
-"  If this functionality is unavailable, using it raises an exception.");
+"If this functionality is unavailable, using it raises an exception.");
 
 #define OS_CHDIR_METHODDEF    \
     {"chdir", _PyCFunction_CAST(os_chdir), METH_FASTCALL|METH_KEYWORDS, os_chdir__doc__},
@@ -13440,4 +13440,4 @@ os__emscripten_debugger(PyObject *module, PyObject *Py_UNUSED(ignored))
 #ifndef OS__EMSCRIPTEN_DEBUGGER_METHODDEF
     #define OS__EMSCRIPTEN_DEBUGGER_METHODDEF
 #endif /* !defined(OS__EMSCRIPTEN_DEBUGGER_METHODDEF) */
-/*[clinic end generated code: output=5341daae6581a62b input=a9049054013a1b77]*/
+/*[clinic end generated code: output=6cfddb3b77dc7a40 input=a9049054013a1b77]*/
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 66baa1a..47eaf5c 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -3482,7 +3482,7 @@ If this functionality is unavailable, using it raises an exception.
 
 static PyObject *
 os_chdir_impl(PyObject *module, path_t *path)
-/*[clinic end generated code: output=3be6400eee26eaae input=1a4a15b4d12cb15d]*/
+/*[clinic end generated code: output=3be6400eee26eaae input=a74ceab5d72adf74]*/
 {
     int result;
 
Error: Process completed with exhttps://github.com/python/cpython/actions/runs/16320837703/job/46097908962?pr=136709it code 1.

@zware zware enabled auto-merge (squash) July 16, 2025 15:04
@zware zware added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jul 16, 2025
@haampie
Copy link
Contributor Author

haampie commented Jul 16, 2025

thanks for directly pushing

@zware zware merged commit bde808a into python:main Jul 16, 2025
44 checks passed
@miss-islington-app
Copy link

Thanks @haampie for the PR, and @zware for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @haampie and @zware, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker bde808ad6ba5eee8a6201983cf071449d7ce7e39 3.14

@miss-islington-app
Copy link

Sorry, @haampie and @zware, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker bde808ad6ba5eee8a6201983cf071449d7ce7e39 3.13

zware pushed a commit to zware/cpython that referenced this pull request Jul 16, 2025
…ythonGH-136709)

(cherry picked from commit bde808a)

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
zware pushed a commit to zware/cpython that referenced this pull request Jul 16, 2025
…ythonGH-136709)

(cherry picked from commit bde808a)

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
@haampie haampie deleted the patch-1 branch July 16, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants