googlefonts / nanoemoji

A wee tool to build color fonts.
Apache License 2.0
238 stars 20 forks source link

Switch from deprecated `toml` library #451

Open CyberTailor opened 1 year ago

CyberTailor commented 1 year ago

The replacement is Python's 3.11 tomllib module and tomli package for older versions.

anthrotype commented 1 year ago

thanks for the reminder. yes we should switch at some point. Are the APIs similar enough that one can use these as drop-in replacements? Are you volunteering to send on a PR? :)

anthrotype commented 1 year ago

I'm afraid but I have encountered a major issue with tomlkit https://github.com/sdispater/tomlkit/issues/309, thus I will have to revert the #452 PR for now.

anthrotype commented 1 year ago

@CyberTailor In this issue you mentioned tomli but in the PR #452 you ended up using tomlkit. May I ask why?

anthrotype commented 1 year ago

for reference, these are the CI build failures that I was seeing, which led me to file the above mentioned issue https://github.com/sdispater/tomlkit/issues/309:

https://github.com/googlefonts/nanoemoji/actions/runs/5762993401/job/15623882139

I pushed the revert commit to this PR https://github.com/googlefonts/nanoemoji/pull/462

CyberTailor commented 1 year ago

In this issue you mentioned tomli but in the PR #452 you ended up using tomlkit. May I ask why?

tomli has no write support

anthrotype commented 1 year ago

https://pypi.org/project/tomli-w/