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
d4294175
Commit
d4294175
authored
Nov 21, 2008
by
Amaury Forgeot d'Arc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#4363: Let uuid.uuid1() and uuid.uuid4() run even if the ctypes module is not present.
Will backport to 2.6
parent
32265659
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Lib/uuid.py
Lib/uuid.py
+2
-2
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/uuid.py
View file @
d4294175
...
...
@@ -479,8 +479,8 @@ def uuid1(node=None, clock_seq=None):
# When the system provides a version-1 UUID generator, use it (but don't
# use UuidCreate here because its UUIDs don't conform to RFC 4122).
_buffer
=
ctypes
.
create_string_buffer
(
16
)
if
_uuid_generate_time
and
node
is
clock_seq
is
None
:
_buffer
=
ctypes
.
create_string_buffer
(
16
)
_uuid_generate_time
(
_buffer
)
return
UUID
(
bytes
=
_buffer
.
raw
)
...
...
@@ -516,8 +516,8 @@ def uuid4():
"""Generate a random UUID."""
# When the system provides a version-4 UUID generator, use it.
_buffer
=
ctypes
.
create_string_buffer
(
16
)
if
_uuid_generate_random
:
_buffer
=
ctypes
.
create_string_buffer
(
16
)
_uuid_generate_random
(
_buffer
)
return
UUID
(
bytes
=
_buffer
.
raw
)
...
...
Misc/NEWS
View file @
d4294175
...
...
@@ -50,6 +50,9 @@ Core and Builtins
Library
-------
- Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if
the ctypes module is not present.
- Issue #4116: Resolve member name conflict in ScrolledCanvas.__init__.
- httplib.HTTPConnection.putheader() now accepts an arbitrary number of values
...
...
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