Re: [zopefoundation/zope.security] 82fd54: Changed strategy to hide wrapped to not use the se...
Jim Fulton <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel |
|---|---|
| Message-ID | <CAPDm-Fj7gBB+sWd35QxAkaiqieD0dvkczUe_1tgBbUhvUzZvJA@mail.gmail.com> |
On Tue, Mar 12, 2013 at 8:30 AM, Stephan Richter <[email protected]> wrote: > On Monday, March 11, 2013 10:33:30 PM Tres Seaver wrote: >> > Yep, saw that. There are some uncovered lines for which I have to add >> > tests left. Also, I just noticed while prorting zope.publisher to PyPy >> > that proxies cannot be adapted, which is a big issue for any view >> > libraries. >> >> Ouch. That "lying about my type" bit is hard to get over. > > I was thinking about dynamically creating proxy classes. Something along the > lines of: > > class PyProxy(object): > > def __new__(cls, orig): > ProxyForOrig = type('ProxyForOrig', (cls, orig.__class__)) > return ProxyForOrig(orig) > > That should also help us with our 3-arg pow() call > > What do you think? Sorry, why do you want to adapt proxies? The "lying about class", which is arguably not lying, is intentional and facilitates adapting proxied objects. Jim -- Jim Fulton http://www.linkedin.com/in/jimfulton Jerky is better than bacon! http://zo.pe/Kqm _______________________________________________ Zope-Dev maillist - [email protected] https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )