[Zope-Coders] Re: SVN: Zope/trunk/lib/python/Testing/ZopeTestCase/ transaction.commit(1) is deprecated in favor of transaction.savepoint().

2005-11-02 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stefan H. Holek wrote:
> Log message for revision 39807:
>   transaction.commit(1) is deprecated in favor of transaction.savepoint().

This likely needs to be 'savepoint(optimistic=True)' (see collector
#1860 for rationale).


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDaVWC+gerLs4ltQ4RAgXvAKDOXY4mj+i3OQPBiIvFIITqcaF1EwCfW0vx
FffUmrPQGyXvugGQia+SsJ4=
=ZtKT
-END PGP SIGNATURE-

___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


[Zope-Coders] Re: Number of tests on trunk dropped?

2005-11-02 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stefan H. Holek wrote:

> Anybody up to explaining why the number of tests run for Zope-trunk 
> dropped by about 2000 overnight? ;-)
> 
> 
> 

Jim posted to zope-dev, subject "Default excluded tests":

> I have configured the test runner to exclude tests for ZConfig, BTrees,
> persistent, ThreadedAsync, transaction, ZEO, ZODB, ZopeUndo, zdaemon,
> and zope.testing. My reasoning for excluding these by default was that
> these packages are all included via externals.  They aren't being
> modified as part of the Zope 2 development process, so why run their tests?
> I then realized that this applies to all of the zope package.  Perhaps
> I should exclude the zope package as well.  Or perhaps we shouldn't
> exclude anything by default.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDaVS4+gerLs4ltQ4RAiKtAKDRfqkosPx9JJ7rEgPnjGdje+A+FACfWzQD
+1yVUBTl+eYBoY4g91ogIr8=
=WWUn
-END PGP SIGNATURE-

___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


[Zope-Coders] Re: SVN: Zope/trunk/lib/python/Testing/ZopeTestCase/ transaction.commit(1) is deprecated in favor of transaction.savepoint().

2005-11-02 Thread Florent Guillaume

Stefan H. Holek wrote:

Log message for revision 39807:
  transaction.commit(1) is deprecated in favor of transaction.savepoint().


Actually, in favor of transaction.savepoint(optimistic=True).

Florent



Changed:
  U   Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py

-=-
Modified: Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
===
--- Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt  2005-11-01 
12:55:46 UTC (rev 39806)
+++ Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt  2005-11-01 
13:00:43 UTC (rev 39807)
@@ -1,4 +1,5 @@
 Unreleased
+- transaction.commit(1) is deprecated in favor of transaction.savepoint().
 - Don't break if Python distros ship without profile support (Debian, Ubuntu).
 - Functional.publish() would hang if it got a request_method argument other
   than GET or HEAD while omitting the stdin argument.

Modified: Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py
===
--- Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py
2005-11-01 12:55:46 UTC (rev 39806)
+++ Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py
2005-11-01 13:00:43 UTC (rev 39807)
@@ -42,7 +42,7 @@
 self.folder.addDTMLMethod('doc', file='foo')
 # _p_oids are None until we commit a subtransaction
 self.assertEqual(self.folder._p_oid, None)
-transaction.commit(1)
+transaction.savepoint()
 self.failIfEqual(self.folder._p_oid, None)
 
 def testCutPaste(self):

@@ -93,7 +93,7 @@
 self.folder.addDTMLMethod('doc', file='foo')
 # _p_oids are None until we commit a subtransaction
 self.assertEqual(self.folder._p_oid, None)
-transaction.commit(1)
+transaction.savepoint()
 self.failIfEqual(self.folder._p_oid, None)
 
 def testExport(self):

@@ -315,7 +315,7 @@
 def testSubTransactionAbort(self):
 self.folder.foo = 1
 self.failUnless(hasattr(self.folder, 'foo'))
-transaction.commit(1)
+transaction.savepoint()
 transaction.abort()
 # This time the abort nukes the foo attribute...
 self.failIf(hasattr(self.folder, 'foo'))
@@ -330,7 +330,7 @@
 def testSubTransactionAbortPersistent(self):
 self.folder._p_foo = 1
 self.failUnless(hasattr(self.folder, '_p_foo'))
-transaction.commit(1)
+transaction.savepoint()
 transaction.abort()
 # This time the abort nukes the _p_foo attribute...
 self.failIf(hasattr(self.folder, '_p_foo'))
@@ -345,7 +345,7 @@
 def testSubTransactionAbortVolatile(self):
 self.folder._v_foo = 1
 self.failUnless(hasattr(self.folder, '_v_foo'))
-transaction.commit(1)
+transaction.savepoint()
 transaction.abort()
 # This time the abort nukes the _v_foo attribute...
 self.failIf(hasattr(self.folder, '_v_foo'))

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins




--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


[Zope-Coders] Number of tests on trunk dropped?

2005-11-02 Thread Stefan H. Holek
Anybody up to explaining why the number of tests run for Zope-trunk  
dropped by about 2000 overnight? ;-)





Stefan

--
Anything that happens, happens.  --Douglas Adams


___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


[Zope-Coders] Zope tests: 8 OK

2005-11-02 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Tue Nov  1 12:01:02 2005 UTC to Wed Nov  2 12:01:02 2005 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Tue Nov  1 22:20:46 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003463.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Nov  1 22:22:16 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003464.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Nov  1 22:23:46 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003465.html

Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Tue Nov  1 22:25:16 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003466.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Nov  1 22:26:46 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003467.html

Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Tue Nov  1 22:28:16 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003468.html

Subject: OK : Zope-trunk Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Nov  1 22:29:46 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003469.html

Subject: OK : Zope-trunk Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Tue Nov  1 22:31:16 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003470.html

___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


Re: [Zope-Coders] Re: Confusing code in ObjectManager manage_FTPstat

2005-11-02 Thread Jim Fulton

Chris McDonough wrote:


On Oct 31, 2005, at 10:26 AM, Jim Fulton wrote:


Sidnei da Silva wrote:


On Mon, Oct 31, 2005 at 10:05:45AM -0500, Jim Fulton wrote:
| Sidnei da Silva wrote:
| >Found some lovely piece of code deep into the FTP parts of Zope  2 
last

| >saturday, one of them is truely ugly. It's listing the contents of
| >the current and parent folders for no apparent reason (or at  
least, it

| >didn't make sense either to me or Chris McDonough).
| | There's a comment stating the intent.
Yes, but the original code does the check in a truely obscure way, at
least to me. I've thought of spelling:
# check to see if we are acquiring our objectValues or not
if not (len(REQUEST.PARENTS) > 1 and
self.objectValues() == REQUEST.PARENTS 
[1].objectValues()):

As:
if self.objectValues.im_self is not self:



That might be better.



Is that what an equivalent test?  It's difficult to know the intent  here.


Suppose we have folders:

  f1/
 f11/
 f12/
  f2/

We don't want to allow someone to access paths like:

  f1/f11/f1
  f1/f11/f2
  f2/f1

and so on.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


Re: [Zope-Coders] Re: Confusing code in ObjectManager manage_FTPstat

2005-11-02 Thread Chris McDonough


On Oct 31, 2005, at 10:26 AM, Jim Fulton wrote:


Sidnei da Silva wrote:

On Mon, Oct 31, 2005 at 10:05:45AM -0500, Jim Fulton wrote:
| Sidnei da Silva wrote:
| >Found some lovely piece of code deep into the FTP parts of Zope  
2 last

| >saturday, one of them is truely ugly. It's listing the contents of
| >the current and parent folders for no apparent reason (or at  
least, it

| >didn't make sense either to me or Chris McDonough).
| | There's a comment stating the intent.
Yes, but the original code does the check in a truely obscure way, at
least to me. I've thought of spelling:
# check to see if we are acquiring our objectValues or not
if not (len(REQUEST.PARENTS) > 1 and
self.objectValues() == REQUEST.PARENTS 
[1].objectValues()):

As:
if self.objectValues.im_self is not self:


That might be better.


Is that what an equivalent test?  It's difficult to know the intent  
here.


- C


___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


[Zope-Coders] Zope tests: 8 OK

2005-11-02 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Mon Oct 31 12:01:01 2005 UTC to Tue Nov  1 12:01:01 2005 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Mon Oct 31 22:36:46 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003455.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Mon Oct 31 22:38:16 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003456.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Mon Oct 31 22:39:46 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003457.html

Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Mon Oct 31 22:41:16 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003458.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Mon Oct 31 22:42:46 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003459.html

Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Mon Oct 31 22:44:16 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003460.html

Subject: OK : Zope-trunk Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Mon Oct 31 22:45:46 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003461.html

Subject: OK : Zope-trunk Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Mon Oct 31 22:47:16 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003462.html

___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders