◐ Shell
reader mode source ↗
Skip to content

gh-107298: Document doesn't link to PyAPI_DATA()#109236

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:doc_pyapi_func_no_link
Sep 14, 2023
Merged

gh-107298: Document doesn't link to PyAPI_DATA()#109236
vstinner merged 2 commits into
python:mainfrom
vstinner:doc_pyapi_func_no_link

Conversation

@vstinner

@vstinner vstinner commented Sep 10, 2023

Copy link
Copy Markdown
Member

Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are
not documented. These macros should only be used to define the Python
C API. They should not be used outside Python code base.

Document PyMODINIT_FUNC macro.


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

@vstinner

Copy link
Copy Markdown
Member Author

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hide comment

Oh! There is still a warning in Doc/whatsnew/2.3.rst: c:macro reference target not found: PyMODINIT_FUNC.

I will fix it.

@vstinner vstinner force-pushed the doc_pyapi_func_no_link branch from cbd269f to 553fdd0 Compare September 11, 2023 20:58

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

PyMODINIT_FUNC is purposed to be used in the user code. It is even used in examples.

@vstinner vstinner force-pushed the doc_pyapi_func_no_link branch from 553fdd0 to 5eba491 Compare September 11, 2023 21:20
@vstinner

Copy link
Copy Markdown
Member Author

PyMODINIT_FUNC is purposed to be used in the user code. It is even used in examples.

Oh right.

I fixed my PR:

  • Document PyMODINIT_FUNC.
  • Remove links to PyAPI_FUNC() and PyAPI_DATA().

Please review it again.

@hugovk: I added "the" in the added doc ;-)

@vstinner vstinner force-pushed the doc_pyapi_func_no_link branch from 5eba491 to 5847580 Compare September 11, 2023 21:21
@vstinner

Copy link
Copy Markdown
Member Author

@serhiy-storchaka: I completed PyMODINIT_FUNC doc. Would you mind to review my doc change again?

26 hidden items Load more…
@vstinner

Copy link
Copy Markdown
Member Author

Oops sorry, I tested a Git tool and it messed up my PR :-( I fixed my PR.

@vstinner vstinner merged commit d7a27e5 into python:main Sep 14, 2023
@vstinner vstinner deleted the doc_pyapi_func_no_link branch September 14, 2023 12:56
@vstinner

Copy link
Copy Markdown
Member Author

Merged, thanks for the review @serhiy-storchaka.

@vstinner

Copy link
Copy Markdown
Member Author

Merged, thanks for the review @serhiy-storchaka.

Oh, and thanks @hugovk for the review as well :-)

@vstinner vstinner added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Sep 27, 2023
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker d7a27e527d7e669d2e45cff80ad725978226477c 3.11

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 27, 2023
Document PyMODINIT_FUNC macro.

Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are
not documented. These macros should only be used to define the Python
C API. They should not be used outside Python code base.
(cherry picked from commit d7a27e5)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app

bedevere-app Bot commented Sep 27, 2023

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the only security fixes label Sep 27, 2023
@bedevere-app

bedevere-app Bot commented Sep 27, 2023

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Sep 27, 2023
vstinner added a commit that referenced this pull request Sep 27, 2023
gh-107298: Document PyMODINIT_FUNC macro (#109236)

Document PyMODINIT_FUNC macro.

Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are
not documented. These macros should only be used to define the Python
C API. They should not be used outside Python code base.

(cherry picked from commit d7a27e5)
Yhg1s pushed a commit that referenced this pull request Sep 27, 2023
gh-107298: Document PyMODINIT_FUNC macro (GH-109236)

Document PyMODINIT_FUNC macro.

Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are
not documented. These macros should only be used to define the Python
C API. They should not be used outside Python code base.
(cherry picked from commit d7a27e5)

Co-authored-by: Victor Stinner <vstinner@python.org>
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.

5 participants