r2885 - in zodb/trunk/debian (4 files)
arnau at users.alioth.debian.org
arnau at users.alioth.debian.org
Tue Dec 16 09:01:12 UTC 2014
Date: Tuesday, December 16, 2014 @ 09:01:05
Author: arnau
Revision: 2885
Refresh patches applied for 1:3.10.5-1.
Modified:
zodb/trunk/debian/changelog
zodb/trunk/debian/patches/persistent-module-4.x-compat.patch
zodb/trunk/debian/patches/series
Deleted:
zodb/trunk/debian/patches/test-spurious-failure-under-python27.patch
Modified: zodb/trunk/debian/changelog
===================================================================
--- zodb/trunk/debian/changelog 2014-12-16 08:54:21 UTC (rev 2884)
+++ zodb/trunk/debian/changelog 2014-12-16 09:01:05 UTC (rev 2885)
@@ -17,6 +17,11 @@
- bump Standards-Version to 3.9.4
- requires Python 2.5 or later.
+ [ Arnaud Fontaine ]
+ * d/p/persistent-module-4.x-compat.patch: Refreshed.
+ * d/p/test-spurious-failure-under-python27.patch: Not needed anymore as the
+ test has been removed upstream.
+
-- Gediminas Paulauskas <menesis at pov.lt> Tue, 17 Jun 2014 17:25:49 +0300
zodb (1:3.9.7-4) unstable; urgency=medium
Modified: zodb/trunk/debian/patches/persistent-module-4.x-compat.patch
===================================================================
--- zodb/trunk/debian/patches/persistent-module-4.x-compat.patch 2014-12-16 08:54:21 UTC (rev 2884)
+++ zodb/trunk/debian/patches/persistent-module-4.x-compat.patch 2014-12-16 09:01:05 UTC (rev 2885)
@@ -43,7 +43,7 @@
--- a/src/ZODB/BaseStorage.py
+++ b/src/ZODB/BaseStorage.py
-@@ -94,7 +94,7 @@
+@@ -98,7 +98,7 @@
t = time.time()
t = self._ts = TimeStamp(*(time.gmtime(t)[:5] + (t%60,)))
@@ -52,7 +52,7 @@
# ._oid is the highest oid in use (0 is always in use -- it's
# a reserved oid for the root object). Our new_oid() method
-@@ -242,7 +242,7 @@
+@@ -247,7 +247,7 @@
now = time.time()
t = TimeStamp(*(time.gmtime(now)[:5] + (now % 60,)))
self._ts = t = t.laterThan(self._ts)
@@ -61,7 +61,7 @@
else:
self._ts = TimeStamp(tid)
self._tid = tid
-@@ -369,7 +369,7 @@
+@@ -380,7 +380,7 @@
if ok: print ('Time stamps out of order %s, %s' % (_ts, t))
ok = 0
_ts = t.laterThan(_ts)
@@ -72,7 +72,7 @@
if not ok:
--- a/src/ZODB/DB.py
+++ b/src/ZODB/DB.py
-@@ -319,12 +319,12 @@
+@@ -310,12 +310,12 @@
at = toTimeStamp(at)
else:
at = TimeStamp(at)
@@ -90,16 +90,16 @@
--- a/src/ZODB/FileStorage/FileStorage.py
+++ b/src/ZODB/FileStorage/FileStorage.py
-@@ -936,7 +936,7 @@
+@@ -894,7 +894,7 @@
- def _txn_undo(self, transaction_id):
- # Find the right transaction to undo and call _txn_undo_write().
-- tid = base64.decodestring(transaction_id + '\n')
-+ tid = base64.decodestring(transaction_id + b'\n')
- assert len(tid) == 8
- tpos = self._txn_find(tid, 1)
- tindex = self._txn_undo_write(tpos)
-@@ -1093,8 +1093,9 @@
+ with self._lock:
+ # Find the right transaction to undo and call _txn_undo_write().
+- tid = base64.decodestring(transaction_id + '\n')
++ tid = base64.decodestring(transaction_id + b'\n')
+ assert len(tid) == 8
+ tpos = self._txn_find(tid, 1)
+ tindex = self._txn_undo_write(tpos)
+@@ -1048,8 +1048,9 @@
if self._is_read_only:
raise POSException.ReadOnlyError()
@@ -111,7 +111,7 @@
# If the storage is empty, there's nothing to do.
if not self._index:
-@@ -1229,7 +1230,7 @@
+@@ -1176,7 +1177,7 @@
handle_dir = ZODB.blob.remove_committed_dir
# Fist step: move or remove oids or revisions
@@ -120,7 +120,7 @@
line = line.strip().decode('hex')
if len(line) == 8:
-@@ -1532,7 +1533,7 @@
+@@ -1471,7 +1472,7 @@
pos = start
seek(start)
@@ -129,7 +129,7 @@
while 1:
# Read the transaction record
-@@ -1725,7 +1726,7 @@
+@@ -1664,7 +1665,7 @@
# implementation. So just return 0.
return 0
@@ -138,7 +138,7 @@
# copyTransactionsFrom() in BaseStorage. The advantage here is that we
# can create the iterator manually, e.g. setting start and stop, and then
# just let copyTransactionsFrom() do its thing.
-@@ -1742,7 +1743,7 @@
+@@ -1681,7 +1682,7 @@
file = self._file
pos1 = self._pos
file.seek(pos1)
@@ -149,7 +149,7 @@
if start < tid1:
--- a/src/ZODB/FileStorage/fspack.py
+++ b/src/ZODB/FileStorage/fspack.py
-@@ -54,7 +54,7 @@
+@@ -53,7 +53,7 @@
self._file.seek(pos - 8)
pos = pos - u64(self._file.read(8)) - 8
self._file.seek(pos)
@@ -160,10 +160,10 @@
return pos
--- a/src/ZODB/MappingStorage.py
+++ b/src/ZODB/MappingStorage.py
-@@ -190,7 +190,7 @@
+@@ -189,7 +189,7 @@
if not self._data:
return
-
+
- stop = `ZODB.TimeStamp.TimeStamp(*time.gmtime(t)[:5]+(t%60,))`
+ stop = ZODB.TimeStamp.TimeStamp(*time.gmtime(t)[:5]+(t%60,)).raw()
if self._last_pack is not None and self._last_pack >= stop:
@@ -171,7 +171,7 @@
return
--- a/src/ZODB/blob.py
+++ b/src/ZODB/blob.py
-@@ -438,7 +438,8 @@
+@@ -435,7 +435,8 @@
"""
oidpath = self.getPathForOID(oid)
@@ -181,7 +181,7 @@
dir=oidpath)
return fd, name
-@@ -828,7 +829,7 @@
+@@ -816,7 +817,7 @@
# The serial_id is assumed to be given to us base-64 encoded
# (belying the web UI legacy of the ZODB code :-()
@@ -234,7 +234,7 @@
if not ok:
--- a/src/ZODB/scripts/repozo.py
+++ b/src/ZODB/scripts/repozo.py
-@@ -250,7 +250,7 @@
+@@ -283,7 +283,7 @@
def concat(files, ofp=None):
@@ -256,7 +256,7 @@
factory, job, args, repeatp = jobs.next()
--- a/src/ZODB/tests/BasicStorage.py
+++ b/src/ZODB/tests/BasicStorage.py
-@@ -28,7 +28,7 @@
+@@ -32,7 +32,7 @@
import zope.interface
import zope.interface.verify
@@ -267,7 +267,7 @@
def checkBasics(self):
--- a/src/ZODB/tests/MVCCMappingStorage.py
+++ b/src/ZODB/tests/MVCCMappingStorage.py
-@@ -34,7 +34,7 @@
+@@ -30,7 +30,7 @@
def __init__(self, name="MVCC Mapping Storage"):
MappingStorage.__init__(self, name=name)
# _polled_tid contains the transaction ID at the last poll.
@@ -276,7 +276,7 @@
self._data_snapshot = None # {oid->(state, tid)}
self._main_lock_acquire = self._lock_acquire
self._main_lock_release = self._lock_release
-@@ -81,7 +81,7 @@
+@@ -77,7 +77,7 @@
if self._transactions:
new_tid = self._transactions.maxKey()
else:
@@ -298,7 +298,7 @@
Do a pack to the slightly before the first revision was written:
--- a/src/ZODB/tests/testFileStorage.py
+++ b/src/ZODB/tests/testFileStorage.py
-@@ -274,9 +274,9 @@
+@@ -272,9 +272,9 @@
self.open()
key = None
@@ -310,7 +310,7 @@
key = next_oid
expected_data, expected_tid = self._storage.load(oid, '')
self.assertEqual(expected_data, data)
-@@ -409,7 +409,7 @@
+@@ -432,7 +432,7 @@
# Raise an exception if the tids in FileStorage fs aren't
# strictly increasing.
def checkIncreasingTids(fs):
@@ -504,7 +504,7 @@
- return unittest.makeSuite(TimeStampTests, 'check')
--- a/src/ZODB/utils.py
+++ b/src/ZODB/utils.py
-@@ -67,7 +67,7 @@
+@@ -66,7 +66,7 @@
warnings.warn("This will be removed in ZODB 3.8:\n%s" % msg,
DeprecationWarning, stacklevel=3)
@@ -513,7 +513,7 @@
assert sys.hexversion >= 0x02030000
-@@ -118,7 +118,7 @@
+@@ -117,7 +117,7 @@
ts = TimeStamp(*time.gmtime(t)[:5]+(t%60,))
if old is not None:
ts = ts.laterThan(TimeStamp(old))
@@ -522,7 +522,7 @@
def oid_repr(oid):
-@@ -146,7 +146,7 @@
+@@ -145,7 +145,7 @@
# For example, produce
# '0x03441422948b4399 2002-04-14 20:50:34.815000'
Modified: zodb/trunk/debian/patches/series
===================================================================
--- zodb/trunk/debian/patches/series 2014-12-16 08:54:21 UTC (rev 2884)
+++ zodb/trunk/debian/patches/series 2014-12-16 09:01:05 UTC (rev 2885)
@@ -1,5 +1,4 @@
no-manuel.patch
persistent-module-4.x-compat.patch
-test-spurious-failure-under-python27.patch
testUtils.patch
new-transaction.patch
Deleted: zodb/trunk/debian/patches/test-spurious-failure-under-python27.patch
===================================================================
--- zodb/trunk/debian/patches/test-spurious-failure-under-python27.patch 2014-12-16 08:54:21 UTC (rev 2884)
+++ zodb/trunk/debian/patches/test-spurious-failure-under-python27.patch 2014-12-16 09:01:05 UTC (rev 2885)
@@ -1,97 +0,0 @@
-commit 987b67d402dba2b29121892cb8ffb668086dca66
-Author: Jim Fulton <jim at zope.com>
-Date: Sat Jul 10 19:10:52 2010 +0000
-
- Fixed spurious failure under Python 2.7
-
-commit bd415c7a5f2f1835351b8889a3f74393047c6d4f
-Author: Jim Fulton <jim at zope.com>
-Date: Sat Jul 10 19:10:51 2010 +0000
-
- Added a number of helpers.
-
---- a/src/ZODB/tests/testDB.py
-+++ b/src/ZODB/tests/testDB.py
-@@ -242,16 +242,10 @@
-
- def connection_allows_empty_version_for_idiots():
- r"""
-- >>> import sys, StringIO
-- >>> stderr = sys.stderr
-- >>> sys.stderr = StringIO.StringIO()
- >>> db = ZODB.DB('t.fs')
-- >>> c = db.open('')
-- >>> sys.stderr.getvalue() # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
-- '...: DeprecationWarning: A version string was passed to
-- open.\nThe first argument is a transaction manager...
--
-- >>> sys.stderr = stderr
-+ >>> c = ZODB.tests.util.assert_deprecated(
-+ ... (lambda : db.open('')),
-+ ... 'A version string was passed to open')
- >>> c.root()
- {}
- >>> db.close()
---- a/src/ZODB/tests/util.py
-+++ b/src/ZODB/tests/util.py
-@@ -16,6 +16,8 @@
- $Id: util.py 113733 2010-06-21 15:32:58Z ctheune $
- """
-
-+from __future__ import with_statement
-+
- from ZODB.MappingStorage import DB
-
- import atexit
-@@ -24,8 +26,12 @@
- import time
- import unittest
- import persistent
-+import sys
-+import time
- import transaction
-+import warnings
- import zope.testing.setupstack
-+import ZODB.utils
-
- def setUp(test, name='test'):
- transaction.abort()
-@@ -99,3 +105,38 @@
- def testNothing(self):
- pass
-
-+def assert_warning(category, func, warning_text=''):
-+ if sys.version_info < (2, 6):
-+ return func() # Can't use catch_warnings :(
-+
-+ with warnings.catch_warnings(record=True) as w:
-+ warnings.simplefilter('default')
-+ result = func()
-+ for warning in w:
-+ if ((warning.category is category)
-+ and (warning_text in str(warning.message))):
-+ return result
-+ raise AssertionError(w)
-+
-+def assert_deprecated(func, warning_text=''):
-+ return assert_warning(DeprecationWarning, func, warning_text)
-+
-+def wait(func=None, timeout=30):
-+ if func is None:
-+ return lambda f: wait(f, timeout)
-+ for i in xrange(int(timeout*100)):
-+ if func():
-+ return
-+ time.sleep(.01)
-+ raise AssertionError
-+
-+def store(storage, oid, value='x', serial=ZODB.utils.z64):
-+ if not isinstance(oid, str):
-+ oid = ZODB.utils.p64(oid)
-+ if not isinstance(serial, str):
-+ serial = ZODB.utils.p64(serial)
-+ t = transaction.get()
-+ storage.tpc_begin(t)
-+ storage.store(oid, serial, value, '', t)
-+ storage.tpc_vote(t)
-+ storage.tpc_finish(t)
More information about the pkg-zope-developers
mailing list