-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uuid(3|5) generation does not accept names which are not utf-8 decodable #94684
Comments
** Not a UUID expert here ** When looking at the RFC examples-
All examples can have a string equivilent. |
Looking at the source code of the function: Lines 704 to 711 in da49128
If you need to pass a bytes object as name you can decode it into a UTF-8 string with bytes.decode .Maybe the function could be modified to make it accept also bytes objects as the name argument.
|
Sorry for the confusion should have posted a better example. But as @MonadChains states, if We can with the current implementation for example create uuid3 with a |
I think there may be an issue with the definitions here, since |
I don't see a specification of |
@yourlefthandman The problem isn't that it's not solvable, one could just overwrite the uuid3 function to do what you want, it's a matter of reporting a possible improvement. |
RFC 4122 does not specify that name should be a string, so for completness the functions should also support a name given as a raw byte sequence.
Thanks, looks like this was completed |
…ython#94709) RFC 4122 does not specify that name should be a string, so for completness the functions should also support a name given as a raw byte sequence.
…ython#94709) RFC 4122 does not specify that name should be a string, so for completness the functions should also support a name given as a raw byte sequence.
From the documentation:
As far as I can tell from RFC4122, name being a string is not a requirement and therefore there are UUIDs which we cannot generate. Is this a bug or am I missing something from the RFC?
The text was updated successfully, but these errors were encountered: