From 4a3bbafdef42113eb02c9acab363c48ba72bdff6 2017-07-13 07:57:26 From: Thomas Kluyver Date: 2017-07-13 07:57:26 Subject: [PATCH] Merge pull request #10697 from ipython/auto-backport-of-pr-10696 Backport PR #10696 on branch 5.x --- diff --git a/IPython/core/compilerop.py b/IPython/core/compilerop.py index e39ded6..f529eb5 100644 --- a/IPython/core/compilerop.py +++ b/IPython/core/compilerop.py @@ -56,7 +56,7 @@ def code_name(code, number=0): This now expects code to be unicode. """ - hash_digest = hashlib.md5(code.encode("utf-8")).hexdigest() + hash_digest = hashlib.sha1(code.encode("utf-8")).hexdigest() # Include the number and 12 characters of the hash in the name. It's # pretty much impossible that in a single session we'll have collisions # even with truncated hashes, and the full one makes tracebacks too long