Skip to content

Releases: thombashi/pathvalidate

v3.2.1

23 Aug 07:24
v3.2.1
Compare
Choose a tag to compare

What's Changed

  • Test Python 3.12 in CIs by @MatthieuDartiailh in #40
  • Bump actions/setup-python from 4 to 5 by @dependabot in #36
  • Bump actions/upload-artifact from 3 to 4 by @dependabot in #38
  • Bump actions/download-artifact from 3 to 4 by @dependabot in #37
  • Fix CI by @thombashi in #41
  • Update the CI workflow to include a job that publishes packages to TestPyPI by @thombashi in #42
  • Fix coverage report by @thombashi in #45
  • Fix sanitize_filename truncation by @7x11x13 in #48
  • Fix validation functions of filepaths by @thombashi in #55
    • If platform argument is windows or universal, filepaths ending with a space or a period should be detected as an error
    • Fix POSIX-style absolute paths were not detected as errors with platform="windows" or platform="universal" on Python 3.12 and below
  • Add support for Python 3.13 by @thombashi in #56
  • Improve type annotations
  • Add a build and publish workflow
  • Add Sigstore signatures to release assets
  • Update copyright year to include the last update year: #54 (Thanks to @Flimm)
  • Add CHANGELOG

New Contributors

Full Changelog: v3.2.0...v3.2.1

v3.2.0

17 Sep 03:04
v3.2.0
Compare
Choose a tag to compare
  • 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: v3.1.0...v3.2.0

v3.1.0

16 Jul 03:03
Compare
Choose a tag to compare
  • 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: v3.0.0...v3.1.0

v3.0.0

22 May 14:20
v3.0.0
Compare
Choose a tag to compare

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 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: v2.5.2...v3.0.0

v2.5.2

20 Aug 16:31
v2.5.2
Compare
Choose a tag to compare
  • Add support for Python 3.11: #22 (Thanks to @hegjon)

Full Changelog: v2.5.1...v2.5.2

v2.5.1

31 Jul 17:07
v2.5.1
Compare
Choose a tag to compare

What's Changed

  • Add __all__ by @eggplants in #24
  • Add DeprecationWarning to deprecated functions

New Contributors

Full Changelog: v2.5.0...v2.5.1

v2.5.0

26 Sep 13:54
v2.5.0
Compare
Choose a tag to compare
  • 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

v2.4.1

03 Apr 16:50
v2.4.1
Compare
Choose a tag to compare
  • Fix filename validations that include '\' (backslash) on other than Windows: #18 (Thanks to @Traktormaster)

v2.4.0

21 Mar 13:28
v2.4.0
Compare
Choose a tag to compare
  • Add exclude_symbols argument to replace_symbol function
  • Fix permissions of files included in sdist package binary (Thanks to @hegjon)

v2.3.2

03 Jan 09:40
v2.3.2
Compare
Choose a tag to compare
  • Fix to disallow file name/path that only white spaces for universal platform