From af499ca70bcc8a9523d848c6267dab04774abb192c89b8b4434b9d7dd77e4af3 Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Tue, 14 Jan 2025 13:36:41 +0000 Subject: [PATCH] - Update to 3.2.3 * Fix dot-files validation - from version 3.2.2 * Fix the detection logic of the reservation words for the file name on Windows * Drop support for Python 3.7/3.8 * Refactor type annotations OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pathvalidate?expand=0&rev=19 --- .gitattributes | 23 +++++++ .gitignore | 1 + pathvalidate-3.2.0.tar.gz | 3 + pathvalidate-3.2.1.tar.gz | 3 + pathvalidate-3.2.3.tar.gz | 3 + python-pathvalidate.changes | 123 ++++++++++++++++++++++++++++++++++++ python-pathvalidate.spec | 64 +++++++++++++++++++ 7 files changed, 220 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pathvalidate-3.2.0.tar.gz create mode 100644 pathvalidate-3.2.1.tar.gz create mode 100644 pathvalidate-3.2.3.tar.gz create mode 100644 python-pathvalidate.changes create mode 100644 python-pathvalidate.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pathvalidate-3.2.0.tar.gz b/pathvalidate-3.2.0.tar.gz new file mode 100644 index 0000000..a62fe53 --- /dev/null +++ b/pathvalidate-3.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e8378cf6712bff67fbe7a8307d99fa8c1a0cb28aa477056f8fc374f0dff24ad +size 31246 diff --git a/pathvalidate-3.2.1.tar.gz b/pathvalidate-3.2.1.tar.gz new file mode 100644 index 0000000..b986f2b --- /dev/null +++ b/pathvalidate-3.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5d07b1e2374187040612a1fcd2bcb2919f8db180df254c9581bb90bf903377d +size 59263 diff --git a/pathvalidate-3.2.3.tar.gz b/pathvalidate-3.2.3.tar.gz new file mode 100644 index 0000000..52399d2 --- /dev/null +++ b/pathvalidate-3.2.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59b5b9278e30382d6d213497623043ebe63f10e29055be4419a9c04c721739cb +size 61717 diff --git a/python-pathvalidate.changes b/python-pathvalidate.changes new file mode 100644 index 0000000..c47e47c --- /dev/null +++ b/python-pathvalidate.changes @@ -0,0 +1,123 @@ +------------------------------------------------------------------- +Tue Jan 14 11:12:53 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 3.2.3 + * Fix dot-files validation +- from version 3.2.2 + * Fix the detection logic of the reservation + words for the file name on Windows + * Drop support for Python 3.7/3.8 + * Refactor type annotations + +------------------------------------------------------------------- +Sat Aug 31 12:18:51 UTC 2024 - Dirk Müller + +- update to 3.2.1: + * Test Python 3.12 in CIs + * Fix coverage report + * Fix `sanitize_filename` truncation + * Fix validation functions of filepaths + * 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 + * Improve type annotations + * Add a build and publish workflow + * Add Sigstore signatures to release assets + +------------------------------------------------------------------- +Sat Dec 9 10:06:13 UTC 2023 - Dirk Müller + +- update to 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 +- update to 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 + +------------------------------------------------------------------- +Fri Feb 24 12:52:28 UTC 2023 - Daniel Garcia + +- Update to version 2.5.2 + * Add support for Python 3.11: #22 (Thanks to @hegjon) +- v2.5.1 + * Add __all__ by @eggplants in #24 + * Add DeprecationWarning to deprecated functions +- v2.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 +- v2.4.1 + * Fix filename validations that include '\' (backslash) on other + than Windows: #18 (Thanks to @Traktormaster) + +------------------------------------------------------------------- +Sun Mar 21 13:33:57 UTC 2021 - Martin Hauke + +- Update to version 2.4.0 + * Add exclude_symbols argument to replace_symbol function. + * Fix permissions of files included in sdist package binary. + +------------------------------------------------------------------- +Thu Nov 26 10:16:44 UTC 2020 - John Vandenberg + +- Update to v2.3.0 + * Change not to process for "."/".." by sanitization functions + * Change to normalize with sanitize_filepath in default + +------------------------------------------------------------------- +Sat Mar 28 12:35:30 UTC 2020 - Martin Hauke + +- Update to version 2.2.2 + * Fix __str__ method + * Fix to avoid raise an exception when an absolute path + includes "."/".." + * Modify an error message + * Modify raising exception from NullNameError to ValidationError + of validate_pathtype + +------------------------------------------------------------------- +Fri Mar 20 16:48:47 UTC 2020 - Martin Hauke + +- Update to version 2.2.1 + * Fix to include py.typed to the package + +------------------------------------------------------------------- +Sun Feb 16 09:54:22 UTC 2020 - Martin Hauke + +- Update to version 2.2.0 + * Add POSIX as a platform + * Change platform of validate_filepath_arg/sanitize_filepath_arg + to 'auto': + +------------------------------------------------------------------- +Sat Feb 8 09:47:08 UTC 2020 - Martin Hauke + +- Initial package, version 2.1.0 diff --git a/python-pathvalidate.spec b/python-pathvalidate.spec new file mode 100644 index 0000000..5072dcd --- /dev/null +++ b/python-pathvalidate.spec @@ -0,0 +1,64 @@ +# +# spec file for package python-pathvalidate +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-pathvalidate +Version: 3.2.3 +Release: 0 +Summary: Python library to sanitize/validate a string such as filenames +License: MIT +Group: Development/Languages/Python +URL: https://github.com/thombashi/pathvalidate +Source: https://files.pythonhosted.org/packages/source/p/pathvalidate/pathvalidate-%{version}.tar.gz +BuildRequires: %{python_module setuptools >= 38.3.0} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module Faker} +BuildRequires: %{python_module allpairspy} +BuildRequires: %{python_module click} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module tcolorpy} +# /SECTION +Requires: python-setuptools >= 38.3.0 +BuildArch: noarch +%python_subpackages + +%description +pathvalidate is a Python library to sanitize/validate a string such as +filenames/file-paths/etc. + +%prep +%setup -q -n pathvalidate-%{version} + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%files %{python_files} +%doc README.rst +%license LICENSE +%{python_sitelib}/pathvalidate* + +%changelog