[pypy-svn] rev 1589 - in pypy/trunk/src/pypy: . objspace/flow tool translator/test
hpk at codespeak.net
hpk at codespeak.net
Sun Oct 5 17:35:01 CEST 2003
Author: hpk
Date: Sun Oct 5 17:35:00 2003
New Revision: 1589
Modified:
pypy/trunk/src/pypy/TODO
pypy/trunk/src/pypy/objspace/flow/objspace.py
pypy/trunk/src/pypy/tool/udir.py
pypy/trunk/src/pypy/translator/test/buildpyxmodule.py
pypy/trunk/src/pypy/translator/test/make_dot.py
pypy/trunk/src/pypy/translator/test/test_pyrextrans.py
Log:
- added a few tasks
- fixed usage of 'udir' and moved a more general version into
the vpath package
Modified: pypy/trunk/src/pypy/TODO
==============================================================================
--- pypy/trunk/src/pypy/TODO (original)
+++ pypy/trunk/src/pypy/TODO Sun Oct 5 17:35:00 2003
@@ -1,3 +1,5 @@
+Task: update pypy homepage
+
Task: fix interpreter-level object introspection from app-level
(make dis.dis(dis.dis) goal work as a side effect)
@@ -6,7 +8,7 @@
Task: complete builtins! (like e.g. 'dir')
-Task: slicing with assigments & more small things (finish review)
+Task: slicing with assigments & more small things (finish StdObjSpace review!)
lst[::-2] = lst2
@@ -14,7 +16,8 @@
Task: generate a nice dot-graph from the structure of PyPy
-Task: trash the standard unittest framework
+
+Task: trash the standard unittest framework/enhance it
Task: complete the list of operations in type inference (annotation.py)
@@ -24,4 +27,3 @@
Task: (documentation) do more and enhance
-
Modified: pypy/trunk/src/pypy/objspace/flow/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/flow/objspace.py (original)
+++ pypy/trunk/src/pypy/objspace/flow/objspace.py Sun Oct 5 17:35:00 2003
@@ -47,7 +47,7 @@
def reraise(self):
etype, evalue, etb = sys.exc_info()
- print >> sys.stderr, '*** reraise', etype, evalue
+ #print >> sys.stderr, '*** reraise', etype, evalue
raise OperationError, OperationError(self.wrap(etype), self.wrap(evalue)), etb
def build_flow(self, func):
Modified: pypy/trunk/src/pypy/tool/udir.py
==============================================================================
--- pypy/trunk/src/pypy/tool/udir.py (original)
+++ pypy/trunk/src/pypy/tool/udir.py Sun Oct 5 17:35:00 2003
@@ -1,41 +1,6 @@
import autopath
-#__________________________________________________________
-# udir (a unique human-readable directory path where unittests can store
-# files to their likening)
+from vpath.local import make_numbered_dir
-def make_udir():
- from vpath.local import Path, mkdtemp
+udir = make_numbered_dir(base='usession-', keep=3)
- _newtmpdir = mkdtemp()
- _tmpdir = _newtmpdir.dirname()
- _newtmpdir.rmdir()
-
- name, num = 'usession', 0
- items = []
- for item in _tmpdir.listdir():
- if item.basename().startswith(name):
- xb = item.basename().split('-')
- try:
- name, num = xb[0], int(xb[1])
- items.append((name, num))
- except (TypeError,ValueError):
- continue
-
- if items:
- items.sort()
- name, num = items[-1]
- num += 1
-
- udir = _tmpdir.join('-'.join([name, str(num)]))
- udir.mkdir()
- return udir
-
-udir = make_udir()
-
-#__________________________________________________________
-
-
-if __name__ == '__main__':
- # test all of pypy
- print udir
Modified: pypy/trunk/src/pypy/translator/test/buildpyxmodule.py
==============================================================================
--- pypy/trunk/src/pypy/translator/test/buildpyxmodule.py (original)
+++ pypy/trunk/src/pypy/translator/test/buildpyxmodule.py Sun Oct 5 17:35:00 2003
@@ -71,4 +71,4 @@
raise ValueError, "failure %s" % result
except PyrexError, e:
print >>sys.stderr, e
- cfile = pyxfile.newsuffix('.c')
+ cfile = pyxfile.newext('.c')
Modified: pypy/trunk/src/pypy/translator/test/make_dot.py
==============================================================================
--- pypy/trunk/src/pypy/translator/test/make_dot.py (original)
+++ pypy/trunk/src/pypy/translator/test/make_dot.py Sun Oct 5 17:35:00 2003
@@ -195,7 +195,7 @@
from vpath.adapter.process import exec_cmd
dest = udir.join('%s.dot' % name)
dest.write(dotgen.get_source(fun))
- psdest = dest.newsuffix(target)
+ psdest = dest.newext(target)
out = exec_cmd('dot -T%s %s' % (target, str(dest)))
psdest.write(out)
print "wrote", psdest
Modified: pypy/trunk/src/pypy/translator/test/test_pyrextrans.py
==============================================================================
--- pypy/trunk/src/pypy/translator/test/test_pyrextrans.py (original)
+++ pypy/trunk/src/pypy/translator/test/test_pyrextrans.py Sun Oct 5 17:35:00 2003
@@ -5,7 +5,7 @@
from pypy.translator.flowmodel import *
from pypy.translator.test.buildpyxmodule import make_module_from_pyxstring
-make_dot = 0
+make_dot = 1
if make_dot:
from pypy.translator.test.make_dot import make_dot
More information about the Pypy-commit
mailing list