Re: [Cython] Annotations and Cython 3

2021-10-25 Thread da-woods
One further option would be to revert to Cython 0.29 behaviour, but 
support the PEP-563 version as a "from __future__" import (essentially 
following the current behaviour of Python). When I wrong the original 
patch for the PEP-563 I tried to do that, but then removed the code in 
favour of keeping one simpler option. But the code to do this mostly 
already exists (somewhere)




On 25/10/2021 19:11, da-woods wrote:
> [...]


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


[Cython] Annotations and Cython 3

2021-10-25 Thread da-woods
I suspect the answer to this is still "wait and see" but: do we have an 
opinion on what we want to do about annotations in Cython 3.


Currently we're targetting PEP-563 behaviour. To me it looks fairly 
likely that this won't be what Python decides on. I guess the likely 
outcomes are "status quo" or something close to PEP-649.


The issue with the PEP-563 (stringify everything) behaviour is that it's 
noticeably different, so releasing Cython 3 with that behaviour then 
changing to something else will be an obvious incompatible change.


I'd be reluctant to implement PEP-649 until it's actually accepted (it 
looks hard...). Is it worth reverting to the Cython 0.29 behaviour (with 
some scoping fixes) on the basis that it's what most people are using 
now, and it's likely to be closer what what's picked?


Or should we at least mark "decide what to do with annotations" as a 
blocker for Cython 3?


David

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


Re: [Cython] Annotations and Cython 3

2021-10-25 Thread Lisandro Dalcin
On Mon, 25 Oct 2021 at 21:57, da-woods  wrote:

> One further option would be to revert to Cython 0.29 behaviour, but
> support the PEP-563 version as a "from __future__" import (essentially
> following the current behaviour of Python).


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.
In addition, perhaps you should consider adding a compiler directive (or
there is one already that I'm missing?) that we can pass with -X o type as
a #cython comment in sources.
In the face of ambiguity... give users various alternatives to the control
the behavior.



-- 
Lisandro Dalcin

Senior Research Scientist
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel