GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-107298: Fix C API Buffer documentation by vstinner · Pull Request #108011 · python/cpython Conversation
|
|
Fix some of the Sphinx warnings reported in https://github.com/python/cpython/pull/108010/files PR (PR unrelated to documentation). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Send a request to *exporter* to fill in *view* as specified by *flags*. | ||
| If the exporter cannot provide a buffer of the exact type, it MUST raise | ||
| :c:data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` and | ||
| :exc:`BufferError`, set ``view->obj`` to ``NULL`` and |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
There is yet one reference in typeobj.rst.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``. | ||
| The maximum number of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`. | ||
|
|
||
| .. :c:macro:: PyBUF_MAX_NDIM |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You can just add
.. c:namespace:: NULL
here, and restore the namespace after the description to fix reference issues.
I already used it for some macros declared not at the top level.
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#namespacing
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I saw your "namespace: NULL" trick of your other PRs, but here Py_buffer members are defined before and after this macro which is not part of Py_buffer structure. In terms of Sphinx, it's confusing. I prefer to document it somewhere else.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the review @serhiy-storchaka. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @vstinner, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-108041 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
(cherry picked from commit c2941cb) Co-authored-by: Victor Stinner <[email protected]>
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry @vstinner, I had trouble checking out the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Conflict in 3.12 but not in 3.11? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…). (cherry picked from commit c2941cb) Co-authored-by: Victor Stinner <[email protected]>
|
GH-108048 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
(cherry picked from commit c2941cb) Co-authored-by: Victor Stinner <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.