Skip to content
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

gh-107298: Fix numerous ref errors and typos in the C API docs #108258

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Aug 22, 2023

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But I'm not sure if Doc/c-api/exceptions.rst changes are related.

that if *filename* is not ``NULL``, it is decoded from the filesystem
encoding (:func:`os.fsdecode`) and passed to the constructor of
:exc:`OSError` as a third parameter to be used to define the
:attr:`!filename` attribute of the exception instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if Doc/c-api/exceptions.rst changes are related or not? They don't seem to fix Sphinx warnings.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both descriptions referred non-existing function

PyObject* PyErr_SetFromWindowsErrWithFilenameObject(int ierr, PyObject *filenameObject);

There is no, and never was such function.

So I rewrote the descriptions by referring other functions, using descriptions of other functions which add the filename parameter as an example.

It fixes 2 of 10 warnings in Doc/c-api/exceptions.rst.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I didn't notice, ok. Well, I approved your PR ;-)

@serhiy-storchaka serhiy-storchaka merged commit d7202e4 into python:main Aug 22, 2023
17 checks passed
@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the docs-capi-refs branch August 22, 2023 12:50
@miss-islington
Copy link
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker d7202e4879bf4e7e00a69500ddcb3143864139b4 3.11

@bedevere-bot
Copy link

GH-108284 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 22, 2023
…ythonGH-108258)

(cherry picked from commit d7202e4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Aug 22, 2023
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Aug 22, 2023
…I docs (pythonGH-108258).

(cherry picked from commit d7202e4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

GH-108290 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 22, 2023
Yhg1s pushed a commit that referenced this pull request Aug 22, 2023
…GH-108258) (#108284)

gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258)
(cherry picked from commit d7202e4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
ambv pushed a commit that referenced this pull request Aug 22, 2023
@serhiy-storchaka serhiy-storchaka removed their assignment Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants