Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !2172

Draft: add optional script to migrate data to py3

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Xiaowu Zhang requested to merge xiaowu.zhang/erp5:feat/py3_migrate_script into master Oct 08, 2025
  • Overview 7
  • Commits 1
  • Pipelines 0
  • Changes 3

follow https://lab.nexedi.com/nexedi/erp5/-/merge_requests/2145#note_243116

one approach to convert all object might be to have an external script reading all records from the ZODB and if the pickle data has some python2 STRING, load and save again the object for this oid. Once this external script does not find any STRING, it means we no longer need zodbupdate. I guess this could be a way, we can try this.

we already have enable_zodbupdate_load_monkey_patch , which performs on-the-fly migration. Therefore, this script is optional.

It reads all records from the ZODB, and if the pickle data contains Python 2 strings, it loads and saves the corresponding object for that OID to explicitly migrate it to Python 3.

After running it, all records should be migrated to Python 3, allowing the system to run without enable_zodbupdate_load_monkey_patch

Edited Oct 10, 2025 by Xiaowu Zhang
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feat/py3_migrate_script
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7