Message285450
In 3.6, type_new in Objects/typeobject.c sets the __classcell__ in the dict if it's a cell object. It happens that CreateSwappedType in Modules/_ctypes/_ctypes.c re-uses the dict to create the swapped type (e.g. big endian), which in turn updates the __classcell__. Thus in builtin___build_class__ in Python/bltinmodule.c, the check `cell_cls != cls` ends up being true, which leads to the observed TypeError. CreateSwappedType should be able to avoid this by either deleting "__classcell__" from the dict or creating a copy without it before passing it to type_new. |
|
Date |
User |
Action |
Args |
2017-01-13 23:53:52 | eryksun | set | recipients:
+ eryksun, ncoghlan, serhiy.storchaka, Dave Jones |
2017-01-13 23:53:52 | eryksun | set | messageid: <1484351632.83.0.957451441914.issue29270@psf.upfronthosting.co.za> |
2017-01-13 23:53:52 | eryksun | link | issue29270 messages |
2017-01-13 23:53:52 | eryksun | create | |
|