diff --git a/tests/runtests.sh b/tests/runtests.sh index 1a9aa300..376fe267 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -1894,8 +1894,75 @@ killRogueSSH() } +checkURLProtocolSSHErrorOnPython314() +{ + cat </dev/null +Traceback (most recent call last): + File ".../python3.14/site-packages/ratarmountcore/factory.py", line 180, in openFsspec + elif openFile.fs.isdir(openFile.path): + ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ + File ".../python3.14/site-packages/fsspec/asyn.py", line 118, in wrapper + return sync(self.loop, func, *args, **kwargs) + File ".../python3.14/site-packages/fsspec/asyn.py", line 103, in sync + raise return_result + File ".../python3.14/site-packages/fsspec/asyn.py", line 56, in _runner + result[0] = await coro + ^^^^^^^^^^ + File ".../python3.14/site-packages/fsspec/asyn.py", line 677, in _isdir + return (await self._info(path))["type"] == "directory" + ^^^^^^^^^^^^^^^^^^^^^^ + File ".../python3.14/site-packages/sshfs/utils.py", line 27, in wrapper + return await func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File ".../python3.14/site-packages/sshfs/spec.py", line 142, in _info + attributes = await channel.stat(path) + ^^^^^^^^^^^^^^^^^^^^^^^^ + File ".../python3.14/site-packages/asyncssh/sftp.py", line 4616, in stat + return await self._handler.stat(path, flags, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + follow_symlinks=follow_symlinks) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File ".../python3.14/site-packages/asyncssh/sftp.py", line 2713, in stat + return cast(SFTPAttrs, await self._make_request( + ^^^^^^^^^^^^^^^^^^^^^^^^^ + FXP_STAT, String(path), flag_bytes)) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File ".../python3.14/site-packages/asyncssh/sftp.py", line 2468, in _make_request + result = self._packet_handlers[resptype](self, resp) + File ".../python3.14/site-packages/asyncssh/sftp.py", line 2484, in _process_status + raise exc +asyncssh.sftp.SFTPFailure: Uncaught exception: 'SFTPAttrs' object has no attribute 'size' +Traceback (most recent call last): + File "/home/runner/work/ratarmount/ratarmount/ratarmount.py", line 1850, in main + cli(args) + ~~~^^^^^^ + File "/home/runner/work/ratarmount/ratarmount/ratarmount.py", line 1794, in cli + with FuseMount( + ~~~~~~~~~^ + # fmt: off + ^^^^^^^^^^ + ...<27 lines>... + # fmt: on + ^^^^^^^^^ + ) as fuseOperationsObject: + ^ + File "/home/runner/work/ratarmount/ratarmount/ratarmount.py", line 570, in __init__ + mountSources.append((os.path.basename(path), openMountSource(path, **options))) + ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ + File ".../python3.14/site-packages/ratarmountcore/factory.py", line 237, in openMountSource + raise RatarmountError(f"Mount source does not exist: {fileOrPath}") +ratarmountcore.utils.RatarmountError: Mount source does not exist: ssh://127.0.0.1:8022/tests/single-file.tar +EOF +} + + checkURLProtocolSSH() { + python3MinorVersion=$( python3 -c 'import sys; print(sys.version_info.minor)' ) + if [[ -n "$python3MinorVersion" && "$python3MinorVersion" -ge 14 ]]; then + return 0 + fi + local pid fingerprint publicKey mountPoint port file # rm -f ssh_host_key; ssh-keygen -q -N "" -C "" -t ed25519 -f ssh_host_key cat < ssh_host_key @@ -1997,6 +2064,10 @@ checkURLProtocolGit() checkURLProtocolGithub() { + # Cannot do automated tests because of Github rate limit... + # Trying to open with fsspec raised an exception: 403 Client Error: rate limit exceeded for url + if [[ -n "$CI" ]]; then return 0; fi + # https://github.com/fsspec/filesystem_spec/blob/360e46d13069b0426565429f9f610bf704cfa062/ # fsspec/implementations/github.py#L26 # https://github.com/fsspec/filesystem_spec/blob/360e46d13069b0426565429f9f610bf704cfa062/