Re: [Mailman-Developers] mailman.client and UUIDs for user.user_id
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 10/29/2014 05:27 PM, Aurelien Bompard wrote:
Hi Florian!
I think mailmanclient should not expose a different value as the REST API does (the fact that it's an int representation of a uuid isn't exactly obvious from the outside, so a non-explicit conversion could potentially lead to some confusion).
Hmm, to me the current situation is more confusing, since the user_id property I get from the REST API is different from the one I find in the database.
Yeah, I know what you mean. From a Mailman-developer's view that *is* confusing.
But the view of non-MM dev, who is just a user of mailmanclient and/or the REST API (and doesn't know the innards of Mailman's database) might be different. If the user_id value changes depending on whether you are using the API directly via HTTP or through mailmanclient, that might be hard to understand.
I guess it depends on the reason the UUID is serialized. If it's to avoid being messed up during the transport, it's a transport issue and I think the library should convert it back (but the original ascii string should not be a problem so it's probably not that. Anyone remembers why the REST API exposes the int value instead of the string? It happened in commit 7043 but the reason is not given in the commit message.
Good question. @Barry...?
But how about we add a
uuid
property to the user object which exposes the original uuid value?Not sure that's useful, converting it back to an UUID is easy enough ( uuid.UUID(int=value) )
OK ;-)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEcBAEBAgAGBQJUURfsAAoJEEceGbPdavl7IxcIAKSp3XQdIW7jyzO67cqsf2+O Q7hXqttQdXCxYriu/BfihOrc+REVihMnE78Hb2JRq/mTc1Waa7wHIEQyM9SAUB+A 9y+oZb75GHrVPONNd89Xs5PODpyjOuFLrg+no4zHRr/CTrH6wgLrQC5EoNgjQsla dN25XAvVNGt2x9uJqLiaETwj7nE++wE8SdlhOlVT+PDZfktPPztCfO4n7TzV2BlU eTUNAxqMKaypd3IjpXpsY8tFUMQKJmilqaja2vXjk067KskPPD48C2CAcSybpWbC LOp8KWW3Uhxi+eHyLWvaqP24MbE92ic5TOmVVVK6926pPAs1uUM7PjR72Xk6dIA= =as2h -----END PGP SIGNATURE-----
If the user_id value changes depending on whether you are using the API directly via HTTP or through mailmanclient, that might be hard to understand.
Ah, very good point. I'll do the conversion myself then I guess.
A.
participants (2)
-
Aurelien Bompard
-
Florian Fuchs