forked from pool/python-ZEO
Accepting request 1076889 from home:pgajdos:python
- version update to 5.4.0
* Reimplement and streamline the asyncio part of the ClientStorage implementation.
* Remove support for interoperability with ZEO4 server.
* If the zeopack script cannot connect to a server it sets exit status 1 See #214.
* Remove asyncio/mtacceptor module.
* Add support for Python 3.10, 3.11.
* Add ConflictError to the list of unlogged server exceptions.
- do not require six
- modified patches
% python-ZEO-no-mock.patch (refreshed)
- added patches
fix d0f0709ac6
+ python-ZEO-no-six.patch
OBS-URL: https://build.opensuse.org/request/show/1076889
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ZEO?expand=0&rev=28
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
Index: ZEO-5.2.3/src/ZEO/tests/testZEO.py
|
||||
Index: ZEO-5.4.0/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
|
||||
--- ZEO-5.4.0.orig/src/ZEO/tests/testZEO.py
|
||||
+++ ZEO-5.4.0/src/ZEO/tests/testZEO.py
|
||||
@@ -83,7 +83,10 @@ class CreativeGetState(persistent.Persis
|
||||
class Test_convenience_functions(unittest.TestCase):
|
||||
|
||||
def test_ZEO_client_convenience(self):
|
||||
@@ -14,8 +14,8 @@ Index: ZEO-5.2.3/src/ZEO/tests/testZEO.py
|
||||
import ZEO
|
||||
|
||||
client_thread = mock.Mock(
|
||||
@@ -90,7 +93,10 @@ class Test_convenience_functions(unittes
|
||||
self.assertIsInstance(client, ClientStorage)
|
||||
@@ -95,7 +98,10 @@ class Test_convenience_functions(unittes
|
||||
client._cache.close() # client thread responsibility
|
||||
|
||||
def test_ZEO_DB_convenience_ok(self):
|
||||
- import mock
|
||||
@@ -26,7 +26,7 @@ Index: ZEO-5.2.3/src/ZEO/tests/testZEO.py
|
||||
import ZEO
|
||||
|
||||
client_mock = mock.Mock(spec=['close'])
|
||||
@@ -108,7 +114,10 @@ class Test_convenience_functions(unittes
|
||||
@@ -113,7 +119,10 @@ class Test_convenience_functions(unittes
|
||||
client_mock.close.assert_not_called()
|
||||
|
||||
def test_ZEO_DB_convenience_error(self):
|
||||
@@ -38,7 +38,7 @@ Index: ZEO-5.2.3/src/ZEO/tests/testZEO.py
|
||||
import ZEO
|
||||
|
||||
client_mock = mock.Mock(spec=['close'])
|
||||
@@ -126,7 +135,10 @@ class Test_convenience_functions(unittes
|
||||
@@ -131,7 +140,10 @@ class Test_convenience_functions(unittes
|
||||
client_mock.close.assert_called_once()
|
||||
|
||||
def test_ZEO_connection_convenience_ok(self):
|
||||
@@ -50,7 +50,7 @@ Index: ZEO-5.2.3/src/ZEO/tests/testZEO.py
|
||||
import ZEO
|
||||
|
||||
ret = object()
|
||||
@@ -145,7 +157,10 @@ class Test_convenience_functions(unittes
|
||||
@@ -150,7 +162,10 @@ class Test_convenience_functions(unittes
|
||||
DB_mock.close.assert_not_called()
|
||||
|
||||
def test_ZEO_connection_convenience_value(self):
|
||||
@@ -62,10 +62,10 @@ Index: ZEO-5.2.3/src/ZEO/tests/testZEO.py
|
||||
import ZEO
|
||||
|
||||
DB_mock = mock.Mock(spec=[
|
||||
Index: ZEO-5.2.3/src/ZEO/tests/testZEOServer.py
|
||||
Index: ZEO-5.4.0/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
|
||||
--- ZEO-5.4.0.orig/src/ZEO/tests/testZEOServer.py
|
||||
+++ ZEO-5.4.0/src/ZEO/tests/testZEOServer.py
|
||||
@@ -1,6 +1,9 @@
|
||||
import unittest
|
||||
|
||||
@@ -74,13 +74,13 @@ Index: ZEO-5.2.3/src/ZEO/tests/testZEOServer.py
|
||||
+ 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
|
||||
from ZEO.runzeo import ZEOServer
|
||||
Index: ZEO-5.4.0/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
|
||||
--- ZEO-5.4.0.orig/src/ZEO/tests/testssl.py
|
||||
+++ ZEO-5.4.0/src/ZEO/tests/testssl.py
|
||||
@@ -1,9 +1,12 @@
|
||||
from .._compat import PY3
|
||||
|
||||
@@ -95,19 +95,19 @@ Index: ZEO-5.2.3/src/ZEO/tests/testssl.py
|
||||
from ZODB.config import storageFromString
|
||||
|
||||
from ..Exceptions import ClientDisconnected
|
||||
Index: ZEO-5.2.3/src/ZEO/asyncio/tests.py
|
||||
Index: ZEO-5.4.0/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:
|
||||
--- ZEO-5.4.0.orig/src/ZEO/asyncio/tests.py
|
||||
+++ ZEO-5.4.0/src/ZEO/asyncio/tests.py
|
||||
@@ -12,7 +12,10 @@ else:
|
||||
|
||||
from zope.testing import setupstack
|
||||
from concurrent.futures import Future
|
||||
from unittest import TestCase
|
||||
-import mock
|
||||
+try:
|
||||
+ from unittest import mock as mock
|
||||
+except ImportError:
|
||||
+ import mock
|
||||
from ZODB.POSException import ReadOnlyError
|
||||
from ZODB.utils import maxtid, RLock
|
||||
|
||||
import collections
|
||||
|
||||
Reference in New Issue
Block a user