-
Couldn't load subscription status.
- Fork 15
Description
Context: "WIP python3: fix xmlunwrap and its test to align with the use of bytes" commit in #17 (current shortcut:
ydirson@d709c94).
This stems from functions getText() and getStrAttribute() calling str.encode() on the data they return, and this contaminates getMapAttribute(), whose keys must be the same type. Likely this causes no issue only because this module only ever manipulates pure-ASCII data in its xml files, which did not seem to warrant unicode usage. The commit referenced above shows how this becomes awkward in python3, having to manypulate byte objects.
Just removing the .encode() calls and switching the module to unicode_literals would make it clean, be would likely impact all client code making use of those 3 functions, which would have to be updated in lockstep. The only client modules identified for now are:
- https://github.com/xenserver/host-installer
xcp.repository(internal, so not an issue)
Suggested course of action: make this change in a separate branch, in parallel to required host-installer changes, prior to merging #17 so the latter can be updated accordingly.