Skip to content

Conversation

@ionelmc
Copy link
Owner

@ionelmc ionelmc commented Oct 20, 2025

@oldium try this.

@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

❌ Patch coverage is 92.68293% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.52%. Comparing base (ac82d41) to head (8ef2515).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
src/tblib/pickling_support.py 71.42% 1 Missing and 1 partial ⚠️
tests/test_pickle_exception.py 97.05% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #83      +/-   ##
==========================================
- Coverage   96.80%   96.52%   -0.29%     
==========================================
  Files           9        9              
  Lines         564      604      +40     
  Branches       46       49       +3     
==========================================
+ Hits          546      583      +37     
- Misses         14       16       +2     
- Partials        4        5       +1     
Flag Coverage Δ
py310 (macos) ?
py310 (macos/arm64) 93.69% <92.68%> (?)
py310 (ubuntu) ?
py310 (ubuntu/x64) 93.69% <92.68%> (?)
py310 (windows) ?
py310 (windows/x64) 93.69% <92.68%> (?)
py311 (macos) ?
py311 (macos/arm64) 96.01% <92.68%> (?)
py311 (ubuntu) ?
py311 (ubuntu/x64) 96.01% <92.68%> (?)
py311 (windows) ?
py311 (windows/x64) 96.01% <92.68%> (?)
py312 (macos) ?
py312 (macos/arm64) 96.01% <92.68%> (?)
py312 (ubuntu) ?
py312 (ubuntu/x64) 96.01% <92.68%> (?)
py312 (windows) ?
py312 (windows/x64) 96.01% <92.68%> (?)
py313 (macos) ?
py313 (macos/arm64) 96.01% <92.68%> (?)
py313 (ubuntu) ?
py313 (ubuntu/x64) 96.01% <92.68%> (?)
py313 (windows) ?
py313 (windows/x64) 96.01% <92.68%> (?)
py314 (macos) ?
py314 (macos/arm64) 95.68% <87.80%> (?)
py314 (ubuntu) ?
py314 (ubuntu/x64) 95.68% <87.80%> (?)
py314 (windows) ?
py314 (windows/x64) 95.68% <87.80%> (?)
py39 (macos) ?
py39 (macos/arm64) 93.37% <92.68%> (?)
py39 (ubuntu) ?
py39 (ubuntu/x64) 93.37% <92.68%> (?)
py39 (windows) ?
py39 (windows/x64) 93.37% <92.68%> (?)
pypy310 (macos) ?
pypy310 (macos/arm64) 91.04% <87.80%> (?)
pypy310 (ubuntu) ?
pypy310 (ubuntu/x64) 91.04% <87.80%> (?)
pypy310 (windows) ?
pypy310 (windows/x64) 91.04% <87.80%> (?)
pypy311 (macos) ?
pypy311 (macos/arm64) 93.36% <87.80%> (?)
pypy311 (ubuntu) ?
pypy311 (ubuntu/x64) 93.36% <87.80%> (?)
pypy311 (windows) ?
pypy311 (windows/x64) 93.36% <87.80%> (?)
pypy39 (macos) ?
pypy39 (macos/arm64) 90.72% <87.80%> (?)
pypy39 (ubuntu) ?
pypy39 (ubuntu/x64) 90.72% <87.80%> (?)
pypy39 (windows) ?
pypy39 (windows/x64) 90.72% <87.80%> (?)

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

☔ View full report in Codecov by Sentry.
📢 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.

@oldium
Copy link
Contributor

oldium commented Oct 20, 2025

I added a test from #82 (comment):

def test_real_oserror():
    try:
        import os
        os.open('non-existing-file', os.O_RDONLY)
        assert False, 'os.open should have raised an OSError'
    except Exception as e:
        exc = e

    str_output = str(exc)
    tblib.pickling_support.install(exc)
    exc = pickle.loads(pickle.dumps(exc))

    assert isinstance(exc, OSError)
    assert exc.errno == 2
    assert str_output == str(exc)

The result of pytest is:

Edit: Removed wrong pytest output

@oldium
Copy link
Contributor

oldium commented Oct 20, 2025

Moment. I see different result in debugger.

@oldium
Copy link
Contributor

oldium commented Oct 20, 2025

Also my test works now. I had to run pip install -e . inside venv again. Strange.

image

@oldium
Copy link
Contributor

oldium commented Oct 20, 2025

So it works for me, thanks!

@ionelmc ionelmc merged commit 12c8770 into master Oct 20, 2025
89 of 92 checks passed
@ionelmc ionelmc deleted the fix-82 branch October 20, 2025 16:58
@ionelmc
Copy link
Owner Author

ionelmc commented Oct 21, 2025

Just released 3.2.0.

@oldium
Copy link
Contributor

oldium commented Oct 21, 2025

Perfect, really thanks 😊

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.

3 participants