Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for negative values #1355
This is a breaking change as applications may not expect negative values there right now; you could either add a new converter or an argument (like it's done for the
Also, general tip: Having issue numbers at the beginning of a commit message is more noise than useful (especially when not prefixed with # so they aren't linked on github).
I've changed the name, thanks for the tip.
In my opinion this is not a breaking change but rather a bug fix (or might be both). Int implies that the input should allow any integer, the fact that it hasn't until now should be considered a bug as it is not expected behaviour for an integer parser.
However, I realise that a lot of people might be using the fact it doesn't allow negative numbers to skip writing their own error handling for invalid values (in the case of paging) so I will make two new converters SignedIntegerConverter and SignedFloatConverter as that will probably cause the least amount of tension.
Do you prefer the new types to be called 'sint' and 'sfloat' or 'signed_int' and 'signed_float'? :)
Bugfixes can be breaking changes as well if the bug existed for a long time and people likely relied on them. For example, the most common use case for
If backwards compatibility was not thing I'd change int and add
If we go for
I think either
Should be the method we use. I have no strong preference for either one, but
EDIT: Werkzeug does not allow - in their url rules so we can rule out