Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r89761:965d1e442759
Date: 2017-01-25 11:47 +0100
http://bitbucket.org/pypy/pypy/changeset/965d1e442759/
Log: issue #2471 fix
diff --git a/pypy/module/gc/app_referents.py b/pypy/module/gc/app_referents.py
--- a/pypy/module/gc/app_referents.py
+++ b/pypy/module/gc/app_referents.py
@@ -31,7 +31,7 @@
filename2 = os.path.join(os.path.dirname(file), 'typeids.txt')
if not os.path.exists(filename2):
data = zlib.decompress(gc.get_typeids_z())
- f = open(filename2, 'w')
+ f = open(filename2, 'wb')
f.write(data)
f.close()
filename2 = os.path.join(os.path.dirname(file), 'typeids.lst')
diff --git a/pypy/module/gc/referents.py b/pypy/module/gc/referents.py
--- a/pypy/module/gc/referents.py
+++ b/pypy/module/gc/referents.py
@@ -202,7 +202,7 @@
def get_typeids_z(space):
a = rgc.get_typeids_z()
s = ''.join([a[i] for i in range(len(a))])
- return space.wrap(s)
+ return space.newbytes(s)
def get_typeids_list(space):
l = rgc.get_typeids_list()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit