]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL,
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 13 Sep 2013 04:46:40 +0000 (07:46 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 13 Sep 2013 04:46:40 +0000 (07:46 +0300)
if all necessary functions are already found in libuuid.
Patch by Evgeny Sologubov.

Lib/uuid.py
Misc/ACKS
Misc/NEWS

index 049b46c09d9ff7527ec0dac32c33a90274a9fed0..9226fd4ebbeb7c687091a67575bc7ce84b864cd3 100644 (file)
@@ -429,6 +429,8 @@ try:
             _uuid_generate_random = lib.uuid_generate_random
         if hasattr(lib, 'uuid_generate_time'):
             _uuid_generate_time = lib.uuid_generate_time
+            if _uuid_generate_random is not None:
+                break  # found everything we were looking for
 
     # The uuid_generate_* functions are broken on MacOS X 10.5, as noted
     # in issue #8621 the function generates the same sequence of values
index db01d142a9e2622b75433d2e606a41040653ec70..b649f7f624ec02ea7c3f2effab4c21e2dccc6a4e 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1160,6 +1160,7 @@ Rafal Smotrzyk
 Eric Snow
 Dirk Soede
 Paul Sokolovsky
+Evgeny Sologubov
 Cody Somerville
 Edoardo Spadolini
 Clay Spence
index dcd97540e7aa87e09cf947eefa5017deff8c5ba1..3d9f24d71848c9199b94efd909463c38c9b989de 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -68,6 +68,10 @@ Core and Builtins
 Library
 -------
 
+- Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL,
+  if all necessary functions are already found in libuuid.
+  Patch by Evgeny Sologubov.
+
 - Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in
   the _sre module.