• Jason Madden's avatar
    WIP: All CFFI watchers have explicit lifetimes · 51461c84
    Jason Madden authored
    And must be close() when done. The IO watchers already required this
    for libuv; doing it for everything simplifies memory management and
    object lifetimes and lets us get rid of a bunch of weakref objects
    with callbacks.
    
    This is a new requirement and will only affect those that use
    CFFI (e.g., PyPy) and specifically it's needed for libuv; libev
    doesn't really do much with it.
    
    Some debugging help for forgetting to close objects piggybacks on
    tracemalloc on Python 3.
    
    test_ftplib.py fails in Python 3 because of some warnings about
    unclosed objects.
    test__backdoor.py fails in Python 2 for the same reason.
    51461c84
test__subprocess.py 15.4 KB