Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Use hashing in all places
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf committed Jun 19, 2019
1 parent 064a8c3 commit 6b27888
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/sage/misc/lazy_import_cache.py
Expand Up @@ -32,8 +32,6 @@ def get_cache_file():
True
sage: sage.misc.lazy_import_cache.DOT_SAGE = OLD
"""
mangled = os.path.realpath(SAGE_LIB).replace(os.sep, '_')
if len(mangled) > 255 - 25:
mangled = hashlib.sha256(mangled.encode('utf-8')).hexdigest()
mangled = hashlib.sha256(os.path.realpath(SAGE_LIB).encode('utf-8')).hexdigest()
return os.path.join(DOT_SAGE, 'cache',
"%s-lazy_import_cache.pickle" % mangled)

0 comments on commit 6b27888

Please sign in to comment.