Commit 0802da2b authored by Kirill Smelkov's avatar Kirill Smelkov

Drop support for ZODB3

It's been a while since last ZODB3 3.10.7 release in 2016 and the last
commit in upstream ZODB3 repository (3.10 branch) is from 2017. The
world switched since then to ZODB4 and to ZODB5 after that.

We were still requiring ZODB3, because ZODB3 3.11 egg was just a
dependency on newer ZODB, ZEO, BTrees and persistent; and this way we
could be supporting all ZODB3.10.x and  ZODB4 and ZODB5 via ZODB3.11.

However upcoming Wendelin.core 2, for its proper working, needs MVCC
semantic as implemented in ZODB5. This forces us, even for ZODB4, to
backport non-trivial bits from ZODB5 (see [1]). Maintaining ZODB3
support at this point becomes non-practical, because, to our knowledge,
there is no wendelin.core user that plans to continue using ZODB3
without switching to at least ZODB4 in the near future.

So goodbye ZODB3. Even though ZODB still stays with us, it gives a
feeling similar to [2], because in 2014, when I was myself learning
ZODB, it was through ZODB3 - still at the time when all ZODB bits were
living together in one place.

[1] nexedi/ZODB!1
[2] https://lists.osuosl.org/pipermail/darcs-users/2008-September/014095.html
parent fd6b5252
# Wendelin.core.bigfile | Tests for ZODB utilities
# Copyright (C) 2014-2020 Nexedi SA and Contributors.
# Copyright (C) 2014-2021 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
......@@ -232,7 +232,7 @@ def test_deactivate_btree():
# verify that zconn_at gives correct answer.
@xfail(zmajor < 5, reason="zconn_at is TODO for ZODB4 and ZODB3")
@xfail(zmajor < 5, reason="zconn_at is TODO for ZODB4")
@func
def test_zconn_at():
stor = testdb.getZODBStorage()
......@@ -308,7 +308,7 @@ def test_zconn_at():
# verify that ZODB.Connection.onResyncCallback works
@xfail(zmajor < 5, reason="ZODB.Connection.onResyncCallback is TODO for ZODB4 and ZODB3")
@xfail(zmajor < 5, reason="ZODB.Connection.onResyncCallback is TODO for ZODB4")
@func
def test_zodb_onresync():
stor = testdb.getZODBStorage()
......
# Wendelin.bigfile | common ZODB-related helpers
# Copyright (C) 2014-2020 Nexedi SA and Contributors.
# Copyright (C) 2014-2021 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
......@@ -197,7 +197,7 @@ def zconn_at(zconn): # -> tid
# ZODB3
else:
raise AssertionError("zconn_at: TODO: add support for ZODB3")
raise AssertionError("zconn_at: ZODB3 is not supported anymore")
# before2at converts tid that specifies database state as "before" into tid that
......@@ -267,8 +267,10 @@ ZODB.Connection.Connection.open = Connection_open
# patch for ZODB.Connection to support callback on after database view is changed
ZODB.Connection.Connection._onResyncCallbacks = None
def Connection_onResyncCallback(self, f):
if zmajor <= 4:
raise AssertionError("onResyncCallback: TODO: add support for ZODB34")
if zmajor <= 3:
raise AssertionError("onResyncCallback: ZODB3 is not supported anymore")
if zmajor == 4:
raise AssertionError("onResyncCallback: TODO: add support for ZODB4")
if self._onResyncCallbacks is None:
# NOTE WeakSet does not work for bound methods - they are always created
# anew for each obj.method access, and thus will go away almost immediately
......@@ -299,9 +301,9 @@ elif zmajor == 4:
pass # raises in onResyncCallback
# ZODB3: TODO
# ZODB3
else:
pass # raises in onResyncCallback
raise AssertionError("ZODB3 is not supported anymore")
......
# Wendelin.core | pythonic package setup
# Copyright (C) 2014-2020 Nexedi SA and Contributors.
# Copyright (C) 2014-2021 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
......@@ -247,11 +247,7 @@ setup(
install_requires = [
'numpy', # BigArray + its children
# for ZBigFile / ZBigArray
# ( NOTE: ZODB3 3.11 just pulls in latest ZODB _4_, so this way
# specifying ZODB _3_ we allow external requirements to
# specify either to use e.g. ZODB3.10 or ZODB4 )
'ZODB3 >= 3.10',
'ZODB >= 4', # for ZBigFile / ZBigArray
'pygolang >= 0.0.2', # defer, sync.WaitGroup, ...
......
# wendelin.core | tox setup
[tox]
envlist = py27-{ZODB3,ZODB4,ZODB5}-{zblk0,zblk1}-{fs,zeo,neo}-{numpy115,numpy116},
envlist = py27-{ZODB4,ZODB5}-{zblk0,zblk1}-{fs,zeo,neo}-{numpy115,numpy116},
{py36,py37}-{ZODB4,ZODB5}-{zblk0,zblk1}-fs-{numpy115,numpy116},
py36-{ZODB4,ZODB5}-{zblk0,zblk1}-zeo-{numpy115,numpy116},
py37-ZODB5-{zblk0,zblk1}-zeo-{numpy115,numpy116}
# (NOTE ZODB3 does not work on python3)
# (NOTE ZEO4 does not work with python3.7)
# (NOTE NEO does not work on python3 at all)
# (XXX ZODB5-*-neo are currently failing)
......@@ -13,13 +12,6 @@ envlist = py27-{ZODB3,ZODB4,ZODB5}-{zblk0,zblk1}-{fs,zeo,neo}-{numpy115,numpy116
deps =
.[test]
# latest ZODB from 3 series
ZODB3: ZODB3 >=3.10, <3.11dev
ZODB3: transaction <2.0dev
# ZConfig 3.2.0 passes filename to ZEO config as unicode which eventualy breaks in FileStorage:
# https://github.com/zopefoundation/ZODB/blob/3.10.7-4-gb8d7a8567/src/ZODB/FileStorage/FileStorage.py#L1640
ZODB3: ZConfig <3.2.0
# latest current ZODB _4_
ZODB4: ZODB >=4.0, <5.0dev
ZODB4: ZEO >=4.0, <5.0dev
......
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