[pypy-commit] pypy py3.5: merge heads
arigo
pypy.commits at gmail.com
Mon Dec 12 07:47:36 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r89017:310d51b5e3ba
Date: 2016-12-12 13:46 +0100
http://bitbucket.org/pypy/pypy/changeset/310d51b5e3ba/
Log: merge heads
diff --git a/pypy/module/cpyext/structmember.py b/pypy/module/cpyext/structmember.py
--- a/pypy/module/cpyext/structmember.py
+++ b/pypy/module/cpyext/structmember.py
@@ -93,7 +93,7 @@
if (flags & READONLY or
member_type in [T_STRING, T_STRING_INPLACE]):
- raise oefmt(space.w_TypeError, "readonly attribute")
+ raise oefmt(space.w_AttributeError, "readonly attribute")
elif w_value is None:
if member_type == T_OBJECT_EX:
if not rffi.cast(PyObjectP, addr)[0]:
diff --git a/pypy/module/cpyext/test/test_typeobject.py b/pypy/module/cpyext/test/test_typeobject.py
--- a/pypy/module/cpyext/test/test_typeobject.py
+++ b/pypy/module/cpyext/test/test_typeobject.py
@@ -310,7 +310,7 @@
("setattr", "METH_O",
'''
int ret;
- PyObject* name = PyString_FromString("mymodule");
+ PyObject* name = PyBytes_FromString("mymodule");
PyObject *obj = PyType_Type.tp_alloc(&PyType_Type, 0);
PyHeapTypeObject *type = (PyHeapTypeObject*)obj;
if ((type->ht_type.tp_flags & Py_TPFLAGS_HEAPTYPE) == 0)
@@ -1152,7 +1152,7 @@
Base2->tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HEAPTYPE;
Base12->tp_flags = Py_TPFLAGS_DEFAULT;
Base12->tp_base = Base1;
- Base12->tp_bases = PyTuple_Pack(2, Base1, Base2);
+ Base12->tp_bases = PyTuple_Pack(2, Base1, Base2);
Base12->tp_doc = "The Base12 type or object";
if (PyType_Ready(Base1) < 0) return NULL;
if (PyType_Ready(Base2) < 0) return NULL;
More information about the pypy-commit
mailing list