This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bryevdv
Recipients bryevdv
Date 2018-09-07.16:30:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536337804.03.0.56676864532.issue34608@psf.upfronthosting.co.za>
In-reply-to
Content
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()
```

Output:

~ master*
(py37) ❯ python test.py
3.7.0 : 1 [[<__main__.FakeMod object at 0x10b65e320>]]

~ master*
(base) ❯ python test.py
3.6.6 : 2 [[<__main__.FakeMod object at 0x106f3ea90>], <frame object at 0x10684b648>]
History
Date User Action Args
2018-09-07 16:30:04bryevdvsetrecipients: + bryevdv
2018-09-07 16:30:04bryevdvsetmessageid: <1536337804.03.0.56676864532.issue34608@psf.upfronthosting.co.za>
2018-09-07 16:30:04bryevdvlinkissue34608 messages
2018-09-07 16:30:03bryevdvcreate