You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When called on a local object inside a function, gc.get_referrers no longer returns a Frame as one of the references. I could not find anything in the release notes or changeling that indicated that this is an intentional change.
The following script generates different output when run on Python 3.6 vs Python 3.7 (on linux, OSX, or Windows):
# referrers.py
import gc, sys
class FakeMod(object): pass
extra = []
def test():
mod = FakeMod()
extra.append(mod)
referrers = gc.get_referrers(mod)
print(".".join(str(x) for x in sys.version_info[:3]), ":", len(referrers), referrers)
test()
get_referrers() doesn't really guarantee anything. It's more of a clever hack based on however the Python GC works at the moment. So, this it probably WONTFIX.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: