Skip to content
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 calling bytes on serializer. #18

Merged
merged 2 commits into from
Jan 31, 2024
Merged

Fix calling bytes on serializer. #18

merged 2 commits into from
Jan 31, 2024

Conversation

mauritsvanrees
Copy link
Member

This got broken in commit eacd0f3, part of PR #13.

I saw this when using a checkout of `repoze.xmliter` and using `diazo` (from Plone).
Added test that throws an error without this fix:

```
>       self.assertTrue(b'<br />' in bytes(t))
E       TypeError: __bytes__ returned non-bytes (type str)
```
The code has been changed to support Python 3 only.
@mauritsvanrees
Copy link
Member Author

mauritsvanrees commented Jan 30, 2024

After this is approved and merged, a release would be welcome.
[Edit: oh, right, I can do this myself on PyPI.]

repoze/xmliter/serializer.py Show resolved Hide resolved
@tseaver tseaver merged commit 9675980 into master Jan 31, 2024
6 checks passed
@tseaver tseaver deleted the maurits-fix-bytes branch January 31, 2024 17:24
@tseaver
Copy link
Member

tseaver commented Jan 31, 2024

Released 1.0b1: https://pypi.org/project/repoze.xmliter/1.0b1/

@mauritsvanrees
Copy link
Member Author

Thanks!

With the previous release, in Plone I saw errors when trying to upgrade lxml to version 5. With the new release these should be gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants