Skip to content

Commit b2a604f

Browse files
authored
Merge pull request #100 from binary-butterfly/release-0.8.0
Prepare release of 0.8.0
2 parents f78b14e + 2e4f679 commit b2a604f

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,59 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88

9+
## [0.8.0](https://github.com/binary-butterfly/validataclass/releases/tag/0.8.0) - 2022-11-30
10+
11+
[Full changelog](https://github.com/binary-butterfly/validataclass/compare/0.7.2...0.8.0)
12+
13+
This release adds two new validators and a handful of new parameters to existing validators.
14+
15+
It also introduces two **breaking changes**, which in practice shouldn't really affect anyone negatively, and one
16+
**deprecation** of an existing validator parameter. See the changes below.
17+
18+
### Added
19+
20+
- `AllowEmptyString`: New wrapper validator that accepts empty strings (by [@TomasHalgas]). [#91]
21+
- `DiscardValidator`: New validator that discards any input and always returns a predefined value. [#94]
22+
- `EmailValidator` and `RegexValidator`: Add parameter `allow_empty` to allow empty strings (by [@TomasHalgas]). [#89]
23+
- `EmailValidator`: Add parameter `max_length`. [#97]
24+
- `DecimalValidator`: Add parameter `rounding` to specify rounding mode (with a new default, see "Changed"). [#99]
25+
26+
### Changed
27+
28+
- **Breaking change:** `AnyOfValidator` and `EnumValidator` are now **case-sensitive** by default. [#98]
29+
- The parameter `case_insensitive` is **replaced** with a new parameter `case_sensitive` which defaults to True.
30+
- The old parameter is still supported for compatibility, but is now deprecated and will be removed in a future version.
31+
- If you have set `case_insensitive=True` before, you can simply remove this parameter now as this is the default now.
32+
- **Breaking change:** `DecimalValidator` (and all subclasses) now uses `decimal.ROUND_HALF_UP` as default rounding mode. [#99]
33+
- Until now, the rounding mode of the current decimal context was used, which defaults to `decimal.ROUND_HALF_EVEN`.
34+
- Use the `rounding` parameter to change this. To restore the old behavior and use the decimal context, set `rounding=None`.
35+
36+
### Deprecated
37+
38+
- `AnyOfValidator` and `EnumValidator`: The parameter `case_insensitive` is now deprecated and will be removed in a future
39+
version. (See "Changed" above.) [#98]
40+
41+
### Testing
42+
43+
- Fix version incompatibility in test suite. [#95]
44+
- `AnyOfValidator`: Add unit tests with an empty list for allowed values. [#96]
45+
46+
### New contributors
47+
48+
- [@TomasHalgas] made their first contributions in [#89] and [#91].
49+
50+
[#89]: https://github.com/binary-butterfly/validataclass/pull/89
51+
[#91]: https://github.com/binary-butterfly/validataclass/pull/91
52+
[#94]: https://github.com/binary-butterfly/validataclass/pull/94
53+
[#95]: https://github.com/binary-butterfly/validataclass/pull/95
54+
[#96]: https://github.com/binary-butterfly/validataclass/pull/96
55+
[#97]: https://github.com/binary-butterfly/validataclass/pull/97
56+
[#98]: https://github.com/binary-butterfly/validataclass/pull/98
57+
[#99]: https://github.com/binary-butterfly/validataclass/pull/99
58+
59+
[@TomasHalgas]: https://github.com/TomasHalgas
60+
61+
962
## [0.7.2](https://github.com/binary-butterfly/validataclass/releases/tag/0.7.2) - 2022-09-26
1063

1164
[Full changelog](https://github.com/binary-butterfly/validataclass/compare/0.7.1...0.7.2)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you add the package to your dependencies, it is recommended to use [compatibl
2121
version specifiers to make sure you always get the latest version of the library but without running into breaking changes:
2222

2323
```shell
24-
pip install validataclass~=0.7
24+
pip install validataclass~=0.8
2525
```
2626

2727
However, keep in mind that the library still is in its beta phase (as indicated by the major version of 0). There can

0 commit comments

Comments
 (0)