[z3-checkins] r18148 - in z3/Five/branch/Five-1.1: . bbb form/tests tests

regebro at codespeak.net regebro at codespeak.net
Tue Oct 4 18:05:03 CEST 2005


Author: regebro
Date: Tue Oct  4 18:04:52 2005
New Revision: 18148

Added:
   z3/Five/branch/Five-1.1/bbb/transaction_patch.py
      - copied unchanged from r18141, z3/Five/branch/tziade_transaction/bbb/transaction_patch.py
   z3/Five/branch/Five-1.1/tests/test_import_conflicts.py
      - copied unchanged from r18141, z3/Five/branch/tziade_transaction/tests/test_import_conflicts.py
Removed:
   z3/Five/branch/Five-1.1/bbb/transaction.py
Modified:
   z3/Five/branch/Five-1.1/CHANGES.txt
   z3/Five/branch/Five-1.1/CREDITS.txt
   z3/Five/branch/Five-1.1/form/tests/forms.txt
   z3/Five/branch/Five-1.1/monkey.py
Log:
Merged Tareks transaction fix.


Modified: z3/Five/branch/Five-1.1/CHANGES.txt
==============================================================================
--- z3/Five/branch/Five-1.1/CHANGES.txt	(original)
+++ z3/Five/branch/Five-1.1/CHANGES.txt	Tue Oct  4 18:04:52 2005
@@ -51,9 +51,9 @@
 * In some hard to replicate cases, using the "modules" variable in ZPT cause
   an AuthenticationError. Using the secure module importer fixes this.
 
-* There was some cases with conflicts of the transaction module. One
-  fix is included, an alternative is in branch/tziade_transaction.
-  More testing is needed before we know which is the best one. /regebro
+* If you used some parts of Zope 3 (for example the mail delivery) Five 1.1
+  transaction backport would conflict with Zope 3s transaction module.
+  This is now solved.
 
 Five 1.1b (2005-07-13)
 ======================

Modified: z3/Five/branch/Five-1.1/CREDITS.txt
==============================================================================
--- z3/Five/branch/Five-1.1/CREDITS.txt	(original)
+++ z3/Five/branch/Five-1.1/CREDITS.txt	Tue Oct  4 18:04:52 2005
@@ -31,6 +31,8 @@
 
 - Malcolm Cleaton (malcolm at jamkit.com)
 
+- Tarek Ziadé (tziade at nuxeo.com)
+
 Thank you
 ---------
 

Deleted: /z3/Five/branch/Five-1.1/bbb/transaction.py
==============================================================================
--- /z3/Five/branch/Five-1.1/bbb/transaction.py	Tue Oct  4 18:04:52 2005
+++ (empty file)
@@ -1,27 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004, 2005 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Transaction legacy package.
-
-$Id$
-"""
-def begin():
-    get_transaction().begin()
-
-def commit(sub=False):
-    get_transaction().commit(sub)
-
-def abort(sub=False):
-    get_transaction().abort(sub)
-
-get_transaction = get = get_transaction

Modified: z3/Five/branch/Five-1.1/form/tests/forms.txt
==============================================================================
--- z3/Five/branch/Five-1.1/form/tests/forms.txt	(original)
+++ z3/Five/branch/Five-1.1/form/tests/forms.txt	Tue Oct  4 18:04:52 2005
@@ -48,9 +48,8 @@
   >>> print http(r"""
   ... GET /test_folder_1_/ftf/+/protectedaddform.html HTTP/1.1
   ... """, handle_errors=False)
-  Traceback (most recent call last):
+  HTTP/1.1 401 Unauthorized
   ...
-  Unauthorized: ...
 
 Now let's add a piece of our sample content object to test more things
 on it:

Modified: z3/Five/branch/Five-1.1/monkey.py
==============================================================================
--- z3/Five/branch/Five-1.1/monkey.py	(original)
+++ z3/Five/branch/Five-1.1/monkey.py	Tue Oct  4 18:04:52 2005
@@ -50,8 +50,13 @@
     i18n.monkey()
 
     try:
-        import transaction
+        import Zope2
     except ImportError:
         import sys
-        from Products.Five.bbb import transaction
-        sys.modules['transaction'] = transaction
+        import transaction
+        from Products.Five.bbb import transaction_patch
+        transaction.begin = transaction_patch.begin
+        transaction.commit = transaction_patch.commit
+        transaction.abort = transaction_patch.abort
+        transaction.get_transaction = transaction_patch.get_transaction
+        transaction.get = transaction_patch.get


More information about the z3-checkins mailing list