Message305635
| Author | vstinner |
|---|---|
| Recipients | Arfrever, Keith.Dart, Michael.Felt, aixtools@gmail.com, berker.peksag, christian.heimes, eric.araujo, hynek, kdart, knny-myer, lukasz.langa, martin.panter, methane, nailor, ned.deily, nvetoshkin, orsenthil, pitrou, r.david.murray, serhiy.storchaka, skrah, vstinner |
| Date | 2017-11-06.11:27:44 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1509967664.14.0.213398074469.issue11063@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
"""
Unrelated to the patch (same before and after), this looks odd to me:
>>> import uuid
>>> uuid._has_uuid_generate_time_safe is None
True
>>>
>>> import _uuid
>>> _uuid.has_uuid_generate_time_safe
1
"""
None means "not initialized yet". It's initialized on demand, at the first call of uuid1() or get_node():
$ python3
Python 3.7.0a2+ (heads/master:a5293b4ff2, Nov 6 2017, 12:22:04)
>>> import uuid
>>> uuid._has_uuid_generate_time_safe # == None
>>> uuid.uuid1()
UUID('3e5a7628-c2e5-11e7-adc1-3ca9f4650c0c')
>>> uuid._has_uuid_generate_time_safe
1
> [Also, I thought we weren't supposed to use ctypes in the stdlib.]
Antoine's commit a106aec2ed6ba171838ca7e6ba43c4e722bbecd1 avoids ctypes when libuuid is available.
For the other systems without libuuid, well, it was probably simpler to use ctypes. ctypes was more popular a few years ago. The code "just works" and I guess that nobody wants to touch it :-) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2017-11-06 11:27:45 | vstinner | set | recipients: + vstinner, orsenthil, kdart, pitrou, christian.heimes, ned.deily, eric.araujo, Arfrever, r.david.murray, methane, skrah, nvetoshkin, lukasz.langa, knny-myer, nailor, Keith.Dart, berker.peksag, hynek, martin.panter, serhiy.storchaka, Michael.Felt, aixtools@gmail.com |
| 2017-11-06 11:27:44 | vstinner | set | messageid: <1509967664.14.0.213398074469.issue11063@psf.upfronthosting.co.za> |
| 2017-11-06 11:27:44 | vstinner | link | issue11063 messages |
| 2017-11-06 11:27:44 | vstinner | create | |