bobfang1992 / pytomlpp

A python wrapper for tomlplusplus
https://bobfang1992.github.io/pytomlpp/pytomlpp.html
MIT License
86 stars 11 forks source link

Added optional encoding to dump and load functions #77

Closed Backist closed 7 months ago

Backist commented 7 months ago

As i said in the issue, it is a minimal change but I think it is useful especially when you need to use a different encoding than the one your system uses, for example utf-8 instead of cp1292 which is used when the encoding parameter is not specified in open().

bobfang1992 commented 7 months ago

Thanks, merged.

bobfang1992 commented 7 months ago

@Backist it seems the ut are faling after I merge this, I can take a look at this later but if you have time please do not hesitate to have a look as well. Thanks!

Backist commented 7 months ago

The wheel error is essentially fixed, I just made a syntax error. I checked with the tests that the binary modes did not take the enconding argument as None, since the binary opening mode does not take an enconding. I will make a new pull request with the hotfix. Ignore that revert commit, I just created it by mistake

Backist commented 7 months ago

I'm a bit busy at the moment, let me have a look at it in depth as soon as I can verify with the tests before I do the final PR.

bobfang1992 commented 7 months ago

@Backist sure thanks!