Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marius Gedminas wrote: On Fri, Dec 12, 2008 at 12:45:27PM +, Malthe Borch wrote: Martijn Pieters wrote: The C extension is required to make messageids immutable. Because they are immutable, the security machinery can treat them as rocks, e.g.

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-22 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Fulton wrote: On Dec 12, 2008, at 6:28 AM, Malthe Borch wrote: I've branched out this package and removed the C-extension. It's not documented in the package why a C-extension is needed or alternatively, what it benefits. If there are

[Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Malthe Borch
I've branched out this package and removed the C-extension. It's not documented in the package why a C-extension is needed or alternatively, what it benefits. If there are no objections, I will merge this into trunk shortly. \malthe ___ Zope-Dev

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Jacob Holm
Hi Malthe Malthe Borch wrote: I've branched out this package and removed the C-extension. It's not documented in the package why a C-extension is needed or alternatively, what it benefits. If there are no objections, I will merge this into trunk shortly. IIRC, the C extension is

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Marius Gedminas
On Fri, Dec 12, 2008 at 11:28:48AM +, Malthe Borch wrote: I've branched out this package and removed the C-extension. It's not documented in the package why a C-extension is needed or alternatively, what it benefits. C extensions are usually optimizations. If there are no objections, I

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Martijn Pieters
On Fri, Dec 12, 2008 at 11:28, Malthe Borch mbo...@gmail.com wrote: I've branched out this package and removed the C-extension. It's not documented in the package why a C-extension is needed or alternatively, what it benefits. The C extension is required to make messageids immutable. Because

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Malthe Borch
Martijn Pieters wrote: The C extension is required to make messageids immutable. Because they are immutable, the security machinery can treat them as rocks, e.g. safe to pass around. Removing the C-extension undoes this, as you cannot make truely immutable. I believe it is possible to do this

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Malthe Borch
Malthe Borch wrote: I believe it is possible to do this in pure Python: The implementation may reviewed in this branch: http://svn.zope.org/zope.i18nmessageid/branches/c-extension-less/ \malthe ___ Zope-Dev maillist - Zope-Dev@zope.org

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Marius Gedminas
On Fri, Dec 12, 2008 at 12:45:27PM +, Malthe Borch wrote: Martijn Pieters wrote: The C extension is required to make messageids immutable. Because they are immutable, the security machinery can treat them as rocks, e.g. safe to pass around. Removing the C-extension undoes this, as you

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Malthe Borch
Marius Gedminas wrote: Careful: id(some_object) will likely be reused when the old object is garbage collected. This has been worked around using the weak reference dictionary. \malthe ___ Zope-Dev maillist - Zope-Dev@zope.org

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Jim Fulton
On Dec 12, 2008, at 6:28 AM, Malthe Borch wrote: I've branched out this package and removed the C-extension. It's not documented in the package why a C-extension is needed or alternatively, what it benefits. If there are no objections, I will merge this into trunk shortly. I object.

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Martijn Pieters
On Fri, Dec 12, 2008 at 17:01, Jim Fulton j...@zope.com wrote: On Dec 12, 2008, at 6:28 AM, Malthe Borch wrote: I've branched out this package and removed the C-extension. It's not documented in the package why a C-extension is needed or alternatively, what it benefits. If there are no

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Malthe Borch
Martijn Pieters wrote: I object as well, and have asked for Malthe to provide his reasoning here at the Plone Performance Sprint in Bristol, but so far his only motivation is that he wants to see if he can get this to work without a C-extension. I am sceptical he'll be able to, and am not

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Martijn Faassen
Malthe Borch wrote: Martijn Pieters wrote: I object as well, and have asked for Malthe to provide his reasoning here at the Plone Performance Sprint in Bristol, but so far his only motivation is that he wants to see if he can get this to work without a C-extension. I am sceptical he'll be

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Martijn Pieters
On Fri, Dec 12, 2008 at 18:51, Martijn Faassen faas...@startifact.com wrote: Unless it can be clearly demonstrated that the new method is equivalent in both performance and security, talk of dropping the C extension seems somewhat premature. A pure Python fallback for this module would however

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Malthe Borch
Martijn Faassen wrote: My suspicion from observing the discussions in this thread so far indicate that a drop in code complexity doesn't seem to be a necessary consequence of rewriting to Python either. The proposed implementation has already been implemented (walk up this thread); it is

Re: [Zope-dev] C-extension in zope.i18nmessageid

2008-12-12 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martijn Faassen wrote: Malthe Borch wrote: Martijn Pieters wrote: I object as well, and have asked for Malthe to provide his reasoning here at the Plone Performance Sprint in Bristol, but so far his only motivation is that he wants to see if he