Skip to content

Surface SMB tree setup errors as OSError#361

Merged
jborean93 merged 1 commit into
jborean93:masterfrom
henrik-nil-acc:pr/smbclient-setup-oserror
Jun 25, 2026
Merged

Surface SMB tree setup errors as OSError#361
jborean93 merged 1 commit into
jborean93:masterfrom
henrik-nil-acc:pr/smbclient-setup-oserror

Conversation

@henrik-nil-acc

Copy link
Copy Markdown
Contributor

A raw SMBResponseException from SMBRawIO setup did not flow through rmtree's ignore_errors and onerror hooks. The same gap affected remove, rmdir, and scandir for callers using smbclient as a drop-in for os and os.path.

The transaction layer already translated these errors for operations wrapped in SMBFileTransaction.

A raw SMBResponseException from SMBRawIO setup did not flow through
rmtree's ignore_errors and onerror hooks. The same gap affected
remove, rmdir, and scandir for callers using smbclient as a drop-in
for os and os.path.

The transaction layer already translated these errors for
operations wrapped in SMBFileTransaction.
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.73%. Comparing base (b23a216) to head (177b956).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #361   +/-   ##
=======================================
  Coverage   98.73%   98.73%           
=======================================
  Files          24       24           
  Lines        5288     5291    +3     
=======================================
+ Hits         5221     5224    +3     
  Misses         67       67           
Flag Coverage Δ
macOS 69.11% <100.00%> (+0.01%) ⬆️
py3.10 98.73% <100.00%> (+<0.01%) ⬆️
py3.11 98.73% <100.00%> (+<0.01%) ⬆️
py3.12 98.73% <100.00%> (+<0.01%) ⬆️
py3.13 98.73% <100.00%> (+<0.01%) ⬆️
py3.14 98.73% <100.00%> (+<0.01%) ⬆️
ubuntu 96.65% <100.00%> (+<0.01%) ⬆️
windows 98.65% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jborean93 jborean93 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have to remember to explicit mark this in the changelog as it might catch people who are already ignoring the old exception type but this is still better to align the behaviours between how the transaction APIs work vs the standalone opens. Plus it is also nice that the smbclient stops re-raising smbprotocol defined errors directly.

@jborean93
jborean93 merged commit f18e252 into jborean93:master Jun 25, 2026
19 checks passed
@henrik-nil-acc
henrik-nil-acc deleted the pr/smbclient-setup-oserror branch June 26, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants