From hpk at codespeak.net Wed Oct 1 11:11:31 2008 From: hpk at codespeak.net (hpk at codespeak.net) Date: Wed, 1 Oct 2008 11:11:31 +0200 (CEST) Subject: [py-svn] r58516 - in py: dist/py/doc trunk/py/doc Message-ID: <20081001091131.E9A93169F8E@codespeak.net> Author: hpk Date: Wed Oct 1 11:11:29 2008 New Revision: 58516 Modified: py/dist/py/doc/misc.txt py/trunk/py/doc/misc.txt Log: fix typo Modified: py/dist/py/doc/misc.txt ============================================================================== --- py/dist/py/doc/misc.txt (original) +++ py/dist/py/doc/misc.txt Wed Oct 1 11:11:29 2008 @@ -199,7 +199,7 @@ * subprocess * textwrap -They are used by replacing the normal ``import ...`` byr +They are used by replacing the normal ``import ...`` by ``from py.compat import ...``. :api:`py.builtin` Modified: py/trunk/py/doc/misc.txt ============================================================================== --- py/trunk/py/doc/misc.txt (original) +++ py/trunk/py/doc/misc.txt Wed Oct 1 11:11:29 2008 @@ -199,7 +199,7 @@ * subprocess * textwrap -They are used by replacing the normal ``import ...`` byr +They are used by replacing the normal ``import ...`` by ``from py.compat import ...``. :api:`py.builtin` From hpk at codespeak.net Wed Oct 1 11:24:26 2008 From: hpk at codespeak.net (hpk at codespeak.net) Date: Wed, 1 Oct 2008 11:24:26 +0200 (CEST) Subject: [py-svn] r58517 - in py: dist/py/doc trunk/py/doc Message-ID: <20081001092426.3089D16A048@codespeak.net> Author: hpk Date: Wed Oct 1 11:24:24 2008 New Revision: 58517 Modified: py/dist/py/doc/misc.txt py/trunk/py/doc/misc.txt Log: clarify/better english for the cross-python version namespaces Modified: py/dist/py/doc/misc.txt ============================================================================== --- py/dist/py/doc/misc.txt (original) +++ py/dist/py/doc/misc.txt Wed Oct 1 11:24:24 2008 @@ -184,30 +184,29 @@ * :source:`py/compat/` * :source:`py/builtin/` -The py-lib contains some helpers that make writing scripts that work on various -Python versions easier. +The compat and builtin namespaces help to write code using newer python features on older python interpreters. :api:`py.compat` ---------------- -:api:`py.compat` provides fixed versions (currently from Python 2.4.4) of -various newer modules to be able to use them in various Python versions. -Currently these are: +:api:`py.compat` provides fixed versions (currently taken from Python 2.4.4) of +a few selected modules to be able to use them across python versions. Currently these are: * doctest * optparse * subprocess * textwrap -They are used by replacing the normal ``import ...`` by -``from py.compat import ...``. +Note that for example ``import doctest`` and ``from py.compat import doctest`` result +into two different module objects no matter what Python version you are using. +So you should only use exactly one of these to avoid confusion in your program. :api:`py.builtin` ----------------- -:api:`py.builtin` provides various builtins that were added in later Python -versions. If the used Python version used does not provide these builtins, they -are pure-Python reimplementations. These currently are: +:api:`py.builtin` provides builtin functions/types that were added in later Python +versions. If the used Python version used does not provide these builtins the +py lib provides some reimplementations. These currently are: * enumerate * reversed @@ -217,4 +216,3 @@ module) :api:`py.builtin.BaseException` is just ``Exception`` before Python 2.5. - Modified: py/trunk/py/doc/misc.txt ============================================================================== --- py/trunk/py/doc/misc.txt (original) +++ py/trunk/py/doc/misc.txt Wed Oct 1 11:24:24 2008 @@ -184,30 +184,29 @@ * :source:`py/compat/` * :source:`py/builtin/` -The py-lib contains some helpers that make writing scripts that work on various -Python versions easier. +The compat and builtin namespaces help to write code using newer python features on older python interpreters. :api:`py.compat` ---------------- -:api:`py.compat` provides fixed versions (currently from Python 2.4.4) of -various newer modules to be able to use them in various Python versions. -Currently these are: +:api:`py.compat` provides fixed versions (currently taken from Python 2.4.4) of +a few selected modules to be able to use them across python versions. Currently these are: * doctest * optparse * subprocess * textwrap -They are used by replacing the normal ``import ...`` by -``from py.compat import ...``. +Note that for example ``import doctest`` and ``from py.compat import doctest`` result +into two different module objects no matter what Python version you are using. +So you should only use exactly one of these to avoid confusion in your program. :api:`py.builtin` ----------------- -:api:`py.builtin` provides various builtins that were added in later Python -versions. If the used Python version used does not provide these builtins, they -are pure-Python reimplementations. These currently are: +:api:`py.builtin` provides builtin functions/types that were added in later Python +versions. If the used Python version used does not provide these builtins the +py lib provides some reimplementations. These currently are: * enumerate * reversed @@ -217,4 +216,3 @@ module) :api:`py.builtin.BaseException` is just ``Exception`` before Python 2.5. - From hpk at codespeak.net Wed Oct 1 11:39:27 2008 From: hpk at codespeak.net (hpk at codespeak.net) Date: Wed, 1 Oct 2008 11:39:27 +0200 (CEST) Subject: [py-svn] r58518 - py/build/fedora Message-ID: <20081001093927.EFCA516A03F@codespeak.net> Author: hpk Date: Wed Oct 1 11:39:27 2008 New Revision: 58518 Added: py/build/fedora/ py/build/fedora/compat.txt Log: add a fedora subdir and a note/suggestion how to handle https://bugzilla.redhat.com/show_bug.cgi?id=459800 Added: py/build/fedora/compat.txt ============================================================================== --- (empty file) +++ py/build/fedora/compat.txt Wed Oct 1 11:39:27 2008 @@ -0,0 +1,16 @@ + +fedora usually has >=python 2.4 anyway so one can +erase py/compat/*.py (except __init__.py) +and put the following into a new file, e.g. py/compat/fedora.py + + import doctest + import optparse + import textwrap + import subprocess + +and then change py/__init__.py to have py.compat like this: + +'compat.doctest' : ('./compat/fedora.py', 'doctest'), +'compat.optparse' : ('./compat/fedora.py', 'optparse'), +'compat.textwrap' : ('./compat/fedora.py', 'textwrap'), +'compat.subprocess' : ('./compat/fedora.py', 'subprocess'), From cfbolz at gmx.de Wed Oct 1 12:03:25 2008 From: cfbolz at gmx.de (Carl Friedrich Bolz) Date: Wed, 1 Oct 2008 12:03:25 +0200 Subject: [py-svn] r58518 - py/build/fedora In-Reply-To: <20081001093927.EFCA516A03F@codespeak.net> References: <20081001093927.EFCA516A03F@codespeak.net> Message-ID: <348899050810010303n3c175023x1592d92477c8e18b@mail.gmail.com> Hi Holger, 2008/10/1 : > Author: hpk > Date: Wed Oct 1 11:39:27 2008 > New Revision: 58518 [snip] > +fedora usually has >=python 2.4 anyway so one can > +erase py/compat/*.py (except __init__.py) > +and put the following into a new file, e.g. py/compat/fedora.py > + > + import doctest > + import optparse > + import textwrap > + import subprocess > + > +and then change py/__init__.py to have py.compat like this: > + > +'compat.doctest' : ('./compat/fedora.py', 'doctest'), > +'compat.optparse' : ('./compat/fedora.py', 'optparse'), > +'compat.textwrap' : ('./compat/fedora.py', 'textwrap'), > +'compat.subprocess' : ('./compat/fedora.py', 'subprocess'), Wasn't the idea originally to not depend on the underlying stdlib for compat ever? Because then the py-lib user can rely on having always exactly the same version of these modules. I remember, because at one time I proposed to put a "try: import doctest except ImportError" into compat to get newer versions of these files if they are there. Cheers, Carl Friedrich From hpk at codespeak.net Thu Oct 2 18:19:06 2008 From: hpk at codespeak.net (hpk at codespeak.net) Date: Thu, 2 Oct 2008 18:19:06 +0200 (CEST) Subject: [py-svn] r58576 - in py/trunk/py/misc: . testing Message-ID: <20081002161906.E6CD916A0AB@codespeak.net> Author: hpk Date: Thu Oct 2 18:19:04 2008 New Revision: 58576 Modified: py/trunk/py/misc/cache.py py/trunk/py/misc/testing/test_cache.py Log: * fix test to not rely on time.time() resolution * strike some superflous __init__ code Modified: py/trunk/py/misc/cache.py ============================================================================== --- py/trunk/py/misc/cache.py (original) +++ py/trunk/py/misc/cache.py Thu Oct 2 18:19:04 2008 @@ -107,9 +107,6 @@ # time function to use for measuring build-times _time = gettime - def __init__(self, maxentries=64): - super(BuildcostAccessCache, self).__init__(maxentries) - def build(self, key, builder, *args, **kwargs): start = self._time() val = builder(*args, **kwargs) Modified: py/trunk/py/misc/testing/test_cache.py ============================================================================== --- py/trunk/py/misc/testing/test_cache.py (original) +++ py/trunk/py/misc/testing/test_cache.py Thu Oct 2 18:19:04 2008 @@ -27,6 +27,12 @@ def test_cache_works_somewhat_simple(self): cache = BuildcostAccessCache() + # the default ._time() call used by + # BuildcostAccessCache.build can + # result into time()-time() == 0 which makes the below + # test fail randomly. Let's rather use incrementing + # numbers instead. + cache._time = py.std.itertools.count().next for x in range(cache.maxentries): y = cache.getorbuild(x, lambda: x) assert x == y From hpk at codespeak.net Mon Oct 6 21:50:36 2008 From: hpk at codespeak.net (hpk at codespeak.net) Date: Mon, 6 Oct 2008 21:50:36 +0200 (CEST) Subject: [py-svn] r58690 - py/trunk Message-ID: <20081006195036.4B53916A041@codespeak.net> Author: hpk Date: Mon Oct 6 21:50:35 2008 New Revision: 58690 Modified: py/trunk/CHANGELOG py/trunk/MANIFEST py/trunk/TODO.txt py/trunk/setup.py Log: * add to TODO, changelog * regen setup Modified: py/trunk/CHANGELOG ============================================================================== --- py/trunk/CHANGELOG (original) +++ py/trunk/CHANGELOG Mon Oct 6 21:50:35 2008 @@ -3,6 +3,9 @@ Changes between 0.9.2 and 1.0 (UNRELEASED) ============================================= +* teardown_method is now guaranteed to get + called after a test method has run. + * new method: py.test.importorskip(mod,minversion) will either import or call py.test.skip() Modified: py/trunk/MANIFEST ============================================================================== --- py/trunk/MANIFEST (original) +++ py/trunk/MANIFEST Mon Oct 6 21:50:35 2008 @@ -2,6 +2,7 @@ LICENSE MANIFEST README.txt +TODO.txt ez_setup.py py/LICENSE py/__init__.py @@ -67,12 +68,14 @@ py/bin/py.countloc py/bin/py.lookup py/bin/py.rest +py/bin/py.svnwcrevert py/bin/py.test py/bin/py.which py/bin/win32/py.cleanup.cmd py/bin/win32/py.countloc.cmd py/bin/win32/py.lookup.cmd py/bin/win32/py.rest.cmd +py/bin/win32/py.svnwcrevert.cmd py/bin/win32/py.test.cmd py/bin/win32/py.which.cmd py/builtin/__init__.py @@ -112,6 +115,7 @@ py/cmdline/pycountloc.py py/cmdline/pylookup.py py/cmdline/pyrest.py +py/cmdline/pysvnwcrevert.py py/cmdline/pytest.py py/cmdline/pywhich.py py/cmdline/testing/__init__.py @@ -146,7 +150,6 @@ py/compat/testing/test_textwrap.py py/compat/textwrap.py py/conftest.py -py/doc/TODO.txt py/doc/__init__.py py/doc/apigen.txt py/doc/apigen_refactorings.txt @@ -246,7 +249,6 @@ py/misc/dynpkg.py py/misc/error.py py/misc/findmissingdocstrings.py -py/misc/killproc.py py/misc/rest.py py/misc/std.py py/misc/svnlook.py @@ -257,10 +259,11 @@ py/misc/testing/test_cache.py py/misc/testing/test_error.py py/misc/testing/test_initpkg.py -py/misc/testing/test_oskill.py py/misc/testing/test_std.py py/misc/testing/test_svnlook.py py/misc/testing/test_terminal.py +py/misc/testing/test_warn.py +py/misc/warn.py py/path/__init__.py py/path/common.py py/path/gateway/TODO.txt @@ -297,9 +300,11 @@ py/process/__init__.py py/process/cmdexec.py py/process/forkedfunc.py +py/process/killproc.py py/process/testing/__init__.py py/process/testing/test_cmdexec.py py/process/testing/test_forkedfunc.py +py/process/testing/test_killproc.py py/rest/__init__.py py/rest/convert.py py/rest/directive.py @@ -369,6 +374,7 @@ py/test/report/webdata/json.py py/test/report/webdata/source.js py/test/report/webjs.py +py/test/resultlog.py py/test/runner.py py/test/session.py py/test/testing/__init__.py @@ -387,9 +393,15 @@ py/test/testing/test_doctest.py py/test/testing/test_event.py py/test/testing/test_outcome.py +py/test/testing/test_recording.py +py/test/testing/test_resultlog.py py/test/testing/test_runner_functional.py py/test/testing/test_session.py py/test/testing/test_setup_nested.py +py/test/web/__init__.py +py/test/web/exception.py +py/test/web/post_multipart.py +py/test/web/webcheck.py py/thread/__init__.py py/thread/io.py py/thread/pool.py Modified: py/trunk/TODO.txt ============================================================================== --- py/trunk/TODO.txt (original) +++ py/trunk/TODO.txt Mon Oct 6 21:50:35 2008 @@ -4,6 +4,11 @@ py.test -------------- +- compatilibity: honour item.run() method of test items (so far + probably only execute() is warned about) + +- turn deprecation / apiwarnings into events, report them at the end? + - get APIGEN back to work - get web reporter back to work Modified: py/trunk/setup.py ============================================================================== --- py/trunk/setup.py (original) +++ py/trunk/setup.py Mon Oct 6 21:50:35 2008 @@ -1,7 +1,7 @@ """ setup file for 'py' package based on: - svn+ssh://codespeak.net/svn/py/trunk, revision=57745 + https://codespeak.net/svn/py/trunk, revision=58363 autogenerated by gensetup.py """ @@ -52,6 +52,7 @@ 'py.countloc = py.cmdline:pycountloc', 'py.lookup = py.cmdline:pylookup', 'py.rest = py.cmdline:pyrest', + 'py.svnwcrevert = py.cmdline:pysvnwcrevert', 'py.test = py.cmdline:pytest', 'py.which = py.cmdline:pywhich']}, classifiers=['Development Status :: 4 - Beta', @@ -120,6 +121,7 @@ 'py.test.report.webdata', 'py.test.testing', 'py.test.testing.import_test.package', + 'py.test.web', 'py.thread', 'py.thread.testing', 'py.tool', @@ -140,12 +142,14 @@ 'bin/py.countloc', 'bin/py.lookup', 'bin/py.rest', + 'bin/py.svnwcrevert', 'bin/py.test', 'bin/py.which', 'bin/win32/py.cleanup.cmd', 'bin/win32/py.countloc.cmd', 'bin/win32/py.lookup.cmd', 'bin/win32/py.rest.cmd', + 'bin/win32/py.svnwcrevert.cmd', 'bin/win32/py.test.cmd', 'bin/win32/py.which.cmd', 'c-extension/greenlet/README.txt', @@ -170,7 +174,6 @@ 'compat/LICENSE', 'compat/testing/test_doctest.txt', 'compat/testing/test_doctest2.txt', - 'doc/TODO.txt', 'doc/apigen.txt', 'doc/apigen_refactorings.txt', 'doc/bin.txt', From hpk at codespeak.net Tue Oct 7 11:26:57 2008 From: hpk at codespeak.net (hpk at codespeak.net) Date: Tue, 7 Oct 2008 11:26:57 +0200 (CEST) Subject: [py-svn] r58699 - in py/trunk/py/test: . testing Message-ID: <20081007092657.ABC3A169EAA@codespeak.net> Author: hpk Date: Tue Oct 7 11:26:56 2008 New Revision: 58699 Modified: py/trunk/py/test/runner.py py/trunk/py/test/testing/acceptance_test.py Log: show traceback before jumping into pdb Modified: py/trunk/py/test/runner.py ============================================================================== --- py/trunk/py/test/runner.py (original) +++ py/trunk/py/test/runner.py Tue Oct 7 11:26:56 2008 @@ -72,11 +72,14 @@ def makereport(self, res, when, excinfo, outerr): if excinfo: kw = self.getkw(when, excinfo, outerr) - if self.pdb and kw.get('failed', 0): - self.pdb(excinfo) else: kw = {'passed': OutcomeRepr(when, '.', "")} - return event.ItemTestReport(self.colitem, **kw) + testrep = event.ItemTestReport(self.colitem, **kw) + if self.pdb and testrep.failed: + tw = py.io.TerminalWriter() + testrep.toterminal(tw) + self.pdb(excinfo) + return testrep class CollectorRunner(RobustRun): def setup(self): Modified: py/trunk/py/test/testing/acceptance_test.py ============================================================================== --- py/trunk/py/test/testing/acceptance_test.py (original) +++ py/trunk/py/test/testing/acceptance_test.py Tue Oct 7 11:26:56 2008 @@ -403,15 +403,16 @@ spawn = self.getspawn() self.makepyfile(test_one=""" def test_1(): + #hello assert 1 == 0 """) child = spawn("%s %s --pdb test_one.py" % (py.std.sys.executable, pytestpath)) child.timeout = EXPECTTIMEOUT - child.expect("(Pdb)") - child.sendline("l") child.expect(".*def test_1.*") + child.expect(".*hello.*") + child.expect("(Pdb)") child.sendeof() child.expect("failures: 1") if child.isalive(): From hpk at codespeak.net Tue Oct 7 17:44:57 2008 From: hpk at codespeak.net (hpk at codespeak.net) Date: Tue, 7 Oct 2008 17:44:57 +0200 (CEST) Subject: [py-svn] r58775 - in py/trunk/py/code: . testing Message-ID: <20081007154457.A0E93169E3E@codespeak.net> Author: hpk Date: Tue Oct 7 17:44:56 2008 New Revision: 58775 Modified: py/trunk/py/code/excinfo.py py/trunk/py/code/testing/test_excinfo.py Log: only check for Recursion if we have a RuntimeError Modified: py/trunk/py/code/excinfo.py ============================================================================== --- py/trunk/py/code/excinfo.py (original) +++ py/trunk/py/code/excinfo.py Tue Oct 7 17:44:56 2008 @@ -194,7 +194,9 @@ traceback = excinfo.traceback if self.tbfilter: traceback = traceback.filter() - recursionindex = traceback.recursionindex() + recursionindex = None + if excinfo.errisinstance(RuntimeError): + recursionindex = traceback.recursionindex() last = traceback[-1] entries = [] extraline = None Modified: py/trunk/py/code/testing/test_excinfo.py ============================================================================== --- py/trunk/py/code/testing/test_excinfo.py (original) +++ py/trunk/py/code/testing/test_excinfo.py Tue Oct 7 17:44:56 2008 @@ -351,6 +351,8 @@ def exconly(self, tryshort): return "EXC" + def errisinstance(self, cls): + return False excinfo = FakeExcinfo() class FakeRawTB(object): From fijal at codespeak.net Fri Oct 10 11:59:31 2008 From: fijal at codespeak.net (fijal at codespeak.net) Date: Fri, 10 Oct 2008 11:59:31 +0200 (CEST) Subject: [py-svn] r58888 - py/trunk/py/code Message-ID: <20081010095931.D5EA0169E36@codespeak.net> Author: fijal Date: Fri Oct 10 11:59:31 2008 New Revision: 58888 Modified: py/trunk/py/code/traceback2.py Log: Catch all possible find_source errors Modified: py/trunk/py/code/traceback2.py ============================================================================== --- py/trunk/py/code/traceback2.py (original) +++ py/trunk/py/code/traceback2.py Fri Oct 10 11:59:31 2008 @@ -58,7 +58,9 @@ if source is None: try: sourcelines, lineno = py.std.inspect.findsource(self.frame.code.raw) - except IOError: + except (KeyboardInterrupt, SystemExit): + raise + except: return None source = py.code.Source() source.lines = map(str.rstrip, sourcelines) From arigo at codespeak.net Mon Oct 20 15:45:11 2008 From: arigo at codespeak.net (arigo at codespeak.net) Date: Mon, 20 Oct 2008 15:45:11 +0200 (CEST) Subject: [py-svn] r59268 - py/trunk/py/test Message-ID: <20081020134511.0BB05169EFE@codespeak.net> Author: arigo Date: Mon Oct 20 15:45:10 2008 New Revision: 59268 Modified: py/trunk/py/test/custompdb.py Log: An improvement to pdb (which I should also propose as a CPython patch): in post_portem, the "up" command isn't normally able to walk up past generator frames. This fixes it. Modified: py/trunk/py/test/custompdb.py ============================================================================== --- py/trunk/py/test/custompdb.py (original) +++ py/trunk/py/test/custompdb.py Mon Oct 20 15:45:10 2008 @@ -56,13 +56,19 @@ return None return linecache.getline(filename, lineno) + def get_stack(self, f, t): + # Modified from bdb.py to be able to walk the stack beyond generators, + # which does not work in the normal pdb :-( + stack, i = pdb.Pdb.get_stack(self, f, t) + if f is None: + i = max(0, len(stack) - 1) + return stack, i + def post_mortem(t): - # again, a copy of the version in pdb.py + # modified from pdb.py for the new get_stack() implementation p = Pdb() p.reset() - while t.tb_next is not None: - t = t.tb_next - p.interaction(t.tb_frame, t) + p.interaction(None, t) def set_trace(): # again, a copy of the version in pdb.py From hpk at codespeak.net Thu Oct 23 20:24:06 2008 From: hpk at codespeak.net (hpk at codespeak.net) Date: Thu, 23 Oct 2008 20:24:06 +0200 (CEST) Subject: [py-svn] r59344 - py/trunk Message-ID: <20081023182406.D7DDE168503@codespeak.net> Author: hpk Date: Thu Oct 23 20:24:04 2008 New Revision: 59344 Modified: py/trunk/TODO.txt Log: adding an item to consider Modified: py/trunk/TODO.txt ============================================================================== --- py/trunk/TODO.txt (original) +++ py/trunk/TODO.txt Thu Oct 23 20:24:04 2008 @@ -4,8 +4,29 @@ py.test -------------- -- compatilibity: honour item.run() method of test items (so far - probably only execute() is warned about) +- compatilibity: honour/warn item.run() method of test items (so far + probably only execute() is warned about or the other way round) + +- introduce plugin arch, port to plugins: + - importorskip + - filelog + - chtmpdir per method + - apigen + - xfail + - acceptance/assertlines + - dist-testing? + +- introduce setuptools-style version checking, at least + for py lib itself, maybe also for other packages: + + py.checkversion("py>=1.0") + +- generative tests: it is somewhat misleading for + the classical htmlviews that generated tests are identified + by numbers rather than by its parameters. unclear how + to fix this because we may not always be able to assume + that we can identify a generated tests by using its parameters + (it might not be hashable, doesn't have a sensical repr ...?) - turn deprecation / apiwarnings into events, report them at the end? @@ -17,11 +38,6 @@ as to mark a test as "expected to fail", report specially if it surprisingly passes -- introduce setuptools-style version checking, at least - for py lib itself, maybe also for other packages: - - py.checkversion("py>=1.0") - - nightly test runs on multiple platforms - review and refactor architecture of py.test with particular From arigo at codespeak.net Tue Oct 28 10:02:19 2008 From: arigo at codespeak.net (arigo at codespeak.net) Date: Tue, 28 Oct 2008 10:02:19 +0100 (CET) Subject: [py-svn] r59464 - py/trunk/py/code Message-ID: <20081028090219.C5724169F86@codespeak.net> Author: arigo Date: Tue Oct 28 10:02:19 2008 New Revision: 59464 Modified: py/trunk/py/code/frame.py Log: Fix for a corner case: when the arguments are 'del'-eted from the local scope. This can also occur when using Psyco because f_locals is then empty. Modified: py/trunk/py/code/frame.py ============================================================================== --- py/trunk/py/code/frame.py (original) +++ py/trunk/py/code/frame.py Tue Oct 28 10:02:19 2008 @@ -50,6 +50,9 @@ """ retval = [] for arg in self.code.getargs(): - retval.append((arg, self.f_locals[arg])) + try: + retval.append((arg, self.f_locals[arg])) + except KeyError: + pass # this can occur when using Psyco return retval