Merge branch '2.4.1' into 2.0

This commit is contained in:
Takeshi KOMIYA
2020-02-11 23:12:07 +09:00
5 changed files with 18 additions and 7 deletions

View File

@@ -24,7 +24,7 @@ matrix:
env:
- TOXENV=du15
- PYTEST_ADDOPTS="--cov ./ --cov-append --cov-config setup.cfg"
- python: 'nightly'
- python: '3.8'
env:
- TOXENV=du16
- python: '3.6'

11
CHANGES
View File

@@ -1,4 +1,4 @@
Release 2.4.1 (in development)
Release 2.4.2 (in development)
==============================
Dependencies
@@ -19,6 +19,15 @@ Bugs fixed
Testing
--------
Release 2.4.1 (released Feb 11, 2020)
=====================================
Bugs fixed
----------
* #7120: html: crashed when on scaling SVG images which have float dimentions
* #7126: autodoc: TypeError: 'getset_descriptor' object is not iterable
Release 2.4.0 (released Feb 09, 2020)
=====================================

View File

@@ -32,8 +32,8 @@ if 'PYTHONWARNINGS' not in os.environ:
warnings.filterwarnings('ignore', "'U' mode is deprecated",
DeprecationWarning, module='docutils.io')
__version__ = '2.4.1+'
__released__ = '2.4.1' # used when Sphinx builds its own docs
__version__ = '2.4.2+'
__released__ = '2.4.2' # used when Sphinx builds its own docs
#: Version info for better programmatic use.
#:
@@ -43,7 +43,7 @@ __released__ = '2.4.1' # used when Sphinx builds its own docs
#:
#: .. versionadded:: 1.2
#: Before version 1.2, check the string ``sphinx.__version__``.
version_info = (2, 4, 1, 'beta', 0)
version_info = (2, 4, 2, 'beta', 0)
package_dir = path.abspath(path.dirname(__file__))

View File

@@ -12,7 +12,7 @@ import importlib
import traceback
import warnings
from collections import namedtuple
from typing import Any, Callable, Dict, List, Tuple
from typing import Any, Callable, Dict, List, Mapping, Tuple
from sphinx.deprecation import RemovedInSphinx40Warning, deprecated_alias
from sphinx.util import logging
@@ -164,7 +164,7 @@ def get_object_members(subject: Any, objpath: List[str], attrgetter: Callable,
continue
# annotation only member (ex. attr: int)
if hasattr(subject, '__annotations__'):
if hasattr(subject, '__annotations__') and isinstance(subject.__annotations__, Mapping):
for name in subject.__annotations__:
if name not in members:
members[name] = Attribute(name, True, INSTANCEATTR)

View File

@@ -45,6 +45,8 @@ def get_image_size(filename: str) -> Tuple[int, int]:
size = imagesize.get(filename)
if size[0] == -1:
size = None
elif isinstance(size[0], float) or isinstance(size[1], float):
size = (int(size[0]), int(size[1]))
if size is None and Image: # fallback to Pillow
im = Image.open(filename)