[Zope3-dev] Zope 3.3 branch: zope.app.interface.tests.test_interface.PersistentInterfaceTest failing

2007-03-07 Thread Christian Zagrodnick
Hoi the Zope 3.3 branch tests fail here: Error in test test_persistentDeclarations (zope.app.interface.tests.test_interface.PersistentInterfaceTest) Traceback (most recent call last): File "/sw/lib/python2.4/unittest.py", line 260, in run testMethod() File "/Users/zagy/development/Zope3

[Zope3-dev] Zope 3.2 branch: zope/app/ftests/doctest.txt failing

2007-03-07 Thread Christian Zagrodnick
It's failing with: Failure in test /Users/zagy/development/Zope32/src/zope/app/ftests/doctest.txt Failed doctest test for doctest.txt File "/Users/zagy/development/Zope32/src/zope/app/ftests/doctest.txt", line 0 -- File "/Users

Re: [Zope3-dev] Re: Google Summer of Code

2007-03-07 Thread Christian Theune
Hi, Am Montag, den 05.03.2007, 07:10 -0800 schrieb Martin Aspeli: > > > Philipp von Weitershausen wrote: > > > > On 5 Mar 2007, at 09:48 , Christian Theune wrote: > >> I've added myself too. > > > > Thanks. > > > >> I'd be interested in having some ZODB problem, > >> although I'd like not to

Re: [Zope3-dev] Re: Google Summer of Code

2007-03-07 Thread Martin Aspeli
Christian Theune-2 wrote: > > It's on the ZODB trunk already for a while. The current trunk is going > to be ZODB 3.8 and was already released as an alpha. And it will be the > ZODB that ships with Zope 2.11. > Wonderful :-) > I'm currently writing up a proposal for an extended Blob versio

[Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Christian Theune
Hi, I'm writing up a proposal for the ZODB to make even more efficient Blob handling possible. This includes not copying the data from an uploaded file, but using a `link` operation when possible. However, the Zope 3 publisher currently uses the default implementation of the cgi module's FieldS

[Zope3-dev] Re: Zope 3.3 branch: zope.app.interface.tests.test_interface.PersistentInterfaceTest failing

2007-03-07 Thread Ross Patterson
Christian Zagrodnick <[EMAIL PROTECTED]> writes: > Hoi > > the Zope 3.3 branch tests fail here: > > > Error in test test_persistentDeclarations > (zope.app.interface.tests.test_interface.PersistentInterfaceTest) > Traceback (most recent call last): > File "/sw/lib/python2.4/unittest.py", line 260

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Stephan Richter
On Wednesday 07 March 2007 11:37, Christian Theune wrote: > Does anybody feel like this would be a bad idea? As long as you do not monkey patch the existing code, this is totally fine. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Christian Theune
Am Mittwoch, den 07.03.2007, 11:55 -0500 schrieb Stephan Richter: > On Wednesday 07 March 2007 11:37, Christian Theune wrote: > > Does anybody feel like this would be a bad idea? > > As long as you do not monkey patch the existing code, this is totally fine. *k* No. I was talking about doing

Re: [Zope3-dev] Google Summer of Code

2007-03-07 Thread Lennart Regebro
On 3/5/07, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: a) mentors. It'd be great if some of the Zope core committers would volunteer to mentor a student. This doesn't mean you will definitely end up mentoring one, just show your willingness. Yeah, I could do that. b) pro

Re: [Zope3-dev] Re: Google Summer of Code

2007-03-07 Thread Christian Theune
Hi, Am Mittwoch, den 07.03.2007, 08:03 -0800 schrieb Martin Aspeli: > > > Christian Theune-2 wrote: > > > > It's on the ZODB trunk already for a while. The current trunk is going > > to be ZODB 3.8 and was already released as an alpha. And it will be the > > ZODB that ships with Zope 2.11. > >

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Dieter Maurer
Christian Theune wrote at 2007-3-7 17:37 +0100: >I'm writing up a proposal for the ZODB to make even more efficient Blob >handling possible. > >This includes not copying the data from an uploaded file, but using a >`link` operation when possible. Is it possible at all? Uploaded files end up in a

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Bernd Dorn
On 07.03.2007, at 17:37, Christian Theune wrote: Hi, I'm writing up a proposal for the ZODB to make even more efficient Blob handling possible. This includes not copying the data from an uploaded file, but using a `link` operation when possible. However, the Zope 3 publisher currently use

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Christian Theune
Am Mittwoch, den 07.03.2007, 20:50 +0100 schrieb Dieter Maurer: > Christian Theune wrote at 2007-3-7 17:37 +0100: > >I'm writing up a proposal for the ZODB to make even more efficient Blob > >handling possible. > > > >This includes not copying the data from an uploaded file, but using a > >`link` o

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Christian Theune
Am Mittwoch, den 07.03.2007, 21:03 +0100 schrieb Bernd Dorn: > On 07.03.2007, at 17:37, Christian Theune wrote: > > > Hi, > > > > I'm writing up a proposal for the ZODB to make even more efficient > > Blob > > handling possible. > > > > This includes not copying the data from an uploaded file, b

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Uwe Oestermeier
Christian Theune <[EMAIL PROTECTED]> schreibt: >This is how the dance looks like to do the link(): > > >>> import tempfile, os > >>> d = tempfile.NamedTemporaryFile() > >>> os.path.exists(d.name) > True > >>> d.write('Test') > >>> os.path.exists('/tmp/asdf') > False > >>> os.link(d.name, '/tmp/asdf

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Christian Theune
Am Mittwoch, den 07.03.2007, 21:12 +0100 schrieb Uwe Oestermeier: > Christian Theune <[EMAIL PROTECTED]> schreibt: > >This is how the dance looks like to do the link(): > > > > >>> import tempfile, os > > >>> d = tempfile.NamedTemporaryFile() > > >>> os.path.exists(d.name) > > True > > >>> d.write(

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Uwe Oestermeier
Christian Theune <[EMAIL PROTECTED]> schreibt: > >Nope. It won't disappear if you link it again. And the link(src, dst) >does move it to a 'save' location ;) Again I'm not convinced because you cannot be sure that no other process deletes the temp file. In the following I simulate this with a os.s

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Christian Theune
Am Mittwoch, den 07.03.2007, 21:31 +0100 schrieb Uwe Oestermeier: > Christian Theune <[EMAIL PROTECTED]> schreibt: > > > >Nope. It won't disappear if you link it again. And the link(src, dst) > >does move it to a 'save' location ;) > > Again I'm not convinced because you cannot be sure that no oth

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Dieter Maurer
Christian Theune wrote at 2007-3-7 21:17 +0100: > ... >Nope. It won't disappear if you link it again. And the link(src, dst) >does move it to a 'save' location ;) You do not tell us, which "link" you mean. Python's "os.link" creates a hard link which will only work if source and destination are o

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Benji York
Dieter Maurer wrote: Python's "os.link" creates a hard link which will only work if source and destination are on the same file system. ...and is also not available on Windows. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-dev mail

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Uwe Oestermeier
Christian Theune <[EMAIL PROTECTED]> schreibt: >Nope this is not the correct simulation. Who except your application >knows about /tmp/asdf? You have to simulate deleting d.name and then >you'll see that /tmp/asdf does not disappear. Ok, but what Dieter means is that the tmp dir as a whole is empt

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Christian Theune
Hi, Am Mittwoch, den 07.03.2007, 21:37 +0100 schrieb Dieter Maurer: > Christian Theune wrote at 2007-3-7 21:17 +0100: > > ... > >Nope. It won't disappear if you link it again. And the link(src, dst) > >does move it to a 'save' location ;) > > You do not tell us, which "link" you mean. Sorry. I m

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Christian Theune
Am Mittwoch, den 07.03.2007, 15:59 -0500 schrieb Benji York: > Dieter Maurer wrote: > > Python's "os.link" creates a hard link which will only work > > if source and destination are on the same file system. > > ...and is also not available on Windows. Hrn. I tried to point you all to the upcoming

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Christian Theune
Am Mittwoch, den 07.03.2007, 22:04 +0100 schrieb Uwe Oestermeier: > Christian Theune <[EMAIL PROTECTED]> schreibt: > >Nope this is not the correct simulation. Who except your application > >knows about /tmp/asdf? You have to simulate deleting d.name and then > >you'll see that /tmp/asdf does not di

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Wichert Akkerman
Previously Christian Theune wrote: > Am Mittwoch, den 07.03.2007, 21:31 +0100 schrieb Uwe Oestermeier: > > Christian Theune <[EMAIL PROTECTED]> schreibt: > > > > > >Nope. It won't disappear if you link it again. And the link(src, dst) > > >does move it to a 'save' location ;) > > > > Again I'm not

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Christian Theune
Am Donnerstag, den 08.03.2007, 00:32 +0100 schrieb Wichert Akkerman: > Previously Christian Theune wrote: > > Am Mittwoch, den 07.03.2007, 21:31 +0100 schrieb Uwe Oestermeier: > > > Christian Theune <[EMAIL PROTECTED]> schreibt: > > > > > > > >Nope. It won't disappear if you link it again. And the

Re: [Zope3-dev] Re: Zope 3.3 branch: zope.app.interface.tests.test_interface.PersistentInterfaceTest failing

2007-03-07 Thread Christian Theune
I can't reproduce them on my 3.3 checkout either. Am Mittwoch, den 07.03.2007, 08:54 -0800 schrieb Ross Patterson: > Christian Zagrodnick <[EMAIL PROTECTED]> writes: > > > Hoi > > > > the Zope 3.3 branch tests fail here: > > > > > > Error in test test_persistentDeclarations > > (zope.app.interfac

[Zope3-dev] Possible bug in zope.app.cache.ram

2007-03-07 Thread Shaar Gabriel
hi. i think i found a bug in zope.app.cache.ram if an entry is added to the cache without having a miss first (for example to cache in advance some long calculation that is going to be looked up in the near furutre anyway), then the miss counter for that object doesn't exist, and getStaistic

Re: [Zope3-dev] Google Summer of Code

2007-03-07 Thread Philipp von Weitershausen
On 7 Mar 2007, at 12:24 , Lennart Regebro wrote: On 3/5/07, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: a) mentors. It'd be great if some of the Zope core committers would volunteer to mentor a student. This doesn't mean you will definitely end up mentoring one, just sho

[Zope3-dev] Re: Proposal for optimized Blob handling

2007-03-07 Thread Philipp von Weitershausen
Christian Theune wrote: Hi, [modified slightly from a similar proposal to zope3-dev to match Zope 2's publisher] I'm writing up a proposal for the ZODB to make even more efficient Blob handling possible. This includes not copying the data from an uploaded file, but using a `link` operation whe

[Zope3-dev] Re: i18nextract changes if you are interested.

2007-03-07 Thread Philipp von Weitershausen
Giovannetti, Mark wrote: Hello, Using zope 3.3.0 so i18nextract may have changed. I found that i18nextract didn't quite meet my needs. So I changed it. The following diff shows the changes. Basically, I wanted to allow individual py/zcml/pt extractions to be possible. Originally, python c

[Zope3-dev] Re: [Zope-dev] Re: Proposal for optimized Blob handling

2007-03-07 Thread Chris McDonough
Note that one micro-optimization for PUT requests is to not use a FieldStorage at all because the body is never mime-encoded anyway in practice. I have a monkey patch to do this now, which I turned into a patch for the core, but took out because Phillipp whined at a sprint once. ;-) Here

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Sidnei da Silva
On 3/7/07, Christian Theune <[EMAIL PROTECTED]> wrote: This is how the dance looks like to do the link(): >>> import tempfile, os >>> d = tempfile.NamedTemporaryFile() >>> os.path.exists(d.name) True >>> d.write('Test') >>> os.path.exists('/tmp/asdf') False >>> os.link(d.name, '/tmp/asdf

Re: [Zope3-dev] Re: Proposal for optimized Blob handling

2007-03-07 Thread Sidnei da Silva
On 3/7/07, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: Am I the only person here who immediately associated "link" with the POSIX? Also, am I the only one who read "when possible" as "when on a POSIX system where link is available", in other words, "when not on Windows"? One starts to wo

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Sidnei da Silva
On 3/7/07, Christian Theune <[EMAIL PROTECTED]> wrote: I propose to create a small subclass to override the `make_file` method to use `NamedTemporaryFile` instead of `TemporaryFile` to allow the file being accessible from a filename so I can apply a `link` operation. Notice: The FieldStorage exp

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Sidnei da Silva
On 3/7/07, Benji York <[EMAIL PROTECTED]> wrote: Dieter Maurer wrote: > Python's "os.link" creates a hard link which will only work > if source and destination are on the same file system. ...and is also not available on Windows. os.link() isn't, but hard links are as long as you use NTFS [1].

Re: [Zope3-dev] Re: Proposal for optimized Blob handling

2007-03-07 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sidnei da Silva wrote: > On 3/7/07, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: >> Am I the only person here who immediately associated "link" with the >> POSIX? Also, am I the only one who read "when possible" as "when on a >> POSIX system wh

Re: [Zope3-dev] Proposal for optimized Blob handling

2007-03-07 Thread Martijn Pieters
On 3/7/07, Uwe Oestermeier <[EMAIL PROTECTED]> wrote: Ok, but what Dieter means is that the tmp dir as a whole is emptied from time to time. Not a likely scenario other than at reboot time or when a clueless sysadmin clears it by hand. Automated /tmp cleaning takes file age into account to avoi