Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1485054a
Commit
1485054a
authored
Jul 14, 2015
by
Steve Dower
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #24634: Importing uuid should not try to load libc on Windows
parent
77518434
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
Lib/uuid.py
Lib/uuid.py
+6
-2
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/uuid.py
View file @
1485054a
...
...
@@ -441,10 +441,14 @@ def _netbios_getnode():
_uuid_generate_random
=
_uuid_generate_time
=
_UuidCreate
=
None
try
:
import
ctypes
,
ctypes
.
util
import
sys
# The uuid_generate_* routines are provided by libuuid on at least
# Linux and FreeBSD, and provided by libc on Mac OS X.
for
libname
in
[
'uuid'
,
'c'
]:
_libnames
=
[
'uuid'
]
if
not
sys
.
platform
.
startswith
(
'win'
):
_libnames
.
append
(
'c'
)
for
libname
in
_libnames
:
try
:
lib
=
ctypes
.
CDLL
(
ctypes
.
util
.
find_library
(
libname
))
except
:
...
...
@@ -455,6 +459,7 @@ try:
_uuid_generate_time
=
lib
.
uuid_generate_time
if
_uuid_generate_random
is
not
None
:
break
# found everything we were looking for
del
_libnames
# The uuid_generate_* functions are broken on MacOS X 10.5, as noted
# in issue #8621 the function generates the same sequence of values
...
...
@@ -463,7 +468,6 @@ try:
#
# Assume that the uuid_generate functions are broken from 10.5 onward,
# the test can be adjusted when a later version is fixed.
import
sys
if
sys
.
platform
==
'darwin'
:
import
os
if
int
(
os
.
uname
()[
2
].
split
(
'.'
)[
0
])
>=
9
:
...
...
Misc/NEWS
View file @
1485054a
...
...
@@ -34,6 +34,8 @@ Core and Builtins
Library
-------
-
Issue
#
24634
:
Importing
uuid
should
not
try
to
load
libc
on
Windows
-
Issue
#
23652
:
Make
it
possible
to
compile
the
select
module
against
the
libc
headers
from
the
Linux
Standard
Base
,
which
do
not
include
some
EPOLL
macros
.
Initial
patch
by
Matt
Frank
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment