You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm doing similar work with limit order book data on the JPX side (master's research) with a Windows PC, and recently stumbled across MeatPy. This issue looked like something I could help with, so I dug into the failures — here's the diagnosis, in case it's useful.
Reproduced on Windows 11 (current main): 38 failures, all in test code — the library itself is Windows-clean.
Two root causes, both in how the tests manage temp files:
36 tests hold a tempfile.NamedTemporaryFile(delete=False) handle open for the whole test body and call Path(tmp.name).unlink()inside the with block. POSIX allows unlinking an open file; Windows raises PermissionError (WinError 32). Affects test_csv_writer.py, test_parquet_writer.py, test_writers.py, test_recorders.py.
The two test_itch50_reader_writer.py failures use the default delete=True, which on Windows opens the file with O_TEMPORARY — so ITCH50Writer's own re-open of the same path (itch50_writer.py:81) fails with Errno 13 at flush.
The writers themselves are fine — every library-side open is context-scoped, so no product code needs to change.
I have a minimal fix passing the full suite locally (659 passed; ruff clean): converting the five affected test files to pytest's tmp_path fixture, which removes the manual cleanup entirely and behaves identically on Linux. Happy to open a PR if that's useful, or leave the diagnosis here if you'd rather take it yourself.
Two smaller things I noticed and left alone: test_itch2_reader.py uses the same idiom (it passes, but leaks temp files since it never unlinks), and a windows-latest leg in test.yml would lock the fix in. Glad to fold either into the PR or a follow-up.
Activity
jevwithwind commentedon Jul 4, 2026
Hi! I'm doing similar work with limit order book data on the JPX side (master's research) with a Windows PC, and recently stumbled across MeatPy. This issue looked like something I could help with, so I dug into the failures — here's the diagnosis, in case it's useful.
Reproduced on Windows 11 (current
main): 38 failures, all in test code — the library itself is Windows-clean.Two root causes, both in how the tests manage temp files:
tempfile.NamedTemporaryFile(delete=False)handle open for the whole test body and callPath(tmp.name).unlink()inside thewithblock. POSIX allows unlinking an open file; Windows raisesPermissionError(WinError 32). Affectstest_csv_writer.py,test_parquet_writer.py,test_writers.py,test_recorders.py.test_itch50_reader_writer.pyfailures use the defaultdelete=True, which on Windows opens the file withO_TEMPORARY— soITCH50Writer's own re-open of the same path (itch50_writer.py:81) fails withErrno 13at flush.The writers themselves are fine — every library-side open is context-scoped, so no product code needs to change.
I have a minimal fix passing the full suite locally (659 passed; ruff clean): converting the five affected test files to pytest's
tmp_pathfixture, which removes the manual cleanup entirely and behaves identically on Linux. Happy to open a PR if that's useful, or leave the diagnosis here if you'd rather take it yourself.Two smaller things I noticed and left alone:
test_itch2_reader.pyuses the same idiom (it passes, but leaks temp files since it never unlinks), and awindows-latestleg intest.ymlwould lock the fix in. Glad to fold either into the PR or a follow-up.