Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_get_paths_windows_traverse fails on Python 3.13 #179

Open
wRAR opened this issue Oct 6, 2024 · 2 comments
Open

test_get_paths_windows_traverse fails on Python 3.13 #179

wRAR opened this issue Oct 6, 2024 · 2 comments

Comments

@wRAR
Copy link

wRAR commented Oct 6, 2024

______________________________________________________________________________________________________ test_get_paths_windows_traverse _______________________________________________________________________________________________________

    def test_get_paths_windows_traverse():
        base_path = pathlib.PureWindowsPath("C:\\ftp")
        user = aioftp.User()
        user.base_path = base_path
        connection = aioftp.Connection(current_directory=base_path, user=user)
        virtual_path = pathlib.PurePosixPath("/foo/C:\\windows")
        real_path, resolved_virtual_path = aioftp.Server.get_paths(
            connection,
            virtual_path,
        )
>       assert real_path == base_path
E       AssertionError: assert PureWindowsPath('C:/ftp/foo/C:/windows') == PureWindowsPath('C:/ftp')

Found at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1082132 and I can confirm it locally.

@pohmelie
Copy link
Collaborator

pohmelie commented Oct 7, 2024

I'm not sure how it should work, but it looks like a bug in cpython. Raised one on cpython github: python/cpython#125069

New behaviour looks like what @ported-pw did in #148.

@pohmelie
Copy link
Collaborator

Ok, so this was a bug in a cpython implementation. Bug fixed. Workaround landed. Minimal python version bumped to 3.9. New release is on pypi. Thank you for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@wRAR @pohmelie and others