GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-107298: Fix numerous ref errors and typos in the C API docs by serhiy-storchaka · Pull Request #108258 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 22, 2023 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: Fix Sphinx warnings in the C API documentation #107298

📚 Documentation preview 📚: https://cpython-previews--108258.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news labels Aug 22, 2023
@bedevere-bot bedevere-bot mentioned this pull request Aug 22, 2023
Fix Sphinx warnings in the C API documentation #107298
Closed
@bedevere-bot bedevere-bot added the awaiting core review label Aug 22, 2023
@serhiy-storchaka
serhiy-storchaka requested a review from vstinner August 22, 2023 06:43
@serhiy-storchaka serhiy-storchaka added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Aug 22, 2023
@serhiy-storchaka
serhiy-storchaka force-pushed the docs-capi-refs branch from 04ff27d to 195605c Compare August 22, 2023 07:24
@serhiy-storchaka
pythongh-107298: Fix numerous ref errors and typos in the C API docs
050933c
@serhiy-storchaka
serhiy-storchaka force-pushed the docs-capi-refs branch from 195605c to 050933c Compare August 22, 2023 07:42
vstinner
vstinner approved these changes Aug 22, 2023
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/c-api/exceptions.rst
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.

@vstinner vstinner Aug 22, 2023

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@serhiy-storchaka serhiy-storchaka Aug 22, 2023

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vstinner vstinner Aug 22, 2023

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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 ;-)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Aug 22, 2023
@serhiy-storchaka
serhiy-storchaka merged commit d7202e4 into python:main Aug 22, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Aug 22, 2023
@miss-islington

miss-islington commented Aug 22, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

miss-islington commented Aug 22, 2023

Copy link
Copy Markdown
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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington miss-islington assigned serhiy-storchaka Aug 22, 2023
@bedevere-bot

bedevere-bot commented Aug 22, 2023

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 22, 2023
@serhiy-storchaka @miss-islington
pythongh-107298: Fix numerous ref errors and typos in the C API docs (p…
563c000
…ythonGH-108258)

(cherry picked from commit d7202e4)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Aug 22, 2023
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Aug 22, 2023
@serhiy-storchaka
[3.11] pythongh-107298: Fix numerous ref errors and typos in the C AP…
9743e17
…I docs (pythonGH-108258).

(cherry picked from commit d7202e4)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot

bedevere-bot commented Aug 22, 2023

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
@miss-islington @serhiy-storchaka
[3.12] gh-107298: Fix numerous ref errors and typos in the C API docs (…
e5d779c
…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 <[email protected]>
ambv pushed a commit that referenced this pull request Aug 22, 2023
@serhiy-storchaka
[3.11] gh-107298: Fix numerous ref errors and typos in the C API docs (…
3ca9264
…GH-108258) (#108290)

(cherry picked from commit d7202e4)
@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

Reviewers

@vstinner vstinner vstinner approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@serhiy-storchaka @miss-islington @bedevere-bot @vstinner
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.