MAkes various chanes to `PythonContext`