biopragmatics/bioversions

Handle API breaking change in dependency cachier

Closed this issue · 6 comments

bioversions.utils depends on cachier. The optional argument backend has been removed in a recent version of cachier, causing the snippet below to break.

#: A decorator for functions whose return values
#: should be cached and refreshed once per day
refresh_daily = cachier(
    stale_after=datetime.timedelta(days=1),
    backend="memory",
    cache_dir=BIOVERSIONS_HOME,
)

Wow that's a huge bummer. I will tag the version to <=1.5.0 and consider alternative ways of doing this with newer versions of cachier.

Major bummer, I didn't realize this was your feature.

Released in v1.5.0 !!! 1st_place_medal partying_face

Congrats and great work, @cthoyt ! First major outside contribution to this project! I'm so proud. May it be the first of many (by you and/or users of the package)!

python-cachier/cachier#6 (comment)

It looks like they rebased it completely out of history. (to cover up breaking semver?)

I'd consider trying to drop the dependency or make a fork if the devs are willing to do something so user hostile. Might be too much work though.

Tbh it's not a crucial feature - it would only be useful for running in a web context, which I don't really suggest anymore since it maintains a nightly updated YAML file with the results. I will definitely consider dropping the dependency

The developer made a note in python-cachier/cachier#79 that this was just a mistake and it should be reinstantiated in the latest patch.

All's well that ends well. That makes a lot more sense than him doing it on purpose.