STINNER Victor <vstin...@python.org> added the comment:

uuid.py has a long history. The recent history is the addition of the _uuid 
module which exposes libuuid function properly. IMHO it's a better approach 
than ctypes.

On Windows, it seems like ctypes remains used to get access to Windows function 
UuidCreateSequential(). It is used by uuid.getnode() for example. We should 
expose UuidCreateSequential() in _uuid rather than using ctypes for that.

I propose to do that in two steps:

(A) Ensure that _uuid works on macOS, FreeBSD and Linux, especially in the 
macOS installer of python.org. If yes, remove the ctypes code to access libuuid 
functions.

(B) Add a function to _uuid to expose Windows UuidCreateSequential(), use it in 
uuid.py and remove the related ctypes code.

Both steps can be done in parallel.

----------
nosy: +vstinner

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40501>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to