Commit Graph

135 Commits

Author SHA1 Message Date
Takeshi KOMIYA
d6063ff35b doc: Fold lines by 80 columns 2019-05-30 01:07:05 +09:00
Takeshi KOMIYA
9b2423c5bb doclinter: restrict by 90 columns 2019-05-26 10:53:53 +09:00
Takeshi KOMIYA
439f329466 doclinter: Fix files are ignored. 2019-05-26 10:53:52 +09:00
Takeshi KOMIYA
c4b20a82ea doclinter: Ignore large code-block and long interpreted text 2019-05-26 10:53:52 +09:00
Takeshi KOMIYA
5d2c8e6eb7 Add utils/doclinter.py; a documenter linter for Sphinx 2019-05-12 17:57:25 +09:00
Jon Dufresne
22afc77c48 Python-3-only clean ups discovered by pyupgrade
https://github.com/asottile/pyupgrade

> A tool to automatically upgrade syntax for newer versions of the
> language.

- Drop u str prefix
- Drop base object inheritance
- Drop args to super()
- Use set literals
- Use dict comprehension
- Use set comprehension
2019-03-19 01:09:48 +09:00
Takeshi KOMIYA
6d02bdda13 Do "twine check" before uploading package 2019-03-10 18:58:02 +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
Takeshi KOMIYA
8ea3f7fad9
Merge pull request #5509 from stephenfin/remove-future-imports
Remove future imports
2018-12-17 20:32:39 +09:00
Stephen Finucane
5a9033e5aa Specifically request Python 3
If Sphinx is Python 3-only, Sphinx's tooling should be Python 3-only
too.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-12-17 09:46:18 +00:00
Stephen Finucane
d345d0f8c1 py3: Remove (most) __future__ imports
There were two used:

- print_function
- absolute_import

Both of these are mandatory in Python 3.0 onwards [1] and can therefore
be removed...mostly. Unfortunately, mypy is still running in Python 2.7
mode, meaning we need the 'print_function' future wherever we're calling
'print' with the 'file' argument. There's also a single
'absolute_import' future that must be retained as its removal breaks a
test for as-yet unknown reasons.  TODOs are added to resolve both issues
in the future.

[1] https://docs.python.org/3/library/__future__.html

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-12-17 09:46:15 +00: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
ea1d2d06f8
Merge pull request #5803 from jdufresne/encoding-utf8
Avoid respecifying default encoding for .encode()/.decode() calls
2018-12-16 20:01:43 +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
Jon Dufresne
1f4fcd656b Remove use of six.unichr()
Use Python 3 chr() instead.
2018-12-15 08:15:56 -08: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
bc19cf72c9 Merge branch '1.7' 2018-05-14 01:04:45 +09:00
Takeshi KOMIYA
c9890cb653 Update release-checklist 2018-05-11 22:28:04 +09:00
shimizukawa
ab101744f2 Use twine instead of 'setup.py upload'. There are security reason ( https://packaging.python.org/tutorials/distributing-packages/#uploading-your-project-to-pypi ) and metadata reason (refs #4936 ). 2018-05-09 11:31:41 +09:00
Jon Dufresne
365c93f227 Update all pypi.python.org URLs to pypi.org
For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
2018-04-18 19:51:48 -07:00
Takeshi KOMIYA
8bc3691966
Merge pull request #4638 from tk0miya/fix_markup
doc: Fix markup
2018-02-18 16:10:08 +09:00
Takeshi KOMIYA
e9003ac07e doc: Fix markup 2018-02-18 12:40:46 +09:00
Takeshi KOMIYA
f8bb40ab30 Merge branch '1.7' 2018-02-18 12:39:07 +09:00
Takeshi KOMIYA
a721b32d51 docs: Use literal for commands 2018-02-16 21:40:07 +09:00
Takeshi KOMIYA
4b0cff0253 docs: protect and unprotect the stable branch on releasing 2018-02-12 22:54:38 +09:00
Takeshi KOMIYA
7a92e3e409 Call git fetch before checking status 2018-02-07 10:49:46 +09:00
Takeshi KOMIYA
94eae2c4f9 Add procedures for beta and final releases 2018-02-06 23:19:32 +09:00
Takeshi KOMIYA
35f05bdc7e Update release checklist (again) 2018-02-03 02:13:02 +09:00
Takeshi KOMIYA
60f2e13f49
Merge pull request #4513 from tk0miya/update_release_checklist
Update release checklist
2018-02-03 02:09:50 +09:00
Takeshi KOMIYA
ab274e920b Update release checklist 2018-01-29 00:24:30 +09:00
Takeshi KOMIYA
9f5c676322 Use flake8-import-order 2018-01-28 01:52:16 +09:00
Takeshi KOMIYA
bcb1bd914d package: update bump_version.py 2018-01-15 22:24:52 +09:00
Takeshi KOMIYA
5562e76585 A happy new year! 2018-01-01 01:10:10 +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
e3baf213f5 Merge branch 'stable' 2017-10-23 23:04:32 +09:00
Takeshi KOMIYA
47c869c89a Fix flake8 and style-check violations 2017-10-23 23:01:18 +09:00
Takeshi KOMIYA
5de42c4c50 Merge pull request #4121 from stephenfin/remove-check-indent
utils: Remove the 'reindent' tool
2017-10-21 18:17:47 +09:00
Stephen Finucane
160e27e20f utils: Remove 'check_sources'
There are still a couple of checks here but all of them can be removed
now:

- Check if using valid Python syntax
- Check if line length too long
- Check if using 'x == None/True/False'
- Check if using old HTML 3 tags

The first three are already handled by default by the 'flake8' tool. The
last one isn't replaced by anything, but it really isn't worth worrying
about now because the tags it checks for have been dead for a really
long time and would not be used by anyone writing HTML in the last 10
years. Combined, it means we can remove the entire file.

The 'style-check' target is updated to simply alias 'flake8'. It can be
removed in a future release. This allows us to stop using this target in
the Travis jobs, seeing as we already run flake8.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 17:17:27 +01:00
Stephen Finucane
f5c0d64658 utils: Move "header check" to a flake8 plugin
If we want to check style, we run 'tox -e flake8': it shouldn't be
necessary to run some obscure 'make' command too. Make this possible by
moving the sole useful test from the target of this make command to a
flake8 plugin.

This includes a fix for a header that was previously excluded from
checks, but is now included.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 17:17:27 +01:00
Stephen Finucane
64b4d7c686 utils: Use better variable names in check_fileheader
We're going to be doing some surgery on this function, so first clean it
up before we do anything else.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 17:17:27 +01:00
Stephen Finucane
b90e58809f utils: Remove the 'reindent' tool
Nobody seems to be using this, probably because of the 'flake8' target,
and it hasn't been touched, some Python/flake8 updates aside in years.
Just remove it.

The Make target is not removed to both give us time to warn users that
the target is gone and, more importantly, to prevent merge conflicts
with other patches being submitted at the same time.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 17:13:59 +01:00
Daniel Hahler
5359bb8ba5 Fix DeprecationWarning for r'…(?u)'
Fixes

> DeprecationWarning: Flags not at the start of the expression …
2017-08-18 11:53:37 +02:00
Takeshi KOMIYA
8683823536 pycode: Replace pgen2 by own parser 2017-07-26 20:51:58 +09:00
Takeshi KOMIYA
ca6a1edd2f Merge branch 'stable' 2017-05-26 00:15:00 +09:00
Takeshi KOMIYA
068fd115d6 Add dependencies category to CHANGES template 2017-05-26 00:10:56 +09:00
Takeshi KOMIYA
e7ffa63463 Merge branch 'stable' 2017-05-16 23:53:46 +09:00
Takeshi KOMIYA
e322fa8480 Update message catalogs 2017-05-16 22:21:44 +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