diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-02-11 23:13:09 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-02-11 23:13:09 +0900 |
commit | d1a24a329d0896aec06264055ecd5dfb74fcd235 (patch) | |
tree | 4137c0357e8b40287950a1c1c991ed9a3f952557 | |
parent | 0adf058916b7bd3a1df6f480c73792d035e5f693 (diff) | |
parent | 64f7dd2379e2e36ea2155de1d1cc855c93066c56 (diff) | |
download | sphinx-git-d1a24a329d0896aec06264055ecd5dfb74fcd235.tar.gz |
Merge branch '2.0'
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | CHANGES | 11 | ||||
-rw-r--r-- | sphinx/ext/autodoc/importer.py | 4 | ||||
-rw-r--r-- | sphinx/util/images.py | 2 |
4 files changed, 15 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml index 008f4e442..046efc35a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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' @@ -62,7 +62,7 @@ Bugs fixed Testing -------- -Release 2.4.1 (in development) +Release 2.4.2 (in development) ============================== Dependencies @@ -83,6 +83,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) ===================================== diff --git a/sphinx/ext/autodoc/importer.py b/sphinx/ext/autodoc/importer.py index 3d4fb1805..e98b97915 100644 --- a/sphinx/ext/autodoc/importer.py +++ b/sphinx/ext/autodoc/importer.py @@ -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) diff --git a/sphinx/util/images.py b/sphinx/util/images.py index 17bd95685..568682b37 100644 --- a/sphinx/util/images.py +++ b/sphinx/util/images.py @@ -41,6 +41,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 with Image.open(filename) as im: |