diff options
author | Chris Larson <chris_larson@mentor.com> | 2011-02-11 21:26:51 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-06 18:24:13 +0100 |
commit | 0788081ac7a04f94c349b2673ed6ae122aa7d1a8 (patch) | |
tree | 250ed0b8dd782a1d8b089588d48b84396d9bd26d /bitbake/lib/bb/msg.py | |
parent | 0cc52efc8c26bd48b7d9c4bac36f11a2663a7578 (diff) | |
download | poky-0788081ac7a04f94c349b2673ed6ae122aa7d1a8.tar.gz |
Enable some DeprecationWarnings
We'll be skipping the Pending Deprecation step given our release process.
(Bitbake rev: 67a55a6b45fec300bea42c18be41cf0a2f931072)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/msg.py')
-rw-r--r-- | bitbake/lib/bb/msg.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py index 1f9ff904af..a7ac850790 100644 --- a/bitbake/lib/bb/msg.py +++ b/bitbake/lib/bb/msg.py | |||
@@ -147,8 +147,8 @@ def set_debug_domains(domainargs): | |||
147 | # | 147 | # |
148 | 148 | ||
149 | def debug(level, msgdomain, msg): | 149 | def debug(level, msgdomain, msg): |
150 | warnings.warn("bb.msg.debug will soon be deprecated in favor of the python 'logging' module", | 150 | warnings.warn("bb.msg.debug is deprecated in favor of the python 'logging' module", |
151 | PendingDeprecationWarning, stacklevel=2) | 151 | DeprecationWarning, stacklevel=2) |
152 | level = logging.DEBUG - (level - 1) | 152 | level = logging.DEBUG - (level - 1) |
153 | if not msgdomain: | 153 | if not msgdomain: |
154 | logger.debug(level, msg) | 154 | logger.debug(level, msg) |
@@ -156,13 +156,13 @@ def debug(level, msgdomain, msg): | |||
156 | loggers[msgdomain].debug(level, msg) | 156 | loggers[msgdomain].debug(level, msg) |
157 | 157 | ||
158 | def plain(msg): | 158 | def plain(msg): |
159 | warnings.warn("bb.msg.plain will soon be deprecated in favor of the python 'logging' module", | 159 | warnings.warn("bb.msg.plain is deprecated in favor of the python 'logging' module", |
160 | PendingDeprecationWarning, stacklevel=2) | 160 | DeprecationWarning, stacklevel=2) |
161 | logger.plain(msg) | 161 | logger.plain(msg) |
162 | 162 | ||
163 | def note(level, msgdomain, msg): | 163 | def note(level, msgdomain, msg): |
164 | warnings.warn("bb.msg.note will soon be deprecated in favor of the python 'logging' module", | 164 | warnings.warn("bb.msg.note is deprecated in favor of the python 'logging' module", |
165 | PendingDeprecationWarning, stacklevel=2) | 165 | DeprecationWarning, stacklevel=2) |
166 | if level > 1: | 166 | if level > 1: |
167 | if msgdomain: | 167 | if msgdomain: |
168 | logger.verbose(msg) | 168 | logger.verbose(msg) |
@@ -175,24 +175,22 @@ def note(level, msgdomain, msg): | |||
175 | loggers[msgdomain].info(msg) | 175 | loggers[msgdomain].info(msg) |
176 | 176 | ||
177 | def warn(msgdomain, msg): | 177 | def warn(msgdomain, msg): |
178 | warnings.warn("bb.msg.warn will soon be deprecated in favor of the python 'logging' module", | 178 | warnings.warn("bb.msg.warn is deprecated in favor of the python 'logging' module", |
179 | PendingDeprecationWarning, stacklevel=2) | 179 | DeprecationWarning, stacklevel=2) |
180 | if not msgdomain: | 180 | if not msgdomain: |
181 | logger.warn(msg) | 181 | logger.warn(msg) |
182 | else: | 182 | else: |
183 | loggers[msgdomain].warn(msg) | 183 | loggers[msgdomain].warn(msg) |
184 | 184 | ||
185 | def error(msgdomain, msg): | 185 | def error(msgdomain, msg): |
186 | warnings.warn("bb.msg.error will soon be deprecated in favor of the python 'logging' module", | 186 | warnings.warn("bb.msg.error is deprecated in favor of the python 'logging' module", |
187 | PendingDeprecationWarning, stacklevel=2) | 187 | DeprecationWarning, stacklevel=2) |
188 | if not msgdomain: | 188 | if not msgdomain: |
189 | logger.error(msg) | 189 | logger.error(msg) |
190 | else: | 190 | else: |
191 | loggers[msgdomain].error(msg) | 191 | loggers[msgdomain].error(msg) |
192 | 192 | ||
193 | def fatal(msgdomain, msg): | 193 | def fatal(msgdomain, msg): |
194 | warnings.warn("bb.msg.fatal will soon be deprecated in favor of raising appropriate exceptions", | ||
195 | PendingDeprecationWarning, stacklevel=2) | ||
196 | if not msgdomain: | 194 | if not msgdomain: |
197 | logger.critical(msg) | 195 | logger.critical(msg) |
198 | else: | 196 | else: |