Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Z zodbtools
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 4
    • Merge requests 4
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • nexedi
  • zodbtools
  • Merge requests
  • !34

Merged
Created Apr 06, 2025 by Kirill Smelkov@kirrOwner

test/gen_testdata: Require ZODB ≥ 5 explicitly

  • 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 !21 (closed)
/cc @jerome

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