forked from pool/python-ZEO
- added patches fix https://github.com/zopefoundation/ZEO/issues/184 + python-ZEO-no-mock.patch - - added patches fix https://github.com/zopefoundation/ZEO/issues/184 + python-ZEO-no-mock.patch - version update to 5.2.3 5.2.3 (2021-08-09) ------------------ - Ensure ``ZEO`` satisfies the ``ZODB >= 5.6`` requirement that ``lastTransaction()`` changes only after invalidation processing. Violating this requirement can lead to race conditions and associated data corruption `#166 <https://github.com/zopefoundation/ZEO/issues/166>`_. - Add automated tests against the ZODB ``master`` branch see `issue 177 <https://github.com/zopefoundation/ZEO/issues/177>`_. - Fix data corruption due to race between load and external invalidations. See `issue 155 <https://github.com/zopefoundation/ZEO/issues/155>`_. - Improve log message when client cache is out of sync with server. See `issue 142 <https://github.com/zopefoundation/ZEO/issues/142>`_. 5.2.2 (2020-08-11) ------------------ - Remove support for Python 3.4 - Provide proper CA test certificates to allow the SSL tests succeed for Py3 - Replace deprecated occurrences of ``Thread.isAlive()`` by ``Thread.is_alive()`` See `pull request 154 <https://github.com/zopefoundation/ZEO/pull/154>`_. OBS-URL: https://build.opensuse.org/request/show/921257 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ZEO?expand=0&rev=23
114 lines
3.5 KiB
Diff
114 lines
3.5 KiB
Diff
Index: ZEO-5.2.3/src/ZEO/tests/testZEO.py
|
|
===================================================================
|
|
--- ZEO-5.2.3.orig/src/ZEO/tests/testZEO.py 2021-04-29 11:25:08.000000000 +0200
|
|
+++ ZEO-5.2.3/src/ZEO/tests/testZEO.py 2021-09-24 11:27:58.067122104 +0200
|
|
@@ -80,7 +80,10 @@ class CreativeGetState(persistent.Persis
|
|
class Test_convenience_functions(unittest.TestCase):
|
|
|
|
def test_ZEO_client_convenience(self):
|
|
- import mock
|
|
+ try:
|
|
+ from unittest import mock as mock
|
|
+ except ImportError:
|
|
+ import mock
|
|
import ZEO
|
|
|
|
client_thread = mock.Mock(
|
|
@@ -90,7 +93,10 @@ class Test_convenience_functions(unittes
|
|
self.assertIsInstance(client, ClientStorage)
|
|
|
|
def test_ZEO_DB_convenience_ok(self):
|
|
- import mock
|
|
+ try:
|
|
+ from unittest import mock as mock
|
|
+ except ImportError:
|
|
+ import mock
|
|
import ZEO
|
|
|
|
client_mock = mock.Mock(spec=['close'])
|
|
@@ -108,7 +114,10 @@ class Test_convenience_functions(unittes
|
|
client_mock.close.assert_not_called()
|
|
|
|
def test_ZEO_DB_convenience_error(self):
|
|
- import mock
|
|
+ try:
|
|
+ from unittest import mock as mock
|
|
+ except ImportError:
|
|
+ import mock
|
|
import ZEO
|
|
|
|
client_mock = mock.Mock(spec=['close'])
|
|
@@ -126,7 +135,10 @@ class Test_convenience_functions(unittes
|
|
client_mock.close.assert_called_once()
|
|
|
|
def test_ZEO_connection_convenience_ok(self):
|
|
- import mock
|
|
+ try:
|
|
+ from unittest import mock as mock
|
|
+ except ImportError:
|
|
+ import mock
|
|
import ZEO
|
|
|
|
ret = object()
|
|
@@ -145,7 +157,10 @@ class Test_convenience_functions(unittes
|
|
DB_mock.close.assert_not_called()
|
|
|
|
def test_ZEO_connection_convenience_value(self):
|
|
- import mock
|
|
+ try:
|
|
+ from unittest import mock as mock
|
|
+ except ImportError:
|
|
+ import mock
|
|
import ZEO
|
|
|
|
DB_mock = mock.Mock(spec=[
|
|
Index: ZEO-5.2.3/src/ZEO/tests/testZEOServer.py
|
|
===================================================================
|
|
--- ZEO-5.2.3.orig/src/ZEO/tests/testZEOServer.py 2020-07-24 12:54:40.000000000 +0200
|
|
+++ ZEO-5.2.3/src/ZEO/tests/testZEOServer.py 2021-09-24 11:28:21.655258841 +0200
|
|
@@ -1,6 +1,9 @@
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock as mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import os
|
|
|
|
from ZEO._compat import PY3
|
|
Index: ZEO-5.2.3/src/ZEO/tests/testssl.py
|
|
===================================================================
|
|
--- ZEO-5.2.3.orig/src/ZEO/tests/testssl.py 2020-07-24 12:54:40.000000000 +0200
|
|
+++ ZEO-5.2.3/src/ZEO/tests/testssl.py 2021-09-24 11:28:36.887347135 +0200
|
|
@@ -1,9 +1,12 @@
|
|
from .._compat import PY3
|
|
|
|
-import mock
|
|
import os
|
|
import ssl
|
|
import unittest
|
|
+try:
|
|
+ from unittest import mock as mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from ZODB.config import storageFromString
|
|
|
|
from ..Exceptions import ClientDisconnected
|
|
Index: ZEO-5.2.3/src/ZEO/asyncio/tests.py
|
|
===================================================================
|
|
--- ZEO-5.2.3.orig/src/ZEO/asyncio/tests.py 2021-04-29 11:25:08.000000000 +0200
|
|
+++ ZEO-5.2.3/src/ZEO/asyncio/tests.py 2021-09-24 11:20:02.132363111 +0200
|
|
@@ -7,7 +7,10 @@ else:
|
|
|
|
from zope.testing import setupstack
|
|
from concurrent.futures import Future
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock as mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from ZODB.POSException import ReadOnlyError
|
|
from ZODB.utils import maxtid, RLock
|
|
|