Re: [Cython] Failing test reimport_from_subinterpreter

2018-10-22 Thread Jeroen Demeyer
OK, I finished analyzing the problem. It's a combination of: 1. the Sage wrapper around the Cython installer setting PYTHONPATH 2. the reimport_from_subinterpreter test failing if PYTHONPATH is set I'll open a PR quick. ___ cython-devel mailing list c

Re: [Cython] longintrepr.h issues with MinGW

2018-10-23 Thread Jeroen Demeyer
If you care about MinGW, there is also this CPython issue which makes it basically impossible to compile any Cython extension on MinGW: https://bugs.python.org/issue11566 ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mai

Re: [Cython] longintrepr.h issues with MinGW

2018-10-23 Thread Jeroen Demeyer
On 2018-10-24 07:58, Jeroen Demeyer wrote: If you care about MinGW, there is also this CPython issue which makes it basically impossible to compile any Cython extension on MinGW: https://bugs.python.org/issue11566 I forgot to say that this makes it impossible to compile any *C++* Cython

Re: [Cython] Hooking tp_clear()

2019-01-09 Thread Jeroen Demeyer
(reviving this thread after I thought about it some more...) As I mentioned in the original post, I want something like __dealloc__ but with access to a particular cdef attribute (representing a Python object). Since Python attributes of cdef classes may have been cleared by tp_clear, they can

Re: [Cython] Hooking tp_clear()

2019-01-10 Thread Jeroen Demeyer
On 2019-01-09 22:12, Stefan Behnel wrote: I would like to avoid adding Cython specific features that are better served by the general finalisation mechanism of PEP-442. That could also be used as argument against @cython.no_gc_clear but we still have that anyway. Second, with PEP-442 you don

[Cython] Reason for __Pyx_PyObject_Call2Args, __Pyx_PyObject_Call3Args

2019-06-13 Thread Jeroen Demeyer
Is there any particular reason why Cython has specific code like __Pyx_PyObject_Call2Args, __Pyx_PyObject_Call3Args, ... And then there is even more complicated Python code in PyMethodCallNode generating something like __Pyx_PyObject_Call2Args for an arbitrary number of arguments. This could

[Cython] Working on METH_FASTCALL and vectorcall support

2019-06-17 Thread Jeroen Demeyer
Hello, this is just to let you know that I'm planning to add support for functions/methods defined with METH_FASTCALL instead of METH_VARARGS on CPython 3.7. Once this is implemented, it will be fairly easy to use vectorcall (PEP 590) for cython_function_or_method. Jeroen. ___

[Cython] Empty defines of Py_TPFLAGS_METHOD_DESCRIPTOR?

2019-06-18 Thread Jeroen Demeyer
Hello, What's the purpose of commit https://github.com/cython/cython/commit/8ac1a6a55fc44ff858cc367af556250a91f71d16 I can't think of any reasonable scenario where Py_TPFLAGS_METHOD_DESCRIPTOR would be defined differently than in CPython (i.e. with value 1<<17). This is an honest question,

Re: [Cython] Progress towards Cython 3.0

2019-08-04 Thread Jeroen Demeyer
On 2019-08-04 09:16, Stefan Behnel wrote: But also the "binding" PR is a big one that will need some more fiddling with the details, some of which can be investigated separately. Does that have to be part of Cython 3.0? It may not be worth blocking Cython 3.0 for this. ___

[Cython] How to detect CyFunction?

2019-08-09 Thread Jeroen Demeyer
Hi, I have a very technical question about Cython.Compiler.Nodes.DefNode: how can I know whether the instance represents a PyCFunction (built-in function) or a CyFunction (Cython function)? I've tried all the obvious conditions such as checking self.is_cyfunction, self.py_cfunc_node.binding and env

<    1   2