Pathvalidate

Latest version: v3.2.0

Safety actively analyzes 621688 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 8

3.2.0

- Add `reserved_name_handler` argument to `sanitize_filename` function and `sanitize_filepath` function
- Add `NullValueHandler` class and `ReservedNameHandler` class
- Add `fs_encoding` property and `byte_count` property to `ValidationError` class
- Add `additional_reserved_names` argument to validate/sanitize functions to allow custom reserved names
- Modify the return value format of `ValidationError.__str__` method
- Improve type annotations

**Full Changelog**: https://github.com/thombashi/pathvalidate/compare/v3.1.0...v3.2.0

3.1.0

- Fix validation error messages to show the `target-platform` properly: 34 (Thanks to matanster)
- Fix README: out of date with the actual error generated by `validate_filename` 35 (Thanks to hXtreme)
- Add `description` property to `ErrorReason` class
- Add `as_slog` method to `ValidationError` class
- Add `docs` extras
- Change the type of the return value of `ValidationError.reason` from `Optional[ErrorReason]` to `ErrorReason`
- Update `[build-system]`
- Drop support for Python 3.6


**Full Changelog**: https://github.com/thombashi/pathvalidate/compare/v3.0.0...v3.1.0

3.0.0

What's Changed
- Trim heading spaces in Windows by eggplants in https://github.com/thombashi/pathvalidate/pull/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 to `sanitize_filename` and `sanitize_filepath` functions
- Add error codes to `ErrorReason`
- Add `zip_safe=False` to `setup`
- Modify to accept `pathvalidate.Platform` type as `platform` arguments
- Rename type alias from `Handler` to `NullValueHandler`
- Remove `InvalidLengthError` to use `ValidationError`
- Improve type annotations
- Make it possible to import `FileNameValidator` and `FilePathValidator` classes from the package root
- Change constructor arguments of `FileNameSanitizer` and `FilePathSanitizer` classes
- Remove `min_len`
- Add `validator`
- Remove deprecated functions
- Modify error messages
- Refactoring

**Full Changelog**: https://github.com/thombashi/pathvalidate/compare/v2.5.2...v3.0.0

2.5.2

- Add support for Python 3.11: 22 (Thanks to hegjon)

**Full Changelog**: https://github.com/thombashi/pathvalidate/compare/v2.5.1...v2.5.2

2.5.1

What's Changed
* Add `__all__` by eggplants in https://github.com/thombashi/pathvalidate/pull/24
* Add `DeprecationWarning` to deprecated functions


New Contributors
* eggplants made their first contribution in https://github.com/thombashi/pathvalidate/pull/24

**Full Changelog**: https://github.com/thombashi/pathvalidate/compare/v2.5.0...v2.5.1

2.5.0

- Add support for Python 3.10
- Drop support for Python 3.5
- Add `null_value_handler` argument to `sanitize_filename`/`sanitize_filepath` functions: 20 (Thanks to
mkbloke)
- Add `AbstractSanitizer`/`AbstractValidator` classes to import path
- Add `replace_ansi_escape` function
- Add `setup-ci` target to `Makefile`
- Modify `min_len`/`max_len` to use default values when assigned minus values

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.