vatlab / sos

SoS workflow system for daily data analysis
http://vatlab.github.io/sos-docs
BSD 3-Clause "New" or "Revised" License
274 stars 45 forks source link

subclass pathlib.Path for path #1539

Closed BoPeng closed 7 months ago

BoPeng commented 7 months ago

Breaks for python 3.10, and simple scripts like

file_target('a_1.txt').with_suffix('.bak')._md5

fails, because the functon we override to add _md5, named _init is removed from pathlib in python 3.10.

Supposedly, python 3.12 allows more graceful derivation of path from Path (https://discuss.python.org/t/make-pathlib-extensible/3428/46), but we will have to fix 3.10 for now.