Re: [Cython] Annotations and Cython 3

2021-10-26 Thread Stefan Behnel
Am 26. Oktober 2021 07:54:10 MESZ schrieb Lisandro Dalcin:
>In any case, if you know how and can implement the __future__ import,
>that
>would be great. Otherwise, valid Python3 code using that import
>currently fails to compile in Cython.

Probably just an oversight. A no-op future import is trivial to add and ignore.

>In addition, perhaps you should consider adding a compiler directive

There is one (annotation_typing) that controls whether Cython reads annotations 
as types or not (which isn't what you're asking for). Apart from that, since 
there is no future unimport, there should probably be a way to get either 
behaviour, regardless of the default.

Stefan
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] Annotations and Cython 3

2021-10-26 Thread da-woods

On 26/10/2021 07:53, Stefan Behnel wrote:

Am 26. Oktober 2021 07:54:10 MESZ schrieb Lisandro Dalcin:

In any case, if you know how and can implement the __future__ import,
that
would be great. Otherwise, valid Python3 code using that import
currently fails to compile in Cython.

Probably just an oversight. A no-op future import is trivial to add and ignore.


We do support the __future__ import as a no-op on the Cython 3 alphas:

https://github.com/cython/cython/blob/e93c2c556c5c15148763b26c6e3eef35ee88a22f/tests/run/pep563_annotations.py#L4

___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel