Feature Summary
loads() resolves a require line only through the qprogram.vendors entry-point group, so a vendor extension that is installed and importable but ships no entry point is never found and the file fails to load.
Motivation / Use Case
loads() resolves a require line only through the qprogram.vendors entry-point group, so a vendor extension that is installed and importable but ships no entry point is never found and the file fails to load. try_activate_vendor looks the name up in the memoized entry-point scan and returns False when nothing claims it, with no fallback to importing a module. On the current tree that is the intended rule: the serialization guide and the parser's own error message both say an extension without the entry point has to be imported by hand. So the open question is whether an import fallback is worth adding, not whether something is broken.
Proposed Solution
Either loads() also tries importing a module named for the vendor when no entry point claims it, or the entry point stays the only route and that stays the documented rule.
import sys
sys.path.insert(0, "tests")
import qprogram as qp
# tests/_dummy_vendor.py is importable, but declares no qprogram.vendors entry point
qp.loads("#!QProgram 1.0\n\nrequire dummy 0.1\n\nbody:\n sync\n")
Surfaces It Touches
Vendor activation and the require line's contract.
Feature Summary
loads()resolves arequireline only through theqprogram.vendorsentry-point group, so a vendor extension that is installed and importable but ships no entry point is never found and the file fails to load.Motivation / Use Case
loads()resolves arequireline only through theqprogram.vendorsentry-point group, so a vendor extension that is installed and importable but ships no entry point is never found and the file fails to load.try_activate_vendorlooks the name up in the memoized entry-point scan and returns False when nothing claims it, with no fallback to importing a module. On the current tree that is the intended rule: the serialization guide and the parser's own error message both say an extension without the entry point has to be imported by hand. So the open question is whether an import fallback is worth adding, not whether something is broken.Proposed Solution
Either
loads()also tries importing a module named for the vendor when no entry point claims it, or the entry point stays the only route and that stays the documented rule.Surfaces It Touches
Vendor activation and the
requireline's contract.