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 141
    • Merge requests 141
  • 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
  • !2003

Merged
Created Oct 24, 2024 by Jérome Perrin@jeromeOwner

Formulator: repair FormToXML for py2

  • Overview 2
  • Commits 4
  • Pipelines 2
  • Changes 2

In 1b555dbf (py2/py3: Make Products code compatible with both python2 and python3 (!1751)., 2024-07-16) we changed the code in a way that on python2 it would first node text to a python2 str and only later convert it to unicode, but setting text to a str during the first step can fail with:

ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

This change to set directly unicode on py2.

At the same time, fix a bug discovered with the test, groups with non-ascii names could not be serialized on py2.

Also remove unnecessary if six.PY3: ret = bytes2str(bytes), bytes2str is no-op on py2

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix/form_to_xml_py2
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7