diff options
-rw-r--r-- | Lib/distutils/extension.py | 9 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Lib/distutils/extension.py b/Lib/distutils/extension.py index 16d2bef..5c07bda 100644 --- a/Lib/distutils/extension.py +++ b/Lib/distutils/extension.py @@ -103,10 +103,11 @@ class Extension: optional=None, **kw # To catch unknown keywords ): - assert isinstance(name, str), "'name' must be a string" - assert (isinstance(sources, list) and - all(isinstance(v, str) for v in sources)), \ - "'sources' must be a list of strings" + if not isinstance(name, str): + raise AssertionError("'name' must be a string") + if not (isinstance(sources, list) and + all(isinstance(v, str) for v in sources)): + raise AssertionError("'sources' must be a list of strings") self.name = name self.sources = sources @@ -892,6 +892,9 @@ Core and Builtins Library ------- +- Issue #6545: Removed assert statements in distutils.Extension, so the + behavior is similar when used with -O. + - Issue #6459: distutils.command.build_ext.get_export_symbols now uses the "PyInit" prefix, rather than "init". |