holoviz-dev / pyctdev

Python packaging Common Tasks for Developers
BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link

Add tomli as a dependency and adapt code to tomli>=2 #93

Closed maximlt closed 2 years ago

maximlt commented 2 years ago

pyctdev is using the toml library vendored by pip, tomli, which pip upgraded from 1.x to 2.x in its 22.1 version. The newer tomli apparently strictly requires to open a file with .load in binary mode (https://github.com/hukkin/tomli#parse-a-toml-file). This broke pyctdev.

Instead of relying on a vendored version of tomli by pip, tomli (>=2) is now a dependency of pyctdev and it will be the case until Python 3.11, which will offer the tomllib module (adapted from tomli, same API then).