alisw / alibuild

A simple build tool for ALICE software
http://alisw.github.io/alibuild/
GNU General Public License v3.0
24 stars 47 forks source link

Fix hashing on Python 3.12 #810

Closed TimoWilken closed 1 year ago

TimoWilken commented 1 year ago

Python 3.12 changes the default string representation of OrderedDicts, which aliBuild relies upon (this is obviously far from ideal, but we're stuck with it).

This patch hashes OrderedDicts in their old representation, to maintain hash compatibility between python<3.12 and python==3.12.

This saves e.g. Mac users from having to rebuild their entire sw directory when upgrading from python@3.11 to python@3.12 using brew.

Hashes are checked using unittests, so unittests passing should mean that hashes are computed exactly the same as before. (I found this issue by running the usual unittests on python3.12.) Take this opportunity to add a CI check under python3.12 to this repo.