Bug#501207: destar: Fails to run with python2.5
On Tue, Oct 07, 2008 at 08:42:26AM +0300, Faidon Liambotis wrote: John, hi, John Wright wrote: The above problem is actually the same as bug 501207. However, with that patch applied, I get the following problem starting destar: snip The attached patch fixes the SyntaxError. Thanks a lot for these patches! I have absolutely no clue about python and I don't think anyone in the team does -- which effectively means that we need all the help we can get. So, bear with me if this is a silly question: I was under the impression that lenny will be shipped with both python 2.4 and 2.5 and that these should be co-installable. Yes, lenny will have both python2.4 and python2.5. One workaround, at least for the compiler.ast.From problem, would be to run destar with #!/usr/bin/python2.4 instead of #!/usr/bin/python. But I think it better to fix the bug rather than try to work around it, if possible. Are your fixes backwards compatible? It'd suck to fix this only to have a bug report the day after fails to run with python2.4 :) I made sure the fix for #501207 was backwards-compatible. As for the SyntaxError problem, I'm surprised it ever worked at all. Function definitions with optional arguments before required positional arguments aren't legal in 2.4 either (I'm not sure when/if they ever were). Maybe quixote used to generate different actual Python code than it does now in this case? Anyway, I'm pretty certain the patch for the SyntaxError will work with python2.4, but I'll check tomorrow. -- John Wright [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#501207: destar: Fails to run with python2.5
John Wright wrote: Yes, lenny will have both python2.4 and python2.5. One workaround, at least for the compiler.ast.From problem, would be to run destar with #!/usr/bin/python2.4 instead of #!/usr/bin/python. But I think it better to fix the bug rather than try to work around it, if possible. Definitely, my concern was for the backwards compatibility. Are your fixes backwards compatible? It'd suck to fix this only to have a bug report the day after fails to run with python2.4 :) I made sure the fix for #501207 was backwards-compatible. As for the SyntaxError problem, I'm surprised it ever worked at all. Function definitions with optional arguments before required positional arguments aren't legal in 2.4 either (I'm not sure when/if they ever were). Maybe quixote used to generate different actual Python code than it does now in this case? Anyway, I'm pretty certain the patch for the SyntaxError will work with python2.4, but I'll check tomorrow. Great, thanks a lot! Regards, Faidon -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#501207: destar: Fails to run with python2.5
On Tue, Oct 07, 2008 at 09:07:10AM +0300, Faidon Liambotis wrote: John Wright wrote: Yes, lenny will have both python2.4 and python2.5. One workaround, at least for the compiler.ast.From problem, would be to run destar with #!/usr/bin/python2.4 instead of #!/usr/bin/python. But I think it better to fix the bug rather than try to work around it, if possible. Definitely, my concern was for the backwards compatibility. Are your fixes backwards compatible? It'd suck to fix this only to have a bug report the day after fails to run with python2.4 :) I made sure the fix for #501207 was backwards-compatible. As for the SyntaxError problem, I'm surprised it ever worked at all. Function definitions with optional arguments before required positional arguments aren't legal in 2.4 either (I'm not sure when/if they ever were). Maybe quixote used to generate different actual Python code than it does now in this case? Anyway, I'm pretty certain the patch for the SyntaxError will work with python2.4, but I'll check tomorrow. Great, thanks a lot! It still works for me when I replace #!/usr/bin/env python with #!/usr/bin/env python2.4 in /usr/share/destar/python/destar.py. -- John Wright [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#501207: destar: Fails to run with python2.5
block 501207 by 484360 tags 501207 + patch thanks The above problem is actually the same as bug 501207. However, with that patch applied, I get the following problem starting destar: [EMAIL PROTECTED]:~$ destar DeStar 0.2.2, Copyright (C) 2005 by Holger Schurig and contributors. DeStar comes with ABSOLUTELY NO WARRANTY. This is free software, you are welcome to redistribute it under certain conditions; see the included files GPL-2.txt and COPYRIGHT.txt Serving application 'page_main' on port 8080 warning: Computing default hostname info: Medusa (V1.11) started at Mon Oct 6 18:08:53 2008 Hostname: neptune.jswright Port:8080 Note: you need the cdr_sqlite3_custom module to have CDR and Stats functionalities Note: you don't seem to have access to /var/log/asterisk/master.db yet created by cdr_sqlite3_custom. See INSTALL.txt for details. Traceback (most recent call last): File /usr/share/destar/python/destar.py, line 139, in module pub.run() File /usr/share/destar/python/Server.py, line 168, in run publisher = self.publishclass(self.approot) File /var/lib/python-support/python2.5/quixote/publish.py, line 107, in __init__ self.root_namespace = _get_module(root_namespace) File /var/lib/python-support/python2.5/quixote/publish.py, line 32, in _get_module __import__(name) File /var/lib/python-support/python2.5/quixote/ptl_import.py, line 127, in find_import_module return self.loader.load_module(fullname, stuff) File /var/lib/python-support/python2.5/quixote/ptl_import.py, line 107, in load_module return _load_ptl(name, filename, file) File /var/lib/python-support/python2.5/quixote/ptl_import.py, line 82, in _load_ptl return _exec_module_code(code, name, filename) File /var/lib/python-support/python2.5/quixote/ptl_import.py, line 35, in _exec_module_code exec code in mod.__dict__ File /usr/share/destar/python/page_main.ptl, line 74, in module m = __import__(s) File /var/lib/python-support/python2.5/quixote/ptl_import.py, line 127, in find_import_module return self.loader.load_module(fullname, stuff) File /var/lib/python-support/python2.5/quixote/ptl_import.py, line 107, in load_module return _load_ptl(name, filename, file) File /var/lib/python-support/python2.5/quixote/ptl_import.py, line 72, in _load_ptl code = compile_template(file, filename, output) File /var/lib/python-support/python2.5/quixote/ptl_compile.py, line 303, in compile_template template.compile() File /usr/lib/python2.5/compiler/pycodegen.py, line 111, in compile tree = self._get_tree() File /var/lib/python-support/python2.5/quixote/ptl_compile.py, line 274, in _get_tree tree = parse(self.source, self.filename) File /var/lib/python-support/python2.5/quixote/ptl_compile.py, line 232, in parse raise SyntaxError(str(e), (filename, e.lineno, e.offset, e.text)) SyntaxError: non-default argument follows default argument (page_owner_cdr.ptl) The attached patch fixes the SyntaxError. -- John Wright [EMAIL PROTECTED] --- destar-0.2.2.orig/page_owner_cdr.ptl +++ destar-0.2.2/page_owner_cdr.ptl @@ -239,7 +239,7 @@ return render() -def cdrShowResults [html] (where=[], limit, offset, total = 0, field=_(Time_of_start), order=DESC): +def cdrShowResults [html] (where, limit, offset, total = 0, field=_(Time_of_start), order=DESC): if total == 0: 'p' '--No records to Show--' --- destar-0.2.2.orig/page_stats_cdr.ptl +++ destar-0.2.2/page_stats_cdr.ptl @@ -244,7 +244,7 @@ return render() -def cdrShowResults [html] (where=[], limit, offset, total = 0, field=start, order=DESC): +def cdrShowResults [html] (where, limit, offset, total = 0, field=start, order=DESC): if total == 0: 'p' '--No records to Show--'
Bug#501207: destar: Fails to run with python2.5
John, hi, John Wright wrote: The above problem is actually the same as bug 501207. However, with that patch applied, I get the following problem starting destar: snip The attached patch fixes the SyntaxError. Thanks a lot for these patches! I have absolutely no clue about python and I don't think anyone in the team does -- which effectively means that we need all the help we can get. So, bear with me if this is a silly question: I was under the impression that lenny will be shipped with both python 2.4 and 2.5 and that these should be co-installable. Are your fixes backwards compatible? It'd suck to fix this only to have a bug report the day after fails to run with python2.4 :) Thanks, Faidon -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]