Message 78021 - Python tracker
Here is an alternate patch which does the tuple optimization in the GC. I don't like it a lot, first because it puts some type-specific code in gcmodule, second because it invalidates the dict optimization (since tuples are untracked only when walked by the GC, they are still tracked when added to a dict and therefore the dict will be tracked too).