PyPy and bzr
Wouter van Heyst
larstiq at larstiq.dyndns.org
Fri May 13 21:12:58 UTC 2011
On Sat, May 14, 2011 at 02:49:13 +0900, INADA Naoki wrote:
> One thing I found is that bzrlib.export.tgz_exporter depends on CPython's
> refcount behavior.
> It opens a file and pass to gzip.GZipFile, then pass it to tarfile.open.
> gzip.GZipFile.close() doesn't close passed stream and tarball.close() also.
> So we should close the file explicitly.
Before I fall asleep, I put up https://code.launchpad.net/~larstiq/bzr/bzr-pypy
which makes the export and test_pack blackbox tests pass on pypy.
The test_pack one was a straightforward application of with(), but the
export one is a bit more intricate. _run_bzr_core() in bzrlib/tests/__init.py
does:
out = stdout.getvalue()
which, since I'm sleepy, I decided to whack with the blunt is_stdout
boolean.
HTH,
Wouter van Heyst
P.S. to test I downloaded the Linux 32bit pypy-with-jit:
http://pypy.org/download/pypy-1.5-linux.tar.bz2
See http://pypy.org/download.html for other options.
More information about the bazaar
mailing list