1 | initial version |
Monkey patching does not apply to extension modules (that is compiled Python module from C source code). And sage.libs.cypari2
is an extension module written in Cython.
The best way to go in your situation is to use a home compiled version of Sage and start modifying its source code. The procedure is described in the developer manual. Note that the cypari2 code is an external package of Sage (see https://github.com/defeo/cypari2) that you clearly do not want to modify.