Takeshi KOMIYA
f996859420
A happy new year!
...
.. note::
$ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \;
$ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
2021-01-01 13:40:48 +09:00
François Freitag
0949735210
Sort imports with isort
...
Keep imports alphabetically sorted and their order homogeneous across
Python source files.
The isort project has more feature and is more active than the
flake8-import-order plugin.
Most issues caught were simply import ordering from the same module.
Where imports were purposefully placed out of order, tag with
isort:skip.
2020-11-11 13:19:05 +01:00
Takeshi KOMIYA
4dd8b1022f
test: Use read_text() and read_bytes()
2020-02-01 11:58:51 +09:00
Takeshi KOMIYA
eaf495c3c4
A happy new year!
2020-01-01 14:27:43 +09:00
Takeshi KOMIYA
3791013c08
quickstart: Simplify generated conf.py (master_doc)
2019-02-09 15:00:27 +09:00
Takeshi KOMIYA
d4df28c643
quickstart: Simplify generated conf.py (source_suffix)
2019-02-09 15:00:27 +09:00
Takeshi KOMIYA
68c90a26f1
quickstart: Simplify generated conf.py (for latex)
2019-01-07 23:06:14 +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
Jon Dufresne
6978918ffc
Replace use of six.text_type with str
...
This removes the last use of the six package allowing Sphinx to remove
it as a dependency.
2018-12-18 16:23:10 -08:00
Jon Dufresne
43ff640b58
Deprecate quickstart.term_decode() and remove internal uses
...
Per the Python 3 docs, input() always returns a string:
https://docs.python.org/3/library/functions.html#input
> The function then reads a line from input, converts it to a
> string (stripping a trailing newline), and returns that.
The stubs from typeshed say the same:
https://github.com/python/typeshed/blob/5c69373890dfaf4f07f0638766fb0a4903352892/stdlib/3/builtins.pyi#L835
Here is the implementation from CPython with also shows a call to
PyUnicode_Decode on the result:
https://github.com/python/cpython/blob/3.7/Python/bltinmodule.c#L1960-L2143
As the value is always a string, there is nothing to decode. Therefore
the call to term_decode() unnecessary and can safely be removed.
With this in mind, must adjust quickstart tests to be more
representative.
2018-12-17 06:44:17 -08: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
c6bd84a614
refactor: Remove u-prefix from strings
2018-12-16 21:28:51 +09:00
Jon Dufresne
5bf25eb445
Avoid respecifying default encoding for .encode()/.decode() calls
...
In Python 3, both .encode() and .decode() default the encoding to
'utf-8'. See the docs:
https://docs.python.org/3/library/stdtypes.html#str.encode
https://docs.python.org/3/library/stdtypes.html#bytes.decode
Simplify and shorten the code by using the default instead of
respecifying it.
2018-12-15 17:19:56 -08:00
Takeshi KOMIYA
fd1dd13a50
refactor: Replace six.StringIO by io.StringIO
2018-12-15 21:00:38 +09:00
Takeshi KOMIYA
a5e7e85e92
quickstart: Simplify generated conf.py (for manpage)
2018-12-02 17:57:20 +09:00
Takeshi KOMIYA
e527be396a
Merge pull request #5607 from tk0miya/smart_texinfo_conf_py
...
quickstart: Simplify generated conf.py (for texinfo)
2018-12-02 01:30:51 +09:00
Takeshi KOMIYA
4761e70c37
Merge branch '1.8'
2018-11-22 22:14:32 +09:00
Jon Dufresne
444a7212b6
Fix "invalid escape sequence" warnings emitted during tests
...
sphinx/tests/test_quickstart.py:221: DeprecationWarning: invalid escape sequence '\*'
content = filename.bytes().decode('unicode-escape')
sphinx/tests/test_quickstart.py:221: DeprecationWarning: invalid escape sequence '\`'
content = filename.bytes().decode('unicode-escape')
2018-11-13 07:14:24 -08:00
Takeshi KOMIYA
bdaedbcbe4
quickstart: Simplify generated conf.py (for texinfo)
2018-11-11 21:57:14 +09: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
Takeshi KOMIYA
3a2418a827
refactoring: Drop PY2 and PY3 flags
2018-09-22 21:27:59 +09:00
Takeshi KOMIYA
dc4f8d4836
conf.py: Drop epub_author, epub_publisher and epub_copyright
...
The default values of them are same as conf.py's. So it is not
needed to override the setting.
2018-08-05 08:16:00 +09:00
Takeshi KOMIYA
f7027049b1
Fix flake8 violations
2018-02-19 23:20:56 +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
a9efb2517a
Fix flake8 violations
2017-12-23 21:21:21 +09:00
Stephen Finucane
d46273ca4a
quickstart: Rework how we collect extensions
...
This is a little more flexible than the existing set up and makes
maximum use of argparse capabilities.
This has the side-effect of no longer including configuration for the
'sphinx.ext.todo' extension when said extension is not enabled.
Signed-off-by: Stephen Finucane <stephen@that.guru >
2017-12-03 19:24:58 +00:00
Stephen Finucane
4c0f657ee6
quickstart: Rework 'do_prompt' function
...
The 'd' and 'key' values are used on a single line. Move these outside
the function to allow us to do other things with this function.
Signed-off-by: Stephen Finucane <stephen@that.guru >
2017-12-03 19:24:58 +00:00
Stephen Finucane
1f5ed02225
sphinx-quickstart: Move code to 'sphinx.cmd'
...
We're going to move the executable's here (or at least those that part
of the core library). The 'sphinx-build' executable was already moved,
so lets do 'sphinx-quickstart' next.
To avoid breaking packages that are using this feature directly, aliases
for the old 'main' method are included. This is based on what Django
does [1] and, like Django, will allow us to safely remove the old
modules in Sphinx 2.0.
[1] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695
Signed-off-by: Stephen Finucane <stephen@that.guru >
2017-10-02 15:42:23 +01:00
shimizukawa
d497d74370
refs #3458 : add sphinx.testing that are moved from /tests directory.
2017-05-14 20:47:15 +09:00
Takeshi KOMIYA
7cca0b456e
Merge pull request #3668 from adamjstewart/fixes/apidoc-main-argv
...
Don't ignore first argument passed to sphinx.apidoc.main
2017-05-14 01:11:49 +09:00
Adam J. Stewart
326ddd10d7
Fix failing unit tests
2017-05-11 12:53:15 -05:00
Takeshi KOMIYA
8fda21099d
Remove deprecated testing utilities
2017-04-27 23:38:42 +09:00
Takeshi KOMIYA
c57e47e042
Year++
2017-03-26 11:49:34 +09:00
shimizukawa
f962ad67d2
pytest: remove deprecated raises and raises_msg assert functions
2017-01-06 00:46:42 +09:00
shimizukawa
d0a33dd785
pytest: remove deprecated with_tempdir decorator
2017-01-06 00:26:01 +09:00
Takeshi KOMIYA
ae1f523d52
Add `--extensions to sphinx-quickstart` to support enable arbitary extensions from command line (ref: #2904 )
2016-11-02 11:11:15 +09:00
Georg Brandl
4f72bdb722
Merge branch 'stable'
2016-01-14 22:54:08 +01:00
Georg Brandl
46d7e8558e
Obligatory copyright update.
2016-01-14 22:54:04 +01:00
Takeshi KOMIYA
0ea518d563
Add sphinx.ext.githubpages to publish the docs on GitHub Pages
2016-01-06 22:14:57 +09:00
Hong Xu
ea25284d0a
Replace pngmath with imgmath in quickstart.
2015-12-29 15:14:04 -08:00
shimizukawa
a94c40cbcf
ref #1776 : test fixed.
2015-03-16 00:27:12 +09:00
Georg Brandl
bf3bdcc7f5
source_suffix can now be a list.
2015-02-08 20:13:47 +01:00
Ian Lee
9302231342
Added insertion of todo_include_todos config option.
...
Set to True when we enable 'ext_todo' during the quickstart process.
2015-02-07 00:00:08 -08:00
Georg Brandl
a23903d8d5
Merge branch 'stable'
2015-01-03 21:41:14 +01:00
Georg Brandl
567d52f199
all: update copyright
2015-01-03 21:36:32 +01:00
Georg Brandl
d47a7587f9
Complete test suite overhaul.
...
* rename a few test modules to make the names more consistent
* do not copy/use Sphinx from build/ (unnecessary without 2to3)
* use a temporary dir for *all* test projects, the source tree
will stay pristine that way (default is tests/build)
* speed up tests by ~3x by splitting up test projects and avoiding
rebuilds
2014-09-21 17:17:02 +02:00
Takayuki Shimizukawa
6746c83a18
* Drop Python-3.2. And now, removing 2to3 mechanism procedure has been completed. Closes #1350 .
...
Pygments-2.0 will drop Python-3.2.
The snowballstemmer package that is referred from sphinx-1.3 (that is merged at pull request #214 ) has not supported Python-3.2.
We decided to drop the Python-3.2.
see also https://bitbucket.org/birkenfeld/sphinx/pull-request/243/native-py2-py3-support-without-2to3-refs
2014-05-27 23:17:36 +09:00
Takayuki Shimizukawa
1e58062692
remove 'six' name except importing line.
2014-04-30 21:30:46 +09:00