RE: Python 2.3 compatibility?
"Bauer, Georg" <[email protected]> Mon, 19 Jan 2004 10:40:33 +0100
| Newsgroups | gmane.comp.pythin.pyds.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi! > Now, PyDS and all their dependencies have been packaged in > such a way that they can be recompiled against any Python > version, no problem, but with Python 2.3 I get the following > error trying to import my old site backuped from 0.6.1; could > you help? I currently don't have any Python 2.3 system running, as Debian Sarge isn't released, yet (and I am not upgraded to Panther on my Macintosh). So I am quite sure that there are problems with PyDS and Python 2.3, only I don't know which ones and how to solve them :-) > I could send you a tarball of the backup if you want to play > with it. Currently going to download PyDS 0.7.0 for Windows, > restore/re-backup from there and see if I could get it to > import nicely on PyDS/Python2.3 on Linux. You can just carry over your metakit data files, no need to backup/restore. Metakit files are Python version ignorant and are usually backward compatible to it's own versions. > Traceback (most recent call last): > File "/usr/bin/pyds-restore", line 51, in ? > PyDS.Server.start_server(daemon=0, restore=url) > File "/usr/lib/python2.3/site-packages/PyDS/Server.py", > line 357, in start_server > PyDS.Tool._ToolNamespace['upstream']._restore(restore) > File > "/usr/lib/python2.3/site-packages/PyDS/UpstreamTool.py", line > 328, in _restore > if tool: > File > "/usr/lib/python2.3/site-packages/PyDS/NuggetsTool.py", line > 284, in __getattr__ > raise KeyError(name) > KeyError: '__nonzero__' That's a weird one. But are you sure you are testing with the current 0.7.0 version? My line 328 in UpstreamTool.py isn't in the _restore method, but in some hook method. And my NuggetsTool.py in line 284 isn't in __getattr__ ... What I know is that Python 2.3 behaves differently with regard to attr fetching than Python 2.2. Especially MacrosTool and NuggetsTool have problems there, because they use the __getattr__ method to provide attribute access to their inner database. I stumbled over that fact when I got a bugreport by someone else where something similar happened - looks like dictionary access and attribute access to objects are functionally merged in Python 2.3. Those lurking problems are the reason why PyDS is still linked to Python 2.2. People using PyDS with 2.3 are on very shaky grounds! bye, Georg