[Bug 460389] Re: SyntaxError in package

2010-01-23 Thread TJ

** Patch added: "Debdiff for Karmic"
   http://launchpadlibrarian.net/38309189/onboard_0.92.0-0ubuntu4.debdiff

-- 
SyntaxError in package
https://bugs.launchpad.net/bugs/460389
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 460389] Re: SyntaxError in package

2010-01-23 Thread TJ
This is caused because the package relies upon using the Python "with"
keyword. For Python 2.6 "with" is available by default but for Python
2.5 any script that uses "with" needs to do a future import as the first
line of the script:

from __future__ import with_statement

Compiling the package manually shows the same error:

--- Python 2.5 ---
cd /usr/lib/python2.5/site-packages/Onboard/
sudo rm *.pyc
sudo python2.5
Python 2.5.4 (r254:67916, Jan 20 2010, 21:43:02) 
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import compileall
>>> compileall.compile_dir('./')
Listing ./ ...
Compiling ./Config.py ...
Compiling ./Exceptions.py ...
Compiling ./IconPalette.py ...
Compiling ./KbdWindow.py ...
Compiling ./KeyCommon.py ...
Compiling ./KeyGtk.py ...
Compiling ./Keyboard.py ...
Compiling ./KeyboardGTK.py ...
Compiling ./KeyboardSVG.py ...
./KeyboardSVG.py:105: Warning: 'with' will become a reserved keyword in Python 
2.6
  File "./KeyboardSVG.py", line 105
with open(pane_svg_filename) as svg_file:
^
SyntaxError: invalid syntax

Compiling ./OnboardGtk.py ...
Compiling ./Pane.py ...
Compiling ./SnippetList.py ...
Compiling ./__init__.py ...
Compiling ./settings.py ...
Compiling ./utils.py ...
0
>>> exit()
--

The attached patch adds the required line to KeyboardSVG.py. It is
tested with python2.5 and python2.6 on Karmic and works for both:

--- Python 2.5 ---
cd /usr/lib/python2.5/site-packages/Onboard/
sudo rm *.pyc
sudo python2.5
Python 2.5.4 (r254:67916, Jan 20 2010, 21:43:02) 
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import compileall
>>> compileall.compile_dir('./')
Listing ./ ...
Compiling ./Config.py ...
Compiling ./Exceptions.py ...
Compiling ./IconPalette.py ...
Compiling ./KbdWindow.py ...
Compiling ./KeyCommon.py ...
Compiling ./KeyGtk.py ...
Compiling ./Keyboard.py ...
Compiling ./KeyboardGTK.py ...
Compiling ./KeyboardSVG.py ...
Compiling ./OnboardGtk.py ...
Compiling ./Pane.py ...
Compiling ./SnippetList.py ...
Compiling ./__init__.py ...
Compiling ./settings.py ...
Compiling ./utils.py ...
1
>>> exit()
--

--- Python 2.6 ---
cd /usr/lib/python2.6/dist-packages/Onboard/
sudo rm *.pyc
sudo python2.6
Python 2.6.4 (r264:75706, Dec  7 2009, 18:43:55) 
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import compileall
>>> compileall.compile_dir('./')
Listing ./ ...
Compiling ./Config.py ...
Compiling ./Exceptions.py ...
Compiling ./IconPalette.py ...
Compiling ./KbdWindow.py ...
Compiling ./KeyCommon.py ...
Compiling ./KeyGtk.py ...
Compiling ./Keyboard.py ...
Compiling ./KeyboardGTK.py ...
Compiling ./KeyboardSVG.py ...
Compiling ./OnboardGtk.py ...
Compiling ./Pane.py ...
Compiling ./SnippetList.py ...
Compiling ./__init__.py ...
Compiling ./settings.py ...
Compiling ./utils.py ...
1
>>> exit()
--

** Patch added: "Use __future__ with for2.5"
   http://launchpadlibrarian.net/38309170/32-use_future_with_for_2.5.patch

** Changed in: onboard (Ubuntu)
   Status: New => Confirmed

** Changed in: onboard (Ubuntu)
   Importance: Undecided => Medium

-- 
SyntaxError in package
https://bugs.launchpad.net/bugs/460389
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 460389] Re: SyntaxError in package

2009-11-23 Thread Fridtjof Busse
No, and I did not investigate any further.

-- 
SyntaxError in package
https://bugs.launchpad.net/bugs/460389
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 460389] Re: SyntaxError in package

2009-11-13 Thread challman
Did you ever find a solution for this?

-- 
SyntaxError in package
https://bugs.launchpad.net/bugs/460389
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 460389] Re: SyntaxError in package

2009-10-25 Thread Kai Kasurinen
** Package changed: python2.5 (Ubuntu) => onboard (Ubuntu)

-- 
SyntaxError in package
https://bugs.launchpad.net/bugs/460389
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 460389] Re: SyntaxError in package

2009-10-25 Thread Fridtjof Busse

** Attachment added: "Dependencies.txt"
   http://launchpadlibrarian.net/34355720/Dependencies.txt

** Attachment added: "XsessionErrors.txt"
   http://launchpadlibrarian.net/34355722/XsessionErrors.txt

-- 
SyntaxError in package
https://bugs.launchpad.net/bugs/460389
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs