after sometime without following the current leo development today
I've found time for upgrading my local repository.
So I'm with revision 2548. The problem is that leo doesn't start with
python 2.5
$ launchLeo.py &
$ *** isPython3: False
/usr/local/src/leo-editor/leo/core/leoPlugins.py:723: Warning: 'as'
will become a reserved keyword in Python 2.6
Traceback (most recent call last):
File "/usr/local/src/leo-editor/launchLeo.py", line 7, in <module>
import leo.core.runLeo
File "/usr/local/src/leo-editor/leo/core/runLeo.py", line 50, in
<module>
import leo.core.leoApp as leoApp
File "/usr/local/src/leo-editor/leo/core/leoApp.py", line 11, in
<module>
import leo.core.leoPlugins as leoPlugins
File "/usr/local/src/leo-editor/leo/core/leoPlugins.py", line 723
except TryNext as exc:
^
SyntaxError: invalid syntax
[1]+ Fi d'execuci? amb l'estat 1 /usr/local/src/leo-editor/
launchLeo.py
Is just me, or other people is suffering the same problem?
Vicent
Hi again,
it seems the offending line was added in revision 2523 so I've
downgraded my local repo to rev 2522. But:
$ launchLeo.py &
$ *** isPython3: False
/usr/local/src/leo-editor/leo/external/pickleshare.py:205: Warning:
'as' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
File "/usr/local/src/leo-editor/launchLeo.py", line 7, in <module>
import leo.core.runLeo
File "/usr/local/src/leo-editor/leo/core/runLeo.py", line 50, in
<module>
import leo.core.leoApp as leoApp
File "/usr/local/src/leo-editor/leo/core/leoApp.py", line 15, in
<module>
import leo.external.pickleshare
File "/usr/local/src/leo-editor/leo/external/pickleshare.py", line
205
except OSError as e:
^
SyntaxError: invalid syntax
FYI, before my problematic upgrade I was using revision 2453 without
problems.
Vicent
> So I'm with revision 2548. The problem is that leo doesn't start with
> python 2.5
You have to upgrade to Python 2.6. This is because 2.6 has some
python3 compatibility features that Leo uses.
--
Ville M. Vainio
http://tinyurl.com/vainio
Hi,
I see. The problem is that python 2.6 is still in debian experimental
and I'm using debian testing... I suppose I'll have to install python
2.6 from sources or just wait.
Anyway thanks for your help.
Vicent
> I see. The problem is that python 2.6 is still in debian experimental
> and I'm using debian testing... I suppose I'll have to install python
> 2.6 from sources or just wait.
Are you sure? At least Sid has python 2.6...
>> Are you sure? At least Sid has python 2.6...
> ?? That is not what says packages.debian.org. I'll further
> investigate...
I checked too, indeed it seems it has python 2.5.
I assumed Sid would have 2.6 because Karmic has it (2.6.4), and it was
branched from Sid 6 months ago....
Right. Bad luck for me.
Thanks for all.
Vicent
> File "/usr/local/src/leo-editor/leo/core/leoPlugins.py", line 723
> except TryNext as exc:
> ^
> SyntaxError: invalid syntax
There are only a few such instances in all of Leo at present. Rather
than requiring Python 2.6, I think it would be best to choose the
correct syntax based on the Python version. I'll attempt a fix today.
Edward
> There are only a few such instances in all of Leo at present. Rather
> than requiring Python 2.6, I think it would be best to choose the
> correct syntax based on the Python version. I'll attempt a fix today.
I don't think it's possible.
You are correct. It won't help to "choose" the syntax with a switch,
because the offending syntax still gets parsed.
This is a nasty surprise.
The only way around this would be to create another leo3k branch, then
revert the trunk to the rev before the grand merge. This will allow
people to use Leo with Python 2.5 until Python 2.6 becomes more widely
available.
I dislike my choices:
1. Creating a new leo3k branch would delay wider testing of the leo3k
code. And I don't want to create branch that might not be merged for
months, even though no more changes are contemplated.
2. It seems unreasonable to force people to move to a version of
Python that is not widely available.
What do you all think?
Edward
> 2. It seems unreasonable to force people to move to a version of
> Python that is not widely available.
>
> What do you all think?
Let's force people to move to 2.6. It *is* widely available, and
that's the jump we need to take to get into py3k action at all.
By the time Leo 4.7 official version is out, everyone should have
python 2.6, I think...
This is reasonable and it would seem to be the easiest path.
I suppose we could create a leo25 branch that will compile on Python 2.5...
Edward