osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] Use of Cython


Hi Nick,

Le 04/08/2018 ? 15:13, Nick Coghlan a ?crit?:
> 
> It'd be *really* nice to at least be able to write some of the C API
> tests directly in Cython rather than having to fiddle about with
> splitting the test between the regrtest parts that actually define the
> test case and the extension module parts that expose the interfaces
> that we want to test.

Actually, I think testing the C API is precisely the kind of area where
you don't want to involve a third-party, especially not a moving target
(Cython is actively maintained and generated code will vary after each
new Cython release).  Besides, Cython itself calls the C API, which
means you might end up involuntarily testing the C API against itself.

If anything, testing the C API using ctypes or cffi would probably be
more reasonable... assuming we get ctypes / cffi to compile everywhere,
which currently isn't the case.

Regards

Antoine.