BNode value not random enough · Issue #185 · RDFLib/rdflib (original) (raw)

bcq.nng@gmail.com, 2011-12-23T16:13:30.000Z

When rdflib is used in a application that fork the current Python process, for exemple when using flup.server.*_fork, BNode's value generation in these processes:

This means that the parent and child processes will all get the same BNode values.

I fixed this issue using

value = _unique_id() + str(random.randint(1, 99999999))

but there might be a cleaner solution.