History log of /linux-master/Documentation/sphinx/cdomain.py
Revision Date Author Comments
# 3e893e16 08-Dec-2023 Jonathan Corbet <corbet@lwn.net>

docs: Raise the minimum Sphinx requirement to 2.4.4

Commit 31abfdda6527 (docs: Deprecate use of Sphinx < 2.4.x) in 6.2 added a
warning that support for older versions of Sphinx would be going away.
There have been no complaints, so the time has come. Raise the minimum
Sphinx version to 2.4.4 and clean out some compatibility code that we no
longer need.

Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Link: https://lore.kernel.org/r/874jgs47fq.fsf@meer.lwn.net
Signed-off-by: Jonathan Corbet <corbet@lwn.net>


# 60374870 17-Oct-2023 Charles Han <hanchunchao@inspur.com>

Documentation/sphinx: Remove the repeated word "the" in comments.

Remove the repeated word "the" in comments.

Signed-off-by: Charles Han <hanchunchao@inspur.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20231018023046.30022-1-hanchunchao@inspur.com>


# 86a0adc0 12-Sep-2023 Benjamin Gray <bgray@linux.ibm.com>

Documentation/sphinx: fix Python string escapes

Python 3.6 introduced a DeprecationWarning for invalid escape sequences.
This is upgraded to a SyntaxWarning in Python 3.12, and will eventually
be a syntax error.

Fix these now to get ahead of it before it's an error.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Message-ID: <20230912060801.95533-3-bgray@linux.ibm.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>


# d56b699d 14-Aug-2023 Bjorn Helgaas <bhelgaas@google.com>

Documentation: Fix typos

Fix typos in Documentation.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20230814212822.193684-4-helgaas@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>


# f546ff0c 01-Feb-2021 Jonathan Corbet <corbet@lwn.net>

Move our minimum Sphinx version to 1.7

As promised, drop support for some ancient sphinx releases, along with a
lot of the cruft that was required to make that support work.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>


# 95f49490 25-Sep-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

docs: cdomain.py: extend it to handle new Sphinx 3.x tags

While most of the C domain parsing is done via kernel-doc,
some RST files use C domain tags directly.

While several of them can be removed for Sphinx < 3.0, due
to automarkup.py, and several others that could be
converted into kernel-doc markups, changes like that are
time-consuming, and may not fit all cases.

As we already have the cdomain.py for handing backward
compatibility with Sphinx versions below 3.0, let's
make it more complete, in order to cover any usage of the
newer tags outside kernel-doc.

This way, it should be feasible to use the new tags inside
the Kernel tree, without losing backward compatibility.

This should allow fixing the remaining warnings with
the Kernel tags.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 71e552ae 24-Sep-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

docs: cdomain.py: add support for a new Sphinx 3.1+ tag

Since Sphinx 3.0, the C domain code was rewritten, but only
after version 3.1 it got support for setting namespaces on
C domains, with is something that it is required, in order to
document system calls, like ioctl() and others.

As part of changing the documentation subsystem to properly
build with Sphinx 3.1+, add support for such new tag:

.. c:namespace::"

Such tag optionally replaces the optional "name" tag for functions,
setting a single namespace domain for all C references found
at the file.

With that, it should be possible to convert existing
documentation to be compatible with both Sphinx 1.x/2.x and
3.1+.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 42f6ebd8 23-May-2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

docs: cdomain.py: get rid of a warning since version 1.8

There's a new warning about a deprecation function. Add a
logic at cdomain.py to avoid that.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>


# c46988ae 20-Mar-2017 Rémy Léone <remy.leone@gmail.com>

Use sphinx.version_info directly instead of parsing

Using the development version of sphinx caused the parsing of the
version to fail.

Signed-off-by: Rémy Léone <remy.leone@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>


# 56cd8692 07-Sep-2016 Markus Heiser <markus.heiser@darmarIT.de>

doc-rst:c-domain: function-like macros arguments

Handle signatures of function-like macros well. Don't try to deduce
arguments types of function-like macros.

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>


# b495360e 07-Sep-2016 Markus Heiser <markus.heiser@darmarIT.de>

doc-rst:c-domain: fix sphinx version incompatibility

The self.indexnode's tuple has changed in sphinx version 1.4, from a
former 4 element tuple to a 5 element tuple.

https://github.com/sphinx-doc/sphinx/commit/e6a5a3a92e938fcd75866b4227db9e0524d58f7c

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>


# 556aa6d5 15-Aug-2016 Markus Heiser <markus.heiser@darmarIT.de>

doc-rst: moved *duplicate* warnings to nitpicky mode

Moved the *duplicate C object description* warnings for function
declarations in the nitpicky mode. In nitpick mode, you can suppress
those warnings (e.g. ioctl) with::

nitpicky = True
nitpick_ignore = [
("c:func", "ioctl"),
]

See Sphinx documentation for the config values for ``nitpick`` and
``nitpick_ignore`` [1].

With this change all the ".. cpp:function:: int ioctl(..)" descriptions
(found in the media book) can be migrated to ".. c:function:: int
ioctl(..)", without getting any warnings. E.g.::

.. cpp:function:: int ioctl( int fd, int request, struct cec_event *argp )

.. c:function:: int ioctl( int fd, int request, struct cec_event *argp )

The main effect, is that we get those *CPP-types* back into Sphinx's C-
namespace and we need no longer to distinguish between c/cpp references,
when we refer a function like the ioctl.

[1] http://www.sphinx-doc.org/en/stable/config.html?highlight=nitpick#confval-nitpicky

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>


# 2c645cd7 15-Aug-2016 Markus Heiser <markus.heiser@darmarIT.de>

doc-rst:c-domain: ref-name of a function declaration

Add option 'name' to the "c:function:" directive. With option 'name'
the ref-name of a function can be modified. E.g.::

.. c:function:: int ioctl( int fd, int request )
:name: VIDIOC_LOG_STATUS

The func-name (e.g. ioctl) remains in the output but the ref-name
changed from ``ioctl`` to ``VIDIOC_LOG_STATUS``. The index entry for
this function is also changed to ``VIDIOC_LOG_STATUS`` and the function
can now referenced by::

:c:func:`VIDIOC_LOG_STATUS`

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>


# e8f5c617 22-Aug-2016 Markus Heiser <markus.heiser@darmarit.de>

doc-rst: add boilerplate to customize c-domain

Add a sphinx-extension to customize the sphinx c-domain. No functional
changes right yet, just the boilerplate code.

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
[ jc: coding-style tweak ]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>