Commit Graph

8475 Commits

Author SHA1 Message Date
Takeshi KOMIYA
30a10d3e29 Fix typo 2017-04-21 00:48:36 +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
70b86401d0 Merge pull request #3648 from tk0miya/refactor_theming
Refactor sphinx.theming (T/O)
2017-04-21 00:23:08 +09:00
Takeshi KOMIYA
1ee744208d Fix mypy violations 2017-04-21 00:09:52 +09:00
Takeshi KOMIYA
e24779b1cc Drop old methods 2017-04-21 00:09:50 +09:00
Takeshi KOMIYA
ca7bb5140e Refactored again 2017-04-20 20:45:44 +09:00
Takeshi KOMIYA
faefe2b5a5 Add HTMLThemeFactory class 2017-04-20 20:45:44 +09:00
Takeshi KOMIYA
b405c0aaf5 Refactor sphinx.theming 2017-04-20 20:45:44 +09:00
Takeshi KOMIYA
637dd02f14 Refactor Theme class 2017-04-20 20:45:44 +09:00
Takeshi KOMIYA
81ef0de7b4 Split theme manager and theme instance class 2017-04-20 20:45:44 +09:00
Takayuki SHIMIZUKAWA
6729d44431 Merge pull request #3635 from tk0miya/stylesheet_behaves_like_a_string
Add styleesheet class
2017-04-20 07:35:03 +09:00
Takayuki SHIMIZUKAWA
9a7cd2a9ad Merge pull request #3646 from jwilk/re.sub
Remove misplaced flags from re.sub() calls
2017-04-20 07:29:17 +09:00
Jakub Wilk
79a841e98c Remove misplaced flags from re.sub() calls
The 4th argument of re.sub() is maximum number of substitutions,
not flags.

Moreover, re.MULTILINE affects only semantics of ^ and $,
so it wouldn't have any effect on this regular expression.
2017-04-20 00:04:08 +02:00
Takeshi KOMIYA
f21ce2f03f Fix markup 2017-04-20 02:02:27 +09:00
Takeshi KOMIYA
358005bd43 Show the location if warniserror enabled 2017-04-20 02:01:57 +09:00
Takeshi KOMIYA
f95b54a78e Make messages translatable 2017-04-20 01:49:17 +09:00
Yoshiki Shibukawa
7bbf749bd1 Refactoring EPUB builders: split common codes from EPUB2 builder 2017-04-20 00:48:00 +09:00
shimizukawa
4f620bf955 Update CHANGES refs #3644 2017-04-20 00:16:32 +09:00
Takeshi KOMIYA
36f09e83d7 Merge pull request #3643 from shibukawa/feature/fix_epub_theme_for_html5
fix #3641: Fix epub style to adopt html5 experimental writer
2017-04-20 00:13:38 +09:00
Takayuki SHIMIZUKAWA
4b2cacddf9 Merge pull request #3644 from jdemeyer/inspect_isfunction
Use inspect instead of checking types
2017-04-20 00:11:19 +09:00
Jeroen Demeyer
3e2255cd64 Use inspect instead of checking types 2017-04-19 15:38:03 +02:00
Yoshiki Shibukawa
23f55ac58d Merge pull request #3640 from shibukawa/feature/html5_enabled_for_epub_by_default
fix #3639: use html5 writer for epub by default
2017-04-19 22:22:37 +09:00
Yoshiki Shibukawa
388d5936c1 Update CHANGES
fix typo
2017-04-19 22:09:39 +09:00
Yoshiki Shibukawa
b0f395ad37 fix #3641: Fix epub style to adopt html5 experimental writer 2017-04-19 21:29:43 +09:00
shimizukawa
ac6a74ad89 Update CHANGES refs #3449 2017-04-19 21:27:41 +09:00
Takayuki SHIMIZUKAWA
6cb582fdd3 Merge pull request #3449 from njsmith/getargspec-__wrapped__
On py3, use inspect.signature for more accurate signature calculation
2017-04-19 21:21:19 +09:00
Yoshiki Shibukawa
213b2a2c79 Update CHANGES
Fix option name
2017-04-19 20:41:58 +09:00
Yoshiki Shibukawa
7262c709fe fix #3639: use html5 translator for epub by default 2017-04-19 20:00:37 +09:00
shimizukawa
de2cd652ab update CHANGES refs #2961 2017-04-19 16:28:56 +09:00
Takayuki SHIMIZUKAWA
1b6ac8b22d Merge pull request #2961 from rjarry/mock_imports
enhance autodoc_mock_imports
2017-04-19 16:20:22 +09:00
Takayuki SHIMIZUKAWA
2e13e1f0ca Merge pull request #3637 from NickVolynkin/spell-github-the-right-way
spell "GitHub" the right way
2017-04-19 13:35:18 +09:00
Nick Volynkin
3dee761727 spell "GitHub" the right way 2017-04-19 11:08:36 +07: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
Robin Jarry
ececc4dcfe ext: enhance autodoc_mock_imports
The autodoc_mock_imports option requires to explicitly declare *every*
external module and sub-module that are imported by the documented code.
This is not practical as the list can become very large and must be
maintained as the code changes.

Also, the mocking is minimal which causes errors when compiling the
docs. For example, if you declare:

    autodoc_mock_imports = ['django.template']

And try to document a module:

    .. automodule:: my.lib.util

Which contains this code:

    from django.template import Library
    register = Library()

The following error occurs:

    File ".../my/lib/util.py" line 2
        register = Library()
    TypeError: 'object' object is not callable

Other similar errors can occur such as "TypeError: 'object' object has
no len".

To address these limitations, only require to declare the top-level
module that should be mocked:

    autodoc_mock_imports = ['django']

Will mock "django" but also any sub-module: "django.template",
"django.contrib", etc.

Also, make the mocked modules yield more complete dummy objects to avoid
these TypeError problems.

Behind the scenes, it uses the python import hooks mechanism specified
in PEP 302.

Signed-off-by: Robin Jarry <robin@jarry.cc>
2017-04-18 17:08:17 +02:00
Takeshi KOMIYA
b03b515556 Update CHANGES for PR #1767 2017-04-19 00:07:30 +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
4738ef878c Merge pull request #3634 from tk0miya/failed_to_load_templates
Fix fail to load template file if the parent template is archived
2017-04-18 23:58:08 +09:00
Takeshi KOMIYA
f1b387bdcf Fix fail to load template file if the parent template is archived 2017-04-18 23:22:03 +09:00
Takeshi KOMIYA
690f07fa3c Merge pull request #3388 from smheidrich/autosectionlabel_prefix_document1
Added autosectionlabel_prefix_document config option
2017-04-18 01:16:00 +09:00
Takeshi KOMIYA
83cce3ee13 Merge pull request #3629 from tk0miya/preload_builder_module
Preload builder module before init config values
2017-04-18 01:09:38 +09:00
Takeshi KOMIYA
da3e824d64 Merge pull request #3565 from tk0miya/3558_emit_warnings_for_unreferenced_footnotes
Fix #3558: Emit warnings if footnotes and citations are not referenced
2017-04-18 01:08:59 +09:00
Takeshi KOMIYA
f6d9c7d1d1 Merge branch 'master' into 3558_emit_warnings_for_unreferenced_footnotes 2017-04-18 01:08:50 +09:00
smheidrich
231976ff14 Added autosectionlabel_prefix_document config option. 2017-04-17 14:51:39 +02:00
Takeshi KOMIYA
13acfd3ce1 Rename test-image-glob to test-images 2017-04-16 21:53:01 +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
Takeshi KOMIYA
bda95d967e Remove unused codes 2017-04-16 17:30:19 +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
Jean-François B
c5e55c56c0 Merge pull request #3582 from jfbu/fixpdfinfo
Use hyperref to set up the PDF information dictionary (fixes #3551)
2017-04-15 10:29:04 +02:00