Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-3653

QMF Python API inappropriately enforces schema



    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Auto Closed
    • Affects Version/s: 0.12
    • Fix Version/s: None
    • Component/s: QMF
    • Labels:
    • Environment:

      Fedora 15, not that it matters.


      When calling a method from the Python QMF API, the number of arguments provided is checked against the schema and an exception raised if they do not match. This means that there is no way to update a schema (e.g. by adding new, optional parameters to a command) without also breaking existing Python console scripts.

      Note that the C++ implementation has no such restriction, so there is no technical reason for it.

      This check should be removed for the case where there are fewer arguments provided than specified by the schema. The checking of keyword arguments is currently pretty limited - e.g. they may overlap with positional arguments, or may be for fields not present in the schema (in both cases they are ignored).

      Ideally, additional keyword arguments beyond the ones present in the schema should also be allowed (this appears to be possible; I don't see the schema being used to identify the parameter's type, so I assume it is inferred). This would allow new scripts to continue to talk to both new and old agents without having to check the schema.




            • Assignee:
              tross Ted Ross
              zaneb Zane Bitter
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: