v3.0.0
What's Changed
- Trim heading spaces in Windows by @eggplants in #28
- Consider filesystem encoding for length calculations: #26 (Thanks to @virlos)
- Fix type model: #29 (Thanks to @rogalski)
- Fix sanitizing of filenames that only consist of whitespaces and periods
- Add
validate_unprintable_char
function - Add
validate_after_sanitize
keyword argument tosanitize_filename
andsanitize_filepath
functions - Add error codes to
ErrorReason
- Add
zip_safe=False
tosetup
- Modify to accept
pathvalidate.Platform
type asplatform
arguments - Rename type alias from
Handler
toNullValueHandler
- Remove
InvalidLengthError
to useValidationError
- Improve type annotations
- Make it possible to import
FileNameValidator
andFilePathValidator
classes from the package root - Change constructor arguments of
FileNameSanitizer
andFilePathSanitizer
classes- Remove
min_len
- Add
validator
- Remove
- Remove deprecated functions
- Modify error messages
- Refactoring
Full Changelog: v2.5.2...v3.0.0