MAINT: remove usage of Python C API in _pywt.pyx