lukecwik opened a new issue, #23389:
URL: https://github.com/apache/beam/issues/23389

   ### What happened?
   
   I get the following error:
   ```
     in test_size_of_weakref
       print(objsize.get_deep_size(oref))
     File ".../python/.eggs/objsize-0.5.2-py3.8.egg/objsize.py", line 235, in 
get_deep_size
       return sum(map(get_size_func, it))
     File ".../python/.eggs/objsize-0.5.2-py3.8.egg/objsize.py", line 91, in 
traverse_bfs
       objs = {o_id: o for o_id, o in objs if o_id not in marked and 
filter_func(o)}
     File ".../python/.eggs/objsize-0.5.2-py3.8.egg/objsize.py", line 91, in 
<dictcomp>
       objs = {o_id: o for o_id, o in objs if o_id not in marked and 
filter_func(o)}
     File ".../python/.eggs/objsize-0.5.2-py3.8.egg/objsize.py", line 43, in 
default_object_filter
       return not isinstance(o, type)
   ReferenceError: weakly-referenced object no longer exists
   ```
   
   when running the following test:
   ```
   import unittest
   import objsize
   import weakref
   import threading
   
   class Foo(list):
     pass
   
   class WeakRefTest(unittest.TestCase):
     def test_size_of_weakref(self):
       wait_event = threading.Event()
       o = Foo("SuperDuper")
       oref = weakref.proxy(o, lambda value: wait_event.set())
       del o
       wait_event.wait()
       objsize.get_deep_size(oref)
   ```
   
   Cut an issue to upstream dependency: 
https://github.com/liran-funaro/objsize/issues/6
   
   ### Issue Priority
   
   Priority: 0
   
   ### Issue Component
   
   Component: sdk-py-harness


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to