Commit 544b26a7 authored by Kirill Smelkov's avatar Kirill Smelkov

ZODB: Provide ZODB4-wc2 which backports MVCC approach from ZODB5

To always call loadBefore instead of load.
Wendelin.core 2 needs this - see nexedi/ZODB@8e7eab33 for details.

There is also ZEO4-wc2 which contains backports of ZEO5 patches that are
needed for wendelin.core 2 to work correctly.

Wendelin.core 2 will work with ZODB4-wc2 or ZODB5.
Wendelin.core 2 will not work with just ZODB4.
parent f9f36629
...@@ -71,3 +71,13 @@ egg_versions = ...@@ -71,3 +71,13 @@ egg_versions =
ZEO = 5.2.2 ZEO = 5.2.2
trollius = 2.2.post1 trollius = 2.2.post1
futures = 3.2.0 futures = 3.2.0
# ZEO4-wc2 is ZEO4 version with patches for wendelin.core 2 to work correctly.
# The patches are backports of what is in ZEO master (ZEO5), but since upstream
# considers 4 branch to be "dead", we have to maintain it by ourselves.
# See https://github.com/zopefoundation/ZEO/pull/161 for the reference.
[ZEO4-wc2]
<= ZEO4
revisions = bf80d23d3506
location = ${buildout:parts-directory}/ZEO4-wc2
...@@ -9,7 +9,7 @@ extends = ...@@ -9,7 +9,7 @@ extends =
parts = ZODB/scripts parts = ZODB/scripts
# ZODB allows to use either ZODB4 or ZODB5. # ZODB allows to use either ZODB4, ZODB4-wc2 or ZODB5.
# To select which version to use users should do: # To select which version to use users should do:
# #
# [ZODB] # [ZODB]
...@@ -65,6 +65,24 @@ egg_versions = ...@@ -65,6 +65,24 @@ egg_versions =
transaction = 2.4.0 transaction = 2.4.0
# ZODB4-wc2 is ZODB4 version with patches for wendelin.core 2 to work correctly.
# The main change is backport of the way MVCC is handled by always calling
# loadBefore instead of load.
# See https://lab.nexedi.com/nexedi/ZODB/commit/8e7eab33 for details.
[ZODB4-wc2]
<= ZODB4
recipe = zc.recipe.egg:develop
setup = ${ZODB4-wc2-repository:location}
[ZODB4-wc2-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/ZODB.git
git-executable = ${git:location}/bin/git
branch = 4-nxd+MVCC-load-before
revision = 4.4.5-9-g8e7eab330
location = ${buildout:parts-directory}/ZODB4-wc2
# XXX: buildout fails to install properly eggs with setup_requires # XXX: buildout fails to install properly eggs with setup_requires
[BTrees] [BTrees]
recipe = zc.recipe.egg:custom recipe = zc.recipe.egg:custom
......
# SlapOS software release to test ZODB4-wc2 on Nexedi testing infrastructure.
[buildout]
extends =
# test<X>.cfg configures ZODB.major=<X>.
../../stack/nxdtest.cfg
../pygolang/buildout.cfg
../python-manuel/buildout.cfg
buildout.cfg
../ZEO/buildout.cfg
parts =
ZODB
.nxdtest
# for instance
ZODB-python
slapos-cookbook
instance.cfg
[ZODB]
major = 4-wc2
[ZODB4-wc2-repository]
revision =
# we need persistent to be a git checkout because persistent tests want to
# discover in-tree files that are not present in persistent egg when it is
# installed in non-development mode:
#
# https://erp5.nexedi.net/test_result_module/20201123-3F859E35/7
# (look for "AssertionError: could not find my setup.py")
#
# https://github.com/zopefoundation/persistent/blob/4.6.4-0-g7ed95cf/persistent/tests/test_docs.py#L37-L43
[persistent]
recipe = zc.recipe.egg:develop
setup = ${persistent-repository:location}
[persistent-repository]
recipe = slapos.recipe.build:gitclone
location = ${buildout:parts-directory}/persistent
repository = https://github.com/zopefoundation/persistent.git
branch = master
revision = 4.6.4-0-g7ed95cf
git-executable = ${git:location}/bin/git
# test-dependent eggs that must come through in-tree recipes.
[ZODB]
depends += ${manuel:egg}
# bin/python is preinstalled with sys.path to ZODB & friends.
[ZODB-python]
<= python-interpreter
eggs +=
${ZODB:egg}[test]
${ZEO:egg}[test]
transaction[test]
# env.sh for ZODB's python to be on $PATH.
[ZODB-env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template = inline:
export PS1="(ZODB-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH
# .nxdtest to run ZODB tests
[.nxdtest]
<= jinja2-template
template = inline:
# determine where ZODB & friends were installed
from subprocess import check_output
_ = check_output(['python', '-c',
'from os.path import dirname\n'+
'def X(mod): m=__import__(mod); print(dirname(m.__file__))\n\n'+
'X("ZODB"); X("persistent"); X("BTrees"); X("transaction"), X("ZEO")'])
ZODB, persistent, BTrees, transaction, ZEO = _.split()
# run tests for whole ZODB stack
TestCase('ZODB/unit', ['python', '-m', 'zope.testrunner', '-uv', '--package-path', ZODB, 'ZODB'])
TestCase('ZODB/functional', ['python', '-m', 'zope.testrunner', '-fv', '--package-path', ZODB, 'ZODB'])
TestCase('ZEO/unit', ['python', '-m', 'zope.testrunner', '-uv', '--package-path', ZEO, 'ZEO'])
TestCase('ZEO/functional', ['python', '-m', 'zope.testrunner', '-fv', '--package-path', ZEO, 'ZEO'])
TestCase('persistent', ['python', '-m', 'zope.testrunner', '-v', '--package-path', persistent, 'persistent'])
TestCase('BTrees', ['python', '-m', 'zope.testrunner', '-v', '--package-path', BTrees, 'BTrees'])
# transaction uses unittest instead of zope.testrunner
import os.path
def P(path): return os.path.join(path, '..')
TestCase('transaction',['python', '-m', 'unittest', 'discover', '-s', P(transaction)])
# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
template = inline:
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
[runTestSuite]
env.sh = ${ZODB-env.sh:rendered}
workdir = ${buildout:directory}
[versions]
mock = 3.0.5
random2 = 1.0.1
zope.testing = 4.7
zope.testrunner = 5.2
zope.exceptions = 4.4
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