Visitar URL original
Docs for uuid don't mention that uuid1 can repeat in some circumstances · Issue #77726 · python/cpython · GitHub
Skip to content

Docs for uuid don't mention that uuid1 can repeat in some circumstances #77726

Description

@merelymoray
BPO 33545
Nosy @tirkarthi

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 = None
created_at = <Date 2018-05-16.17:32:45.837>
labels = ['type-feature', 'docs']
title = "Docs for uuid don't mention that uuid1 can repeat in some circumstances"
updated_at = <Date 2018-09-20.11:37:09.831>
user = 'https://bugs.python.org/merelymoray'

bugs.python.org fields:

activity = <Date 2018-09-20.11:37:09.831>
actor = 'xtreak'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2018-05-16.17:32:45.837>
creator = 'merelymoray'
dependencies = []
files = []
hgrepos = []
issue_num = 33545
keywords = []
message_count = 1.0
messages = ['316844']
nosy_count = 3.0
nosy_names = ['docs@python', 'merelymoray', 'xtreak']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue33545'
versions = ['Python 3.6']

Activity

  1. merelymoray commented on May 16, 2018

    merelymoraymannequin
    MannequinAuthor

    https://docs.python.org/3.6/library/uuid.html#uuid.UUID

    uuid.uuid1(node=None, clock_seq=None)

    Generate a UUID from a host ID, sequence number, and the current time. If node is not given, getnode() is used to obtain the hardware address. If clock_seq is given, it is used as the sequence number; otherwise a random 14-bit sequence number is chosen.

    ^^

    This neglects to mention that if you call uuid1() in quick succession with no parameters, you can get a repeat uuid.

    I had a bug because of this.

    It would have been nice if the docs mentioned the fact directly.

    It's only a sentence to add, and would have saved a lot of time.

  2. added
    docsDocumentation in the Doc dir
    type-featureA feature request or enhancement
    on May 16, 2018
  3. transferred this issue fromon Apr 10, 2022
  4. slateny commented on Aug 2, 2022

    @slateny
    Contributor

    There's now a paragraph near the top of the uuid page with some info on this:

    Depending on support from the underlying platform, uuid1() may or may not return a “safe” UUID. ...
    

    which was introduced by #138.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions