Package: wnpp Severity: wishlist X-Debbugs-Cc: python-modules-t...@lists.alioth.debian.org
* Package name : python3-pathvalidate Version : 2.4.1 Upstream Author : https://github.com/thombashi * URL : https://github.com/thombashi/pathvalidate * License : MIT/X Programming Lang: Python Description : Python library to sanitize/validate a string such as filenames/file-paths/etc Features - Sanitize/Validate a string as a: file name, file path - file name/path argument validator/sanitizer for argparse and click - Multi platform support: - sanitize/validate file names/paths for a specific platform (Linux/Windows/macOS/Posix) or universal (platform independent) - Multibyte character support I ended up on this module by googling for ways to verify if any given filename/path is "legit". In DataLad project we relied on side effect of pathlib.Path().exists() to blow up for filenames not supported by OS. Since Python 3.9 it no longer has that side-effect so we have switched to rely on the side-effect of .resolve() which still does blow up, but who knows if it would be in the future.