New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix migration documentation #661
Conversation
The main change is not to convert the ZODB in Python 2 as this is not the preferred way and the second attempt in Python 3 will fail because the ZODB is already converted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Omitting the ZODB migration step under Zope 4/Python 2 will not work for an older ZODB from Zope 2.13, which is my use case. Zope 4/Python 3 will refuse to open that ZODB because the magic marker is too old. The migration step under Zope 4/Python 2 will update the magic marker.
P.S.: And the migration under Python 3 does not fail, unless something in zodbupdate has changed radically in the last 2-3 weeks. I think I ran through that procedure about 2 weeks ago and it worked as I documented it with a ZODB from Zope 2.13.26. |
@dataflake That's strange. The removed Calling it again from Python 3 should lead to the error that the magic marker is not compatible as the ZODB is already converted. So this step is not necessary if the conversion is already done using Python 2. The documentation of I personally converted a |
Have you run through that procedure recently? I just tested it in a local sandbox with an actual production ZODB from Zope 2.13 in a sandbox using Zope 4/Python 3.7 as per your shortened instructions and the I don't see how this can work at all when you run just a single
|
I have spent some time on this and tried to somehow monkey-patch the expected Data.fs magic number into the code at runtime if specific conditions are met (dry run, Python 3), but have not managed a way to do it. So for the migration instructions, the only rough outline I can suggest is the following: UNDER PYTHON 2:
UNDER PYTHON 3:
|
P.S.: As I couldn't find a way to beat the ZODB code into submission by monkeypatching it during the |
@icemac I have updated your branch and removed the dry-run step on Python 3, with a note added why. I also added a step to remove the ZODB index file before running the conversion, I am seeing consistent tracebacks that don't affect the conversion, but they are annoying. This may be ready for merging now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go I think
Thank you! |
The main change is not to convert the ZODB in Python 2 as this is not the preferred way and the second attempt in Python 3 will fail because the ZODB is already converted.