Skip to content

Conversation

@alxsimon
Copy link
Contributor

@alxsimon alxsimon commented Jan 16, 2026

Closes #2467
Uses the .add_note method of exception, introduced in Python 3.11. Also hardcodes the file name in
the raised from exceptions for HDF5 or zip.
Until 3.10 is EOF, needs the sys module.

Description

Would fix #2467

I'll tidy up (changelog and linting) if you think this change is ok.

PR Checklist:

  • Tests that fully cover new/changed functionality.
  • Documentation including tutorial content if appropriate.
  • Changelogs, if there are API changes.

@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.76%. Comparing base (b7fd993) to head (dbf9835).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3366   +/-   ##
=======================================
  Coverage   89.76%   89.76%           
=======================================
  Files          29       29           
  Lines       31292    31295    +3     
  Branches     5738     5739    +1     
=======================================
+ Hits        28089    28092    +3     
  Misses       1794     1794           
  Partials     1409     1409           
Flag Coverage Δ
c-tests 86.77% <ø> (ø)
lwt-tests 80.38% <ø> (ø)
python-c-tests 87.12% <ø> (ø)
python-tests 98.83% <66.66%> (-0.02%) ⬇️
python-tests-no-jit 33.51% <33.33%> (-0.01%) ⬇️
python-tests-numpy1 50.27% <33.33%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
python/tskit/util.py 99.28% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alxsimon alxsimon force-pushed the filename branch 2 times, most recently from 2ed7d19 to 428857e Compare January 17, 2026 17:56
Closes tskit-dev#2467
Uses the .add_note method of exception, introduced
in Python 3.11. Also hardcodes the file name in
the raised from exceptions for HDF5 or zip.
Until 3.10 is EOF, needs the sys module.
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.

Output name of file (if possible) when tskit.load() fails

1 participant