-
Notifications
You must be signed in to change notification settings - Fork 12
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
GenericSetup tests fail under Zope 5.3. #109
Comments
Confirmed. When I use a Zope checkout and revert Zope commit f30212ef52d3211bd305eafc058f4bda0f9b4af8, the GenericSetup tests pass again. cc @jugmac00 who added this commit. |
Yes, this is my change, see also announced at https://zope.readthedocs.io/en/latest/changes.html#id1 It was agreed upon that the old behavior (field2lines returned a list of bytes) is a bug in zopefoundation/Zope#962 as it both did not work as the other converters and also did not work as documented. Then, during the last sprint we discussed this issue again at the standup and it was decided to align the code. I certainly grepped the zopefoundation repositories beforehands, but there are no callers of field2line - but obviously it is used via its alias/mapping From reading the documentation, I was not aware that those converters were also used outside of e.g.web forms. The new behavior of the converters is correct, and aligned to the others, and thus here to stay I guess. Unfortunately, I have no knowledge about @mauritsvanrees, on PyPI I saw you are a maintainer of Certainly another problem surfaced here... there was a breaking change four weeks ago, and we just noticed now. I am not sure why the tests were green until a couple of days ago (https://github.com/zopefoundation/Products.GenericSetup/actions). I am sorry, @mauritsvanrees, I cannot help here. |
I think this is where we need changes in Products.GenericSetup: Products.GenericSetup/src/Products/GenericSetup/utils.py Lines 803 to 813 in a557e16
This is also the place which had been updated 3 years ago, when it was decided to let |
In earlier Zope versions, lines had bytes. Also, if nothing has been done, those bytes are still in the Data.fs, also under Zope 5.3. So we have to take care in our code to run the proper conversions when importing. Fixes #109
Slowly, times are coming to drop Python 2.7 support? At least, I get the impression if I read the bloated code in the linked PR. |
After the end of 2021 Zope 4 will no longer receive bug fixes. So probably Python 2 support can be dropped in 2022. |
I have released this in 2.1.4. |
I first saw this in a Plone 6 test run when I switch from Zope 5.2.1 to 5.3.
Sample failure locally with GenericSetup tox:
So there is a mixup between bytes and strings.
With tox, the Python 2.7 and 3.5 tests pass, because they use Zope 4.x.
On the newer Pythons, 6 tests fail. They pass when I change
buildout.cfg
to extend the Zope 5.2.1versions.cfg
.When I edit
tox.ini
to let Python 3.6, 3.7 and 3.8 use Zope4 (buildout4.cfg
) those tests pass.The failure above is for this line. The test imports
_NOPURGE_IMPORT
Ignoring the test failure for
lines3
for a moment, let's look at what happens with thelines1
field. I think the following is a bit suspicious:getProperty
, you indeed get a tuple of strings.getProperty
gives a tuple of bytes.I don't know yet if this is a problem in practice, or if the tests just need to be fixed.
I wonder what changed in Zope 5.3 for this. Maybe zopefoundation/Zope#962 is involved.
The text was updated successfully, but these errors were encountered: