Issue #10117: Tools/scripts/reindent.py now accepts source files that
use encoding other than ASCII or UTF-8.  Source encoding is preserved
when reindented code is written to a file.
diff --git a/Lib/trace.py b/Lib/trace.py
index fa24fc1..eb21fde 100644
--- a/Lib/trace.py
+++ b/Lib/trace.py
@@ -493,6 +493,7 @@
             threading.settrace(self.globaltrace)
             sys.settrace(self.globaltrace)
         try:
+            del sys.modules['pickle']
             exec(cmd, globals, locals)
         finally:
             if not self.donothing: