Opened 70 minutes ago
#856 new enhancement
Python (and possibly other) bindings could return a real string for database UUIDs
| Reported by: | James Aylett | Owned by: | Richard Boulton |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | Xapian-bindings (Python) | Version: | |
| Severity: | minor | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: | Operating System: | All |
Description
Document.get_uuid() in the python bindings returns as bytes, which is the correct representation for std::string in general. However we know that this will always be a UUID (serialised as ASCII I think). We could change .get_uuid() to return str. It would be backwards incompatible, but there may not be enough people actually using it for that to be a problem.
We could also turn this into a property, so it's accessed as .uuid. I can't remember it it's possible to have both .uuid giving the new behaviour and a (perhaps deprecated) .get_uuid() giving the old.
Or this may be completely unnecessary given it can be worked round in user code and I doubt anyone else has even thought about this from a bindings consumer.
