Open hegjon opened 5 months ago
For more details: https://bugzilla.redhat.com/show_bug.cgi?id=2259547
The bugzilla issue was with pathvalidate 2.5.2. Here is the locally reproduced output with pathvalidate 3.2.0:
+ cd pathvalidate-3.2.0 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + PATH=/builddir/build/BUILDROOT/python-pathvalidate-3.2.0-1.fc40.x86_64/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-pathvalidate-3.2.0-1.fc40.x86_64/usr/lib64/python3.13/site-packages:/builddir/build/BUILDROOT/python-pathvalidate-3.2.0-1.fc40.x86_64/usr/lib/python3.13/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/pathvalidate-3.2.0/.pyproject-builddir' + PYTEST_XDIST_AUTO_NUM_WORKERS=4 + /usr/bin/pytest ============================= test session starts ============================== platform linux -- Python 3.13.0a3, pytest-7.4.3, pluggy-1.3.0 rootdir: /builddir/build/BUILD/pathvalidate-3.2.0 configfile: pyproject.toml testpaths: test collected 3727 items test/test_argparse.py ...........ss............ssssss [ 0%] test/test_click.py ................ [ 1%] test/test_common.py .................................................... [ 2%] ........................................................................ [ 4%] ........................................................................ [ 6%] ................................................................. [ 8%] test/test_error.py ... [ 8%] test/test_filename.py .................................................. [ 9%] ........................................................................ [ 11%] ................................................................ss...... [ 13%] ........................................................................ [ 15%] ........................................................................ [ 17%] ........................................................................ [ 19%] ..................F.F..FFF.F..FF........................................ [ 21%] ........................................................................ [ 23%] ........................................................................ [ 25%] ........................................................................ [ 27%] ........................................................................ [ 29%] ........................................................................ [ 30%] ........................................................................ [ 32%] ........................................................................ [ 34%] ........................................................................ [ 36%] ........................................................................ [ 38%] .................. [ 39%] test/test_filepath.py .................................................. [ 40%] ...................................................F...s................ [ 42%] ......ss................................................................ [ 44%] ........................................................................ [ 46%] ........................................................................ [ 48%] ........................................................................ [ 50%] ........................................................................ [ 52%] ........................................................................ [ 54%] ........................................................................ [ 55%] ........................................................................ [ 57%] ........................................................................ [ 59%] ........................................................................ [ 61%] ........................................................................ [ 63%] ........................................................................ [ 65%] ........................................................................ [ 67%] ........................................................................ [ 69%] ........................................................................ [ 71%] ........................................................................ [ 73%] ........................................................................ [ 75%] ........................................................................ [ 77%] ...............................................................s...... [ 79%] test/test_handler.py .................. [ 79%] test/test_ltsv.py ...................................................... [ 81%] ........................................................................ [ 82%] ........................................................................ [ 84%] ........................................................................ [ 86%] ............................... [ 87%] test/test_symbol.py .................................................... [ 89%] ..........ss............................................................ [ 90%] ........................................................................ [ 92%] ........................................................................ [ 94%] ........................................................................ [ 96%] ...............................................................ss....... [ 98%] ................................................. [100%] =================================== FAILURES =================================== _____ Test_validate_filename.test_win_abs_path[windows-\\-ValidationError] _____ self = <test.test_filename.Test_validate_filename object at 0x7f1ce9125e50> platform = 'windows', value = '\\' expected = <class 'pathvalidate.error.ValidationError'> @pytest.mark.parametrize( ["platform", "value", "expected"], [ [win_abspath, platform, None] for win_abspath, platform in product( ["linux", "macos", "posix"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "], ) ] + [ [win_abspath, platform, ValidationError] for win_abspath, platform in product( ["windows", "universal"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "] ) ], ) def test_win_abs_path(self, platform, value, expected): if expected is None: validate_filename(value, platform=platform) else: with pytest.raises(expected) as e: validate_filename(value, platform=platform) > assert e.value.reason == ErrorReason.FOUND_ABS_PATH E AssertionError: assert <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> == <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> E + where <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> = [PV1100] invalid characters found: invalids=('\\'), value='\\', platform=Windows.reason E + where [PV1100] invalid characters found: invalids=('\\'), value='\\', platform=Windows = <ExceptionInfo [PV1100] invalid characters found: invalids=('\\'), value='\\', platform=Windows tblen=4>.value E + and <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> = ErrorReason.FOUND_ABS_PATH test/test_filename.py:416: AssertionError ____ Test_validate_filename.test_win_abs_path[windows-\\ -ValidationError] _____ self = <test.test_filename.Test_validate_filename object at 0x7f1ce9125f70> platform = 'windows', value = '\\ ' expected = <class 'pathvalidate.error.ValidationError'> @pytest.mark.parametrize( ["platform", "value", "expected"], [ [win_abspath, platform, None] for win_abspath, platform in product( ["linux", "macos", "posix"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "], ) ] + [ [win_abspath, platform, ValidationError] for win_abspath, platform in product( ["windows", "universal"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "] ) ], ) def test_win_abs_path(self, platform, value, expected): if expected is None: validate_filename(value, platform=platform) else: with pytest.raises(expected) as e: validate_filename(value, platform=platform) > assert e.value.reason == ErrorReason.FOUND_ABS_PATH E AssertionError: assert <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> == <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> E + where <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> = [PV1100] invalid characters found: invalids=('\\'), value='\\ ', platform=Windows.reason E + where [PV1100] invalid characters found: invalids=('\\'), value='\\ ', platform=Windows = <ExceptionInfo [PV1100] invalid characters found: invalids=('\\'), value='\\ ', platform=Windows tblen=4>.value E + and <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> = ErrorReason.FOUND_ABS_PATH test/test_filename.py:416: AssertionError ___ Test_validate_filename.test_win_abs_path[windows-\\xyz-ValidationError] ____ self = <test.test_filename.Test_validate_filename object at 0x7f1ce9126120> platform = 'windows', value = '\\xyz' expected = <class 'pathvalidate.error.ValidationError'> @pytest.mark.parametrize( ["platform", "value", "expected"], [ [win_abspath, platform, None] for win_abspath, platform in product( ["linux", "macos", "posix"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "], ) ] + [ [win_abspath, platform, ValidationError] for win_abspath, platform in product( ["windows", "universal"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "] ) ], ) def test_win_abs_path(self, platform, value, expected): if expected is None: validate_filename(value, platform=platform) else: with pytest.raises(expected) as e: validate_filename(value, platform=platform) > assert e.value.reason == ErrorReason.FOUND_ABS_PATH E AssertionError: assert <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> == <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> E + where <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> = [PV1100] invalid characters found: invalids=('\\'), value='\\xyz', platform=Windows.reason E + where [PV1100] invalid characters found: invalids=('\\'), value='\\xyz', platform=Windows = <ExceptionInfo [PV1100] invalid characters found: invalids=('\\'), value='\\xyz', platform=Windows tblen=4>.value E + and <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> = ErrorReason.FOUND_ABS_PATH test/test_filename.py:416: AssertionError ___ Test_validate_filename.test_win_abs_path[windows-\\xyz -ValidationError] ___ self = <test.test_filename.Test_validate_filename object at 0x7f1ce91261b0> platform = 'windows', value = '\\xyz ' expected = <class 'pathvalidate.error.ValidationError'> @pytest.mark.parametrize( ["platform", "value", "expected"], [ [win_abspath, platform, None] for win_abspath, platform in product( ["linux", "macos", "posix"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "], ) ] + [ [win_abspath, platform, ValidationError] for win_abspath, platform in product( ["windows", "universal"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "] ) ], ) def test_win_abs_path(self, platform, value, expected): if expected is None: validate_filename(value, platform=platform) else: with pytest.raises(expected) as e: validate_filename(value, platform=platform) > assert e.value.reason == ErrorReason.FOUND_ABS_PATH E AssertionError: assert <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> == <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> E + where <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> = [PV1100] invalid characters found: invalids=('\\'), value='\\xyz ', platform=Windows.reason E + where [PV1100] invalid characters found: invalids=('\\'), value='\\xyz ', platform=Windows = <ExceptionInfo [PV1100] invalid characters found: invalids=('\\'), value='\\xyz ', platform=Windows tblen=4>.value E + and <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> = ErrorReason.FOUND_ABS_PATH test/test_filename.py:416: AssertionError ____ Test_validate_filename.test_win_abs_path[universal-\\-ValidationError] ____ self = <test.test_filename.Test_validate_filename object at 0x7f1ce9126240> platform = 'universal', value = '\\' expected = <class 'pathvalidate.error.ValidationError'> @pytest.mark.parametrize( ["platform", "value", "expected"], [ [win_abspath, platform, None] for win_abspath, platform in product( ["linux", "macos", "posix"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "], ) ] + [ [win_abspath, platform, ValidationError] for win_abspath, platform in product( ["windows", "universal"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "] ) ], ) def test_win_abs_path(self, platform, value, expected): if expected is None: validate_filename(value, platform=platform) else: with pytest.raises(expected) as e: validate_filename(value, platform=platform) > assert e.value.reason == ErrorReason.FOUND_ABS_PATH E AssertionError: assert <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> == <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> E + where <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> = [PV1100] invalid characters found: invalids=('\\'), value='\\', platform=Windows.reason E + where [PV1100] invalid characters found: invalids=('\\'), value='\\', platform=Windows = <ExceptionInfo [PV1100] invalid characters found: invalids=('\\'), value='\\', platform=Windows tblen=4>.value E + and <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> = ErrorReason.FOUND_ABS_PATH test/test_filename.py:416: AssertionError ___ Test_validate_filename.test_win_abs_path[universal-\\ -ValidationError] ____ self = <test.test_filename.Test_validate_filename object at 0x7f1ce9126360> platform = 'universal', value = '\\ ' expected = <class 'pathvalidate.error.ValidationError'> @pytest.mark.parametrize( ["platform", "value", "expected"], [ [win_abspath, platform, None] for win_abspath, platform in product( ["linux", "macos", "posix"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "], ) ] + [ [win_abspath, platform, ValidationError] for win_abspath, platform in product( ["windows", "universal"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "] ) ], ) def test_win_abs_path(self, platform, value, expected): if expected is None: validate_filename(value, platform=platform) else: with pytest.raises(expected) as e: validate_filename(value, platform=platform) > assert e.value.reason == ErrorReason.FOUND_ABS_PATH E AssertionError: assert <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> == <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> E + where <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> = [PV1100] invalid characters found: invalids=('\\'), value='\\ ', platform=Windows.reason E + where [PV1100] invalid characters found: invalids=('\\'), value='\\ ', platform=Windows = <ExceptionInfo [PV1100] invalid characters found: invalids=('\\'), value='\\ ', platform=Windows tblen=4>.value E + and <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> = ErrorReason.FOUND_ABS_PATH test/test_filename.py:416: AssertionError __ Test_validate_filename.test_win_abs_path[universal-\\xyz-ValidationError] ___ self = <test.test_filename.Test_validate_filename object at 0x7f1ce9126510> platform = 'universal', value = '\\xyz' expected = <class 'pathvalidate.error.ValidationError'> @pytest.mark.parametrize( ["platform", "value", "expected"], [ [win_abspath, platform, None] for win_abspath, platform in product( ["linux", "macos", "posix"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "], ) ] + [ [win_abspath, platform, ValidationError] for win_abspath, platform in product( ["windows", "universal"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "] ) ], ) def test_win_abs_path(self, platform, value, expected): if expected is None: validate_filename(value, platform=platform) else: with pytest.raises(expected) as e: validate_filename(value, platform=platform) > assert e.value.reason == ErrorReason.FOUND_ABS_PATH E AssertionError: assert <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> == <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> E + where <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> = [PV1100] invalid characters found: invalids=('\\'), value='\\xyz', platform=Windows.reason E + where [PV1100] invalid characters found: invalids=('\\'), value='\\xyz', platform=Windows = <ExceptionInfo [PV1100] invalid characters found: invalids=('\\'), value='\\xyz', platform=Windows tblen=4>.value E + and <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> = ErrorReason.FOUND_ABS_PATH test/test_filename.py:416: AssertionError __ Test_validate_filename.test_win_abs_path[universal-\\xyz -ValidationError] __ self = <test.test_filename.Test_validate_filename object at 0x7f1ce91265a0> platform = 'universal', value = '\\xyz ' expected = <class 'pathvalidate.error.ValidationError'> @pytest.mark.parametrize( ["platform", "value", "expected"], [ [win_abspath, platform, None] for win_abspath, platform in product( ["linux", "macos", "posix"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "], ) ] + [ [win_abspath, platform, ValidationError] for win_abspath, platform in product( ["windows", "universal"], ["\\", "\\\\", "\\ ", "C:\\", "c:\\", "\\xyz", "\\xyz "] ) ], ) def test_win_abs_path(self, platform, value, expected): if expected is None: validate_filename(value, platform=platform) else: with pytest.raises(expected) as e: validate_filename(value, platform=platform) > assert e.value.reason == ErrorReason.FOUND_ABS_PATH E AssertionError: assert <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> == <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> E + where <ErrorReason.INVALID_CHARACTER: ('PV1100', 'INVALID_CHARACTER', 'invalid characters found')> = [PV1100] invalid characters found: invalids=('\\'), value='\\xyz ', platform=Windows.reason E + where [PV1100] invalid characters found: invalids=('\\'), value='\\xyz ', platform=Windows = <ExceptionInfo [PV1100] invalid characters found: invalids=('\\'), value='\\xyz ', platform=Windows tblen=4>.value E + and <ErrorReason.FOUND_ABS_PATH: ('PV1200', 'FOUND_ABS_PATH', 'found an absolute path where must be a relative path')> = ErrorReason.FOUND_ABS_PATH test/test_filename.py:416: AssertionError ________ Test_validate_filepath.test_abs_path[windows-/a/b/c.txt-None] _________ self = <test.test_filepath.Test_validate_filepath object at 0x7f1ce8ed6f90> test_platform = 'windows', value = '/a/b/c.txt', expected = None @pytest.mark.parametrize( ["test_platform", "value", "expected"], [ ["linux", "/a/b/c.txt", None], ["linux", "C:\\a\\b\\c.txt", ValidationError], ["windows", "/a/b/c.txt", None], ["windows", "C:\\a\\b\\c.txt", None], ["universal", "/a/b/c.txt", ValidationError], ["universal", "C:\\a\\b\\c.txt", ValidationError], ], ) def test_abs_path(self, test_platform, value, expected): if expected is None: > validate_filepath(value, platform=test_platform) test/test_filepath.py:292: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathvalidate/_filepath.py:371: in validate_filepath ).validate(file_path) pathvalidate/_filepath.py:195: in validate self.validate_abspath(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pathvalidate._filepath.FilePathValidator object at 0x7f1ce8665310> value = '/a/b/c.txt' def validate_abspath(self, value: PathType) -> None: is_posix_abs = posixpath.isabs(value) is_nt_abs = ntpath.isabs(value) err_object = ValidationError( description=( "an invalid absolute file path ({}) for the platform ({}).".format( value, self.platform.value ) + " to avoid the error, specify an appropriate platform corresponding to" + " the path format or 'auto'." ), platform=self.platform, reason=ErrorReason.MALFORMED_ABS_PATH, ) if any([self._is_windows() and is_nt_abs, self._is_linux() and is_posix_abs]): return if self._is_universal() and any([is_posix_abs, is_nt_abs]): ValidationError( description=( ("POSIX style" if is_posix_abs else "NT style") + " absolute file path found. expected a platform-independent file path." ), platform=self.platform, reason=ErrorReason.MALFORMED_ABS_PATH, ) if self._is_windows(include_universal=True) and is_posix_abs: > raise err_object E pathvalidate.error.ValidationError: [PV1201] found a malformed absolute path: platform=Windows, description=an invalid absolute file path (/a/b/c.txt) for the platform (Windows). to avoid the error, specify an appropriate platform corresponding to the path format or 'auto'. pathvalidate/_filepath.py:269: ValidationError =============================== warnings summary =============================== ../../../../usr/lib/python3.13/site-packages/_pytest/config/__init__.py:1373 /usr/lib/python3.13/site-packages/_pytest/config/__init__.py:1373: PytestConfigWarning: Unknown config option: discord_verbose self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") ../../../../usr/lib/python3.13/site-packages/_pytest/config/__init__.py:1373 /usr/lib/python3.13/site-packages/_pytest/config/__init__.py:1373: PytestConfigWarning: Unknown config option: md_report self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") ../../../../usr/lib/python3.13/site-packages/_pytest/config/__init__.py:1373 /usr/lib/python3.13/site-packages/_pytest/config/__init__.py:1373: PytestConfigWarning: Unknown config option: md_report_color self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") ../../../../usr/lib/python3.13/site-packages/_pytest/config/__init__.py:1373 /usr/lib/python3.13/site-packages/_pytest/config/__init__.py:1373: PytestConfigWarning: Unknown config option: md_report_verbose self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") test/test_filename.py::Test_sanitize_filename::test_normal_check_reserved[CON-True-CON_] test/test_filename.py::Test_sanitize_filename::test_normal_check_reserved[CON-True-CON_] test/test_filename.py::Test_sanitize_filename::test_normal_check_reserved[CON-False-CON] test/test_filename.py::Test_sanitize_filename::test_normal_check_reserved[CON-False-CON] /builddir/build/BUILD/pathvalidate-3.2.0/pathvalidate/_filename.py:450: DeprecationWarning: 'check_reserved' is deprecated. Use 'reserved_name_handler' instead. warnings.warn( test/test_filepath.py::Test_sanitize_filepath::test_normal_check_reserved[CON-True-CON_] test/test_filepath.py::Test_sanitize_filepath::test_normal_check_reserved[CON-False-CON] /builddir/build/BUILD/pathvalidate-3.2.0/pathvalidate/_filepath.py:499: DeprecationWarning: 'check_reserved' is deprecated. Use 'reserved_name_handler' instead. warnings.warn( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED test/test_filename.py::Test_validate_filename::test_win_abs_path[windows-\\-ValidationError] FAILED test/test_filename.py::Test_validate_filename::test_win_abs_path[windows-\\ -ValidationError] FAILED test/test_filename.py::Test_validate_filename::test_win_abs_path[windows-\\xyz-ValidationError] FAILED test/test_filename.py::Test_validate_filename::test_win_abs_path[windows-\\xyz -ValidationError] FAILED test/test_filename.py::Test_validate_filename::test_win_abs_path[universal-\\-ValidationError] FAILED test/test_filename.py::Test_validate_filename::test_win_abs_path[universal-\\ -ValidationError] FAILED test/test_filename.py::Test_validate_filename::test_win_abs_path[universal-\\xyz-ValidationError] FAILED test/test_filename.py::Test_validate_filename::test_win_abs_path[universal-\\xyz -ValidationError] FAILED test/test_filepath.py::Test_validate_filepath::test_abs_path[windows-/a/b/c.txt-None] =========== 9 failed, 3700 passed, 18 skipped, 10 warnings in 5.57s ============
Probably related: https://github.com/python/cpython/commit/e4ff131e01184b68d868cfd241a03f8b7d2e0ff9
For more details: https://bugzilla.redhat.com/show_bug.cgi?id=2259547
The bugzilla issue was with pathvalidate 2.5.2. Here is the locally reproduced output with pathvalidate 3.2.0: