What's Changed
- Bump version post PyPI release by @jborean93 in #342
- Bump minimum Python to 3.10 and dev deps by @jborean93 in #343
- Add target_ip parameter to connection to avoid relying on internal DNS resolution by @laxa in #345
- Handle DFS path resolution during directory listing by @sunilkata-lb in #344
- Fix the str value for flag fields by @jborean93 in #350
- Improve recv-path diagnostics by @henrik-nil-acc in #351
- Add missing structure flags by @jborean93 in #355
- Fix signing requirement against signing required by @laxa in #356
- Stop OSError leaks past rmtree's ignore_errors by @henrik-nil-acc in #357
- Stop wire close from SMBRawIO finalizer by @henrik-nil-acc in #353
- Make codecov project status non-blocking on PRs by @henrik-nil-acc in #360
- Clear Open client state on close-response error by @henrik-nil-acc in #359
- Treat STATUS_NO_SUCH_FILE as end of enumeration by @henrik-nil-acc in #358
- Move dev dependencies into pyproject.toml by @henrik-nil-acc in #362
- Return context-manager iterator from scandir() by @henrik-nil-acc in #363
- Surface SMB tree setup errors as OSError by @henrik-nil-acc in #361
- Prepare for v1.17.0 release by @jborean93 in #365
New Contributors
- @sunilkata-lb made their first contribution in #344
- @henrik-nil-acc made their first contribution in #351
1.17.0 - 2026-07-07
- Drop support for Python 3.9, minimum verison if now 3.10
- Added the
hostname_overridekwarg tosmbprotocol.Sessionthat can override the hostname used in the SPN for authentication - Correctly perform a DFS referral lookup in the
query_directoryon a directory - Fix the
FlagFieldstr representation when theflag_typecontains a dunder attribute with anintvalue - Added some extra flags from MS-SMB2 that have been added recently
- Fix
Connection.client_security_modeto beSMB2_NEGOTIATE_SIGNING_REQUIREDwhen server reports signing is required - Solve numerous issues with
smbclient.rmtreeandignore_errorsnot working with various exceptions - Make
smbclient.scandirreturn a context manager that can close SMB resources. This method should now be called like- The return value is still an iterable and will continue to work as it did before but code should still be updated to use the context manager to ensure resources are released
with smbclient.scandir(...) as scan_gen:
for entry in scan_gen:
...- Handle
STATUS_NO_SUCH_FILEduringsmbclient.scandirwhen using a pattern that matches no file in the specified path - Improve various threading race conditions and deadlocks in the underlying client handler
Full Changelog: v1.16.1...v1.17.0