python-pathvalidate fails to build with Python 3.11.0a4. =================================== FAILURES =================================== _ Test_validate_filepath.test_exception_invalid_char[17DOJ6bKqfdiULG0LywrS37oFh7LAmeHJJyGieLRVf4xjHkenEuiBa8P0zwknBE1\x0017DOJ6bKqfdiULG0LywrS37oFh7LAmeHJJyGieLRVf4xjHkenEuiBa8P0zwknBE1] _ self = <test.test_filepath.Test_validate_filepath object at 0x7f859d916750> value = '17DOJ6bKqfdiULG0LywrS37oFh7LAmeHJJyGieLRVf4xjHkenEuiBa8P0zwknBE1\x0017DOJ6bKqfdiULG0LywrS37oFh7LAmeHJJyGieLRVf4xjHkenEuiBa8P0zwknBE1' @pytest.mark.parametrize( ["value"], [["{0}{1}{0}".format(randstr(64), invalid_c)] for invalid_c in INVALID_PATH_CHARS], ) def test_exception_invalid_char(self, value): > with pytest.raises(ValidationError) as e: E Failed: DID NOT RAISE <class 'pathvalidate.error.ValidationError'> test/test_filepath.py:327: Failed _______ Test_sanitize_filepath.test_normal_str[universal-AA\x00B--AAB0] ________ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d839750> platform = 'universal', value = 'AA\x00B', replace_text = '', expected = 'AAB' @pytest.mark.parametrize( ["platform", "value", "replace_text", "expected"], [ ["universal", "AA" + c + "B", rep, "AA" + rep + "B"] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "A" + c + "B", rep, "A" + c + "B"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "ã‚" + c + "ã„", rep, "ã‚" + c + "ã„"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.repl + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": INVALID_PATH_CHARS + unprintable_ascii_chars, "repl": REPLACE_TEXTS, } ) ) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.c + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": [":", "*", "?", '"', "<", ">", "|"], "repl": REPLACE_TEXTS, } ) ) ], ) def test_normal_str(self, platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, platform=platform, replacement_text=replace_text) > assert sanitized_name == expected E AssertionError: assert 'AA' == 'AAB' E - AAB E ? - E + AA test/test_filepath.py:523: AssertionError ______ Test_sanitize_filepath.test_normal_str[universal-AA\x00B-_-AA_B0] _______ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d838210> platform = 'universal', value = 'AA\x00B', replace_text = '_', expected = 'AA_B' @pytest.mark.parametrize( ["platform", "value", "replace_text", "expected"], [ ["universal", "AA" + c + "B", rep, "AA" + rep + "B"] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "A" + c + "B", rep, "A" + c + "B"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "ã‚" + c + "ã„", rep, "ã‚" + c + "ã„"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.repl + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": INVALID_PATH_CHARS + unprintable_ascii_chars, "repl": REPLACE_TEXTS, } ) ) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.c + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": [":", "*", "?", '"', "<", ">", "|"], "repl": REPLACE_TEXTS, } ) ) ], ) def test_normal_str(self, platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, platform=platform, replacement_text=replace_text) > assert sanitized_name == expected E AssertionError: assert 'AA' == 'AA_B' E - AA_B E + AA test/test_filepath.py:523: AssertionError _______ Test_sanitize_filepath.test_normal_str[universal-AA\x00B--AAB1] ________ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d7b0290> platform = 'universal', value = 'AA\x00B', replace_text = '', expected = 'AAB' @pytest.mark.parametrize( ["platform", "value", "replace_text", "expected"], [ ["universal", "AA" + c + "B", rep, "AA" + rep + "B"] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "A" + c + "B", rep, "A" + c + "B"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "ã‚" + c + "ã„", rep, "ã‚" + c + "ã„"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.repl + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": INVALID_PATH_CHARS + unprintable_ascii_chars, "repl": REPLACE_TEXTS, } ) ) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.c + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": [":", "*", "?", '"', "<", ">", "|"], "repl": REPLACE_TEXTS, } ) ) ], ) def test_normal_str(self, platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, platform=platform, replacement_text=replace_text) > assert sanitized_name == expected E AssertionError: assert 'AA' == 'AAB' E - AAB E ? - E + AA test/test_filepath.py:523: AssertionError ______ Test_sanitize_filepath.test_normal_str[universal-AA\x00B-_-AA_B1] _______ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d826c90> platform = 'universal', value = 'AA\x00B', replace_text = '_', expected = 'AA_B' @pytest.mark.parametrize( ["platform", "value", "replace_text", "expected"], [ ["universal", "AA" + c + "B", rep, "AA" + rep + "B"] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "A" + c + "B", rep, "A" + c + "B"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "ã‚" + c + "ã„", rep, "ã‚" + c + "ã„"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.repl + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": INVALID_PATH_CHARS + unprintable_ascii_chars, "repl": REPLACE_TEXTS, } ) ) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.c + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": [":", "*", "?", '"', "<", ">", "|"], "repl": REPLACE_TEXTS, } ) ) ], ) def test_normal_str(self, platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, platform=platform, replacement_text=replace_text) > assert sanitized_name == expected E AssertionError: assert 'AA' == 'AA_B' E - AA_B E + AA test/test_filepath.py:523: AssertionError ___________ Test_sanitize_filepath.test_normal_str[posix-A\x00B--AB] ___________ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d71e8d0> platform = 'posix', value = 'A\x00B', replace_text = '', expected = 'AB' @pytest.mark.parametrize( ["platform", "value", "replace_text", "expected"], [ ["universal", "AA" + c + "B", rep, "AA" + rep + "B"] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "A" + c + "B", rep, "A" + c + "B"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "ã‚" + c + "ã„", rep, "ã‚" + c + "ã„"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.repl + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": INVALID_PATH_CHARS + unprintable_ascii_chars, "repl": REPLACE_TEXTS, } ) ) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.c + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": [":", "*", "?", '"', "<", ">", "|"], "repl": REPLACE_TEXTS, } ) ) ], ) def test_normal_str(self, platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, platform=platform, replacement_text=replace_text) > assert sanitized_name == expected E AssertionError: assert 'A' == 'AB' E - AB E + A test/test_filepath.py:523: AssertionError ___________ Test_sanitize_filepath.test_normal_str[linux-A\x00B--AB] ___________ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d857150> platform = 'linux', value = 'A\x00B', replace_text = '', expected = 'AB' @pytest.mark.parametrize( ["platform", "value", "replace_text", "expected"], [ ["universal", "AA" + c + "B", rep, "AA" + rep + "B"] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "A" + c + "B", rep, "A" + c + "B"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "ã‚" + c + "ã„", rep, "ã‚" + c + "ã„"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.repl + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": INVALID_PATH_CHARS + unprintable_ascii_chars, "repl": REPLACE_TEXTS, } ) ) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.c + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": [":", "*", "?", '"', "<", ">", "|"], "repl": REPLACE_TEXTS, } ) ) ], ) def test_normal_str(self, platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, platform=platform, replacement_text=replace_text) > assert sanitized_name == expected E AssertionError: assert 'A' == 'AB' E - AB E + A test/test_filepath.py:523: AssertionError __________ Test_sanitize_filepath.test_normal_str[linux-A\x00B-_-A_B] __________ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d886690> platform = 'linux', value = 'A\x00B', replace_text = '_', expected = 'A_B' @pytest.mark.parametrize( ["platform", "value", "replace_text", "expected"], [ ["universal", "AA" + c + "B", rep, "AA" + rep + "B"] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "A" + c + "B", rep, "A" + c + "B"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "ã‚" + c + "ã„", rep, "ã‚" + c + "ã„"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.repl + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": INVALID_PATH_CHARS + unprintable_ascii_chars, "repl": REPLACE_TEXTS, } ) ) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.c + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": [":", "*", "?", '"', "<", ">", "|"], "repl": REPLACE_TEXTS, } ) ) ], ) def test_normal_str(self, platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, platform=platform, replacement_text=replace_text) > assert sanitized_name == expected E AssertionError: assert 'A' == 'A_B' E - A_B E + A test/test_filepath.py:523: AssertionError _________ Test_sanitize_filepath.test_normal_str[macos-A\x00B-_-A_B0] __________ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d796e50> platform = 'macos', value = 'A\x00B', replace_text = '_', expected = 'A_B' @pytest.mark.parametrize( ["platform", "value", "replace_text", "expected"], [ ["universal", "AA" + c + "B", rep, "AA" + rep + "B"] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "A" + c + "B", rep, "A" + c + "B"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "ã‚" + c + "ã„", rep, "ã‚" + c + "ã„"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.repl + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": INVALID_PATH_CHARS + unprintable_ascii_chars, "repl": REPLACE_TEXTS, } ) ) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.c + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": [":", "*", "?", '"', "<", ">", "|"], "repl": REPLACE_TEXTS, } ) ) ], ) def test_normal_str(self, platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, platform=platform, replacement_text=replace_text) > assert sanitized_name == expected E AssertionError: assert 'A' == 'A_B' E - A_B E + A test/test_filepath.py:523: AssertionError __________ Test_sanitize_filepath.test_normal_str[posix-A\x00B-_-A_B] __________ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d72d2d0> platform = 'posix', value = 'A\x00B', replace_text = '_', expected = 'A_B' @pytest.mark.parametrize( ["platform", "value", "replace_text", "expected"], [ ["universal", "AA" + c + "B", rep, "AA" + rep + "B"] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "A" + c + "B", rep, "A" + c + "B"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "ã‚" + c + "ã„", rep, "ã‚" + c + "ã„"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.repl + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": INVALID_PATH_CHARS + unprintable_ascii_chars, "repl": REPLACE_TEXTS, } ) ) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.c + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": [":", "*", "?", '"', "<", ">", "|"], "repl": REPLACE_TEXTS, } ) ) ], ) def test_normal_str(self, platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, platform=platform, replacement_text=replace_text) > assert sanitized_name == expected E AssertionError: assert 'A' == 'A_B' E - A_B E + A test/test_filepath.py:523: AssertionError _________ Test_sanitize_filepath.test_normal_str[macos-A\x00B-_-A_B1] __________ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d634c50> platform = 'macos', value = 'A\x00B', replace_text = '_', expected = 'A_B' @pytest.mark.parametrize( ["platform", "value", "replace_text", "expected"], [ ["universal", "AA" + c + "B", rep, "AA" + rep + "B"] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "A" + c + "B", rep, "A" + c + "B"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ ["universal", "ã‚" + c + "ã„", rep, "ã‚" + c + "ã„"] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.repl + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": INVALID_PATH_CHARS + unprintable_ascii_chars, "repl": REPLACE_TEXTS, } ) ) ] + [ [pair.platform, "A" + pair.c + "B", pair.repl, "A" + pair.c + "B"] for pair in AllPairs( OrderedDict( { "platform": ["posix", "linux", "macos"], "c": [":", "*", "?", '"', "<", ">", "|"], "repl": REPLACE_TEXTS, } ) ) ], ) def test_normal_str(self, platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, platform=platform, replacement_text=replace_text) > assert sanitized_name == expected E AssertionError: assert 'A' == 'A_B' E - A_B E + A test/test_filepath.py:523: AssertionError _______ Test_sanitize_filepath.test_normal_pathlike[value14--expected14] _______ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d7a6fd0> value = PosixPath('AA\x00B'), replace_text = '', expected = PosixPath('AAB') @pytest.mark.parametrize( ["value", "replace_text", "expected"], [ [Path("AA" + c + "B"), rep, Path("AA" + rep + "B")] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [Path("A" + c + "B"), rep, Path("A" + c + "B")] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [Path("ã‚" + c + "ã„"), rep, Path("ã‚" + c + "ã„")] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ], ) def test_normal_pathlike(self, value, replace_text, expected): sanitized_name = sanitize_filepath(value, replace_text) > assert sanitized_name == expected E AssertionError: assert PosixPath('AA') == PosixPath('AAB') test/test_filepath.py:611: AssertionError ______ Test_sanitize_filepath.test_normal_pathlike[value15-_-expected15] _______ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859e122b10> value = PosixPath('AA\x00B'), replace_text = '_', expected = PosixPath('AA_B') @pytest.mark.parametrize( ["value", "replace_text", "expected"], [ [Path("AA" + c + "B"), rep, Path("AA" + rep + "B")] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [Path("A" + c + "B"), rep, Path("A" + c + "B")] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [Path("ã‚" + c + "ã„"), rep, Path("ã‚" + c + "ã„")] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ], ) def test_normal_pathlike(self, value, replace_text, expected): sanitized_name = sanitize_filepath(value, replace_text) > assert sanitized_name == expected E AssertionError: assert PosixPath('AA') == PosixPath('AA_B') test/test_filepath.py:611: AssertionError _______ Test_sanitize_filepath.test_normal_pathlike[value16--expected16] _______ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d680090> value = PosixPath('AA\x00B'), replace_text = '', expected = PosixPath('AAB') @pytest.mark.parametrize( ["value", "replace_text", "expected"], [ [Path("AA" + c + "B"), rep, Path("AA" + rep + "B")] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [Path("A" + c + "B"), rep, Path("A" + c + "B")] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [Path("ã‚" + c + "ã„"), rep, Path("ã‚" + c + "ã„")] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ], ) def test_normal_pathlike(self, value, replace_text, expected): sanitized_name = sanitize_filepath(value, replace_text) > assert sanitized_name == expected E AssertionError: assert PosixPath('AA') == PosixPath('AAB') test/test_filepath.py:611: AssertionError ______ Test_sanitize_filepath.test_normal_pathlike[value17-_-expected17] _______ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d4f1350> value = PosixPath('AA\x00B'), replace_text = '_', expected = PosixPath('AA_B') @pytest.mark.parametrize( ["value", "replace_text", "expected"], [ [Path("AA" + c + "B"), rep, Path("AA" + rep + "B")] for c, rep in product(SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [Path("A" + c + "B"), rep, Path("A" + c + "B")] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ] + [ [Path("ã‚" + c + "ã„"), rep, Path("ã‚" + c + "ã„")] for c, rep in product(NOT_SANITIZE_CHARS, REPLACE_TEXTS) ], ) def test_normal_pathlike(self, value, replace_text, expected): sanitized_name = sanitize_filepath(value, replace_text) > assert sanitized_name == expected E AssertionError: assert PosixPath('AA') == PosixPath('AA_B') test/test_filepath.py:611: AssertionError _ Test_sanitize_filepath.test_normal_multibyte[linux-/tmp/\u3042\u3044\u3046\x00\u3048\u304a.txt--/tmp/\u3042\u3044\u3046\u3048\u304a.txt] _ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d50ed90> test_platform = 'linux', value = '/tmp/ã‚ã„ã†\x00ãˆãŠ.txt', replace_text = '' expected = '/tmp/ã‚ã„ã†ãˆãŠ.txt' @pytest.mark.parametrize( ["test_platform", "value", "replace_text", "expected"], [ ["linux", "/tmp/ã‚ã„ã†\0ãˆãŠ.txt", "", "/tmp/ã‚ã„ã†ãˆãŠ.txt"], ["linux", "/tmp/属\0性.txt", "-", "/tmp/属-性.txt"], ["universal", "tmp/ã‚ã„ã†\0ãˆãŠ.txt", "", "tmp/ã‚ã„ã†ãˆãŠ.txt"], ["universal", "tmp/属\0性.txt", "-", "tmp/属-性.txt"], ], ) def test_normal_multibyte(self, test_platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, replace_text, platform=test_platform) > assert sanitized_name == expected E AssertionError: assert '/tmp/ã‚ã„ã†' == '/tmp/ã‚ã„ã†ãˆãŠ.txt' E - /tmp/ã‚ã„ã†ãˆãŠ.txt E + /tmp/ã‚ã„ㆠtest/test_filepath.py:676: AssertionError _ Test_sanitize_filepath.test_normal_multibyte[linux-/tmp/\u5c5e\x00\u6027.txt---/tmp/\u5c5e-\u6027.txt] _ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d50f110> test_platform = 'linux', value = '/tmp/属\x00性.txt', replace_text = '-' expected = '/tmp/属-性.txt' @pytest.mark.parametrize( ["test_platform", "value", "replace_text", "expected"], [ ["linux", "/tmp/ã‚ã„ã†\0ãˆãŠ.txt", "", "/tmp/ã‚ã„ã†ãˆãŠ.txt"], ["linux", "/tmp/属\0性.txt", "-", "/tmp/属-性.txt"], ["universal", "tmp/ã‚ã„ã†\0ãˆãŠ.txt", "", "tmp/ã‚ã„ã†ãˆãŠ.txt"], ["universal", "tmp/属\0性.txt", "-", "tmp/属-性.txt"], ], ) def test_normal_multibyte(self, test_platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, replace_text, platform=test_platform) > assert sanitized_name == expected E AssertionError: assert '/tmp/属' == '/tmp/属-性.txt' E - /tmp/属-性.txt E + /tmp/属 test/test_filepath.py:676: AssertionError _ Test_sanitize_filepath.test_normal_multibyte[universal-tmp/\u3042\u3044\u3046\x00\u3048\u304a.txt--tmp/\u3042\u3044\u3046\u3048\u304a.txt] _ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d4f38d0> test_platform = 'universal', value = 'tmp/ã‚ã„ã†\x00ãˆãŠ.txt', replace_text = '' expected = 'tmp/ã‚ã„ã†ãˆãŠ.txt' @pytest.mark.parametrize( ["test_platform", "value", "replace_text", "expected"], [ ["linux", "/tmp/ã‚ã„ã†\0ãˆãŠ.txt", "", "/tmp/ã‚ã„ã†ãˆãŠ.txt"], ["linux", "/tmp/属\0性.txt", "-", "/tmp/属-性.txt"], ["universal", "tmp/ã‚ã„ã†\0ãˆãŠ.txt", "", "tmp/ã‚ã„ã†ãˆãŠ.txt"], ["universal", "tmp/属\0性.txt", "-", "tmp/属-性.txt"], ], ) def test_normal_multibyte(self, test_platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, replace_text, platform=test_platform) > assert sanitized_name == expected E AssertionError: assert 'tmp/ã‚ã„ã†' == 'tmp/ã‚ã„ã†ãˆãŠ.txt' E - tmp/ã‚ã„ã†ãˆãŠ.txt E + tmp/ã‚ã„ㆠtest/test_filepath.py:676: AssertionError _ Test_sanitize_filepath.test_normal_multibyte[universal-tmp/\u5c5e\x00\u6027.txt---tmp/\u5c5e-\u6027.txt] _ self = <test.test_filepath.Test_sanitize_filepath object at 0x7f859d573850> test_platform = 'universal', value = 'tmp/属\x00性.txt', replace_text = '-' expected = 'tmp/属-性.txt' @pytest.mark.parametrize( ["test_platform", "value", "replace_text", "expected"], [ ["linux", "/tmp/ã‚ã„ã†\0ãˆãŠ.txt", "", "/tmp/ã‚ã„ã†ãˆãŠ.txt"], ["linux", "/tmp/属\0性.txt", "-", "/tmp/属-性.txt"], ["universal", "tmp/ã‚ã„ã†\0ãˆãŠ.txt", "", "tmp/ã‚ã„ã†ãˆãŠ.txt"], ["universal", "tmp/属\0性.txt", "-", "tmp/属-性.txt"], ], ) def test_normal_multibyte(self, test_platform, value, replace_text, expected): sanitized_name = sanitize_filepath(value, replace_text, platform=test_platform) > assert sanitized_name == expected E AssertionError: assert 'tmp/属' == 'tmp/属-性.txt' E - tmp/属-性.txt E + tmp/属 test/test_filepath.py:676: AssertionError =============================== warnings summary =============================== ../../../../usr/lib/python3.11/site-packages/_pytest/config/__init__.py:1233 /usr/lib/python3.11/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: discord_verbose self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") ../../../../usr/lib/python3.11/site-packages/_pytest/config/__init__.py:1233 /usr/lib/python3.11/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: md_report self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") ../../../../usr/lib/python3.11/site-packages/_pytest/config/__init__.py:1233 /usr/lib/python3.11/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: md_report_color self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") ../../../../usr/lib/python3.11/site-packages/_pytest/config/__init__.py:1233 /usr/lib/python3.11/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: md_report_verbose self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") -- Docs: https://docs.pytest.org/en/stable/warnings.html =========================== short test summary info ============================ FAILED test/test_filepath.py::Test_validate_filepath::test_exception_invalid_char[17DOJ6bKqfdiULG0LywrS37oFh7LAmeHJJyGieLRVf4xjHkenEuiBa8P0zwknBE1\x0017DOJ6bKqfdiULG0LywrS37oFh7LAmeHJJyGieLRVf4xjHkenEuiBa8P0zwknBE1] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_str[universal-AA\x00B--AAB0] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_str[universal-AA\x00B-_-AA_B0] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_str[universal-AA\x00B--AAB1] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_str[universal-AA\x00B-_-AA_B1] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_str[posix-A\x00B--AB] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_str[linux-A\x00B--AB] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_str[linux-A\x00B-_-A_B] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_str[macos-A\x00B-_-A_B0] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_str[posix-A\x00B-_-A_B] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_str[macos-A\x00B-_-A_B1] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_pathlike[value14--expected14] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_pathlike[value15-_-expected15] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_pathlike[value16--expected16] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_pathlike[value17-_-expected17] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_multibyte[linux-/tmp/\u3042\u3044\u3046\x00\u3048\u304a.txt--/tmp/\u3042\u3044\u3046\u3048\u304a.txt] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_multibyte[linux-/tmp/\u5c5e\x00\u6027.txt---/tmp/\u5c5e-\u6027.txt] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_multibyte[universal-tmp/\u3042\u3044\u3046\x00\u3048\u304a.txt--tmp/\u3042\u3044\u3046\u3048\u304a.txt] FAILED test/test_filepath.py::Test_sanitize_filepath::test_normal_multibyte[universal-tmp/\u5c5e\x00\u6027.txt---tmp/\u5c5e-\u6027.txt] =========== 19 failed, 3545 passed, 18 skipped, 4 warnings in 3.65s ============ https://docs.python.org/3.11/whatsnew/3.11.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03271710-python-pathvalidate/ For all our attempts to build python-pathvalidate with Python 3.11, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-pathvalidate/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/ Let us know here if you have any questions. Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
I have updated to the latest upstream version, they might have solved this issue
The latest version 2.5.0 depends on tcolorpy for the %check section, that is not yet in Fedora repo. I have added a package review for it in bug 2058411. Would be great if anyone could review it.
Fixed in python-pathvalidate-2.5.0-2.fc37
Re-open, as I assumed Python 3.11 had been moved into Fedora rawhide
*** Bug 2099047 has been marked as a duplicate of this bug. ***
Disabled the test for Python 3.11. Will re-enable them when upstream have fixed it