Skip to content

Commit a3e303f

Browse files
authored
Merge pull request #513 from PythonCharmers/v0.18.x
Merge 0.18.1 into master
2 parents edc6b2b + bf4b67e commit a3e303f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

docs/whatsnew.rst

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
What's New
44
**********
55

6+
What's new in version 0.18.1 (2019-10-09)
7+
=========================================
8+
This is a minor bug-fix release containing a fix for raise_()
9+
when passed an exception that's not an Exception (e.g. BaseException
10+
subclasses)
11+
612
What's new in version 0.18.0 (2019-10-09)
713
=========================================
814
This is a major bug-fix and feature release, including:

src/future/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
__copyright__ = 'Copyright 2013-2019 Python Charmers Pty Ltd'
8888
__ver_major__ = 0
8989
__ver_minor__ = 18
90-
__ver_patch__ = 0
90+
__ver_patch__ = 1
9191
__ver_sub__ = ''
9292
__version__ = "%d.%d.%d%s" % (__ver_major__, __ver_minor__,
9393
__ver_patch__, __ver_sub__)

src/future/utils/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def raise_(tp, value=None, tb=None):
415415
if value is not None:
416416
raise TypeError("instance exception may not have a separate value")
417417
exc = tp
418-
elif not issubclass(tp, Exception):
418+
elif isinstance(tp, type) and not issubclass(tp, Exception):
419419
# If the first object is a class, it becomes the type of the
420420
# exception.
421421
raise TypeError("class must derive from Exception")

0 commit comments

Comments
 (0)