Erotemic / ubelt

A Python utility library with a stdlib like feel and extra batteries. Paths, Progress, Dicts, Downloads, Caching, Hashing: ubelt makes it easy!
Apache License 2.0
719 stars 43 forks source link

Fix CacheStamp issue with old caches #116

Closed Erotemic closed 2 years ago

Erotemic commented 2 years ago

To reproduce:

docker run -it python3 bash

pip install ubelt==1.0.0
python -c "import ubelt; ubelt.CacheStamp('foo', '.').renew()"
pip install ubelt==1.1.0
python -c "import ubelt; ubelt.CacheStamp('foo', '.').expired()"
codecov[bot] commented 2 years ago

Codecov Report

Merging #116 (40f6248) into main (5064cc2) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #116   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           28        28           
  Lines         3207      3207           
  Branches       646       646           
=========================================
  Hits          3207      3207           
Impacted Files Coverage Δ
ubelt/util_cache.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5064cc2...40f6248. Read the comment docs.