[svn r63914] py.log._apiwarn is fine enough because it's something
of an py lib internal api deprecation mechanism atm. --HG-- branch : trunk
This commit is contained in:
		
							parent
							
								
									2ffb68c177
								
							
						
					
					
						commit
						58cc8c29d3
					
				|  | @ -25,8 +25,8 @@ version = "1.0.0b1" | |||
| 
 | ||||
| initpkg(__name__, | ||||
|     description = "pylib and py.test: agile development and test support library", | ||||
|     revision = int('$LastChangedRevision: 63913 $'.split(':')[1][:-1]), | ||||
|     lastchangedate = '$LastChangedDate: 2009-04-09 22:32:04 +0200 (Thu, 09 Apr 2009) $', | ||||
|     revision = int('$LastChangedRevision: 63914 $'.split(':')[1][:-1]), | ||||
|     lastchangedate = '$LastChangedDate: 2009-04-09 22:34:28 +0200 (Thu, 09 Apr 2009) $', | ||||
|     version = version,  | ||||
|     url = "http://pylib.org",  | ||||
|     download_url = "http://codespeak.net/py/%s/download.html" % version, | ||||
|  | @ -179,7 +179,7 @@ initpkg(__name__, | |||
| 
 | ||||
|     # logging API ('producers' and 'consumers' connected via keywords) | ||||
|     'log.__doc__'            : ('./log/__init__.py', '__doc__'), | ||||
|     'log.APIWARN'            : ('./log/warning.py', 'APIWARN'), | ||||
|     'log._apiwarn'            : ('./log/warning.py', '_apiwarn'), | ||||
|     'log.Producer'           : ('./log/producer.py', 'Producer'), | ||||
|     'log.default'            : ('./log/producer.py', 'default'), | ||||
|     'log._getstate'          : ('./log/producer.py', '_getstate'), | ||||
|  |  | |||
|  | @ -164,7 +164,7 @@ class SshGateway(PopenCmdGateway): | |||
|             cmdline[i] = "'" + cmdline[i].replace("'", "'\\''") + "'" | ||||
|         cmd = 'ssh -C' | ||||
|         if identity is not None:  | ||||
|             py.log.APIWARN("1.0", "pass in 'ssh_config' file instead of identity") | ||||
|             py.log._apiwarn("1.0", "pass in 'ssh_config' file instead of identity") | ||||
|             cmd += ' -i %s' % (identity,) | ||||
|         if ssh_config is not None: | ||||
|             cmd += ' -F %s' % (ssh_config) | ||||
|  |  | |||
|  | @ -45,4 +45,4 @@ class TestWarningPlugin: | |||
|         assert warning.msg == "xxx (since version 3.0)" | ||||
| 
 | ||||
| def test_default(): | ||||
|     assert py._com.comregistry.isregistered(py.log.APIWARN.im_self) | ||||
|     assert py._com.comregistry.isregistered(py.log._apiwarn.im_self) | ||||
|  |  | |||
|  | @ -66,4 +66,4 @@ class WarningPlugin(object): | |||
| 
 | ||||
| # singleton api warner for py lib  | ||||
| apiwarner = WarningPlugin(py._com.comregistry) | ||||
| APIWARN = apiwarner.apiwarn | ||||
| _apiwarn = apiwarner.apiwarn | ||||
|  |  | |||
|  | @ -21,7 +21,7 @@ class checker: | |||
|         kwargs-specified specification.  | ||||
|     """ | ||||
|     def __init__(self, **kwargs): | ||||
|         py.log.APIWARN("0.9.0",  | ||||
|         py.log._apiwarn("0.9.0",  | ||||
|             "py.path.checker is deprecated, construct " | ||||
|             "calls to pathobj.check() instead",  | ||||
|         ) | ||||
|  |  | |||
|  | @ -441,7 +441,7 @@ class Directory(FSCollector): | |||
| 
 | ||||
|     def consider_dir(self, path, usefilters=None): | ||||
|         if usefilters is not None: | ||||
|             py.log.APIWARN("0.99", "usefilters argument not needed") | ||||
|             py.log._apiwarn("0.99", "usefilters argument not needed") | ||||
|         res = self.config.api.pytest_collect_recurse(path=path, parent=self) | ||||
|         if res is None or res: | ||||
|             return self.config.api.pytest_collect_directory( | ||||
|  | @ -478,13 +478,13 @@ class Item(Node): | |||
|         """ execute this test item.""" | ||||
|          | ||||
| def warnoldcollect(): | ||||
|     py.log.APIWARN("1.0",  | ||||
|     py.log._apiwarn("1.0",  | ||||
|         "implement collector.collect() instead of " | ||||
|         "collector.run() and collector.join()", | ||||
|         stacklevel=2) | ||||
| 
 | ||||
| def warnoldtestrun(): | ||||
|     py.log.APIWARN("1.0",  | ||||
|     py.log._apiwarn("1.0",  | ||||
|         "implement item.runtest() instead of " | ||||
|         "item.run() and item.execute()", | ||||
|         stacklevel=2) | ||||
|  |  | |||
|  | @ -180,7 +180,7 @@ class Config(object): | |||
|         """ add a named group of options to the current testing session.  | ||||
|             This function gets invoked during testing session initialization.  | ||||
|         """  | ||||
|         py.log.APIWARN("1.0", "define plugins to add options", stacklevel=2) | ||||
|         py.log._apiwarn("1.0", "define plugins to add options", stacklevel=2) | ||||
|         group = self._parser.addgroup(groupname) | ||||
|         for opt in specs: | ||||
|             group._addoption_instance(opt) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue