Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 145
    • Merge requests 145
  • 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
  • nexedi
  • erp5erp5
  • Merge requests
  • !2172

Open
Created Oct 08, 2025 by Xiaowu Zhang@xiaowu.zhangDeveloper
  • Report abuse
Report abuse

Draft: add optional script to migrate data to py3

  • Overview 7
  • Commits 1
  • Changes 3

follow !2145 (comment 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
Reviewer
Request review from
Time tracking
Source branch: feat/py3_migrate_script
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7