Monkey-patching C types is not straightforward. It relies on changing the attributes or methods in memory at the right address with the exact right size. This requires the greatest caution. A simple mistake can mess up the memory used by the Python interpreter, and for instance lead to `SegmentationFault` exceptions or unforeseen behaviors. However, being able to patch C type is a very powerful tool. With great power comes great responsibility. `patch_c_type` is implemented with the greateast caution. The Python C-API documentation has been thoroughly followed and understood. In addition, this patch has been battle tested in real conditions. In the end, this allows to patch unwanted behaviors from types implemented in C. Co-authored-by: Denis Ledoux <dle@odoo.com> Co-authored-by: Christophe Simonis <chs@odoo.com> Co-authored-by: Mathieu Walravens <wama@odoo.com>