Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow requirement to allow finalizers to run
Tests on some platforms and Python versions (Python 3.7, 3.8, and 3.9 on Ubuntu and macOS) were hanging with coverage==6.3. See nedbat/coveragepy#1310 and nedbat/coveragepy#1312 for some discussion about this issue. Some people have pinned coverage==6.2 as a temporary workaround. As discussed in #1312, coverage fixes this issue in 00da68ef1a0b4d43c003babae0cb8f91beaf06d2 by only setting signal handlers from the main thread; I confirmed that using the latest commit of coverage (aad5ece47bf12bceff4296516f23171a06b34bb5) fixes the issue of tests hanging without any modification to our code. However, according to the pytest-cov documentation (https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html#if-you-use-multiprocessing-pool), when using `multiprocessing.Pool`, we are supposed to ensure that `join()` is called on the pool, rather than `terminate()`. Following this requirement makes the tests work with coverage==6.3 as well.
- Loading branch information