[pypy-commit] pypy py3k: fix breakage from default: marshal co_names as str again instead of as

pjenvey noreply at buildbot.pypy.org
Mon Dec 8 05:34:23 CET 2014


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r74855:9314eec351d7
Date: 2014-12-07 20:32 -0800
http://bitbucket.org/pypy/pypy/changeset/9314eec351d7/

Log:	fix breakage from default: marshal co_names as str again instead of
	as unicode. though marshaling as unicode is more correct per
	cpython3 (applies to various other code object fields too), we'll
	come back to that later..

diff --git a/pypy/objspace/std/marshal_impl.py b/pypy/objspace/std/marshal_impl.py
--- a/pypy/objspace/std/marshal_impl.py
+++ b/pypy/objspace/std/marshal_impl.py
@@ -329,7 +329,7 @@
     m.put_int(x.co_flags)
     m.atom_str(TYPE_STRING, x.co_code)
     m.put_tuple_w(TYPE_TUPLE, x.co_consts_w)
-    m.put_tuple_w(TYPE_TUPLE, x.co_names_w)
+    _put_str_list(space, m, [space.str_w(w_name) for w_name in x.co_names_w])
     _put_str_list(space, m, x.co_varnames)
     _put_str_list(space, m, x.co_freevars)
     _put_str_list(space, m, x.co_cellvars)


More information about the pypy-commit mailing list