]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-106739: Add `rtype_cache` to `warnings.warn` message when leaked objects found...
authorshailshouryya <42100758+shailshouryya@users.noreply.github.com>
Tue, 25 Jul 2023 17:27:36 +0000 (10:27 -0700)
committerGitHub <noreply@github.com>
Tue, 25 Jul 2023 17:27:36 +0000 (17:27 +0000)
commitfabcbe9c12688eb9a902a5c89cb720ed373625c5
tree03b8fa5c5bf1ec7cfc538e2a442e5610438e2955
parent188000ae4b486cfffaeaa0a06902e4844d1b2bbc
gh-106739: Add `rtype_cache` to `warnings.warn` message when leaked objects found (#106740)

Adding the `rtype_cache` to the `warnings.warn` message improves the
previous, somewhat vague message from

```
/Users/username/cpython/Lib/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 6 leaked semaphore objects to clean up at shutdown
```

to

```
/Users/username/cpython/Lib/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 6 leaked semaphore objects to clean up at shutdown: {'/mp-yor5cvj8', '/mp-10jx8eqr', '/mp-eobsx9tt', '/mp-0lml23vl', '/mp-9dgtsa_m', '/mp-frntyv4s'}
```

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Lib/multiprocessing/resource_tracker.py
Misc/NEWS.d/next/Library/2023-07-20-06-00-35.gh-issue-106739.W1hygr.rst [new file with mode: 0644]