Repository navigation
0.2.1
What's new
Patch release fixing driver lifecycle and internal state bugs introduced in 0.2.0.
Bug fixes
-
IV_open()/IV_close()— flag set after DLL call: the internalis_driver_openflag was updated before the DLL call completed. If the call
failed, the flag was left in an inconsistent state. It is now set only after a successful DLL return. -
close_driver()— now idempotent: previously raisedDriverNotOpenErrorwhen called on an already-closed driver, making it unsafe to use in
finallyblocks. It now returns silently if the driver is not open. -
select_serial_number()— unambiguous return when already connected: previously returned0, indistinguishable from a valid position index.
Now returnsNoneto clearly signal that no reselection was performed. Type signature updated toint | None. -
IV_SelectSn— corrected return type: the Core wrapper incorrectly declaredtuple[int, str]and returned the input serial number echoed back
as if it were DLL output. Simplified to return only the result code (int). -
save_method(),save_data(),save_dataset(),set_status_par()— result codes now verified: all four methods were discarding the DLL
return code entirely, making failures silent. They now callverify_result_code()and raise typed exceptions on failure. -
get_cell_status()— result code checked before processing bits: previously discarded with_, meaning a failed DLL call would process garbage
bits as valid cell status.
Upgrade notes
If you call select_serial_number() and check its return value, update your code to handle None:
index = Pyvium.select_serial_number("SN12345")
if index is None:
print("Device was already connected — no reselection needed")