Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • Z zodbtools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 4
    • Merge requests 4
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • nexedinexedi
  • zodbtools
  • Merge requests
  • !34

test/gen_testdata: Require ZODB ≥ 5 explicitly

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Kirill Smelkov requested to merge kirr/zodbtools:y/testdata-z5 into master Apr 06, 2025
  • Overview 2
  • Commits 1
  • Changes 1

Zodbtools supports ZODB ≥ 4 so far (see e.g. c59a54ca "Drop support for ZODB3"). However running gen_testdata.py works only with ZODB5 and later as it currently fails on ZODB4:

(z4-dev) kirr@deca:~/src/wendelin/z/zodbtools/zodbtools/test$ python gen_testdata.py
Traceback (most recent call last):
  File "gen_testdata.py", line 70, in <module>
    from ZODB.Connection import TransactionMetaData
ImportError: cannot import name TransactionMetaData

We discussed this with Jérome and we think it is ok to require ZODB ≥ 5 for testdata generation because even with ZODB5 we generate all kinds of ZODB test data we care about and commit them to git:

py2: ZODB 4 and ZODB5 < 5.3     (pickle protocol 1)
py2: ZODB 5.3                   (pickle protocol 2)
py2: ZODB ≥ 5.4                 (pickle protocol 3)
py3: ZODB4 and ZODB5            (pickle protocol 3)

-> Add explicit check that ZODB is 5 or later when running the script to avoid any potential confusion with ImportError: cannot import name TransactionMetaData.

/discussed-at https://lab.nexedi.com/nexedi/zodbtools/-/merge_requests/21
/cc @jerome

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: y/testdata-z5
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7