Commit Graph

703 Commits

Author SHA1 Message Date
Takeshi KOMIYA
dd371a59de Move DirectoryHTMLBuilder to sphinx.builders.dirhtml package 2019-02-07 02:06:39 +09:00
Takeshi KOMIYA
c4397318d3 Separate applehelp to sphinxcontrib package 2019-02-06 00:44:37 +09:00
Takeshi KOMIYA
2bd69350a7 Separate devhelp to sphinxcontrib package 2019-01-20 03:03:50 +09:00
Takeshi KOMIYA
6be9d2a08e Separate qthelp to sphinxcontrib package 2019-01-19 16:34:06 +09:00
Takeshi KOMIYA
9c52b4ed6c Drop dependency: sphinxcontrib-websupport 2019-01-14 19:44:12 +09:00
Takeshi KOMIYA
647021be64 Add progress_message() as a helper for progress messages 2019-01-12 22:06:04 +09:00
Takeshi KOMIYA
b08a7c4757 Move SingleFileHTMLBuilder to sphinx.builders.singlehtml package 2019-01-11 01:59:56 +09:00
Takeshi KOMIYA
76e9f57c2e Merge branch '1.8' 2019-01-02 16:16:25 +09:00
Takeshi KOMIYA
1b1ebd2c75 A happy new year! 2019-01-02 16:00:30 +09:00
jfbu
32d57b8637 Merge branch '1.8'
resolved Conflicts:
	doc/development/tutorials/todo.rst
	sphinx/locale/__init__.py
	sphinx/search/zh.py
2018-12-28 12:50:20 +01:00
jfbu
1e07cb10fc Fix various spelling typos 2018-12-27 13:06:33 +01:00
Takeshi KOMIYA
de49b991f6 refactor: Use simple Input class 2018-12-17 22:07:56 +09:00
Jon Dufresne
bade33c7e4 Remove unnecessary encoding cookie from Python source files
In Python 3, the default encoding of source files is utf-8. The encoding
cookie is now unnecessary and redundant so remove it. For more details,
see the docs:

https://docs.python.org/3/howto/unicode.html#the-string-type

> The default encoding for Python source code is UTF-8, so you can
> simply include a Unicode character in a string literal ...

Includes a fix for the flake8 header checks to stop expecting an
encoding cookie.
2018-12-16 12:22:12 -08:00
Takeshi KOMIYA
6bc357140d Replace all "unicode" type by "str" 2018-12-15 23:57:43 +09:00
Takeshi KOMIYA
b56f4f9022 Remove print_function feature 2018-12-15 23:16:10 +09:00
Takeshi KOMIYA
53917f228f Move to py3 mode for mypy (and remove many "type: ignore" comments) 2018-12-15 02:42:42 +09:00
Takeshi KOMIYA
773568a4e2 refactor: Use app.add_node() to register Sphinx own nodes 2018-12-05 00:05:51 +09:00
Takeshi KOMIYA
382d836771 Fix annotations of enumerable_nodes 2018-12-03 22:07:29 +09:00
Takeshi KOMIYA
bfd35c6ce1 Add role manipulator directives to sphinx.util.docutils 2018-12-01 19:50:12 +09:00
Takeshi KOMIYA
e294b8e036 Add role manipulator functions to sphinx.util.docutils 2018-12-01 18:46:22 +09:00
Takeshi KOMIYA
fcc53447a3 Fix annotations (in some modules) 2018-12-01 12:29:49 +09:00
Takeshi KOMIYA
3c99d00605 Add sphinx.util.typing:unicode to help mypy-3 migration 2018-11-24 23:19:51 +09:00
Takeshi KOMIYA
d4e22793ca Fix annotations for app.add_nodes() and related functions 2018-11-24 21:59:11 +09:00
Jon Dufresne
27a6787d63 Remove use of six.binary_type
Remove type checks for cases that don't apply to Python 3.

For remaining uses, use bytes instead
2018-11-11 19:09:47 -08:00
Takeshi KOMIYA
8f9a76f476 Remove use six.move module 2018-11-12 01:02:14 +09:00
Takeshi KOMIYA
d340ff9abb Fix typehints: sphinx.registry 2018-11-05 11:11:16 +09:00
Takeshi KOMIYA
8b687ac304 Merge branch '1.8' 2018-11-01 01:24:12 +09:00
Takeshi KOMIYA
ca8bc8ca49 refactor: Deprecate app._setting_up_extension 2018-10-17 11:56:11 +09:00
Takeshi KOMIYA
257394a459 Fix #5471: Show appropriate warning for deprecated APIs 2018-10-17 02:05:07 +09:00
Takeshi KOMIYA
eaec3bd916 Add sphinx.project; a manipulator for project and documents 2018-10-16 10:34:58 +09:00
Jon Dufresne
ce8227c6cf Replace all six.itervalues()/.iteritems() with .values()/.items() 2018-09-23 18:26:31 -07:00
Jon Dufresne
02d06bdaf0 Remove uses of six.moves that did not cause any type errors
Removal of the remaining imports may require passing "--python-version
3.5" to the mypy command.
2018-09-23 09:22:06 -07:00
Jon Dufresne
490e4aed41 Remove unnecessary object from class definitions
In Python 3, all classes are new-style classes. The object in the
definition is redundant and unnecessary.
2018-09-11 07:07:01 -07:00
Takeshi KOMIYA
02b763bc71 refactor: Check primary_domain on config-inited event 2018-09-08 22:47:45 +09:00
Takeshi KOMIYA
a7cab001d9 Drop APIs deprecated in 2.0 2018-09-03 00:31:33 +09:00
Takeshi KOMIYA
698d4ed42c Allow to install JS and CSS files on builder-inited event 2018-08-26 11:59:47 +09:00
Takeshi KOMIYA
25bfa1692a refactor: Move repository of changesets to domain from env 2018-08-02 01:51:50 +09:00
Takeshi KOMIYA
609ec5ef33
Merge branch 'master' into 4614_keep_going 2018-07-31 01:11:08 +09:00
Takeshi KOMIYA
104bd42f51
Merge branch 'master' into refactor_highlighter 2018-07-29 11:21:36 +09:00
Takeshi KOMIYA
dd65d00f29 Implement math_renderer framework 2018-07-28 18:20:11 +09:00
Takeshi KOMIYA
e3483e9b04 Closes #4614: sphinx-build: Add :option:--keep-going option to show all warnings 2018-07-23 00:38:47 +09:00
Takeshi KOMIYA
4f296c5e67 Refactor: Run highlightlang on resolving phase 2018-07-21 13:54:09 +09:00
Takeshi KOMIYA
1a477397b2
Merge pull request #5120 from blueyed/fix-doc
doc: fix list with add_object_type
2018-06-26 00:40:22 +09:00
Daniel Hahler
8f94429a21 doc: fix func/meth references to Sphinx 2018-06-25 08:25:56 +02:00
Daniel Hahler
c2b85b923f doc: fix list with add_object_type
This seems to have been accidentally broken in eaaab75ec.
2018-06-25 06:38:32 +02:00
Takeshi KOMIYA
9fc2657d7e Add :confval:html_js_files 2018-06-09 02:38:36 +09:00
Takeshi KOMIYA
106f4ea023 doc: Fix widths of table 2018-06-05 22:45:31 +09:00
Takeshi KOMIYA
f3168d9894 Rename app.add_javascript() to add_js_file() 2018-05-24 23:59:49 +09:00
Takeshi KOMIYA
8fd34b88d3 add_javascript() allows keyword arguments as attributes for <script> tag 2018-05-24 23:59:49 +09:00
Takeshi KOMIYA
3ffde92c54 Add BuildEnvironment.setup() to re-initialize (after unpickle) 2018-05-21 10:36:22 +09:00
Takeshi KOMIYA
a4c7be6fcd Move MathDomain to sphinx.domains.math 2018-05-17 00:42:24 +09:00
Takeshi KOMIYA
4e04bff4f5 Enable math node rendering by default (without HTML builders)
Nowadays, math elements (inline and block level equations) are
integrated into reST spec by default.  But, in Sphinx, they are
not enabled by default.  For this reason, users have to enable
one of math extensions even if target builder supports math
elements directly.

This change starts to enable them by default.  As a first step,
this replaces math node and its structure by docutils based one.
2018-05-15 22:27:49 +09:00
Takeshi KOMIYA
5493bc1612
Merge branch 'master' into refactor_env2 2018-05-12 22:42:29 +09:00
Takeshi KOMIYA
dad20201db refactor: Convert the form of html_css_files 2018-05-11 02:32:04 +09:00
Takeshi KOMIYA
d6db20781a Deprecate methods for pickling/unpickling on BuildEnvironment 2018-05-11 02:28:01 +09:00
Takeshi KOMIYA
e38218fdf5 Fix flake8 violation 2018-04-28 19:15:24 +09:00
Takeshi KOMIYA
b165ade6b0 Rename Config.read_from_py() to Config.read() 2018-04-28 13:05:28 +09:00
Takeshi KOMIYA
5897d45cc6 Merge branch 'master' into refactor_config 2018-04-22 18:56:04 +09:00
Takeshi KOMIYA
320421be67
Merge pull request #4810 from tk0miya/define_priority_for_transforms
Proposal: Define priority for transforms
2018-04-21 11:29:48 +09:00
Takeshi KOMIYA
c35eb6fade
Merge pull request #4815 from tk0miya/refine_add_css_file
Refine adding CSS files
2018-04-13 00:21:33 +09:00
Takeshi KOMIYA
b2bd9f75a6 Merge branch '1.7' 2018-04-09 01:46:00 +09:00
Takeshi KOMIYA
3afc72fba4 Rename add_stylesheet() to add_css_file() 2018-04-06 13:11:24 +09:00
Takeshi KOMIYA
99fbd44e20 Store stylesheets as an instance variable of HTML builder
So far, CSS files are stored as a class variable of HTML builder.
Not to have status globally, this changes it to an instance varable.
2018-04-06 13:10:49 +09:00
Takeshi KOMIYA
c5d6942b88 add_stylesheet() allows additional attributes 2018-04-06 13:10:49 +09:00
Takeshi KOMIYA
cff8dc519b Fix #4783: Sphinx crashed when drives of srcdir and outdir are different 2018-04-02 23:03:02 +09:00
Takeshi KOMIYA
5ab403bf36 Define priority for transforms 2018-04-02 22:51:52 +09:00
Takeshi KOMIYA
47918f365e Merge branch 'master' into refactor_config 2018-04-02 10:47:47 +09:00
Takeshi KOMIYA
bc63dc8450 Rename Config.read() to Config.from_conf_py() 2018-04-01 20:07:45 +09:00
Takeshi KOMIYA
448db58d88
Merge pull request #4760 from tk0miya/add_override_option
Add a new keyword argument ``override`` to Application APIs
2018-03-29 23:26:08 +09:00
Takeshi KOMIYA
61828786a6 Deprecate app.override_domain() 2018-03-29 21:59:29 +09:00
Takeshi KOMIYA
a24601aa24 Deprecate Config.check_unicode() 2018-03-29 10:32:49 +09:00
Takeshi KOMIYA
00e9e560b1 Fix confoverrides parameter was ignored 2018-03-29 10:24:48 +09:00
Takeshi KOMIYA
2f1cb1e184 Instantiate Config object simply if confdir not given 2018-03-28 00:58:41 +09:00
Takeshi KOMIYA
181fb1093d Now Config.read() takes a filename instead (dirname, filename) 2018-03-28 00:58:40 +09:00
Takeshi KOMIYA
aa1073cfe1 Fix #4787: Update docstrings for add_directive() 2018-03-27 23:10:22 +09:00
Takeshi KOMIYA
78cbf96158 Deprecate Config.check_types() 2018-03-24 00:29:11 +09:00
Takeshi KOMIYA
3d8cb12497 Raise ExtensionError from Config class instead application class 2018-03-24 00:27:03 +09:00
Takeshi KOMIYA
ba83214386 Refactor: Add Config.read() as a constructor
To simplify Config.__init__() method, this separates conf.py parsing
feature to Config.read() method.
This allows to instantiate config object simply.
2018-03-23 23:40:28 +09:00
Takeshi KOMIYA
1a43d47c33 Add a new keyword argument `override` to Application APIs 2018-03-21 00:23:44 +09:00
Takeshi KOMIYA
4202c13fe8 Fix invalid __file__ variable is passed to conf.py 2018-03-20 22:52:17 +09:00
Takeshi KOMIYA
9efaf18852 Merge branch '1.7' 2018-03-18 01:21:01 +09:00
cocoatomo
6a6fcb5d86 Fix module name 2018-03-15 07:59:43 +09:00
Takeshi KOMIYA
70a622b86c Revert "Use typing.TYPE_CHECKING for typehints"
This reverts commit a073e17537.
2018-03-13 23:23:15 +09:00
Takeshi KOMIYA
6faef28150 Make console and warning messages translatable 2018-03-03 23:18:38 +09:00
Takeshi KOMIYA
645ad75523 Fix mypy violations 2018-02-26 02:21:26 +09:00
Takeshi KOMIYA
b3e7609a80 Update docs 2018-02-25 23:44:38 +09:00
Takeshi KOMIYA
ed403ad8ff Supports i18n console output 2018-02-25 23:44:37 +09:00
Takeshi KOMIYA
5b3e1dc856 Add locales.get_translation() to provide i18n feature for extensions 2018-02-25 02:03:40 +09:00
Takeshi KOMIYA
30cab5c376
Merge branch 'master' into migrate_registry 2018-02-22 20:21:09 +09:00
Takeshi KOMIYA
f6b1abf254
Merge pull request #4594 from tk0miya/4564_rst_prolog_not_working
Change interface of add_source_parser() and add add_source_suffix()
2018-02-22 20:19:13 +09:00
Takeshi KOMIYA
5789b25847 Change interface of add_source_parser() and add add_source_suffix() 2018-02-21 10:54:49 +09:00
Takeshi KOMIYA
9c6d4f1308 Add simple wrapper to register nodes 2018-02-21 00:28:03 +09:00
Takeshi KOMIYA
8b8836b6d2 Show deprecation warning in directive_helper() 2018-02-21 00:27:18 +09:00
Takeshi KOMIYA
446eab49b8 refactor: transplant node handlers for writer on instantiation of translator
For now, node handlers are registered as class methods of translator
classes.  After this change, they are registered as instance method.
2018-02-20 01:46:51 +09:00
Takeshi KOMIYA
18efa1a63a refactor: Store enumerable_nodes to registry 2018-02-20 01:32:30 +09:00
Takeshi KOMIYA
1ffa537b1c refactor: Store latex packages to registry 2018-02-20 00:19:32 +09:00
Takeshi KOMIYA
9a82e1098b
Merge pull request #4625 from tk0miya/add_app.phase
Add app.phase to let components know the current build phase
2018-02-20 00:09:58 +09:00
Takeshi KOMIYA
f8bb40ab30 Merge branch '1.7' 2018-02-18 12:39:07 +09:00
Takeshi KOMIYA
a9ecb190a7 autosummary: Fix compatibility of get_documenter() API (refs: #4366) 2018-02-17 23:26:28 +09:00
Takeshi KOMIYA
9d91816fe6 Add app.phase to let components know the current build phase 2018-02-17 00:09:07 +09:00
Takeshi KOMIYA
5d1b8ff55f Fix mypy violations 2018-02-14 22:57:41 +09:00
Takeshi KOMIYA
a073e17537 Use typing.TYPE_CHECKING for typehints 2018-02-14 22:57:38 +09:00
Takeshi KOMIYA
053ac8c401 Fix indentation 2018-02-12 23:54:38 +09:00
Takeshi KOMIYA
bd0b4204ca Fix #4596: TypeError: issubclass() arg 1 must be a class 2018-02-12 10:23:01 +09:00
Takeshi KOMIYA
85651bfdf2 Fix condition for deprecation warning 2018-02-10 23:36:25 +09:00
Takeshi KOMIYA
e84ba569a2 Merge branch '1.7-release' 2018-02-10 15:46:48 +09:00
Takeshi KOMIYA
301aee4916 Drop function based directive support 2018-02-07 09:20:47 +09:00
cocoatomo
1c61bf6db4 More translation-friendly messages 2018-02-07 02:12:22 +09:00
cocoatomo
8969ae40de Make the log message more translation-friendly 2018-02-07 01:52:22 +09:00
Takeshi KOMIYA
9d33ec99b4 Deprecate: app.import_object() 2018-02-06 00:36:55 +09:00
Takeshi KOMIYA
3859136342 Refactor app._init_env() not to load env even if dump not found 2018-02-06 00:22:14 +09:00
Takeshi KOMIYA
f49a7c9024 Reimplement needs_extensions checker as a config-init handler 2018-01-31 20:41:31 +09:00
Takeshi KOMIYA
4647fcee45 Merge branch '1.7-release' 2018-01-31 20:40:56 +09:00
Takeshi KOMIYA
a5fea73d0c Merge branch 'master' into integrate_source_suffix_and_source_parsers 2018-01-31 00:04:11 +09:00
Takeshi KOMIYA
0f4a4b2ae9
Merge pull request #4486 from tk0miya/4460_env_version_of_extensions
Close #4460: extensions should return the version of data structure as metadata
2018-01-28 21:15:07 +09:00
Takeshi KOMIYA
9f5c676322 Use flake8-import-order 2018-01-28 01:52:16 +09:00
Takeshi KOMIYA
32c5e8346f Close #4460: extensions should return the version of data structure as metadata 2018-01-25 02:04:22 +09:00
Takeshi KOMIYA
0cdd9ee72a Integrate source_suffix and source_parsers (refs: #4474) 2018-01-25 02:03:56 +09:00
Takeshi KOMIYA
69f69628ed :confval:source_suffix allows a mapping fileext to file types 2018-01-25 02:03:56 +09:00
Takeshi KOMIYA
dc45877d3c Deprecate config value: source_parsers 2018-01-25 02:03:56 +09:00
Takeshi KOMIYA
3b42c8e06c Drop a hack for py31 2018-01-25 02:02:54 +09:00
Stephen Finucane
1ec03ec1b0 doc: Add 'deprecated' directive to docstrings
This helps emphasize the deprecated nature of these directives.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-01-21 11:38:03 +00:00
Stephen Finucane
b7ff955472 doc: Move 'sphinx.application' API docs to code
This allows us to do something like 'help(sphinx.application)' in code.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-01-21 11:19:46 +00:00
Takeshi KOMIYA
6e420e517e
Merge pull request #4465 from tk0miya/improve_config
Improve config
2018-01-21 16:05:34 +09:00
Takeshi KOMIYA
944047c8d4 Emit config-inited just after config.init_values() 2018-01-21 15:44:37 +09:00
Takeshi KOMIYA
c80a26c81b refactor: move source_suffix migrator to event handler 2018-01-20 22:30:37 +09:00
Stephen Finucane
3a85b3502f app: Centralize directory validation
This allows us to avoid duplication of code and ensure validation
happens regardless of who's initializing the class. We introduce a new
exception - ApplicationError - to indicate these kinds of issues. This
subclasses SphinxError, meaning we don't need to modify our exception
handling code.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-01-20 13:04:29 +00:00
Takeshi KOMIYA
29df3a095a Add config-inited event 2018-01-20 21:21:45 +09:00
Stephen Finucane
a83e8bab7d builders: Add 'Builder.epilog' option
This allows builders to emit a final epilog message containing
information such as where resulting files can be found. This is only
emitted if the build was successful.

This allows us to remove this content from the 'make_mode' tool and
the legacy 'Makefile' and 'make.bat' templates. There's room for more
dramatic simplification of the former, but this will come later.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-01-11 20:57:03 +00:00
Takeshi KOMIYA
fb921c7457 Merge branch 'master' into refactor_autodoc 2018-01-08 15:10:43 +09:00
Takeshi KOMIYA
1c0a5ee55d Merge branch 'master' into refactor_AutoDirective 2018-01-08 14:17:08 +09:00
MURAOKA Yusuke
2484819e96 Fix creating build directory for unknown build target 2018-01-07 20:11:01 +09:00
Takeshi KOMIYA
7162fcdff9 Fix typo 2018-01-07 00:51:45 +09:00
Takeshi KOMIYA
4b51ed4aa9 Deprecate AutoDirective._special_attrgetters 2018-01-01 12:13:29 +09:00
Takeshi KOMIYA
5d6413b712 Deprecate sphinx.ext.autodoc.add_documenter() and AutoDirective._register 2018-01-01 12:13:29 +09:00
Takeshi KOMIYA
f1f6ca8cc9 Merge branch 'happy_new_year' into master 2018-01-01 01:09:17 +09:00
Takeshi KOMIYA
2426cedb8b A happy new year! 2018-01-01 01:06:58 +09:00
Takeshi KOMIYA
1d3362425b Add app.is_parallel_allowed() 2017-12-30 00:54:55 +09:00
Takeshi KOMIYA
90159b8143 Merge branch 'master' into refactor_registry 2017-12-21 00:16:32 +09:00
jfbu
fcbabcd9b5 Merge branch 'stable'
Conflicts:
	sphinx/apidoc.py
	sphinx/application.py
	sphinx/quickstart.py

	modified:   CHANGES
	modified:   doc/config.rst
	modified:   doc/markup/inline.rst
	modified:   sphinx/application.py
	modified:   sphinx/builders/__init__.py
	modified:   sphinx/cmd/quickstart.py
	modified:   sphinx/ext/apidoc.py
2017-12-18 10:13:49 +01:00
Takeshi KOMIYA
832914423e autodoc: refactor AutoDirective 2017-12-17 02:07:34 +09:00
Michał Górny
14af6b429e Use ensuredir() instead of os.makedirs() to fix race conditions
Use the ensuredir() function consistently across Sphinx code to avoid
race conditions e.g. when multiple Sphinx instances attempt to create
the same output directory. The ensuredir() function that was already
present in sphinx.util.osutil correctly catches EEXIST exception that
occurs if the specified directory already exists (i.e. it was created
between the call to os.path.isdir() and os.makedirs() that follows it).

While at it, remove redundant os.path.isdir() calls when they only
guarded the os.makedirs() call, and replace mkdir_p() which had pretty
much the same purpose, except for being prone to race conditions.

I did not modify testing-related code as race conditions mostly affect
real applications and not the test environment.

Fix #4281: Race conditions when creating output directory
2017-12-16 09:50:09 +01:00
Takeshi KOMIYA
fe07365a8c Fix mypy violations 2017-12-15 22:17:03 +09:00
Takeshi KOMIYA
2a26656ce6 Move post-transform manager to registry 2017-12-14 23:55:39 +09:00
Takeshi KOMIYA
27ea988f6e Move Transform manager to registry 2017-12-14 23:55:39 +09:00
Takeshi KOMIYA
ed1f47e190 Move logs to registry 2017-12-14 23:37:13 +09:00
Takeshi KOMIYA
0e86ff2f11 Refactor sphinx.io; separate FileInput class for each file type 2017-12-12 18:24:52 +09:00
Timotheus Kampik
4f3cf402f6 #3799 use propper pluralization in (dummy) i18n call 2017-08-05 18:52:09 +02:00
Takeshi KOMIYA
e8c5589e23 Merge branch 'stable' 2017-07-15 16:47:42 +09:00
Takeshi KOMIYA
bcafa5772c Fix flake8 violation 2017-07-15 16:47:32 +09:00
Takeshi KOMIYA
f349d18531 Merge branch 'stable' 2017-07-15 16:46:59 +09:00
Takeshi KOMIYA
fa77fe8ac9 Fix mypy violations (for mypy-0.520) 2017-07-15 16:44:53 +09:00
Takeshi KOMIYA
007593fa81 Merge branch 'stable' 2017-07-02 20:28:50 +09:00
Takeshi KOMIYA
41bb5f7fd2 Fix #3833: command line messages are translated unintentionally 2017-06-25 17:55:54 +09:00
Takeshi KOMIYA
de11e54955 Merge branch 'stable' 2017-05-28 23:26:16 +09:00
Takeshi KOMIYA
69cf328b8b Add Sphinx own parser (refs: #3816) 2017-05-28 22:34:53 +09:00
Takeshi KOMIYA
ada4f6e19a Fix flake8 violation 2017-05-28 10:38:41 +09:00
Takeshi KOMIYA
b396e6ac5c Refactor patching docutils 2017-05-28 10:10:29 +09:00
jfbu
7165a4f1e4 Fix #3788: Docutils emits warnings for unsupported languages
This monkey-patches docutils.languages.get_language() to suppress
Docutils emitted warning when the document settings use a language_code
for which Docutils has no ready-made localisation. The language_code is
needed for functioning of the smartquotes transform.
2017-05-27 16:58:10 +02:00
Takeshi KOMIYA
78a20617b5 Merge branch '1.6-release' 2017-05-13 15:42:28 +09:00
Takeshi KOMIYA
33837ac493 Update messages 2017-05-12 23:32:56 +09:00
Takeshi KOMIYA
acb9ab6eb9 Fix invalid format string 2017-05-11 20:19:13 +09:00
Takeshi KOMIYA
c74eb9448b Remove deprecated feature: deprecated APIs 2017-04-27 21:49:19 +09:00
Takeshi KOMIYA
f2c93b3175 Remove deprecated feature: epub2 builder 2017-04-27 21:49:19 +09:00
Takeshi KOMIYA
3a0f7d3bad Merge branch 'master' into add_sphinx_factory 2017-04-23 17:06:20 +09:00
Takeshi KOMIYA
72f267c6ae Rename SphinxFactory class to SphinxComponentRegistry 2017-04-23 16:29:38 +09:00
Takeshi KOMIYA
a87a93ac71 Move load_extension() to factory 2017-04-22 20:04:46 +09:00
Takeshi KOMIYA
78ea36a787 Move translators to SphinxFactory 2017-04-22 20:04:45 +09:00
Takeshi KOMIYA
f346e7dc1d Move source_parsers manager to SphinxFactory 2017-04-22 20:04:45 +09:00
Takeshi KOMIYA
8ca9bdfbd4 Move domain class manager to SphinxFactory 2017-04-22 20:04:43 +09:00
Takeshi KOMIYA
3cc9d8c250 Move Sphinx._directive_helper() to sphinx.util.docutils 2017-04-22 20:04:43 +09:00
Takeshi KOMIYA
feaf2a793b Add SphinxFactory class to simplify application class 2017-04-22 20:04:43 +09:00
Takeshi KOMIYA
621a4e6f61 Fix #3628: Rename sphinx_themes entry point to sphinx.html_themes 2017-04-22 14:59:10 +09:00
Takeshi KOMIYA
241c0db7bc Merge branch 'master' into support_remote_images 2017-04-22 09:45:05 +09:00
Yoshiki Shibukawa
fb48f5a921 Merge pull request #3505 from shibukawa/feature/refactoring_epub_builder
Refactoring EPUB builders: split common codes from EPUB2 builder
2017-04-21 00:25:16 +09:00
Takeshi KOMIYA
1ee744208d Fix mypy violations 2017-04-21 00:09:52 +09:00
Takeshi KOMIYA
faefe2b5a5 Add HTMLThemeFactory class 2017-04-20 20:45:44 +09:00
Yoshiki Shibukawa
7bbf749bd1 Refactoring EPUB builders: split common codes from EPUB2 builder 2017-04-20 00:48:00 +09:00
Takeshi KOMIYA
e6f8cd6c78 Add styleesheet class
To keep compatibility with old themes, an instance of stylesheet behaves as
its filename (refs: #1767).
2017-04-19 10:09:46 +09:00
Takeshi KOMIYA
3c46c2f5ac Add ImageDownloader transform to support remote images on some builders 2017-04-19 01:40:17 +09:00
Takeshi KOMIYA
618ef6492c Merge pull request #1767 from Jellby/master
Allow setting 'rel' and 'title' attributes for stylesheets.
2017-04-19 00:04:43 +09:00
Takeshi KOMIYA
7d9a47d79b Preload builder module before init config values 2017-04-16 18:11:37 +09:00
Takeshi KOMIYA
9fd0205b27 Make translatable 2017-04-16 17:38:00 +09:00
Jellby
e59a8028d7 Rewrite and simplify stylesheet handling
Thanks to tk0miya's comment, I learnt one can add stuff to template
blocks, that allows a much simpler stylesheet configuration, considering
that changes at the template level will be more... well, low-level.
Hopefully this is now acceptable.
2017-04-15 17:07:33 +02:00
Jellby
1cfed262d2 Merge remote-tracking branch 'upstream/master'
Conflicts:
	tests/test_build_html.py
2017-04-15 15:54:06 +02:00
Brecht Machiels
3dd256fe7d Do not include the builder class in the entry point
- use the entry point to load the extension module in the usual way
- update the documentation to reflect this change
2017-04-14 11:01:09 +02:00
Brecht Machiels
9f6da45fe5 Use load_extension() to load the builder extension 2017-04-10 13:08:34 +02:00
Brecht Machiels
405ef96d2a Find third-party builders by entry point
A builder is uniquely identified by its name, which can be used as an
entry point in the 'sphinx.builders' entry point group. This obviates
the need to register the builder as an extension.

The built-in builders are still loaded as before. New third-party builders
should provide an entry point in their setup.py:

    entry_points={
        'sphinx.builders': [
            'mybuilder = mypackage.mymodule:MyBuilder',
        ],
    }

Like before, builders should define a setup(app) function in the
'mypackage.module' module to define configuration variables etc. It is
no longer necessary to register the builder using Sphinx.add_builder().

Existing builders can still be loaded the traditional way, by including
their module name in the extensions list in conf.py.
2017-04-10 13:04:41 +02:00
Takeshi KOMIYA
ed167d661c Fix app.messagelog does not filled after moving to logging module 2017-03-26 18:53:08 +09:00
Takeshi KOMIYA
8f9dd64992 Merge branch 'stable' 2017-03-26 11:52:15 +09:00
Takeshi KOMIYA
c57e47e042 Year++ 2017-03-26 11:49:34 +09:00
Takeshi KOMIYA
2cdcc80d44 Rename module: sphinx.extensions -> sphinx.extension (singular) 2017-03-26 10:58:17 +09:00
Takeshi KOMIYA
54076ed797 treat alabaster as a builtin extension 2017-03-23 22:50:11 +09:00
Takeshi KOMIYA
9025297faa Add Extension class 2017-03-23 22:50:11 +09:00
Takeshi KOMIYA
064a0da8c3 Update deprecation message for env.currmodule and env.currclass 2017-03-23 22:50:11 +09:00
Takeshi KOMIYA
61df39f535 Revert "Drop unused codes"
This reverts commit 0f47b1d09d.
2017-03-22 10:21:54 +09:00
Takeshi KOMIYA
0f47b1d09d Drop unused codes 2017-03-22 09:51:01 +09:00
Takeshi KOMIYA
81c0fef4bb Update warning message 2017-03-20 10:37:57 +09:00
Takeshi KOMIYA
b192b3271a Add Builder#get_asset_paths() to make less-coupling 2017-03-20 01:20:19 +09:00
Takeshi KOMIYA
cd3f48bb76 Create an instance of builder before initialize env 2017-03-19 23:16:37 +09:00
Takeshi KOMIYA
518cfca9fb Remove unused variable 2017-03-12 18:03:04 +09:00
Takeshi KOMIYA
fba23bd2bf Add EventManager 2017-03-11 19:50:49 +09:00
Takeshi KOMIYA
eb40a36aa4 Add ReferenceResolver as a post-transform 2017-03-10 10:49:08 +09:00
Takeshi KOMIYA
99ded4c8b1 Add Sphinx.add_post_transform() 2017-03-10 10:49:08 +09:00
Takeshi KOMIYA
57bb34e5e6 Make error message translatable 2017-03-10 10:41:35 +09:00
Takeshi KOMIYA
6251d0d83b Merge branch 'master' into make_env.app_available_always 2017-03-10 00:45:10 +09:00
Takeshi KOMIYA
15114e596d Initialize i18n module earlier 2017-03-09 12:23:23 +09:00
Takeshi KOMIYA
70a8c737c1 Do not clear `app.env` 2017-03-08 23:34:04 +09:00
Takeshi KOMIYA
c7bec75bcd BuildEnvironment always own application object (after read phase) 2017-03-08 12:23:25 +09:00
Jellby
5f25ade72b again 2017-03-04 13:35:03 +01:00
Jellby
b43ae69e0b again 2017-03-04 13:24:15 +01:00
Jellby
d8ff893ebd again 2017-03-04 13:06:35 +01:00
Jellby
3171a195bb again 2017-03-04 12:44:43 +01:00
Jellby
3ce6168958 Merge remote-tracking branch 'upstream/master'
Conflicts:
	tests/test_build_html.py
2017-03-04 12:03:15 +01:00
Takeshi KOMIYA
554199d30e Upgrade to mypy-0.5 2017-03-03 23:17:34 +09:00
Yoshiki Shibukawa
0ef9ac54f1 Add experimental HTML5 writer 2017-03-02 09:56:50 +09:00
Takeshi KOMIYA
6fa0262802 Fix mypy violations 2017-02-08 18:38:42 +09:00
Takeshi KOMIYA
238d92beb3 Merge pull request #3313 from tk0miya/collectors
Refactor sphinx.environment; Add EnvironmentCollectors
2017-01-31 01:50:28 +09:00
Takeshi KOMIYA
21ef6b7e0f Fix mypy violation 2017-01-28 20:53:10 +09:00
Takeshi KOMIYA
851172b13b Reimplement IndexEntriesManager as a collector 2017-01-28 20:44:40 +09:00
Takeshi KOMIYA
0b0637deb2 Reimplement ToctreeManager as a collector 2017-01-28 20:43:54 +09:00
Takeshi KOMIYA
43b52c85a0 Add TitleCollector 2017-01-28 20:43:54 +09:00
Takeshi KOMIYA
fc2a78434d Add MetadataCollector 2017-01-28 20:43:54 +09:00
Takeshi KOMIYA
08766abf52 Add DependenciesCollector 2017-01-28 20:43:54 +09:00
Takeshi KOMIYA
d1405e4774 Add sphinx.environment.collectors 2017-01-28 20:43:54 +09:00
Takeshi KOMIYA
c2f78b6870 `BuildEnvironment.set_warnfunc()` is now deprecated 2017-01-23 21:52:31 +09:00
Takeshi KOMIYA
7bf4f76c3b Add __iter__(), add() and filter() to Config class 2017-01-17 13:43:01 +09:00
shimizukawa
2254da3782 refs #3329: emit warnings if po file is invalid and can't read it. Also writing mo too. 2017-01-13 00:11:35 +09:00
Takeshi KOMIYA
38d6c34f35 Merge branch 'stable' 2017-01-12 13:03:53 +09:00
Takeshi KOMIYA
603cf3a84a Merge branch 'master' into split_app.status_iterator 2017-01-12 11:38:12 +09:00
Takeshi KOMIYA
60d4846e0f Fix flake8 violations 2017-01-12 10:07:05 +09:00
Takeshi KOMIYA
ecd7b62148 Update type annotations 2017-01-09 18:14:53 +09:00
Takeshi KOMIYA
929683df27 Sphinx.status_iterator() is now deprecated 2017-01-07 18:43:32 +09:00
Takeshi KOMIYA
ae24524d5f Drop debug2() (refs: #3304) 2017-01-07 15:03:16 +09:00
shimizukawa
4c22cd10ca Merge branch 'stable' 2017-01-07 02:14:29 +09:00
Takeshi KOMIYA
f695aac2e2 Fix mypy violations 2017-01-06 11:43:03 +09:00
Takeshi KOMIYA
431d865d4a Drop deprecated options for html builder 2017-01-05 13:51:55 +09:00
Takeshi KOMIYA
d4c4720a07 Update by review 2017-01-04 23:17:45 +09:00
Takeshi KOMIYA
e755a8c004 Use loggers 2017-01-02 12:59:51 +09:00
Takeshi KOMIYA
4ea25a4df3 Emit warning on logger methods 2017-01-02 12:59:51 +09:00
Takeshi KOMIYA
b43523fcbe Use sphinx.util.logging instead app.info(), verbose(), debug() and debug2() 2017-01-02 12:59:50 +09:00
Takeshi KOMIYA
85dcd7baa8 Use sphinx.util.logging instead app.warn() 2017-01-02 12:59:50 +09:00
Takeshi KOMIYA
6d4e645409 Add sphinx.util.logging 2017-01-02 12:59:50 +09:00
Takeshi KOMIYA
54cac94cdf Fix #3294: `add_latex_package()` make crashes non-LaTeX builders 2017-01-01 20:07:16 +09:00
Takeshi KOMIYA
e645ea59db Merge branch 'stable' 2016-12-14 00:12:23 +09:00
shimizukawa
5fc8d3db91 Fix: #2469: Ignore updates of catalog files for gettext builder. Thanks to Hiroshi Ohkubo. 2016-12-12 23:28:00 +09:00
Takeshi KOMIYA
92a9c653f7 Merge branch 'stable' 2016-12-12 22:35:55 +09:00
Takeshi KOMIYA
d72954d498 builtin extensions return metadata to allow parallel build 2016-12-12 21:22:16 +09:00
Jellby
6ce1bb1f00 Merge remote-tracking branch 'upstream/master'
Conflicts:
	sphinx/application.py
	sphinx/builders/html.py
2016-12-06 19:14:12 +01:00
shimizukawa
e739054d80 Fix #3195: Can not build in parallel. All built-in extensions must have 'parallel safe' flag. 2016-12-07 01:02:34 +09:00