From 1d1c813b0199276002aca1dd96dfd7af550057b4 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 10 Apr 2021 19:20:59 +0900 Subject: [PATCH 1/4] Fix #9051: html theme: The style for figure are not applied Since docutils-0.17, figure directive starts to output `
` tag. To support it, this modifies CSS. --- CHANGES | 7 +++++-- sphinx/themes/agogo/static/agogo.css_t | 18 +++++++++++++----- sphinx/themes/basic/static/basic.css_t | 18 ++++++++++-------- sphinx/themes/epub/static/epub.css_t | 6 ++++-- sphinx/themes/nonav/static/nonav.css | 6 ++++-- sphinx/themes/scrolls/static/scrolls.css_t | 6 ++++-- .../traditional/static/traditional.css_t | 6 ++++-- 7 files changed, 44 insertions(+), 23 deletions(-) diff --git a/CHANGES b/CHANGES index d03a2533b..10efb47b8 100644 --- a/CHANGES +++ b/CHANGES @@ -20,8 +20,11 @@ Bugs fixed * #9078: autodoc: Async staticmethods and classmethods are considered as non async coroutine-functions -* #8870: The style of toctree captions has been changed with docutils-0.17 -* #9001: The style of ``sidebar`` directive has been changed with docutils-0.17 +* #8870, #9001, #9051: html theme: The style are not applied with docutils-0.17 + + - toctree captions + - The content of ``sidebar`` directive + - figures Testing -------- diff --git a/sphinx/themes/agogo/static/agogo.css_t b/sphinx/themes/agogo/static/agogo.css_t index 489ec17ea..0c78e4345 100644 --- a/sphinx/themes/agogo/static/agogo.css_t +++ b/sphinx/themes/agogo/static/agogo.css_t @@ -370,19 +370,25 @@ div.footer .left { /* Styles copied from basic theme */ -img.align-left, .figure.align-left, object.align-left { +img.align-left, figure.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } -img.align-right, .figure.align-right, object.align-right { +img.align-right, figure.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } -img.align-center, .figure.align-center, object.align-center { +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { display: block; margin-left: auto; margin-right: auto; @@ -407,11 +413,13 @@ table caption span.caption-number { table caption span.caption-text { } -div.figure p.caption span.caption-number { +div.figure p.caption span.caption-number, +figcaption span.caption-number { font-style: italic; } -div.figure p.caption span.caption-text { +div.figure p.caption span.caption-text, +figcaption span.caption-text { } /* -- search page ----------------------------------------------------------- */ diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index 5fc83c848..c0158b27b 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -277,25 +277,25 @@ p.rubric { font-weight: bold; } -img.align-left, .figure.align-left, object.align-left { +img.align-left, figure.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } -img.align-right, .figure.align-right, object.align-right { +img.align-right, figure.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } -img.align-center, .figure.align-center, object.align-center { +img.align-center, figure.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } -img.align-default, .figure.align-default { +img.align-default, figure.align-default, .figure.align-default { display: block; margin-left: auto; margin-right: auto; @@ -458,20 +458,22 @@ td > :last-child { /* -- figures --------------------------------------------------------------- */ -div.figure { +div.figure, figure { margin: 0.5em; padding: 0.5em; } -div.figure p.caption { +div.figure p.caption, figcaption { padding: 0.3em; } -div.figure p.caption span.caption-number { +div.figure p.caption span.caption-number, +figcaption span.caption-number { font-style: italic; } -div.figure p.caption span.caption-text { +div.figure p.caption span.caption-text, +figcaption span.caption-text { } /* -- field list styles ----------------------------------------------------- */ diff --git a/sphinx/themes/epub/static/epub.css_t b/sphinx/themes/epub/static/epub.css_t index 46bbb93b3..9c9ca8565 100644 --- a/sphinx/themes/epub/static/epub.css_t +++ b/sphinx/themes/epub/static/epub.css_t @@ -325,11 +325,13 @@ table.citation td { /* -- figures --------------------------------------------------------------- */ -div.figure p.caption span.caption-number { +div.figure p.caption span.caption-number, +figcaption span.caption-number { font-style: italic; } -div.figure p.caption span.caption-text { +div.figure p.caption span.caption-text, +figcaption span.caption-text { } /* -- field list styles ----------------------------------------------------- */ diff --git a/sphinx/themes/nonav/static/nonav.css b/sphinx/themes/nonav/static/nonav.css index 63abb9f0d..c2d28a26b 100644 --- a/sphinx/themes/nonav/static/nonav.css +++ b/sphinx/themes/nonav/static/nonav.css @@ -314,11 +314,13 @@ table.citation td { /* -- figures --------------------------------------------------------------- */ -div.figure p.caption span.caption-number { +div.figure p.caption span.caption-number, +figcaption span.caption-number { font-style: italic; } -div.figure p.caption span.caption-text { +div.figure p.caption span.caption-text, +figcaption span.caption-text { } /* -- field list styles ----------------------------------------------------- */ diff --git a/sphinx/themes/scrolls/static/scrolls.css_t b/sphinx/themes/scrolls/static/scrolls.css_t index f039d9e2b..48b5af5fe 100644 --- a/sphinx/themes/scrolls/static/scrolls.css_t +++ b/sphinx/themes/scrolls/static/scrolls.css_t @@ -478,11 +478,13 @@ div.viewcode-block:target { padding: 0 5px; } -div.figure p.caption span.caption-number { +div.figure p.caption span.caption-number, +figcaption span.caption-number { font-style: italic; } -div.figure p.caption span.caption-text { +div.figure p.caption span.caption-text, +figcaption span.caption-text { } /* math display */ diff --git a/sphinx/themes/traditional/static/traditional.css_t b/sphinx/themes/traditional/static/traditional.css_t index 4371d8e89..bd648b47e 100644 --- a/sphinx/themes/traditional/static/traditional.css_t +++ b/sphinx/themes/traditional/static/traditional.css_t @@ -743,11 +743,13 @@ div.literal-block-wrapper pre { margin: 0; } -div.figure p.caption span.caption-number { +div.figure p.caption span.caption-number, +figcaption span.caption-number { font-style: italic; } -div.figure p.caption span.caption-text { +div.figure p.caption span.caption-text, +figcaption span.caption-text { } /* :::: MATH DISPLAY :::: */ From 8602e64214da3d7ff59a7a0410f4c59d67aed7e1 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 11 Apr 2021 19:49:25 +0900 Subject: [PATCH 2/4] test: Disable testing with python3.10 pytest has crashed on testing with python 3.10.0a7. To avoid the error, this disables testing with python3.10 for a while. --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d1fd7dc6e..8052c26ae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,10 +27,10 @@ jobs: python: 3.9 docutils: du16 coverage: "--cov ./ --cov-append --cov-config setup.cfg" - - name: py310-dev - python: 3.10-dev - docutils: du17 - os: ubuntu-latest # required + # - name: py310-dev + # python: 3.10-dev + # docutils: du17 + # os: ubuntu-latest # required env: PYTEST_ADDOPTS: ${{ matrix.coverage }} From f6a839ff0fed5fa32428f9a6909023ee299067ac Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 11 Apr 2021 20:27:10 +0900 Subject: [PATCH 3/4] Bump to 3.5.4 final --- CHANGES | 16 ++-------------- sphinx/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/CHANGES b/CHANGES index e8acb14a8..5b4041644 100644 --- a/CHANGES +++ b/CHANGES @@ -1,20 +1,11 @@ -Release 3.5.4 (in development) -============================== +Release 3.5.4 (released Apr 11, 2021) +===================================== Dependencies ------------ * #9071: Restrict docutils to 0.16 -Incompatible changes --------------------- - -Deprecated ----------- - -Features added --------------- - Bugs fixed ---------- @@ -26,9 +17,6 @@ Bugs fixed - The content of ``sidebar`` directive - figures -Testing --------- - Release 3.5.3 (released Mar 20, 2021) ===================================== diff --git a/sphinx/__init__.py b/sphinx/__init__.py index e72c9f81c..179bcd241 100644 --- a/sphinx/__init__.py +++ b/sphinx/__init__.py @@ -32,7 +32,7 @@ if 'PYTHONWARNINGS' not in os.environ: warnings.filterwarnings('ignore', "'U' mode is deprecated", DeprecationWarning, module='docutils.io') -__version__ = '3.5.4+' +__version__ = '3.5.4' __released__ = '3.5.4' # used when Sphinx builds its own docs #: Version info for better programmatic use. @@ -43,7 +43,7 @@ __released__ = '3.5.4' # used when Sphinx builds its own docs #: #: .. versionadded:: 1.2 #: Before version 1.2, check the string ``sphinx.__version__``. -version_info = (3, 5, 4, 'beta', 0) +version_info = (3, 5, 4, 'final', 0) package_dir = path.abspath(path.dirname(__file__)) From 694664ca6ee12b06371488208c012f60357f963a Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 11 Apr 2021 20:28:18 +0900 Subject: [PATCH 4/4] Bump version --- CHANGES | 21 +++++++++++++++++++++ sphinx/__init__.py | 6 +++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 5b4041644..b7cb2554a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,24 @@ +Release 3.5.5 (in development) +============================== + +Dependencies +------------ + +Incompatible changes +-------------------- + +Deprecated +---------- + +Features added +-------------- + +Bugs fixed +---------- + +Testing +-------- + Release 3.5.4 (released Apr 11, 2021) ===================================== diff --git a/sphinx/__init__.py b/sphinx/__init__.py index 179bcd241..5a4c931e7 100644 --- a/sphinx/__init__.py +++ b/sphinx/__init__.py @@ -32,8 +32,8 @@ if 'PYTHONWARNINGS' not in os.environ: warnings.filterwarnings('ignore', "'U' mode is deprecated", DeprecationWarning, module='docutils.io') -__version__ = '3.5.4' -__released__ = '3.5.4' # used when Sphinx builds its own docs +__version__ = '3.5.5+' +__released__ = '3.5.5' # used when Sphinx builds its own docs #: Version info for better programmatic use. #: @@ -43,7 +43,7 @@ __released__ = '3.5.4' # used when Sphinx builds its own docs #: #: .. versionadded:: 1.2 #: Before version 1.2, check the string ``sphinx.__version__``. -version_info = (3, 5, 4, 'final', 0) +version_info = (3, 5, 5, 'final', 0) package_dir = path.abspath(path.dirname(__file__))