Commit 1f369453 authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

IdTool: Handle group_id on python3 (nexedi/erp5!1980).

group_id is used as key of OOBtree and as documented, it's not possible to mix
keys that can not be compared, so we can not have a mix of string and bytes, for
consistency with other BTrees, such as the ones used for OFS.

group_id is also used in a SQL column which is BINARY, this is problematic on
py3 because the selected values will be returned as bytes, but we expect str
here. Because we don't want to run a data migration, we adjust the select
methods to convert to str while selecting.

Since years there was a warning that id_group must be a string, now we make it a
bit stricter, we also enforce that the id_group is valid UTF-8.

A few more tests and assertions were also added.
parent 874e3f4b
Pipeline #37444 passed with stage
in 0 seconds