From 978b5c946683885a64ee9e7c2064ff696f05cddb Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 9 Apr 2010 16:51:09 -0700 Subject: Deprecate the usage of certain objects via certain modules As an example, this displays a deprecation warning for the use of "bb.encodeurl" when you should be using "bb.fetch.encodeurl". It includes a convenience function for this purpose. It should be of use when moving objects between modules permanently, changing the API the user sees. (Bitbake rev: 78f56049ba863b2e585b89db12b32697eb879bbc) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/BBHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/parse') diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index c053b5bfdf..a770131fbc 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py @@ -33,7 +33,7 @@ from ConfHandler import include, init from bb.parse import resolve_file, ast # For compatibility -from bb.parse import vars_from_file +bb.deprecate_import(__name__, "bb.parse", ["vars_from_file"]) __func_start_regexp__ = re.compile( r"(((?Ppython)|(?Pfakeroot))\s*)*(?P[\w\.\-\+\{\}\$]+)?\s*\(\s*\)\s*{$" ) __inherit_regexp__ = re.compile( r"inherit\s+(.+)" ) -- cgit v1.2.3-54-g00ecf