Merge branch '2.0'

This commit is contained in:
Takeshi KOMIYA
2020-02-11 23:13:09 +09:00
4 changed files with 15 additions and 4 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

@@ -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)
=====================================

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

@@ -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: