graph.py: Fixed deprecation warning related to object.__new__
(What was I thinking?)