Open mdickinson opened 7 years ago
One more thing to consider: expired weakrefs. E.g.
File "C:\Python36\lib\site-packages\refcycle\object_graph.py", line 339, in export_json
self.annotated().export_json(filename=filename)
File "C:\Python36\lib\site-packages\refcycle\object_graph.py", line 279, in annotated
for vertex in self.vertices
File "C:\Python36\lib\site-packages\refcycle\object_graph.py", line 279, in
Nice catch; thanks. Do you happen to have a short snippet that reproduces (and that I can turn into a testcase)?
Opened #78 for the bug reported by @VojtechFried.
The annotations code is somewhat fragile: it makes assumptions that are often violated by real-world code (for example, that every bound method in Python 2 will have a non-
None
im_class
attribute, or that every function will have a__name__
attribute).It would probably be worth doing an
except Exception
around each annotation, logging any exceptions, and continuing.