Sphinx 1.2¶
リリース 1.2.3 (2014年9月1日)¶
機能拡張¶
#1518:
sphinx-apidoccommand now has a--versionoption to show version information and exit新しいロケール: ヘブライ語、ヨーロッパポルトガル語、ベトナム語。
バグ修正¶
#636: Keep straight single quotes in literal blocks in the LaTeX build.
#1419: Generated i18n sphinx.js files are missing message catalog entries from '.js_t' and '.html'. The issue was introduced from Sphinx 1.1
#1363: Fix i18n: missing python domain's cross-references with currentmodule directive or currentclass directive.
#1444: autosummary does not create the description from attributes docstring.
#1457: In python3 environment, make linkcheck cause "Can't convert 'bytes' object to str implicitly" error when link target url has a hash part. Thanks to Jorge_C.
#1467: Exception on Python3 if nonexistent method is specified by automethod
#1441: autosummary can't handle nested classes correctly.
#1499: With non-callable
setupin a conf.py, now sphinx-build emits a user-friendly error message.#1502: In autodoc, fix display of parameter defaults containing backslashes.
#1226: autodoc, autosummary: importing setup.py by automodule will invoke setup process and execute
sys.exit(). Now Sphinx avoids SystemExit exception and emits warnings without unexpected termination.#1503: py:function directive generate incorrectly signature when specifying a default parameter with an empty list
[]. Thanks to Geert Jansen.#1508: Non-ASCII filename raise exception on make singlehtml, latex, man, texinfo and changes.
#1531: On Python3 environment, docutils.conf with 'source_link=true' in the general section cause type error.
PR#270, #1533: Non-ASCII docstring cause UnicodeDecodeError when uses with inheritance-diagram directive. Thanks to WAKAYAMA shirou.
PR#281, PR#282, #1509: TODO extension not compatible with websupport. Thanks to Takeshi Komiya.
#1477: gettext does not extract nodes.line in a table or list.
#1544:
make textgenerates wrong table when it has empty table cells.#1522: Footnotes from table get displayed twice in LaTeX. This problem has been appeared from Sphinx 1.2.1 by #949.
#508: Sphinx every time exit with zero when is invoked from setup.py command. ex.
python setup.py build_sphinx -b doctestreturn zero even if doctest failed.
リリース 1.2.2 (2014年3月2日)¶
バグ修正¶
PR#211: When checking for existence of the
html_logofile, check the full relative path and not the basename.PR#212: Fix traceback with autodoc and
__init__methods without docstring.PR#213: Fix a missing import in the setup command.
#1357: Option names documented by
optionare now again allowed to not start with a dash or slash, and referencing them will work correctly.#1358: Fix handling of image paths outside of the source directory when using the "wildcard" style reference.
#1374: Fix for autosummary generating overly-long summaries if first line doesn't end with a period.
#1383: Fix Python 2.5 compatibility of sphinx-apidoc.
#1391: Actually prevent using "pngmath" and "mathjax" extensions at the same time in sphinx-quickstart.
#1386: Fix bug preventing more than one theme being added by the entry point mechanism.
#1370: Ignore "toctree" nodes in text writer, instead of raising.
#1364: Fix 'make gettext' fails when the '.. todolist::' directive is present.
#1367: Fix a change of PR#96 that break sphinx.util.docfields.Field.make_field interface/behavior for
itemargument usage.
ドキュメント¶
Extended the documentation about building extensions.
リリース 1.2.1 (2014年1月19日)¶
バグ修正¶
#1335: Fix autosummary template overloading with exclamation prefix like
{% extends "!autosummary/class.rst" %}cause infinite recursive function call. This was caused by PR#181.#1337: Fix autodoc with
autoclass_content="both"uses uselessobject.__init__docstring when class does not have__init__. This was caused by a change for #1138.#1340: Can't search alphabetical words on the HTML quick search generated with language='ja'.
#1319: Do not crash if the
html_logofile does not exist.#603: Do not use the HTML-ized title for building the search index (that resulted in "literal" being found on every page with a literal in the title).
#751: Allow production lists longer than a page in LaTeX by using longtable.
#764: Always look for stopwords lowercased in JS search.
#814: autodoc: Guard against strange type objects that don't have
__bases__.#932: autodoc: Do not crash if
__doc__is not a string.#933: Do not crash if an
optionvalue is malformed (contains spaces but no option name).#908: On Python 3, handle error messages from LaTeX correctly in the pngmath extension.
#943: In autosummary, recognize "first sentences" to pull from the docstring if they contain uppercase letters.
#923: Take the entire LaTeX document into account when caching pngmath-generated images. This rebuilds them correctly when
pngmath_latex_preamblechanges.#901: Emit a warning when using Docutils' new "math" markup without a Sphinx math extension active.
#845: In code blocks, when the selected lexer fails, display line numbers nevertheless if configured.
#929: Support parsed-literal blocks in LaTeX output correctly.
#949: Update the tabulary.sty packed with Sphinx.
#1050: Add anonymous labels into
objects.invto be referenced viaintersphinx.#1095: Fix print-media stylesheet being included always in the "scrolls" theme.
#1085: Fix current classname not getting set if class description has
:noindex:set.#1181: Report option errors in autodoc directives more gracefully.
#1155: Fix autodocumenting C-defined methods as attributes in Python 3.
#1233: Allow finding both Python classes and exceptions with the "class" and "exc" roles in intersphinx.
#1198: Allow "image" for the "figwidth" option of the figure directive as documented by docutils.
#1152: Fix pycode parsing errors of Python 3 code by including two grammar versions for Python 2 and 3, and loading the appropriate version for the running Python version.
#1017: Be helpful and tell the user when the argument to
optiondoes not match the required format.#1345: Fix two bugs with
nitpick_ignore; now you don't have to remove the store environment for changes to have effect.#1072: In the JS search, fix issues searching for upper-cased words by lowercasing words before stemming.
#1299: Make behavior of the
mathdirective more consistent and avoid producing empty environments in LaTeX output.#1308: Strip HTML tags from the content of "raw" nodes before feeding it to the search indexer.
#1249: Fix duplicate LaTeX page numbering for manual documents.
#1292: In the linkchecker, retry HEAD requests when denied by HTTP 405. Also make the redirect code apparent and tweak the output a bit to be more obvious.
#1285: Avoid name clashes between C domain objects and section titles.
#848: Always take the newest code in incremental rebuilds with the
sphinx.ext.viewcodeextension.#979, #1266: Fix exclude handling in
sphinx-apidoc.#1302: Fix regression in
sphinx.ext.inheritance_diagramwhen documenting classes that can't be pickled.#1316: Remove hard-coded
font-faceresources from epub theme.#1329: Fix traceback with empty translation msgstr in .po files.
#1300: Fix references not working in translated documents in some instances.
#1283: Fix a bug in the detection of changed files that would try to access doctrees of deleted documents.
#1330: Fix
exclude_patternsbehavior with subdirectories in thehtml_static_path.#1323: Fix emitting empty
<ul>tags in the HTML writer, which is not valid HTML.#1147: Don't emit a sidebar search box in the "singlehtml" builder.
ドキュメント¶
#1325: Added a "Intersphinx" tutorial section. (
doc/tutorial.rst)
リリース 1.2 (2013年12月10日)¶
機能拡張¶
プログラムが扱いやすいように、Sphinxのバージョンを表す
sphinx.version_infoタプルを追加。
互換性のない変更¶
sphinx.ext.refcounting拡張を削除。これはCPythonでのみ意味があり、それ以外の使い道が無いため。
バグ修正¶
versionadded/changed と廃止されたディレクティブのために、削除されていたCSS class
versionmodifiedを戻した。PR#181: Fix
html_theme_path = ['.']is a trigger of rebuild all documents always (This change keeps the current "theme changes cause a rebuild" feature).#1296: Fix invalid charset in HTML help generated HTML files for default locale.
PR#190: gettextが他のブロック内のfigureキャプションやrubricタイトルを展開していない問題を修正。ありがとうMichael Schlenker。
PR#176: setup_command test がSphinxをimport出来ない場合がある問題を修正。ありがとうDmitry Shachnev。
#1311: ロケール設定が"C"の環境でPython3でテスト実行した場合、test_linkcode.test_html失敗する問題を修正。
#1269: Python 3.2 以降で ResourceWarnings が表示される問題
#1138: autodocの設定が
autodoc_docstring_signature = Trueかつautoclass_content = 'init'または'both'の場合において、__init__ 行がドキュメントから削除されていなかった問題を修正。
リリース 1.2 beta3 (2013年10月3日)¶
機能拡張¶
デバッグしやすくするため、Sphinxのエラーログにロードした拡張の一覧を含めるようにしました。
互換性のない変更¶
PR#154: LaTeXのクラス名のうちSphinxが提供する 'sphinxmanual' と 'sphinxhowto' 以外について、"sphinx" 接頭辞を削除します。今後、カスタムドキュメントクラスを使用したい場合に、クラス名に'sphinx'接頭辞を付ける必要はありません。ありがとう Erik B.
バグ修正¶
#1265: 修正 i18n: ラベルターゲットが参照しているセクション名を翻訳したときクラッシュする問題。
誤った条件判定により、Sphinxの最初のページ(多くはindex.rst)が検索対象ページに含まれない問題を修正。この問題は1.2b1で発生しました。
#703: Sphinxが非ASCII文字列のファイル名をデコードできない場合UnicodeError例外を発生させる代わりに、可能であれば処理を継続する。
リリース 1.2 beta2 (2013年9月17日)¶
機能拡張¶
apidocは "_private" モジュールをデフォルトで無視するようになった。-Pオプションを使用した場合、それらも含む。apidocにパッケージやモジュールのタイトルを生成しないオプションを追加。これは、モジュールなどのdocstringがすでにreSTのタイトルを持っている場合を想定。PR#161:
apidocは各モジュール別にページを出力できるようになった。これまでは1つのパッケージ内の全てのモジュールが1ページに出力されていた。各ビルダーは、翻訳カタログが更新されたときに対象ドキュメントをビルド対象としてリビルドする。
HTMLライターにおいて、docutils.confの 'writers' と 'html4css1 writer' セクションに対応。また、latex, manpage, texinfo ライターそれぞれについてもそれらの 'writers' セクションに対応。
The new
html_extra_pathconfig value allows to specify directories with files that should be copied directly to the HTML output directory.autodocディレクティブでmodule dataとattributeについて
annotationオプションを追加。値が設定されている場合、デフォルトの値として表示する。PR#136: autodocディレクティブに
imported-membersオプションを追加。このオプションにより、他のモジュールからimportしたメンバーも含められる。新言語: マケドニア、シンハラ、インドネシア
テーマのプラグイン機構を追加。setuptoolsのプラグイン機構を使用します。
互換性のない変更¶
PR#144, #1182: gettextビルダーが生成するpotファイルのPOT-Creation-Dateに実行環境のタイムゾーンを設定します。ありがとう masklinn、 Jakub Wilk。
バグ修正¶
PR#132: jQuery 1.8.3 に更新。
PR#141, #982: Python3環境において、PNGファイルの書き出し時にクラッシュする問題を修正。ありがとうMarcin Wojdyr。
PR#145: In parallel builds, Sphinx drops second document file to write. Thanks to tychoish.
PR#151: LaTeXテーブルのいくつかのスタイルを更新。
PR#153: "extensions" 設定値をオーバーライドできるようになった。
PR#155: C++11関数の幾つかの修飾子サポートを追加。
テンプレートにutf-8エンコーディングされた文字列が含まれる場合に、'make gettext'がUnicodeDecodeError例外を発生させる問題を修正。
#828: Python3において、キーワード引数しかもたない関数のドキュメント化が出来るようにするため、inspect.getfullargspec()を使うようにした。
#1090: i18n機能において、1行に複数のクロスリファレンス(term, ref, doc)が含まれる場合に、すべて同じリンク先となる問題を修正。
#1157: 'globaltoc.html' と非表示設定のtoctreeの組み合わせで例外が起きていた問題を修正。
#1159: ビルド時に生成するobjects.invが誤っている問題を修正し、そのようなobjects.invをintersphinxで正しく扱えるように回避するワークアラウンドを実装。
#1160: 脚注のCitationターゲットが見つからない場合にAssertionError例外が発生する問題を修正。
#1162, PR#139: singlehtmlビルダーが _images/ ディレクトリに画像をコピーしていなかった問題を修正。
#1173: Jinja2 2.7への依存はPython < 3.3 と Python < 2.6 の場合に動作しなくなるためsetup.pyを修正。Thanks to Alexander Dupuy.
#1185: Pythonのモジュールが誤ったエンコーディング定義をしていて、非ASCII文字が含まれる場合にクラッシュしないようにした。
#1188: sphinx-quickstartにおいて "Project version" に非ASCII文字を入力した場合に、UnicodeEncodeError例外を出力する問題を修正。
#1189: sphinx-quickstartで"Project name"に全角文字を使うと "Title underline is too short" 警告が発生するindex.rstを生成する問題
#1190: sphinx-quickstartで"Project name"に非ASCII文字列を指定した場合、TeX/texinfo/manのファイル名が拡張子のみになってしまう
#1192: manpageライターのハイパーリンクのエスケープ処理にあった問題を修正。
#1193: i18n機能において1行に複数のリンクが含まれる場合に全て同じリンクとなる問題を修正。
#1176: i18n機能において、名前付き脚注と記号脚注の脚注番号が出力されない問題を修正。
PR#146,#1172: パラレルビルド時にZeroDivisionErrorが発生する問題。Thanks to tychoish.
#1204: intersphinxのリンク先がローカル環境の場合、リンク生成が間違っている問題
#1206: i18n機能において、gettextビルダーがadmonitionディレクティブのタイトルを翻訳しない問題を修正。
#1232: SphinxがWindows環境で壊れたePubファイルを生成する問題
#1259: Guard the debug output call when emitting events; to prevent the repr() implementation of arbitrary objects causing build failures.
#1142: Mac OS Xにおける、rstファイル名のNFC/NFDノーマライズ問題
#1234: gettextのpoファイルについて、空白文字列のみで構成された文字列を無効化
リリース 1.2 beta1 (2013年3月31日)¶
互換性のない変更¶
1.0で廃止予定となった
sphinx.util.compat.directive_dwim()とsphinx.roles.xfileref_role()を削除しました。PR#122: the files given in
latex_additional_filesnow override TeX files included by Sphinx, such assphinx.sty.PR#124: the node generated by
versionadded,versionchangedanddeprecateddirectives now includes all added markup (such as "New in version X") as child nodes, and no additional text must be generated by writers.PR#99:
seealsoディレクティブは、カスタマイズしたseealsoノードを出力する代わりにadmonitionノードを生成するようになりました。
機能拡張¶
マークアップ
toctreeディレクティブとtoctree()テンプレート関数は非表示のtoctreeを表示するためのincludehiddenオプションを追加 (バグ #790, #1047)。toctree()テンプレート関数のmaxdepthオプションのバグも修正 (バグ #1046)。PR#99: seealsoディレクティブを通常のadmonitionに置き換えました。これにより特別に用意されていたCSSクラス(admonition-see-also)が削除され、一貫性のないLaTeX admonitionタイトル("See also"ではなく"See Also")と、textビルダーでの誤ったインデントが修正されました。
HTML ビルダー
#783: 画像がwidthかhightオプションで拡縮されている場合はフルサイズ画像に自動的にリンクする。
#1067: Improve the ordering of the JavaScript search results: matches in titles come before matches in full text, and object results are better categorized. Also implement a pluggable search scorer.
#1053: The "rightsidebar" and "collapsiblesidebar" HTML theme options now work together.
jQuery 1.7.1、Underscore.js 1.3.1に更新しました。
Texinfo ビルダー
An "Index" node is no longer added when there are no entries.
"deffn" categories are no longer capitalized if they contain capital letters.
desc_annotationが描画されるようになりました。strongandemphasisnodes are now formatted likeliterals. The reason for this is because the standard Texinfo markup (*strong*and_emphasis_) resulted in confusing output due to the common usage of using these constructs for documenting parameter names.Field lists formatting has been tweaked to better display "Info field lists".
system_messageandproblematicnodes are now formatted in a similar fashion as done by the text builder."en-dash" and "em-dash" conversion of hyphens is no longer performed in option directive signatures.
@refis now used instead of@pxreffor cross-references which prevents the word "see" from being added before the link (does not affect the Info output).The
@finaloutcommand has been added for better TeX output.transitionnodes are now formatted using underscores ("_") instead of asterisks ("*").The default value for the
paragraphindenthas been changed from 2 to 0 meaning that paragraphs are no longer indented by default.#1110: A new configuration value
texinfo_no_detailmenuhas been added for controlling whether a@detailmenuis added in the "Top" node's menu.Detailed menus are no longer created except for the "Top" node.
Fixed an issue where duplicate domain indices would result in invalid output.
LaTeX ビルダー:
PR#115: Add
'transition'item inlatex_elementsfor customizing how transitions are displayed. Thanks to Jeff Klukas.PR#114: The LaTeX writer now includes the "cmap" package by default. The
'cmappkg'item inlatex_elementscan be used to control this. Thanks to Dmitry Shachnev.The
'fontpkg'item inlatex_elementsnow defaults to''when thelanguageuses the Cyrillic script. Suggested by Dmitry Shachnev.The
latex_documents,texinfo_documents, andman_pagesconfiguration values will be set to default values based on themaster_docif not explicitly set inconf.py. Previously, if these values were not set, no output would be generated by their respective builders.
国際化:
カスタムテンプレートにi18n機能を追加。例えば、SphinxのdocディレクトリにあるSphinxリファレンスドキュメントの場合、
make gettextを実行するとdoc/_templates/*.htmlからメッセージを抜き出してsphinx.potファイルを生成する。PR#61,#703: Add support for non-ASCII filename handling.
他のビルダー:
Added the Docutils-native XML and pseudo-XML builders. See
XMLBuilderandPseudoXMLBuilder.PR#45: The linkcheck builder now checks
#anchors for existence.PR#123, #1106: Add
epub_use_indexconfiguration value. If provided, it will be used instead ofhtml_use_indexfor epub builder.PR#126: Add
epub_tocscopeconfiguration value. The setting controls the generation of the epub toc. The user can now also include hidden toc entries.PR#112: Add
epub_show_urlsconfiguration value.
Sphinx拡張:
PR#52:
special_membersflag to autodoc now behaves likemembers.PR#47:
sphinx.ext.linkcode拡張の追加。PR#25: In inheritance diagrams, the first line of the class docstring is now the tooltip for the class.
コマンドラインインターフェース:
PR #75: sphinx-apidocに
--follow-linksオプションを追加しました。#869: sphinx-build now has the option
-Tfor printing the full traceback after an unhandled exception.sphinx-build コマンドに標準的な
--helpと--versionオプションを追加。sphinx-build コマンドに無効なオプションや引数を指定した場合に、より詳細なエラーメッセージを表示する。
sphinx-build プログラムには冗長な情報出力オプション
-vがあり、繰り返し配置することでより効果が大きくなります。一回のみの場合では標準の場合に比べ、わずかな追加情報しか出力されませんが。2回かさらにそれ以上のオプションの繰り返しにより、デバッグに有用なより詳細な出力が得られるようになります。
翻訳:
PR #74: いくつかのロシア語翻訳を修正しました。
PR #54: ノルウェー語 (ブークモール) 翻訳を追加しました。
PR #35: スロバキア語ロケールを追加しました。
PR #28: ハンガリー語ロケールを追加しました。
#1113: ヘブライ語翻訳を追加しました。
#1097: バスク語翻訳を追加しました。
#1037: ポーランド語翻訳を修正しました。ありがとう Jakub Wilk。
#1012: エストニア語翻訳を更新しました。
最適化:
検索インデックスの作成について、単語のステミング処理の結果をキャッシュして高速化した。Pythonドキュメントのビルドにおいて20秒ほど高速化された。
PR#108: Add experimental support for parallel building with a new
sphinx-build -joption.
ドキュメント¶
PR#88: "Sphinx開発者ガイド" (
doc/devguide.rst) を追加。Sphinxプロジェクトの基本的な開発プロセスの概要を記載している。ドキュメント ”Sphinxのインストール" を追加 (
doc/install.rst)。
バグ修正¶
PR#124: 以下の問題を修正しました: versionmodified に含まれているパラグラフが入れ子になる場合に無視される問題。間違ったhtml出力 (入れ子になった
<p>タグ)。versionmodifiedが翻訳対象となっていない問題。ありがとう Nozomu Kaneko.PR#111: Respect add_autodoc_attrgetter() even when inherited-members is set. Thanks to A. Jesse Jiryu Davis.
PR#97: Fix footnote handling in translated documents.
textライターがfigureディレクティブの本文を出力する visit_legend 提供していない問題を修正
textビルダーが文字の幅を考慮していなかった問題を修正。全角幅の文字を使用した場合に、タイトルの下線やテーブルレイアウトが崩れる問題があった。
LaTeXテーブルのヘッダーセルの前のスペースを調整。
#1132: LaTeXテーブルにおいて、最初の列で複数行にまたがるセルの出力について修正。
#1128: 標準のロケールではない場合に、時刻表示を整形しようとしてUnicodeエラーとなる問題を修正。
#1127: autodocがPython以外のファイルを単語分割しようとした際のトレースバックを修正。
#1126: LaTeXのコマンドラインオプション名の記述などで、二重ハイフンがダッシュ文字に変換される問題を修正。
#1123: Allow whitespaces in filenames given to
literalinclude.#1120: Sphinx同梱の "basic", "haiku", "scrolls" テーマのi18n化を進めた。ありがとうLeonardo J. Caballero G。
#1118: スペイン語の翻訳を更新。ありがとうLeonardo J. Caballero G。
#1117: sphinx-apidocで.pyxファイルを扱う
#1112: ドキュメントが絶対パスと相対パス、といった異なる方法で参照したダウンロードファイルが複製されないようにした。
#1111: Fix failure to find uppercase words in search when
html_search_languageis 'ja'. Thanks to Tomo Saito.#1108: The text writer now correctly numbers enumerated lists with non-default start values (based on patch by Ewan Edwards).
#1102: autodocにおいて、マルチコンテキストな "with" 文に対応。
#1090: gettextがglossaryの用語定義を対象としていない問題を修正。
#1074: Add environment version info to the generated search index to avoid compatibility issues with old builds.
#1070: Python2のSphinxでビルドしたプロジェクトをPython3で再ビルドしようとしたときに中間データのロード(un-pickling)に失敗する問題を修正。
#1069: autodocが”partial"された関数のシグネチャを整形しようとしてキーワード引数をうまく扱えなかった問題を修正(patch by Artur Gaspar)。
#1062: sphinx.ext.autodoc は __init__ メソッドのシグネチャをクラスのシグネチャとして使うようにした。
#1055: Web support でソースディレクトリへの相対パスができない問題を修正しました。
#1043: WindowsのPython-3.2を使用している環境において、sphinx-quickstartのyes/noの質問に何を答えても受け付けない(同じ質問を繰り返す)問題を修正。その環境でのみ
input()がよけいな 'r' を付けていた。ありがとう Régis Décamps。#1041: cppドメインパーサーが 修飾子付きのconst型をパース出来ない問題。
#1038: cppドメインパーサーがC+11の "static constexpr" 宣言をパース出来ない問題。ありがとう Jakub Wilk。
#1029: Python3.3環境において、intersphinx_mappingがの値が安定しない問題を修正。
#1028: Fix line block output in the text builder.
#1024: Makefile/make.bat のエラーメッセージを改善し、Sphinxがインストールされていない場合に分かりやすいエラーメッセージを表示するようにした。ありがとう Anatoly Techtonik。
#1018: Fix "container" directive handling in the text builder.
#1015: Stop overriding jQuery contains() in the JavaScript.
#1010: Make pngmath images transparent by default; IE7+ should handle it.
#1008: Python 3.3でテストが失敗していた問題を修正しました。
#995: LaTeXの "howto" クラスで目次とページナンバリングの問題を修正。
#976: Fix gettext does not extract index entries.
PR#72: #975: Fix gettext not extracting definition terms before Docutils 0.10.
#961: コード片が三重クォートを持っている場合のLaTeX出力を修正。
#958: Do not preserve
environment.pickleafter a failed build.#955: i18n変換を修正しました。
#940: Fix gettext does not extract figure caption.
#920: PILのパッケージングの問題により、PIL名前空間無しで
Imageをimportしなければならない場合があった。PILあり、なしどちらの場合にも正しくimportできるように修正。ありがとうMarc Schlaich。#723: ローカルファイルをWebKitベースのブラウザで閲覧している場合も検索機能が使えるように修正。
#440: あるファイルシステムの更新時刻の記録精度が悪いため、そのような環境でビルド時の更新対象ファイルの一覧生成が間違っていた問題を修正。