Repository navigation
UX: warn about any (broken) leftover references to closed memory map objects - #16608
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
86bfdbc to
37e1cd7
Compare
There was a problem hiding this comment.
I wrote this changelog entry as a complement to it, but I'd like @saimn's opinion on that before I change it.
There was a problem hiding this comment.
In pre-towncrier days, we would have modified the original entry by hand like this:
* blah blah [#16581, #16608]
But I am not sure how to do that with towncrier. So yes, let's wait for saimn. Thanks!
There was a problem hiding this comment.
not sure, I think the only way is to edit the other entry... as long as it is not released and things are backported consistently, should be fine.
There was a problem hiding this comment.
Should I merge both entries even though they were really done in two separate PRs ? How about I just edit the first one to reference this one (not using a hard link but a PR number) ?
There was a problem hiding this comment.
Yes I think just editing the previous one is the way to go, since both PRs will go in the same release.
There was a problem hiding this comment.
done. I don't think the bot will like it but hopefully you guys can still merge, right ?
There was a problem hiding this comment.
I added a label for the bot to be happy but I'll let @saimn approve and merge. Thanks, all!
| # counting `arr` and a reference as an argument to getrefcount(), | ||
| # see https://docs.python.org/3/library/sys.html#sys.getrefcount | ||
| warnings.warn( | ||
| f"Memory map object {arr} with id={id(arr)} was closed but " |
There was a problem hiding this comment.
printing arr doesn't seem a good idea since this is the "old" arr and will result in a segfault I think...
There was a problem hiding this comment.
🤦🏻♂️ Of course. Thanks !
81a4c53 to
e8bfba0
Compare
…ences to closed memory map objects
…608-on-v6.1.x Backport PR #16608 on branch v6.1.x (UX: warn about any (broken) leftover references to closed memory map objects)
Description
This is a follow up to #16581, suggested by @saimn in https://github.com/astropy/astropy/pull/16581/files#r1652506444