Skip to content
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

Python uuids may not be persistent across time #76382

Closed
xdegaye mannequin opened this issue Dec 2, 2017 · 2 comments
Closed

Python uuids may not be persistent across time #76382

xdegaye mannequin opened this issue Dec 2, 2017 · 2 comments
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@xdegaye
Copy link
Mannequin

xdegaye mannequin commented Dec 2, 2017

BPO 32201
Nosy @warsaw, @vstinner, @ned-deily, @xdegaye, @serhiy-storchaka

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2017-12-02.16:02:05.256>
created_at = <Date 2017-12-02.15:44:11.590>
labels = ['3.7', 'invalid', 'type-bug', 'library']
title = 'Python uuids may not be persistent across time'
updated_at = <Date 2017-12-02.16:02:05.254>
user = 'https://github.com/xdegaye'

bugs.python.org fields:

activity = <Date 2017-12-02.16:02:05.254>
actor = 'xdegaye'
assignee = 'none'
closed = True
closed_date = <Date 2017-12-02.16:02:05.256>
closer = 'xdegaye'
components = ['Library (Lib)']
creation = <Date 2017-12-02.15:44:11.590>
creator = 'xdegaye'
dependencies = []
files = []
hgrepos = []
issue_num = 32201
keywords = []
message_count = 2.0
messages = ['307435', '307437']
nosy_count = 5.0
nosy_names = ['barry', 'vstinner', 'ned.deily', 'xdegaye', 'serhiy.storchaka']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue32201'
versions = ['Python 2.7', 'Python 3.6', 'Python 3.7']

@xdegaye
Copy link
Mannequin Author

xdegaye mannequin commented Dec 2, 2017

UUIDs are unique and persistent across time and space.

UUIDs generated using the getnode() function of the uuid module on a plaform where getnode() cannot use the MAC address are based on a random number created for that purpose and are therefore transient and only valid during the life time of the python process. This seems to be a bug.

My understanding of RFC 4122 is that in that case, the random number is generated only once, otherwise the usefulness of this method is not obvious. In any case the user should be made aware of the transientness of the result of getnode() since persistency is a key feature of UUIDs.

@xdegaye xdegaye mannequin added 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Dec 2, 2017
@xdegaye
Copy link
Mannequin Author

xdegaye mannequin commented Dec 2, 2017

Hum, I misunderstood the meaning of persistency in this context. It is the uniqueness that is persistent. Sorry for the noise, closing now.

@xdegaye xdegaye mannequin closed this as completed Dec 2, 2017
@xdegaye xdegaye mannequin added the invalid label Dec 2, 2017
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

0 participants