Bug Description
register_vendor_version performs no existing-value check and simply overwrites, so the last call in a process wins and nothing reports the clash. Every other registrar guards this: register_waveform, register_sweep_source, register_vendor_operation, register_vendor_block and QProgram.register_vendor all raise ValueError when a different value claims a taken name, on the grounds that replacing another package's registration changes how existing files parse. A version is what require lines are checked against, so two installed packages claiming one namespace resolve silently to whichever imported last.
Minimal Reproducible Example
import qprogram as qp
from qprogram.serialization import registry
qp.register_vendor_version("myvendor", "1.2.3")
qp.register_vendor_version("myvendor", "9.9.9") # no error
print(registry.get_vendor_version("myvendor"))
Expected Behavior
Re-registering the same version stays a no-op, and a different version under a taken namespace raises ValueError, the way register_waveform does: waveform name 'Dup' is already registered to __main__.Dup; rename the class or unregister first.
Actual Behavior
System Information
qprogram 0.1.0
python 3.14.7 | Linux-6.18.33.2-microsoft-standard-WSL2-x86_64-with-glibc2.43
vendors none
Bug Description
register_vendor_versionperforms no existing-value check and simply overwrites, so the last call in a process wins and nothing reports the clash. Every other registrar guards this:register_waveform,register_sweep_source,register_vendor_operation,register_vendor_blockandQProgram.register_vendorall raiseValueErrorwhen a different value claims a taken name, on the grounds that replacing another package's registration changes how existing files parse. A version is whatrequirelines are checked against, so two installed packages claiming one namespace resolve silently to whichever imported last.Minimal Reproducible Example
Expected Behavior
Re-registering the same version stays a no-op, and a different version under a taken namespace raises
ValueError, the wayregister_waveformdoes:waveform name 'Dup' is already registered to __main__.Dup; rename the class or unregister first.Actual Behavior
System Information
qprogram 0.1.0 python 3.14.7 | Linux-6.18.33.2-microsoft-standard-WSL2-x86_64-with-glibc2.43 vendors none