Skip to content

Commit 64cc6ef

Browse files
committed
fix(ci, python 3.12): use importlib_metadata for tests
1 parent add6ead commit 64cc6ef

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

requirements-dev.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ pytest
22
pytest-asyncio
33
pytest-cov
44
mock-ssh-server
5+
importlib-metadata >= 6.0.0

tests/test_sshfs.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
from pathlib import Path
99

1010
import fsspec
11-
import pkg_resources
1211
import pytest
1312
from asyncssh.sftp import SFTPFailure
13+
from importlib_metadata import entry_points
1414

1515
from sshfs import SSHFileSystem
1616

@@ -74,7 +74,7 @@ def strip_keys(info):
7474

7575

7676
def test_fsspec_registration(ssh_server):
77-
for ep in pkg_resources.iter_entry_points(group="fsspec.specs"):
77+
for ep in list(entry_points(group="fsspec.specs")):
7878
fs = fsspec.filesystem(
7979
ep.name,
8080
host=ssh_server.host,
@@ -86,7 +86,7 @@ def test_fsspec_registration(ssh_server):
8686

8787

8888
def test_fsspec_url_parsing(ssh_server, remote_dir, user="user"):
89-
for ep in pkg_resources.iter_entry_points(group="fsspec.specs"):
89+
for ep in list(entry_points(group="fsspec.specs")):
9090
url = f"{ep.name}://{user}@{ssh_server.host}:{ssh_server.port}/{remote_dir}/file"
9191
with fsspec.open(url, "w", client_keys=[USERS[user]]) as file:
9292
# Check the underlying file system.

0 commit comments

Comments
 (0)