Skip to content

Commit

Permalink
Merge branch '2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Feb 11, 2020
2 parents 0adf058 + 64f7dd2 commit d1a24a3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
11 changes: 10 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Bugs fixed
Testing
--------

Release 2.4.1 (in development)
Release 2.4.2 (in development)
==============================

Dependencies
Expand All @@ -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)
=====================================

Expand Down
4 changes: 2 additions & 2 deletions sphinx/ext/autodoc/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions sphinx/util/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d1a24a3

Please sign in to comment.