alecthomas / voluptuous

CONTRIBUTIONS ONLY: Voluptuous, despite the name, is a Python data validation library.
https://pypi.org/project/voluptuous
BSD 3-Clause "New" or "Revised" License
1.82k stars 218 forks source link

Added additional tests for Range, Clamp and Length + catch exceptions #427

Closed spacegaier closed 4 years ago

spacegaier commented 4 years ago

This previous PR https://github.com/alecthomas/voluptuous/pull/414 added support to catch invalid values/types for Range. I now added that also for Clamp and Length.

Additional I added some more tests to increase the coverage and verify the new exception handling for Clamp and Length.

It would be great if after merging, a new version 0.11.8 could be created, so that depending projects (such as home-assistant where I came across those type exceptions in the first place) can easily pull in those fixes.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.05%) to 93.292% when pulling e407e86f92d5d22bb6922761240cf49d23094def on spacegaier:type-error-tests into 580e7305ae0de6d4ba22c4feee688df64bfbb877 on alecthomas:master.

alecthomas commented 4 years ago

Very nice, thanks!

spacegaier commented 4 years ago

@alecthomas Any ideas when a new release of the library will be released so that we can pull all the recent fixes into dependent projects?

alecthomas commented 4 years ago

Hi @spacegaier , pushed up 0.12.0: https://pypi.org/project/voluptuous/0.12.0/

I'm very out of touch with the Python ecosystem at this point, so if you're interested in helping out with releases and general maintenance I'd be happy to hand over the reins.

spacegaier commented 4 years ago

@alecthomas I personally am rather new to the Python ecosystem, but I would be willing to help out here.

And BTW: Thanks for the new release. I already triggered the dependency update in the dependent project I am contributing to (https://github.com/home-assistant/core/pull/40401).