Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #6 use sha1 instead of hash function result
Problem ------- Plug-in fails to read value from .previous file as its format has changed. In the version before 0.2.1 the file contained requirements file copy. Now it keeps integer value, result of 'hash' function on serialized set of parsed requirements. Solution -------- Use SHA1 to describe unique set of the requirements. This function is more reliable than Python 'hash' function. 'hash' function may produce different values for the same input as it depends on a seed or depends on PYTHONHASHSEED value. Side-effect of using SHA1 that even if file is in the old format it will be just rewritten with a new hash value and environment is rebuilt. Testing ------- Updated existing test-case to ensure that SHA1 is saved in the .previous file.
- Loading branch information
Volodymyr Vitvitskyi
committed
Apr 28, 2017
1 parent
8a814b5
commit 3dff32a
Showing
4 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters