Description of problem: The current pymol releases are still incompatible with python 2.6 Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: The removal of 'as' support in python 2.6 breaks sections of pymol's code. Specifically if you look at... http://pymol.svn.sourceforge.net/viewvc/pymol/trunk/pymol/modules/pymol/api.py?view=markup You will see at the end of that file... # dang! Python 2.6 will break PyMOL's "as" method. # Proposal: # 1. stick with Python <=2.5 for as long as possible # 2. convert API method to cmd.show_as() and leave "as" in the scripting langauge # 3. allow "show_as" in the scripting language as = show_as I believe the author of pymol said this issue might not be fixed until pymol 1.5. Actual results: Expected results: Additional info:
This issue should pop up during the packaging/installation of the pymol rpm if the python files in pymol are being compiled to optimized byte-code. The python files that require the depreciated 'as' construct will fail to compile under python 2.6.
If pymol is not python 2.6 ready in time for fedora 11, what should be done with the package?
fixed in SVN trunk rev. 3615, committed to devel branch: http://koji.fedoraproject.org/koji/taskinfo?taskID=1165037
Current pymol trunk still isn't fully python2.6 compatible. My pymol-py package for fink on Mac OS X compiles the python scripts when the deb file is installed. This reveals... Compiling /sw/lib/pymol-py26/modules/pymol2/cmd2.py ... SyntaxError: ('invalid syntax', ('/sw/lib/pymol-py26/modules/pymol2/cmd2.py', 264, 10, ' def as(self, *a, **k):\n')) You really should make sure that a postinstall script runs on the pymol rpm to attempt to compile all the python scripts that are installed. This will automatically validate the syntax compatibility with python 2.6 for you.
The following patch should be sufficient to handle the last remaining cases of as... --- pymol/modules/pymol2/cmd2.py.org 2009-02-24 22:57:16.000000000 -0500 +++ pymol/modules/pymol2/cmd2.py 2009-02-24 22:57:40.000000000 -0500 @@ -261,9 +261,9 @@ k['_self']=self return apply(global_cmd.angle, a, k) - def as(self, *a, **k): + def as_(self, *a, **k): k['_self']=self - return apply(global_cmd.as, a, k) + return apply(global_cmd.as_, a, k) def attach(self, *a, **k): k['_self']=self Do you see faint text in the Representations demo in the svn build on fedora 11?
(In reply to comment #4) > Current pymol trunk still isn't fully python2.6 compatible. My pymol-py package > for fink on Mac OS X > compiles the python scripts when the deb file is installed. This reveals... > > Compiling /sw/lib/pymol-py26/modules/pymol2/cmd2.py ... > SyntaxError: ('invalid syntax', ('/sw/lib/pymol-py26/modules/pymol2/cmd2.py', > 264, 10, ' def as(self, *a, **k):\n')) > > You really should make sure that a postinstall script runs on the pymol rpm to > attempt to > compile all the python scripts that are installed. This will automatically > validate the syntax > compatibility with python 2.6 for you. setup.py doesn't list pymol2 as a module, so it wasn't being included/compiled. I discussed this with upstream, and its OK to include (although not for "production use" at the moment), so I've just patched setup.py.
(In reply to comment #5) > The following patch should be sufficient to handle the last remaining cases of > as... > > --- pymol/modules/pymol2/cmd2.py.org 2009-02-24 22:57:16.000000000 -0500 > +++ pymol/modules/pymol2/cmd2.py 2009-02-24 22:57:40.000000000 -0500 > @@ -261,9 +261,9 @@ > k['_self']=self > return apply(global_cmd.angle, a, k) > > - def as(self, *a, **k): > + def as_(self, *a, **k): > k['_self']=self > - return apply(global_cmd.as, a, k) > + return apply(global_cmd.as_, a, k) > > def attach(self, *a, **k): > k['_self']=self > its in SVN rev 3616 now, which is included with the latest build: http://koji.fedoraproject.org/koji/taskinfo?taskID=1195022 > Do you see faint text in the Representations demo in the svn build on fedora > 11? I've been having difficulty getting F11 to bring up X on my development machine, but I'll check this when I get it working.
(In reply to comment #5) > > Do you see faint text in the Representations demo in the svn build on fedora > 11? Sorry this took me awhile to respond to - yes, using both the nv and nvidia driver, I observe this behavior.
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
OK to close?