summaryrefslogtreecommitdiff
path: root/sphinx/util/images.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix COM812Adam Turner2023-02-181-1/+1
|
* Refactor ``sphinx.util.images.guess_mimetype``Adam Turner2023-02-151-42/+64
|
* Use PEP 604 typesAdam Turner2023-01-011-7/+7
|
* Use PEP 595 typesAdam Turner2023-01-011-2/+2
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-011-0/+2
|
* Clean up after dropping Python 3.6Adam Turner2022-09-271-1/+1
|
* Collapse single line docstringsAdam Turner2022-02-201-2/+1
|
* Remove copyright and licence fieldsAdam Turner2022-02-201-3/+0
|
* Fix module docstring indentationAdam Turner2022-02-201-2/+2
|
* Fix module docstring first lineAdam Turner2022-02-201-2/+1
|
* Remove module titles in docstringsAdam Turner2022-02-191-3/+0
|
* A happy new year!Takeshi KOMIYA2022-01-011-1/+1
|
* Update type annotationsTakeshi KOMIYA2021-02-091-2/+2
|
* Merge branch '3.x'Takeshi KOMIYA2021-01-011-1/+1
|\
| * A happy new year!Takeshi KOMIYA2021-01-011-1/+1
| | | | | | | | | | | | | | .. 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
* | refactor: namedtuples with PEP 526Takeshi KOMIYA2020-07-161-3/+5
|/ | | | | Apply PEP 526 based variable annotation style to namedtuples. It is available since python 3.6.
* Merge branch '3.0.x' into 3.xTakeshi KOMIYA2020-06-031-1/+1
|\
| * Fix mypy violations (with mypy-0.780)Takeshi KOMIYA2020-06-031-1/+1
| |
* | refactor: Add Optional to type annotationsTakeshi KOMIYA2020-04-191-7/+7
|/
* Merge branch '2.0'Takeshi KOMIYA2020-02-111-0/+2
|\
| * Fix #7120: html: crashed when on scaling SVG images which have float dimentionsTakeshi KOMIYA2020-02-091-0/+2
| |
* | Merge branch '2.0'Takeshi KOMIYA2020-01-111-0/+1
|\ \ | |/
| * Adds Adobe Illustrator (.ai) to sphinx.ext.imgconverterModelmat2020-01-081-0/+1
| |
* | Merge branch '2.0'Takeshi KOMIYA2020-01-011-1/+1
|\ \ | |/
| * A happy new year!Takeshi KOMIYA2020-01-011-1/+1
| |
* | Use Pillow's Image context manager to close image fileJon Dufresne2019-08-151-6/+2
| |
* | Merge branch '2.0'Takeshi KOMIYA2019-06-091-17/+7
|\ \ | |/
| * Migrate to py3 style type annotation: sphinx.util.imagesTakeshi KOMIYA2019-06-021-17/+7
| |
* | Drop features and APIs deprecated in 1.8Takeshi KOMIYA2019-03-301-12/+2
|/
* Clean up import for annotationsTakeshi KOMIYA2019-03-061-1/+1
|
* Merge pull request #5899 from jdufresne/image-importTakeshi KOMIYA2019-01-081-6/+3
|\ | | | | Remove outdated fallback to 'import Image'
| * Remove outdated fallback to 'import Image'Jon Dufresne2019-01-071-6/+3
| | | | | | | | | | | | | | | | | | | | | | The fallback 'import Image' was added in commit 99621d7a01638872a5af727aaa8714b269c0f769 for the PIL package. However, the PIL package is no longer maintained and does not support Python 3. Development has moved to the Pillow package which always installs to the PIL namespace. Pillow repo: https://github.com/python-pillow/Pillow Old PIL website: http://www.pythonware.com/products/pil/
* | Add TODO comment to help future developer to refactor guess_mimetypeJon Dufresne2019-01-071-0/+2
|/
* Merge branch '1.8'Takeshi KOMIYA2019-01-021-1/+1
|\
| * A happy new year!Takeshi KOMIYA2019-01-021-1/+1
| |
* | Replace use of six.text_type with strJon Dufresne2018-12-181-3/+2
| | | | | | | | | | This removes the last use of the six package allowing Sphinx to remove it as a dependency.
* | Merge pull request #5509 from stephenfin/remove-future-importsTakeshi KOMIYA2018-12-171-1/+0
|\ \ | | | | | | Remove future imports
| * | py3: Remove (most) __future__ importsStephen Finucane2018-12-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Remove unnecessary encoding cookie from Python source filesJon Dufresne2018-12-161-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | refactor: Remove u-prefix from stringsTakeshi KOMIYA2018-12-161-2/+2
| |
* | Avoid respecifying default encoding for .encode()/.decode() callsJon Dufresne2018-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Replace all "unicode" type by "str"Takeshi KOMIYA2018-12-151-8/+7
| |
* | Move to py3 mode for mypy (and remove many "type: ignore" comments)Takeshi KOMIYA2018-12-151-1/+1
| |
* | Add sphinx.util.typing:unicode to help mypy-3 migrationTakeshi KOMIYA2018-11-241-0/+1
| |
* | Merge branch '1.8'Takeshi KOMIYA2018-11-011-1/+1
|\ \ | |/
| * Fix #5471: Show appropriate warning for deprecated APIsTakeshi KOMIYA2018-10-171-1/+1
| |
* | Replace all six.BytesIO with io.BytesIOJon Dufresne2018-09-231-1/+2
| |
* | Merge branch 'master' into drop-iteritemsTakeshi KOMIYA2018-09-221-8/+10
|\ \
| * | refactoring: Drop PY2 and PY3 flagsTakeshi KOMIYA2018-09-221-6/+3
| | |
| * | Merge branch '1.8'Takeshi KOMIYA2018-09-201-2/+2
| |\ \ | | |/