• 
      

    Fix file descriptor and directory leaks.

    Review Request #14805 — Created Feb. 10, 2026 and submitted — Latest diff uploaded

    Information

    Review Board
    release-7.1.x

    Reviewers

    The recent change to add FileAttachment.sha256_checksum as a
    cached_property was causing the files to be opened but never closed.
    These would pile up, especially while running unit tests, eventually
    causing operations to fail due to OS limits on the number of open files
    within a process.

    While tracking this down, I found a handful of other places throughout
    our code where we were either definitely leaking file descriptors, or
    had places where an exception could cause a leak. We also never cleaned
    up the tests tempdir. This change fixes those up as well.

    Ran unit tests.

    Commits

    Files