As discussed in issue 1700288:
ctypes takes some liberties when creating python types: it modifies the types'
__dict__ directly, bypassing all the machinery of type objects which deal with
special methods.  And this broke recent optimisations of method lookup.
Now we try to modify the type with more "official" functions.
2 files changed