Staging
v0.5.1
https://github.com/python/cpython
Revision 23df2d1304ece169d7e0dfc843dfb8026b413d9f authored by Barry Warsaw on 28 November 2017, 22:26:04 UTC, committed by GitHub on 28 November 2017, 22:26:04 UTC
``uuid.getnode()`` now preferentially returns universally administered MAC addresses if available, over locally administered MAC addresses.  This makes a better guarantee for global uniqueness of UUIDs returned from ``uuid.uuid1()``.  If only locally administered MAC addresses are available, the first such one found is returned.

Also improve internal code style by being explicit about ``return None`` rather than falling off the end of the function.

Improve the test robustness.
1 parent 71bd588
Raw File
Tip revision: 23df2d1304ece169d7e0dfc843dfb8026b413d9f authored by Barry Warsaw on 28 November 2017, 22:26:04 UTC
bpo-32107 - Improve MAC address calculation and fix test_uuid.py (#4600)
Tip revision: 23df2d1
ast.h
#ifndef Py_AST_H
#define Py_AST_H
#ifdef __cplusplus
extern "C" {
#endif

PyAPI_FUNC(int) PyAST_Validate(mod_ty);
PyAPI_FUNC(mod_ty) PyAST_FromNode(
    const node *n,
    PyCompilerFlags *flags,
    const char *filename,       /* decoded from the filesystem encoding */
    PyArena *arena);
PyAPI_FUNC(mod_ty) PyAST_FromNodeObject(
    const node *n,
    PyCompilerFlags *flags,
    PyObject *filename,
    PyArena *arena);

#ifdef __cplusplus
}
#endif
#endif /* !Py_AST_H */
back to top