[pypy-commit] pypy default: fix (for py3)

2017-02-19 Thread arigo
Author: Armin Rigo 
Branch: 
Changeset: r90200:56126b34d84c
Date: 2017-02-19 16:04 +0100
http://bitbucket.org/pypy/pypy/changeset/56126b34d84c/

Log:fix (for py3)

diff --git a/pypy/module/cpyext/test/test_userslots.py 
b/pypy/module/cpyext/test/test_userslots.py
--- a/pypy/module/cpyext/test/test_userslots.py
+++ b/pypy/module/cpyext/test/test_userslots.py
@@ -39,12 +39,12 @@
 arg = space.newtuple([one, one, one])
 # call w_date.__new__
 w_obj = space.call_function(w_date, one, one, one)
-w_year = space.getattr(w_obj, space.newbytes('year'))
+w_year = space.getattr(w_obj, space.newtext('year'))
 assert space.int_w(w_year) == 1
 
 w_obj = generic_cpy_call(space, py_datetype.c_tp_new, py_datetype,
  arg, space.newdict({}))
-w_year = space.getattr(w_obj, space.newbytes('year'))
+w_year = space.getattr(w_obj, space.newtext('year'))
 assert space.int_w(w_year) == 1
 
 class AppTestUserSlots(AppTestCpythonExtensionBase):
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit


[pypy-commit] pypy default: Fix for Py3 support

2015-04-20 Thread arigo
Author: Armin Rigo ar...@tunes.org
Branch: 
Changeset: r76844:9f9e646594bd
Date: 2015-04-20 11:01 +0200
http://bitbucket.org/pypy/pypy/changeset/9f9e646594bd/

Log:Fix for Py3 support

diff --git a/pypy/tool/gdb_pypy.py b/pypy/tool/gdb_pypy.py
--- a/pypy/tool/gdb_pypy.py
+++ b/pypy/tool/gdb_pypy.py
@@ -134,7 +134,7 @@
 try:
 self.gdb.execute('dump binary memory %s %s %s+%d' %
  (fname, vstart, vstart, length))
-with open(fname, 'rt') as fobj:
+with open(fname, 'rb') as fobj:
 data = fobj.read()
 return TypeIdsMap(zlib.decompress(data).splitlines(True), self.gdb)
 finally:
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit