Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-15 Thread Andreas Zeidler
Chris Withers wrote: Andreas Jung wrote: Yes, so this change introduced a bug. Who's the right person to fix it? What's the right collector to report this in? Since Acquisition is a core module of Zope: the Zope 2 tracker on Launchpad. Done: https://bugs.launchpad.net/zope2/+bug/360761

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-15 Thread Hanno Schlichting
Andreas Zeidler wrote: Chris Withers wrote: https://bugs.launchpad.net/zope2/+bug/360761 Now, who knows how to fix it? ;-) this has been fixed in http://svn.zope.org/?view=revrev=99191 Wonderful, if Chris can confirm this, I'll make a new Acquisition release. Hanno

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-15 Thread Chris Withers
Hanno Schlichting wrote: Andreas Zeidler wrote: Chris Withers wrote: https://bugs.launchpad.net/zope2/+bug/360761 Now, who knows how to fix it? ;-) this has been fixed in http://svn.zope.org/?view=revrev=99191 Wonderful, if Chris can confirm this, I'll make a new Acquisition release.

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-15 Thread Hanno Schlichting
Chris Withers wrote: Hanno Schlichting wrote: Andreas Zeidler wrote: Chris Withers wrote: https://bugs.launchpad.net/zope2/+bug/360761 Now, who knows how to fix it? ;-) this has been fixed in http://svn.zope.org/?view=revrev=99191 Wonderful, if Chris can confirm this, I'll make a new

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-15 Thread Chris Withers
Hanno Schlichting wrote: I've running with a develop copy of the Zope 2 trunk. Which doesn't include a develop version of Acquisition. Acquisition is its own package. Ah, okay, I'll pop Acquisition into develop and test before the end of this email ;-) This has include/Acquisition, but is

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-15 Thread Hanno Schlichting
Chris Withers wrote: Hanno Schlichting wrote: This has include/Acquisition, but is that actually being used? If not, then why is it included like that? These are only the header files of Acquisition. Some of the C extensions of the Zope2 egg depend on those headers. Liar! ;-) Ok, sigh.

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-15 Thread Chris Withers
Hanno Schlichting wrote: If so, then how do I get it to recompile now that I've svn up'ed my Zope 2 trunk to get Andreas' changes? You need to check out Acquisition from its SVN trunk and include it into your environment (develop line in buildout or python setup.py develop). Forcing a

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-15 Thread Hanno Schlichting
Chris Withers wrote: Hanno Schlichting wrote: how would I force recompilation in a buildout environment? Via python setup.py build_ext -i -f - works in all environments. Deleting the .so files is probably another way. I guess that equates to: bin/buildout setup path/to/setup.py

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-14 Thread Andreas Zeidler
hi chris, Chris Withers wrote: Andreas Jung wrote: Yes, so this change introduced a bug. Who's the right person to fix it? What's the right collector to report this in? Since Acquisition is a core module of Zope: the Zope 2 tracker on Launchpad. Done:

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-13 Thread Dieter Maurer
Chris Withers wrote at 2009-4-13 03:14 +0100: The context for this is trying to get ParsedXML 1.5 running on Zope 2.12 under Python 2.5 (don't ask why!) Anyway, ParsedXML has a class: class ManageableNodeList(ManageableWrapper, DOMProxy.NodeListProxy,

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-13 Thread Hanno Schlichting
Chris Withers wrote: If you try and iterate over an instance of this class, you get an AttributeError: __iter__. This doesn't make a lot of sense, since you *don't* get an error like that if you iterate over an instance of: class X: def __getitem__(self,i): return 1 The change

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-13 Thread Chris Withers
Hanno Schlichting wrote: The change you are interested in is probably: http://svn.zope.org/Zope/trunk/lib/python/Acquisition/_Acquisition.c?rev=94905r1=92577r2=94905 Acquisition now proxy real iteration via __iter__ correctly (it didn't do that before). What is missing from that change is

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-13 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13.04.2009 17:58 Uhr, Chris Withers wrote: Hanno Schlichting wrote: The change you are interested in is probably: http://svn.zope.org/Zope/trunk/lib/python/Acquisition/_Acquisition.c?rev=94905r1=92577r2=94905 Acquisition now proxy real

Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__

2009-04-13 Thread Chris Withers
Andreas Jung wrote: Yes, so this change introduced a bug. Who's the right person to fix it? What's the right collector to report this in? Since Acquisition is a core module of Zope: the Zope 2 tracker on Launchpad. Done: https://bugs.launchpad.net/zope2/+bug/360761 Now, who knows how to