RDFLib/rdflib — Issue #185: BNode value not random enough
Author: gjhiggins
Created: 2012-02-20 08:34:40+00:00
State: open

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:
- share the same _prefix
- use independant serial number generators that start with the same value

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.