fsspec / universal_pathlib

pathlib api extended to use fsspec backends
MIT License
237 stars 40 forks source link

Test regressions with Python 3.13 #245

Closed musicinmybrain closed 4 days ago

musicinmybrain commented 1 month ago

Control test:

$ gh repo clone fsspec/universal_pathlib
$ cd universal_pathlib
$ python3.12 -m venv _e
$ . _e/bin/activate
(_e) $ python --version
Python 3.12.4
(_e) $ pip install -e .[tests,dev]
(_e) $ python -m pytest
[…]
Results (10.55s):
    1073 passed
       1 xpassed
       2 xfailed
     433 skipped
      77 deselected
(_e) $ deactivate

Now, with Python 3.13:

$ python3.13 -m venv _f
$ . _f/bin/activate
(_f) $ python --version
Python 3.13.0b3
(_f) $ pip install -e .[tests,dev]
(_f) $ pip install cffi==1.17.0rc1
(_f) $ python -m pytest
[…]
FAILED upath/tests/implementations/test_data.py::TestUPathDataPath::test_access_to_private_api - AttributeError: _drv
FAILED upath/tests/implementations/test_github.py::TestUPathGitHubPath::test_iterdir - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_github.py::TestUPathGitHubPath::test_iterdir2 - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_github.py::TestUPathGitHubPath::test_iterdir_trailing_slash - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_github.py::TestUPathGitHubPath::test_rmdir_not_empty - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_github.py::TestUPathGitHubPath::test_access_to_private_api - AttributeError: _drv
FAILED upath/tests/implementations/test_http.py::TestUPathHttp::test_is_dir - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_http.py::TestUPathHttp::test_is_file - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_http.py::TestUPathHttp::test_iterdir - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_http.py::TestUPathHttp::test_iterdir2 - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_http.py::TestUPathHttp::test_iterdir_trailing_slash - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_http.py::TestUPathHttp::test_rmdir_not_empty - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_http.py::TestUPathHttp::test_access_to_private_api - AttributeError: _drv
FAILED upath/tests/implementations/test_http.py::TestUPathHttp::test_work_at_root - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_local.py::TestFSSpecLocal::test_iterdir - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_local.py::TestFSSpecLocal::test_iterdir2 - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_local.py::TestFSSpecLocal::test_iterdir_trailing_slash - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_local.py::TestFSSpecLocal::test_rmdir_not_empty - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_local.py::TestFSSpecLocal::test_access_to_private_api - AttributeError: _drv
FAILED upath/tests/implementations/test_local.py::TestRayIOFSSpecLocal::test_iterdir - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_local.py::TestRayIOFSSpecLocal::test_iterdir2 - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_local.py::TestRayIOFSSpecLocal::test_iterdir_trailing_slash - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_local.py::TestRayIOFSSpecLocal::test_rmdir_not_empty - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_local.py::TestRayIOFSSpecLocal::test_access_to_private_api - AttributeError: _drv
FAILED upath/tests/implementations/test_memory.py::TestMemoryPath::test_iterdir - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_memory.py::TestMemoryPath::test_iterdir2 - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_memory.py::TestMemoryPath::test_iterdir_trailing_slash - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_memory.py::TestMemoryPath::test_rmdir_not_empty - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_memory.py::TestMemoryPath::test_access_to_private_api - AttributeError: _drv
FAILED upath/tests/implementations/test_s3.py::TestUPathS3::test_iterdir - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_s3.py::TestUPathS3::test_iterdir2 - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_s3.py::TestUPathS3::test_iterdir_trailing_slash - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_s3.py::TestUPathS3::test_rmdir_not_empty - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_s3.py::TestUPathS3::test_access_to_private_api - AttributeError: _drv
FAILED upath/tests/implementations/test_s3.py::TestUPathS3::test_iterdir_root - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_s3.py::TestUPathS3::test_iterdir_with_plus_in_name - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_webdav.py::TestUPathWebdav::test_iterdir - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_webdav.py::TestUPathWebdav::test_iterdir2 - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_webdav.py::TestUPathWebdav::test_iterdir_trailing_slash - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_webdav.py::TestUPathWebdav::test_rmdir_not_empty - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/implementations/test_webdav.py::TestUPathWebdav::test_access_to_private_api - AttributeError: _drv
FAILED upath/tests/test_core.py::TestUpath::test_iterdir - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/test_core.py::TestUpath::test_iterdir2 - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/test_core.py::TestUpath::test_iterdir_trailing_slash - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/test_core.py::TestUpath::test_rmdir_not_empty - AttributeError: 'super' object has no attribute '_make_child_relpath'
FAILED upath/tests/test_core.py::TestUpath::test_access_to_private_api - AttributeError: _drv
FAILED upath/tests/test_core.py::test_normalize[http://example.com/a/../..//-http://example.com//] - AssertionError: assert HTTPPath('http://example.com//') == HTTPPath('http://example.com/')
FAILED upath/tests/test_core.py::test_normalize[http://example.com/a/..//-http://example.com//] - AssertionError: assert HTTPPath('http://example.com//') == HTTPPath('http://example.com/')
FAILED upath/tests/test_core.py::test_normalize[http://example.com/a/..//.-http://example.com//] - AssertionError: assert HTTPPath('http://example.com//') == HTTPPath('http://example.com/')
FAILED upath/tests/test_core.py::test_normalize[http://example.com/a/..//b-http://example.com//b] - AssertionError: assert HTTPPath('http://example.com//b') == HTTPPath('http://example.com/b')
FAILED upath/tests/test_core.py::test_normalize[http://example.com/a//../..//-http://example.com//] - AssertionError: assert HTTPPath('http://example.com//') == HTTPPath('http://example.com/')
FAILED upath/tests/test_core.py::test_normalize[http://example.com/a//..//-http://example.com/a//] - AssertionError: assert HTTPPath('http://example.com/a//') == HTTPPath('http://example.com/a/')
FAILED upath/tests/test_core.py::test_normalize[http://example.com/a//..//.-http://example.com/a//] - AssertionError: assert HTTPPath('http://example.com/a//') == HTTPPath('http://example.com/a/')
FAILED upath/tests/test_core.py::test_normalize[http://example.com/a//..//b-http://example.com/a//b] - AssertionError: assert HTTPPath('http://example.com/a//b') == HTTPPath('http://example.com/a/b')

Results (9.60s):
     739 passed
       1 xpassed
      54 failed
         - upath/tests/cases.py:511 TestUPathDataPath.test_access_to_private_api
         - upath/tests/cases.py:136 TestUPathGitHubPath.test_iterdir
         - upath/tests/cases.py:150 TestUPathGitHubPath.test_iterdir2
         - upath/tests/cases.py:163 TestUPathGitHubPath.test_iterdir_trailing_slash
         - upath/tests/cases.py:470 TestUPathGitHubPath.test_rmdir_not_empty
         - upath/tests/cases.py:511 TestUPathGitHubPath.test_access_to_private_api
         - upath/tests/cases.py:104 TestUPathHttp.test_is_dir
         - upath/tests/cases.py:111 TestUPathHttp.test_is_file
         - upath/tests/cases.py:136 TestUPathHttp.test_iterdir
         - upath/tests/cases.py:150 TestUPathHttp.test_iterdir2
         - upath/tests/cases.py:163 TestUPathHttp.test_iterdir_trailing_slash
         - upath/tests/cases.py:470 TestUPathHttp.test_rmdir_not_empty
         - upath/tests/cases.py:511 TestUPathHttp.test_access_to_private_api
         - upath/tests/implementations/test_http.py:39 TestUPathHttp.test_work_at_root
         - upath/tests/cases.py:136 TestFSSpecLocal.test_iterdir
         - upath/tests/cases.py:150 TestFSSpecLocal.test_iterdir2
         - upath/tests/cases.py:163 TestFSSpecLocal.test_iterdir_trailing_slash
         - upath/tests/cases.py:470 TestFSSpecLocal.test_rmdir_not_empty
         - upath/tests/cases.py:511 TestFSSpecLocal.test_access_to_private_api
         - upath/tests/cases.py:136 TestRayIOFSSpecLocal.test_iterdir
         - upath/tests/cases.py:150 TestRayIOFSSpecLocal.test_iterdir2
         - upath/tests/cases.py:163 TestRayIOFSSpecLocal.test_iterdir_trailing_slash
         - upath/tests/cases.py:470 TestRayIOFSSpecLocal.test_rmdir_not_empty
         - upath/tests/cases.py:511 TestRayIOFSSpecLocal.test_access_to_private_api
         - upath/tests/cases.py:136 TestMemoryPath.test_iterdir
         - upath/tests/cases.py:150 TestMemoryPath.test_iterdir2
         - upath/tests/cases.py:163 TestMemoryPath.test_iterdir_trailing_slash
         - upath/tests/cases.py:470 TestMemoryPath.test_rmdir_not_empty
         - upath/tests/cases.py:511 TestMemoryPath.test_access_to_private_api
         - upath/tests/cases.py:136 TestUPathS3.test_iterdir
         - upath/tests/cases.py:150 TestUPathS3.test_iterdir2
         - upath/tests/cases.py:163 TestUPathS3.test_iterdir_trailing_slash
         - upath/tests/cases.py:470 TestUPathS3.test_rmdir_not_empty
         - upath/tests/cases.py:511 TestUPathS3.test_access_to_private_api
         - upath/tests/implementations/test_s3.py:44 TestUPathS3.test_iterdir_root
         - upath/tests/implementations/test_s3.py:82 TestUPathS3.test_iterdir_with_plus_in_name
         - upath/tests/cases.py:136 TestUPathWebdav.test_iterdir
         - upath/tests/cases.py:150 TestUPathWebdav.test_iterdir2
         - upath/tests/cases.py:163 TestUPathWebdav.test_iterdir_trailing_slash
         - upath/tests/cases.py:470 TestUPathWebdav.test_rmdir_not_empty
         - upath/tests/cases.py:511 TestUPathWebdav.test_access_to_private_api
         - upath/tests/cases.py:136 TestUpath.test_iterdir
         - upath/tests/cases.py:150 TestUpath.test_iterdir2
         - upath/tests/cases.py:163 TestUpath.test_iterdir_trailing_slash
         - upath/tests/cases.py:470 TestUpath.test_rmdir_not_empty
         - upath/tests/cases.py:511 TestUpath.test_access_to_private_api
         - upath/tests/test_core.py:389 test_normalize[http://example.com/a/../..//-http://example.com//]
         - upath/tests/test_core.py:389 test_normalize[http://example.com/a/..//-http://example.com//]
         - upath/tests/test_core.py:389 test_normalize[http://example.com/a/..//.-http://example.com//]
         - upath/tests/test_core.py:389 test_normalize[http://example.com/a/..//b-http://example.com//b]
         - upath/tests/test_core.py:389 test_normalize[http://example.com/a//../..//-http://example.com//]
         - upath/tests/test_core.py:389 test_normalize[http://example.com/a//..//-http://example.com/a//]
         - upath/tests/test_core.py:389 test_normalize[http://example.com/a//..//.-http://example.com/a//]
         - upath/tests/test_core.py:389 test_normalize[http://example.com/a//..//b-http://example.com/a//b]
       2 xfailed
     286 skipped
      77 deselected
(_f) $ deactivate

At the time of reporting, main was 92675f060775e7aeb3ffc92cb74abdb92458d231.

This is related to https://github.com/fsspec/universal_pathlib/issues/221. I opened this issue to track specific regressions in Python 3.13.

ap-- commented 1 month ago

Thank you for the report. It looks like to support 3.13 we should finally refactor and move to pathlib-abc #193