RDFLib/rdflib — pull request #232 by dzinxed (2012-09-23 14:38:10+00:00)
Title: Faster BNode, Python 2.4 and Windows compatibility

Please accept a bunch of fixes for the following issues:
- BNode serial number generator's performance on Windows Python 2.4 was unusable (test_issue209 alone took minutes to complete); code for Python 2.4 number generator reseeded random each time it was called and used seed(str) instead of str(int); removing a threading.Lock also helped with Python 2.5+
- pure Python defaultdict implementation (copied from an ActiveState recipe) for Python 2.4
- some code in date parser that didn't do anything and broke Windows tests was removed
- some minor fixes to tests to make them Python 2.4-compatible
- swap_n3 tests now work both on Windows and Linux

To summarize:
- BNode serial generation is faster
- tests now work on both Python 2.4 and Python 2.5+, Windows and Linux (well, 1 error in test_roundtrip is still there, but it's not an OS/Python version compatibility issue)