Commit c499ea7d authored by Jim Fulton's avatar Jim Fulton Committed by GitHub

Merge pull request #74 from zopefoundation/ZEO5

Zeo 5
parents bc92bdd7 787cb615
...@@ -5,20 +5,31 @@ matrix: ...@@ -5,20 +5,31 @@ matrix:
- os: linux - os: linux
python: 2.7 python: 2.7
- os: linux - os: linux
python: 3.3 python: 3.4
- os: linux
python: 3.5
- os: linux - os: linux
python: 3.4 python: 3.4
env: ZEO_MTACCEPTOR=1
- os: linux
python: 3.5
env: ZEO_MTACCEPTOR=1
- os: linux
python: 2.7
env: ZEO4_SERVER=1
- os: linux - os: linux
python: 3.5 python: 3.5
env: ZEO4_SERVER=1
- os: linux - os: linux
python: pypy python: 3.5
env: BUILOUT_OPTIONS=extra=,uvloop
install: install:
- pip install zc.buildout - pip install zc.buildout
- buildout - buildout $BUILOUT_OPTIONS
cache: cache:
directories: directories:
- eggs - eggs
script: script:
- bin/test -v1 -j99 - bin/test -v1j99
notifications: notifications:
email: false email: false
Changelog Changelog
========= =========
4.3.0 (2016-08-02) - Added a ``ClientStorage`` ``server-sync`` configuration option and
------------------ ``server_sync`` constructor argument to force a server round trip at
the beginning of transactions to wait for any outstanding
invalidations at the start of the transaction to be delivered.
- Refuse to work with ZODB 5. - When creating an ad hoc server, a log file isn't created by
default. You must pass a ``log`` option specifying a log file name.
Some recent cleanups in the ZODB commit protocol are incompatible with ZEO 4. - The ZEO server register method now returns the storage last
transaction, allowing the client to avoid an extra round trip during
cache verification.
- Fix ZEO cache tracing on Python 3. - Client disconnect errors are now transient errors. When
applications retry jobs that raise transient errors, jobs (e.g. web
requests) with disconnect errors will be retried. Together with
blocking synchronous ZEO server calls for a limited time while
disconnected, this change should allow brief disconnections due to
server restart to avoid generating client-visible errors (e.g. 500
web responses).
4.2.1 (2016-06-30) - Fixed bugs in using the ZEO 5 client with ZEO 4 servers.
------------------
5.0.0a2 (2016-07-30)
--------------------
- Added the ability to pass credentials when creating client storages.
This is experimental in that passing credentials will cause
connections to an ordinary ZEO server to fail, but it facilitates
experimentation with custom ZEO servers. Doing this with custom ZEO
clients would have been awkward due to the many levels of
composition involved.
In the future, we expect to support server security plugins that
consume credentials for authentication (typically over SSL).
Note that credentials are opaque to ZEO. They can be any object with
a true value. The client mearly passes them to the server, which
will someday pass them to a plugin.
5.0.0a1 (2016-07-21)
--------------------
- Added a ClientStorage prefetch method to prefetch oids.
When oids are prefetched, requests are made at once, but the caller
doesn't block waiting for the results. Rather, then the caller
later tries to fetch data for one of the object ids, it's either
delivered right away from the ZEO cache, if the prefetch for the
object id has completed, or the caller blocks until the inflight
prefetch completes. (No new request is made.)
- Fixed: SSL clients of servers with signed certs didn't load default
certs and were unable to connect.
5.0.0a0 (2016-07-08)
--------------------
This is a major ZEO revision, which replaces the ZEO network protocol
implementation.
New features:
- SSL support
- Optional client-side conflict resolution.
- Lots of mostly internal clean ups.
Dropped features:
- The ZEO authentication protocol.
This will be replaced by new authentication mechanims leveraging SSL.
- The ZEO monitor server.
- Full cache verification.
- Client suppprt for servers older than ZODB 3.9
- Fix bug connecting to ``localhost`` on Windows. (#8). - Server support for clients older than ZEO 4.2.0
4.2.0 (2016-06-15) 4.2.0 (2016-06-15)
------------------ ------------------
......
This diff is collapsed.
ZEO networking implemention based on asyncio to-dos
===================================================
First iteration, client only
----------------------------
- socketless tests for protocol and adapters
- Disconnect/reconnect strategy
- Integration with ClientStorage
Second iteration, server
------------------------
TBD after client release.
...@@ -4,6 +4,7 @@ parts = ...@@ -4,6 +4,7 @@ parts =
test test
scripts scripts
versions = versions versions = versions
extra =
[versions] [versions]
...@@ -11,7 +12,7 @@ versions = versions ...@@ -11,7 +12,7 @@ versions = versions
[test] [test]
recipe = zc.recipe.testrunner recipe = zc.recipe.testrunner
eggs = eggs =
ZEO [test] ZEO [test${buildout:extra}]
initialization = initialization =
import os, tempfile import os, tempfile
try: os.mkdir('tmp') try: os.mkdir('tmp')
...@@ -21,6 +22,5 @@ defaults = ['--all'] ...@@ -21,6 +22,5 @@ defaults = ['--all']
[scripts] [scripts]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs = ${test:eggs}
ZEO [test]
interpreter = py interpreter = py
This diff is collapsed.
...@@ -11,31 +11,44 @@ ...@@ -11,31 +11,44 @@
# FOR A PARTICULAR PURPOSE. # FOR A PARTICULAR PURPOSE.
# #
############################################################################## ##############################################################################
version = '5.0.0a2'
version = '4.3.0'
from setuptools import setup, find_packages from setuptools import setup, find_packages
import os import os
import sys import sys
if sys.version_info < (2, 7): if sys.version_info < (2, 7, 9):
print("This version of ZEO requires Python 2.7 or higher") print("This version of ZEO requires Python 2.7.9 or higher")
sys.exit(0) sys.exit(0)
if (3, 0) < sys.version_info < (3, 3): if (3, 0) < sys.version_info < (3, 4):
print("This version of ZEO requires Python 3.3 or higher") print("This version of ZEO requires Python 3.4 or higher")
sys.exit(0) sys.exit(0)
install_requires = [
'ZODB >= 5.0.0a5',
'six',
'transaction >= 1.6.0',
'persistent >= 4.1.0',
'zc.lockfile',
'ZConfig',
'zdaemon',
'zope.interface',
]
tests_require = ['zope.testing', 'manuel', 'random2', 'mock']
classifiers = """\ if sys.version_info[:2] < (3, ):
install_requires.extend(('futures', 'trollius'))
classifiers = """
Intended Audience :: Developers Intended Audience :: Developers
License :: OSI Approved :: Zope Public License License :: OSI Approved :: Zope Public License
Programming Language :: Python
Programming Language :: Python :: 2 Programming Language :: Python :: 2
Programming Language :: Python :: 2.7 Programming Language :: Python :: 2.7
Programming Language :: Python :: 3 Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy Programming Language :: Python :: Implementation :: PyPy
Topic :: Database Topic :: Database
...@@ -43,7 +56,7 @@ Topic :: Software Development :: Libraries :: Python Modules ...@@ -43,7 +56,7 @@ Topic :: Software Development :: Libraries :: Python Modules
Operating System :: Microsoft :: Windows Operating System :: Microsoft :: Windows
Operating System :: Unix Operating System :: Unix
Framework :: ZODB Framework :: ZODB
""" """.strip().split('\n')
def _modname(path, base, name=''): def _modname(path, base, name=''):
if path == base: if path == base:
...@@ -96,8 +109,6 @@ def alltests(): ...@@ -96,8 +109,6 @@ def alltests():
_unittests_only(suite, mod.test_suite()) _unittests_only(suite, mod.test_suite())
return suite return suite
tests_require = ['zope.testing', 'manuel', 'random2']
long_description = ( long_description = (
open('README.rst').read() open('README.rst').read()
+ '\n' + + '\n' +
...@@ -114,20 +125,11 @@ setup(name="ZEO", ...@@ -114,20 +125,11 @@ setup(name="ZEO",
package_dir = {'': 'src'}, package_dir = {'': 'src'},
license = "ZPL 2.1", license = "ZPL 2.1",
platforms = ["any"], platforms = ["any"],
classifiers = filter(None, classifiers.split("\n")), classifiers = classifiers,
test_suite="__main__.alltests", # to support "setup.py test" test_suite="__main__.alltests", # to support "setup.py test"
tests_require = tests_require, tests_require = tests_require,
extras_require = dict(test=tests_require), extras_require = dict(test=tests_require, uvloop=['uvloop >=0.5.1']),
install_requires = [ install_requires = install_requires,
'ZODB >= 4.2.0b1, <4.999',
'six',
'transaction',
'persistent >= 4.1.0',
'zc.lockfile',
'ZConfig',
'zdaemon',
'zope.interface',
],
zip_safe = False, zip_safe = False,
entry_points = """ entry_points = """
[console_scripts] [console_scripts]
......
This diff is collapsed.
...@@ -13,16 +13,31 @@ ...@@ -13,16 +13,31 @@
############################################################################## ##############################################################################
"""Exceptions for ZEO.""" """Exceptions for ZEO."""
import transaction.interfaces
from ZODB.POSException import StorageError from ZODB.POSException import StorageError
class ClientStorageError(StorageError): class ClientStorageError(StorageError):
"""An error occurred in the ZEO Client Storage.""" """An error occurred in the ZEO Client Storage.
"""
class UnrecognizedResult(ClientStorageError): class UnrecognizedResult(ClientStorageError):
"""A server call returned an unrecognized result.""" """A server call returned an unrecognized result.
"""
class ClientDisconnected(ClientStorageError): class ClientDisconnected(ClientStorageError,
"""The database storage is disconnected from the storage.""" transaction.interfaces.TransientError):
"""The database storage is disconnected from the storage.
"""
class AuthError(StorageError): class AuthError(StorageError):
"""The client provided invalid authentication credentials.""" """The client provided invalid authentication credentials.
"""
class ProtocolError(ClientStorageError):
"""A client contacted a server with an incomparible protocol
"""
class ServerException(ClientStorageError):
"""
"""
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
from .._compat import PY3
if PY3:
import asyncio
try:
from uvloop import new_event_loop
except ImportError:
from asyncio import new_event_loop
else:
import trollius as asyncio
from trollius import new_event_loop
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<import package="ZODB"/> <import package="ZODB"/>
<!-- Use the ZEO server information structure. --> <!-- Use the ZEO server information structure. -->
<import package="ZEO"/> <import package="ZEO" file="server.xml" />
<import package="ZConfig.components.logger"/> <import package="ZConfig.components.logger"/>
......
...@@ -500,7 +500,8 @@ def days(f): ...@@ -500,7 +500,8 @@ def days(f):
minute(f, 10, detail=0) minute(f, 10, detail=0)
new_connection_idre = re.compile(r"new connection \('(\d+.\d+.\d+.\d+)', (\d+)\):") new_connection_idre = re.compile(
r"new connection \('(\d+.\d+.\d+.\d+)', (\d+)\):")
def verify(f): def verify(f):
f, = f f, = f
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment