summaryrefslogtreecommitdiff
path: root/engine/SCons/Warnings.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Warnings.py')
-rw-r--r--engine/SCons/Warnings.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/engine/SCons/Warnings.py b/engine/SCons/Warnings.py
index ecac38b..064076e 100644
--- a/engine/SCons/Warnings.py
+++ b/engine/SCons/Warnings.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001 - 2017 The SCons Foundation
+# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ This file implements the warnings framework for SCons.
"""
-__revision__ = "src/engine/SCons/Warnings.py 74b2c53bc42290e911b334a6b44f187da698a668 2017/11/14 13:16:53 bdbaddog"
+__revision__ = "src/engine/SCons/Warnings.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
import sys
@@ -74,12 +74,6 @@ class MisleadingKeywordsWarning(WarningOnByDefault):
class MissingSConscriptWarning(WarningOnByDefault):
pass
-class NoMD5ModuleWarning(WarningOnByDefault):
- pass
-
-class NoMetaclassSupportWarning(WarningOnByDefault):
- pass
-
class NoObjectCountWarning(WarningOnByDefault):
pass
@@ -153,6 +147,9 @@ class DeprecatedSigModuleWarning(MandatoryDeprecatedWarning):
class DeprecatedBuilderKeywordsWarning(MandatoryDeprecatedWarning):
pass
+class DeprecatedMissingSConscriptWarning(DeprecatedWarning):
+ pass
+
# The below is a list of 2-tuples. The first element is a class object.
# The second element is true if that class is enabled, false if it is disabled.
@@ -185,8 +182,8 @@ def warn(clazz, *args):
global _enabled, _warningAsException, _warningOut
warning = clazz(args)
- for clazz, flag in _enabled:
- if isinstance(warning, clazz):
+ for cls, flag in _enabled:
+ if isinstance(warning, cls):
if flag:
if _warningAsException:
raise warning
@@ -196,9 +193,10 @@ def warn(clazz, *args):
break
def process_warn_strings(arguments):
- """Process string specifications of enabling/disabling warnings,
- as passed to the --warn option or the SetOption('warn') function.
-
+ """Process requests to enable/disable warnings.
+
+ The requests are strings passed to the --warn option or the
+ SetOption('warn') function.
An argument to this option should be of the form <warning-class>
or no-<warning-class>. The warning class is munged in order
@@ -213,7 +211,6 @@ def process_warn_strings(arguments):
As a special case, --warn=all and --warn=no-all will enable or
disable (respectively) the base Warning class of all warnings.
-
"""
def _capitalize(s):