blaze / datashape

Language defining a data description protocol
BSD 2-Clause "Simplified" License
183 stars 65 forks source link

The `datashape` package can not be installed in a python 3.12 env #245

Open xtianpoli opened 1 year ago

xtianpoli commented 1 year ago

The datashape package can not be installed in a python 3.12 environment due to versioneer module which invokes configparser.SafeConfigParser(). This class has been renamed to ConfigParser in Python 3.2. SafeConfigParser then became a deprecated alias and has been removed in Python 3.12.

VincentGardeux commented 5 months ago

A quick fix is to download the 0.5.4 tar.gz from the release section, then

tar -xzvf 0.5.4.tar.gz
cd datashape-0.5.4/
sed -i 's/SafeConfigParser/ConfigParser/g' versioneer.py
sed -i 's/readfp/read_file/g' versioneer.py
python3.12 -m pip install .

SafeConfigParser was replaced by ConfigParser in latest Python v3.12