diff --git a/docs/whatsnew.rst b/docs/whatsnew.rst index 50b2a99c..7d6a1071 100644 --- a/docs/whatsnew.rst +++ b/docs/whatsnew.rst @@ -3,6 +3,12 @@ What's New ********** +What's new in version 0.18.1 (2019-10-09) +========================================= +This is a minor bug-fix release containing a fix for raise_() +when passed an exception that's not an Exception (e.g. BaseException +subclasses) + What's new in version 0.18.0 (2019-10-09) ========================================= This is a major bug-fix and feature release, including: diff --git a/src/future/__init__.py b/src/future/__init__.py index d44e16c8..24f10fa1 100644 --- a/src/future/__init__.py +++ b/src/future/__init__.py @@ -87,7 +87,7 @@ __copyright__ = 'Copyright 2013-2019 Python Charmers Pty Ltd' __ver_major__ = 0 __ver_minor__ = 18 -__ver_patch__ = 0 +__ver_patch__ = 1 __ver_sub__ = '' __version__ = "%d.%d.%d%s" % (__ver_major__, __ver_minor__, __ver_patch__, __ver_sub__) diff --git a/src/future/utils/__init__.py b/src/future/utils/__init__.py index a6b10210..443dae65 100644 --- a/src/future/utils/__init__.py +++ b/src/future/utils/__init__.py @@ -415,7 +415,7 @@ def raise_(tp, value=None, tb=None): if value is not None: raise TypeError("instance exception may not have a separate value") exc = tp - elif not issubclass(tp, Exception): + elif isinstance(tp, type) and not issubclass(tp, Exception): # If the first object is a class, it becomes the type of the # exception. raise TypeError("class must derive from Exception")