Commit Graph

190 Commits

Author SHA1 Message Date
James Addison
c93723b803
singlehtml: deprecate the 'fix_refuris' helper function (#13037)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-11-13 23:15:00 +00:00
Tim Hoffmann
b16e196a60
Improve `autodoc` docs (#12935)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-10-02 23:02:48 +00:00
Wei-Hsiang (Matt) Wang
e35e7b0fbe
Remove unnecessary `:func: and :meth:` parentheses (#12848) 2024-09-01 06:33:28 +01:00
Adam Turner
be73e64a9f
Add `sphinx.util._files` (#12766) 2024-08-11 19:51:59 +01:00
Adam Turner
d39ba32604
Add `sphinx.util._importer` (#12762) 2024-08-11 17:24:26 +01:00
Adam Turner
772cdfa19d
Remove `sphinx.directives.other.VersionChange` (#12662) 2024-07-23 14:56:49 +01:00
Adam Turner
e174df2762
Rename `normalize_intersphinx_mapping to validate_intersphinx_mapping` (#12643) 2024-07-22 13:32:44 +01:00
Adam Turner
82edc3d385
Rewrite `usage/configuration.rst` (#12537)
- Remove now-removed configuration values
- Use obvious 'unset' defaults for ``project`` and ``author``
- Prefer 'e.g.' to 'ex.'
- Allow non-list sequence types in various configuration values
- Add types and defaults to every confval directive
2024-07-10 21:43:14 +01:00
Bénédikt Tran
f24eef7b6b
[cleanup] deprecate `sphinx.testing.util.strip_escseq in favor of sphinx.util.console.strip_colors` (#12186) 2024-03-24 00:43:54 +01:00
Adam Turner
9d1dcae373
Deprecate old-style Makefiles in sphinx-quickstart (#11693) 2023-09-21 10:25:00 +01:00
Bénédikt Tran
76658c49a9
Fix `sphinx.ext.autodoc.preserve_defaults` (#11550)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-17 01:19:25 +00:00
Adam Turner
58b628263f
Deprecate `css_files and script_files` (#11582) 2023-08-12 00:46:44 +00:00
Adam Turner
c9f0e67cca
Add `sphinx.util.index_entries` (#11528) 2023-07-28 07:41:10 +01:00
Adam Turner
49d8304670
Start using `pathlib.Path and deprecate sphinx.testing.path` (#11526) 2023-07-28 00:39:12 +01:00
Adam Turner
5cf3dce36e
Deprecate `md5 and sha1 wrappers in sphinx.util` (#11512) 2023-07-25 02:29:28 +01:00
Adam Turner
2a9e805206
Remove the deprecated Setuptools integration (#11363) 2023-04-27 01:22:04 +01:00
Adam Turner
bffb54734f Note correct deprecation version for `sphinx.util.osutil.cd` 2023-04-23 20:45:25 +01:00
Adam Turner
7ecf037280 Enable 'nit-picky mode' for Sphinx's documentation
Fix several reference errors throughout the documentation and set
``nitpick_ignore`` in ``doc/conf.py``.
2023-04-06 23:11:39 +01:00
Adam Turner
f435fc05e6 Prefer `contextlib.chdir to sphinx.util.osutil.cd` 2023-03-05 18:49:17 +00:00
Adam Turner
5eb79c126a Move exception formatting utilities to `sphinx.util.exceptions` 2023-01-03 22:09:30 +00:00
Adam Turner
3b3ce9cf7b Move HTTP-date formatting utils to utils.http_date 2023-01-03 19:02:38 +00:00
Adam Turner
8c5e7013ea Move console output utilities to `sphinx.util.display`
- Merge `old_status_iterator` into ``status_iterator``.
  ``old_status_iterator`` was deprecated in version 1.6.
2023-01-03 18:37:20 +00:00
Adam Turner
77a02cf696
Use PEP 604 display for `typing.Optional and typing.Union` (#11072) 2023-01-02 17:49:18 +00:00
Viktor Haag
5715abf1d4
Update removal note for logo and favicon variables (#11063)
These were removed in Sphinx 6.0.0
2022-12-31 17:38:06 +00:00
Jean-François B
e7c0881992
LaTeX: support for booktabs-style and zebra-striped tables (#10759)
This is a combination of 2 + 28 + 7 + and some more commits...

* Cherry-pick: Add support for booktabs-style tables to LaTeX builder

* Cherry-pick: Add support for zebra-striped tables to LaTeX builder

Co-authored-by: Stefan Wiehler <stefan.wiehler@missinglinkelectronics.com>

Above work originally initiated by @sephalon (thanks!)

Development refactored and continued by @jfbu

* latex_table_style configuration, support booktabs, colorrows, borderless

Some details:

- Simplify a bit a conditional in the longtable template

  This also puts the target for a longtable with a label but no caption
  above the toprule for better hyperlinking (testing shows hyperlink
  target can not end up alone at bottom of previous page).

- Extend allowed syntax for colour assignments via 'sphinxsetup'

- latex_table_style new configuration value and coloured rows

  For the user interface I tried to look for inspiration in
  https://docutils.sourceforge.io/docs/user/config.html#table-style
  which mentions booktabs and borderless.  They also mention
  captionbelow which we can implement later, now that architecture
  is here.  They don't mention coloured rows.

- Test on our own document... looks fine!

- Work-around an incompatibility of \cline with row colours

- Reverse priority of classes to allow overruling booktabs by standard
  after parsing source but before letting LaTeX writer act

- Closes #8220

  Commit
  bb859c6696
  already improved a bit, this finishes it (as :rst:dir:`rst-class` was
  actually not linking to anywhere).

- Let booktabs style defaults to *not* using \cmidrule.  They actually
  don't make much sense there, as all \hline's are removed.

- Add \sphinxnorowcolor which allows construct such as this one in
  a tabularcolumns directive:

    >{\columncolor{blue}\sphinxnorowcolor}

  else LaTeX always overrides column colour by row colour

- Add TableMergeColorHeader, TableMergeColorOdd, TableMergeColorEven
  so single-row merged cells can be styled especially

- Extend row colours to all header rows not only the first one
  (all header rows will share same colour settings)

- Auto-adjust to a no '|'-colspec for optimal handling of merged cell

- Add \sphinxcolorblend

- Workaround LaTeX's \cline features and other grid tables matters

- Add \sphinxbuildwarning for important warnings

- Fix some white gaps in merged cells of tables with vlines and
  colorrows

- Work around LaTeX's \cline serious deficiencies for complex grid
  tables

  This commit corrects \cline badly impacting vertical spacing and
  making tables look even more cramped as they usually are in LaTeX
  (although one sees it clearly only with \arrarrulewidth a bit more
  than the LaTeX default of 0.4pt).

  Most importantly this commit solves the problem that \cline's got
  masked by colour panels from the row below.

- Update CHANGES for PR #10759

- Improve documentation of new latex_table_style regarding colours
2022-10-12 17:15:40 +02:00
Adam Turner
58a4449707
Deprecate HTML 4 support (#10843) 2022-09-23 18:12:54 +01:00
Adam Turner
490a8a9162
Add include_patterns as the opposite of exclude_patterns (#10518) 2022-07-17 21:44:33 +01:00
Antony Lee
03c1e1b15c
Replace napoleon.iterators by simpler stack implementation (#9856) 2022-06-26 12:40:42 +01:00
Adam Turner
881f66c557
Simplify Sphinx's Stemmer (#10467) 2022-06-16 19:47:09 +01:00
Julien Palard
956cddb7d4
Replace doclinter with sphinx-lint (#10389)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-06-16 19:32:09 +01:00
Takeshi KOMIYA
f9dce5764e Mark sphinx.io:read_doc() deprecated 2022-05-08 02:15:58 +09:00
Takeshi KOMIYA
be212d98df Remove sphinx.util.docutils.__version_info__ on 7.0 2022-05-03 02:07:47 +09:00
Takeshi KOMIYA
3aa7e4105a Deprecate: html5_ready and is_html5_writer_available() 2022-05-03 01:48:17 +09:00
Adam Turner
3f8bf7acb1 Schedule removal for 7.0 2022-04-30 19:10:27 +01:00
Adam Turner
b536ffabc1 Deprecate sphinx.util.jsdump 2022-04-27 02:59:50 +01:00
Takeshi KOMIYA
f72cd83e4d Merge branch '4.x' 2022-02-19 16:08:05 +09:00
Takeshi KOMIYA
8224f6f44a Fix #10181: napoleon_use_ivar adds unexpected prefix to vars
Since 4.0, :ivar: items has not been rendered as hyperlinks.  So any
modules, classes and tilda are now harmful.  This removes the prefixing
filter for napoleon_use_ivar option.

refs: #5129 and #5977
2022-02-12 00:50:56 +09:00
Takeshi KOMIYA
e4e58a4f27 Close #10062: Change the default language to 'en'
Change the default language to `'en'` if any language is not set in
`conf.py`.
2022-01-12 02:45:52 +09:00
Takeshi KOMIYA
0663602bb9 Close #9595: Deprecate setuptools integration 2022-01-01 20:19:27 +09:00
Takeshi KOMIYA
26cd8f100c Deprecate sphinx.writers.latex.LaTeXWriter.docclasses 2021-12-18 02:24:03 +09:00
Takeshi KOMIYA
b778ee806e Fix #9752: autodoc: Failed to detect type annotation for slots attribute 2021-10-23 14:59:36 +09:00
Takeshi KOMIYA
dd2ff3e911 Fix #9710: html: Wrong styles for even/odd rows in nested tables 2021-10-09 16:35:31 +09:00
Takeshi KOMIYA
0424da31ab
Merge branch '4.x' into 9683_add_css_file 2021-10-09 13:58:10 +09:00
Jakob Lykke Andersen
1fe87938e2 js nodes, docs, add entry in deprecation/removal table 2021-10-03 10:18:51 +02:00
Takeshi KOMIYA
1fbca49970 Close #9683: Revert the removal of `add_stylesheet()` API
It will be kept until the Sphinx-6.0 release.

Note: Now it emits a warning instead of DeprecationWarning to let the
users know the deprecation.
2021-10-03 16:34:57 +09:00
Takeshi KOMIYA
ec351bdf3d Merge branch '4.0.x' into 4.x 2021-06-30 21:24:06 +09:00
Takeshi KOMIYA
62f128700e Fix #9032: docs: sphinx.environment.NoUri was removed at v3.0.0
Our deprecation list describes `sphinx.environment.NoUri` was removed at
v4.0.0.  But, acutally, it was removed at v3.0.0 (#6223).
2021-06-14 02:18:01 +09:00
Takeshi KOMIYA
519cc078fd Revert the removal of sphinx.util:force_decode()
After the release of 4.0.0, some 3rd party extensions have became not
working with the latest Sphinx because `force_decode()` function was
removed.  It was deprecated since Sphinx-2.0 and warned for the removal
since 3.0.

This reverts the removal and extends its deprecation period to 5.0.0.  I
hope it helps users of these extensions.
2021-06-13 16:31:33 +09:00
Takeshi KOMIYA
46c2e45aa6 deprecate sphinx.ext.autosummary._app 2021-05-31 02:09:10 +09:00
Takeshi KOMIYA
63fbfb02f1 refactor: Make the app argument for BuildEnvironment required
At present, some attributes of env object are considered as optional
because they have been initialized by None on the constructor.  But
they have always been fullfilled actually.

To be clear the type hints of the env object, this makes the `app`
argument for the BuildEnvironment class required.  It can ensure the
attributes of env object are not optional.
2021-05-22 02:09:49 +09:00