v3.2.3 - 2025-01-03
- Fix dot-files validation by @thombashi in #60 (Thanks to @slingshotvfx)
Full Changelog: https://github.com/thombashi/pathvalidate/compare/v3.2.2...v3.2.3
v3.2.2 - 2025-01-01
- Fix the detection logic of the reservation words for the file name on Windows: #57 (Thanks to @jplarocque)
- Drop support for Python 3.7/3.8
- Refactor type annotations
Full Changelog: https://github.com/thombashi/pathvalidate/compare/v3.2.1...v3.2.2
v3.2.1 - 2024-08-23
- 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 iswindows
oruniversal
, 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"
orplatform="universal"
on Python 3.12 and below
- If
- 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
- @MatthieuDartiailh made their first contribution in #40
- @dependabot made their first contribution in #36
- @7x11x13 made their first contribution in #48
Full Changelog: https://github.com/thombashi/pathvalidate/compare/v3.2.0...v3.2.1
v3.2.0 - 2023-09-17
- Add
reserved_name_handler
argument tosanitize_filename
function andsanitize_filepath
function - Add
NullValueHandler
class andReservedNameHandler
class - Add
fs_encoding
property andbyte_count
property toValidationError
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
v3.1.0 - 2023-07-16
- 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 toErrorReason
class - Add
as_slog
method toValidationError
class - Add
docs
extras - Change the type of the return value of
ValidationError.reason
fromOptional[ErrorReason]
toErrorReason
- Update
[build-system]
- Drop support for Python 3.6
Full Changelog: https://github.com/thombashi/pathvalidate/compare/v3.0.0...v3.1.0
v3.0.0 - 2023-05-22
- 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: https://github.com/thombashi/pathvalidate/compare/v2.5.2...v3.0.0
v2.5.2 - 2022-08-20
Full Changelog: https://github.com/thombashi/pathvalidate/compare/v2.5.1...v2.5.2
v2.5.1 - 2022-07-31
- Add
__all__
by @eggplants in #24 - Add
DeprecationWarning
to deprecated functions
- @eggplants made their first contribution in #24
Full Changelog: https://github.com/thombashi/pathvalidate/compare/v2.5.0...v2.5.1
v2.5.0 - 2021-09-26
- Add support for Python 3.10
- Drop support for Python 3.5
- Add
null_value_handler
argument tosanitize_filename
/sanitize_filepath
functions: #20 (Thanks to @ mkbloke) - Add
AbstractSanitizer
/AbstractValidator
classes to import path - Add
replace_ansi_escape
function - Add
setup-ci
target toMakefile
- Modify
min_len
/max_len
to use default values when assigned minus values
v2.4.1 - 2021-04-03
- Fix filename validations that include
'\'
(backslash) on other than Windows: #18 (Thanks to @Traktormaster)
v2.4.0 - 2021-03-21
- Add
exclude_symbols
argument toreplace_symbol
function - Fix permissions of files included in
sdist
package binary (Thanks to @hegjon)
v2.3.2 - 2021-01-03
- Fix to disallow file name/path that only white spaces for
universal
platform
v2.3.1 - 2020-12-13
- Modify to accept file name/path that consists only whitespaces: #15 (Thank to @Traktormaster)
v2.3.0 - 2020-05-03
- Change not to process for
"."
/".."
by sanitization functions: #13 (Thanks to @ProfElectric) - Change to normalize with
sanitize_filepath
in default - Add normalize interface to
sanitize_filepath
v2.2.2 - 2020-03-28
- Improve file path validation for Windows platform: #12 (Thanks to @bschollnick)
- Fix
__str__
method - Fix to avoid raise an exception when an absolute path includes
"."
/".."
- Modify an error message
- Modify raising exception from
NullNameError
toValidationError
ofvalidate_pathtype
v2.2.1 - 2020-03-20
- Fix to include
py.typed
to the package
v2.2.0 - 2020-02-12
- Add
POSIX
as a platform - Add a reserved keyword for macOS
- Change platform of
validate_filepath_arg
/sanitize_filepath_arg
to'auto'
: #11 (Thanks to @freelanceAndy)
v2.1.0 - 2020-02-01
- Add
check_reserved
argument to validate/sanitize functions - Add
'/'
as a reserved file path for Linux/macOS - Suppress errors when sanitizing null values
- Fix
max_len
value check for file names - Include type annotation information to the package
- Remove
dev
extras_require - Bug fixes
v2.0.0 - 2020-01-13
- Change to be more strict validation for absolute paths
- Fix argparse validator/sanitizer failed when empty inputs
- Bug fixes
v1.1.0 - 2020-01-04
- Modify validate/sanitize functions for
argparse
- Modify validate/sanitize functions for
click
- Update
dev
extras
v1.0.0 - 2020-01-03
- Drop Python 2 support
- Modify to use Python 3 functionality
- Update
extras_require
- Bug fixes
- Remove a deprecated property
v0.29.1 - 2020-01-02
- Fix file path length validation: #10 (Thanks to @UncleGoogle)
- Add
.asc
files of packages to PyPI
v0.29.0 - 2019-06-16
- Add filename/filepath validators for
argparse
/click
- Modify error messages
v0.28.2 - 2019-05-18
- Fix to properly escape special chars for validation error messages: #9 (Thanks to @UncleGoogle)
v0.28.0 - 2019-05-01
- Drop support for Python 3.4
v0.26.0 - 2019-03-15
- Add support for NTFS reserved names
- Improve drive letter handling
v0.25.0 - 2019-03-14
- Add
CLOCK$
as a reserved filename for Windows platform: #8 (Thanks to @sparr) - Improve reserved name detection
- Add
reserved_name
property toReservedNameError
class
v0.24.1 - 2019-02-12
- Fix improper error messages
- Improve error message readability
v0.24.0 - 2019-02-03
- Add
is_valid_filename
/is_valid_filepath
function - Add
FileNameSanitizer
/FilePathSanitizer
classes - Add minimum length validation support
- Remove deprecated functions
v0.23.0 - 2019-01-06
- Improve sanitization/validation for files
- Add
.
and..
as reserved keywords for files - Add limit to
max_filename_len
- Fix platform specific sanitization: #7
- Fix reserved keywords sanitization/validation for files
- Integrate
InvalidCharWindowsError
intoInvalidCharError
- Change to use
ReservedNameError
instead ofInvalidReservedNameError
- Breaking changes
- Rename a property for
FileSanitizer
fromplatform_name
toplatform
- Rename methods argument from
platform_name
toplatform
- Rename a property for
v0.22.0 - 2018-12-23
- Add universal (platform independent) filename/filepath sanitization/validation
- Treat ASCII whitespace other than normal space as invalid on Windows #6 (Thanks to @nyuszika7h)
v0.21.1 - 2018-07-28
- Add support for PathLike object
- Bug fixes
v0.18.0 - 2018-07-07
- Add validations/sanitizations for unprintable characters
- Add support for Python 3.7
v0.15.0 - 2017-03-18
- Remove package dependencies
- pathvalidate functions are expected to passing unicode strings.
v0.14.0 - 2017-02-11
- Change max file name/path length to configurable
- Add support for Python 3.6
- Bug fixes
v0.13.0 - 2017-01-03
- Add JavaScript validator/sanitizer
- Bug fixes
v0.11.0 - 2016-12-25
- Add multibyte character validate/sanitize support
v0.10.0 - 2016-12-23
- Add LTSV support
v0.9.1 - 2016-11-17
- Support UTF8
v0.9.0 - 2016-11-13
- Add validate_symbol function
v0.8.2 - 2016-10-27
- Fix Windows path validation
- Bug fixes
v0.6.0 - 2016-09-19
- Add SQLite name validation function
v0.5.2 - 2016-08-20
- Fix validate/sanitize of excel sheet
- Subdividing errors
- Add file name validation for Windows reserved names and path length
v0.5.1 - 2016-07-23
- Modify error handling
v0.5.0 - 2016-07-17
- Drop support for Python 2.6
- Add validate_excel_sheet_name function
- Add sanitize_excel_sheet_name function
v0.4.2 - 2016-06-19
- Make pytest-runner a conditional requirement
v0.4.1 - 2016-05-29
- Modify replace_symbol function behavior
v0.4.0 - 2016-05-28
- Add validate_file_path/sanitize_file_path functions
- Fix validate/sanitize filename functions
- Fix validate/sanitize python variable name functions
v0.3.0 - 2016-05-22
- Add validate_python_var_name function
v0.2.0 - 2016-05-21
- Add sanitize_python_var_name function