On Sat, Apr 01, 2006 at 02:54:25PM +0100, Michael Hudson wrote:
It's actually because somewhere in the bowels of compilation, the file name being compiled gets interned and test_pkg writes out some temporary files and imports them. If this doesn't happen on the trunk, did this feature get lost somewhere?
I guess it's highly non-deterministic. If the new strings happen to take a previously-dummy entry of the interned strings dict, then after they die the entry is dummy again and we don't have an extra refcount. But if they take a fresh entry, then the dummy they become afterwards counts for one ref.