On Mon, May 09, 2016 at 07:58:53PM -0400, Ian Wilder wrote:
> +1 for not branching. If it's just print statements, the use functions to be
> compatible with Python 3.
> A lot of Python 3 functionality has been backported to 2.x

Thanks for the interest, Josh and Ian. Note that we have a ticket where
we have some ideas and pending issues related to the transition to
supporting Python3:
http://www.lyx.org/trac/ticket/9006

My understanding is that after Georg's patch goes in, we won't have any
pending issues for 2.2.0 since we ensure that either (1) Python2 is run
or (2) that the script is Python3-compatible. Hopefully after 2.2.x we
can make all scripts Python3-compatible.

Scott

> On 2016-05-09 00:35:57 +0000, Josh Hieronymus said:
> 
> > Looking over the code, it looks like much of the problem is that Python
> > 2 has print as a statement, while Python 3 has print as a function.
> > Since we're supporting only Python 2.7 from the 2.x series, we could add
> > an import statement to use print as a function in order to avoid
> > checking the version and branching. I think this capability was added in
> > 2.6, so we would need to check the version if we wanted to let use this
> > strategy with earlier versions.
> > On May 8, 2016 7:04 PM, "Ian Wilder" <ianwilder.ea...@gmail.com> wrote:
> > On 2016-05-04 20:39:54 +0000, Scott Kostyshak said:
> > 
> > 
> > 3. A Python3 compatibility issue at [5]. I don't know whether the best
> > short-run approach is to ensure that we use Python2 to call the script or to
> > fix the script to be compatible with Python3. I CC'ed José to see if he has
> > some wisdom to share.
> > 
> > 
> > It's possible to detect which version of Python is running at runtime.
> > At that point, it could either continue if version 2 and exit with a
> > nonzero status if version 3.
> > 
> > I have a good amount of Python experience, if anyone needs help on this 
> > front.
> 
> 
> 

Attachment: signature.asc
Description: PGP signature

Reply via email to