diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f1ab60..ecbda06 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] - pyv: ["3.7", "3.8", "3.9", "3.10", "3.11.0-rc - 3.11"] + pyv: ["3.8", "3.9", "3.10", "3.11.0-rc - 3.11", "3.12"] steps: - uses: actions/checkout@v4 diff --git a/requirements-dev.txt b/requirements-dev.txt index 43d3a26..1b4add2 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,3 +2,4 @@ pytest pytest-asyncio pytest-cov mock-ssh-server +importlib-metadata >= 6.0.0 diff --git a/tests/test_sshfs.py b/tests/test_sshfs.py index a9e858a..1a13dc2 100644 --- a/tests/test_sshfs.py +++ b/tests/test_sshfs.py @@ -8,9 +8,9 @@ from pathlib import Path import fsspec -import pkg_resources import pytest from asyncssh.sftp import SFTPFailure +from importlib_metadata import entry_points from sshfs import SSHFileSystem @@ -74,7 +74,7 @@ def strip_keys(info): def test_fsspec_registration(ssh_server): - for ep in pkg_resources.iter_entry_points(group="fsspec.specs"): + for ep in list(entry_points(group="fsspec.specs")): fs = fsspec.filesystem( ep.name, host=ssh_server.host, @@ -86,7 +86,7 @@ def test_fsspec_registration(ssh_server): def test_fsspec_url_parsing(ssh_server, remote_dir, user="user"): - for ep in pkg_resources.iter_entry_points(group="fsspec.specs"): + for ep in list(entry_points(group="fsspec.specs")): url = f"{ep.name}://{user}@{ssh_server.host}:{ssh_server.port}/{remote_dir}/file" with fsspec.open(url, "w", client_keys=[USERS[user]]) as file: # Check the underlying file system.