]> granicus.if.org Git - python/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:52:00 +0000 (07:52 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 13 Sep 2013 04:52:00 +0000 (07:52 +0300)
if all necessary functions are already found in libuuid.
Patch by Evgeny Sologubov.

Lib/uuid.py
Misc/ACKS
Misc/NEWS

index fdd0c5cbec08c26c2e86aaad4460a44badefb661..cb4e5f050f1bdd90cd2ef91458a648c71a9a001a 100644 (file)
@@ -408,6 +408,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 e251596c988f479fb1e90924fb3fb4bf779ff78b..6f2b3a76fd9792fcfce3bbf648f91e4508e0a043 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -970,6 +970,7 @@ Roy Smith
 Rafal Smotrzyk
 Dirk Soede
 Paul Sokolovsky
+Evgeny Sologubov
 Cody Somerville
 Clay Spence
 Stefan Sperling
index 9c0b13fb029032288787469ff4f94df648823e47..ea74d71bd9a0e7878c70e8be0dcebd284954b377 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -32,6 +32,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 #14971: unittest test discovery no longer gets confused when a function
   has a different __name__ than its name in the TestCase class dictionary.