# HG changeset patch # User Sylvain Thénault # Date 1304674122 -7200 # Node ID 5f7813ae9fb8e1274f47cc9f25ac9344f04ca1f4 # Parent 0a1c405384d0e4628bf9f469b5c48111c99b4d3c [testlib] fix deprecation warning stack level diff -r 0a1c405384d0 -r 5f7813ae9fb8 devtools/testlib.py --- a/devtools/testlib.py Fri May 06 08:48:26 2011 +0200 +++ b/devtools/testlib.py Fri May 06 11:28:42 2011 +0200 @@ -360,7 +360,7 @@ """create and return a new user entity""" if isinstance(req, basestring): warn('[3.12] create_user arguments are now (req, login[, groups, password, commit, **kwargs])', - DeprecationWarning, stacklevel=1) + DeprecationWarning, stacklevel=2) if not isinstance(groups, (tuple, list)): password = groups groups = login @@ -391,7 +391,7 @@ """ if not isinstance(session, Session): warn('[3.12] grant_permission arguments are now (session, entity, group, pname[, plabel])', - DeprecationWarning, stacklevel=1) + DeprecationWarning, stacklevel=2) plabel = pname pname = group group = entity