[issue11063] uuid.py module import has heavy side effects

STINNER Victor report at bugs.python.org
Thu Sep 28 09:29:56 EDT 2017


STINNER Victor <victor.stinner at gmail.com> added the comment:

I marked bpo-20519 as a duplicate of this issue, even if it's not exactly the same. The main purpose of this issue was to use uuid_generate_time() using a C extension:

+static PyObject *
+_uuid_generate_random(void)
+{
+    uuid_t out;
+    uuid_generate_random(out);
+    return PyBytes_FromStringAndSize((const char *) out, sizeof(out));
+}

+static PyObject *
+_uuid_generate_time(void)
+{
+    uuid_t out;
+    uuid_generate_time(out);
+    return PyBytes_FromStringAndSize((const char *) out, sizeof(out));
+}

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11063>
_______________________________________


More information about the Python-bugs-list mailing list