pykwalify
pykwalify copied to clipboard
Fixing tests for ruamel yaml 0.18+
Fixes: #198
ruamel.yaml 0.18.0 removed deprecated API methods like safe_dump, safe_load_all, and usage of dump without a stream argument. This PR updates the usage by utilizing the yml object in pykwalify.compat for equivalent safe API methods
@lilyinstarlight My gut feeling tells me that this PR probably should also include an update to the requirements file to pin ruamel.yaml>=0.18 then? Specially if this is probably not backwards compatible if they have changed around the functionality with the methods that ruamel uses?
I am thinking that this big of an update to dependencies probably should bump up the release to 1.9.0 for instance and just say that either you upgrade rumale, or you stay behind until you can update ruamel wherever that is used
This is not a breaking change. The deprecated methods were only used in the tests (the rest of the usages were updated in https://github.com/Grokzen/pykwalify/commit/68405edd89bcf6ec16c76169884e89662db4fc47) and the functions used in this PR have been available since well before the currently required ruamel.yaml 0.16.0 for pykwalify
I did, however, just double check to make sure and the tests ran just fine with ruamel.yaml 0.16.0 locally as well
Thank you for the quick reply btw!
I can still bump the version if you would prefer, but I just figured I'd note this is a completely backwards compatible change (as far as I can tell), since I neglected to mention that in the initial description :)