From b77bf70ff550972bbd9d9d356f5282bd44197530 Mon Sep 17 00:00:00 2001 From: StyxX65 <150797939+StyxX65@users.noreply.github.com> Date: Thu, 3 Sep 2026 22:59:38 +0200 Subject: [PATCH] Fix deprecated smbprotocol.query_info import smbprotocol.query_info is a thin deprecation shim (from smbprotocol.file_info import * + a DeprecationWarning) scheduled for removal in the library's next major release. Switched to importing FileDirectoryInformation directly from smbprotocol.file_info, the actual current location - confirmed present there in the installed package. Pure rename, no behavior change: all 227 tests still pass, and the warning is gone from the test output. --- file_scanner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_scanner.py b/file_scanner.py index df87b94..5daeb9e 100644 --- a/file_scanner.py +++ b/file_scanner.py @@ -38,7 +38,7 @@ try: FileAttributes, FilePipePrinterAccessMask, ShareAccess, ImpersonationLevel, ) - from smbprotocol.query_info import FileDirectoryInformation + from smbprotocol.file_info import FileDirectoryInformation SMB_OK = True except ImportError: SMB_OK = False