You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Gordon Sim (JIRA)" <qp...@incubator.apache.org> on 2009/01/09 12:08:59 UTC

[jira] Created: (QPID-1562) Codegen requires presence of an 0-10 spec

Codegen requires presence of an 0-10 spec
-----------------------------------------

                 Key: QPID-1562
                 URL: https://issues.apache.org/jira/browse/QPID-1562
             Project: Qpid
          Issue Type: Bug
          Components: Python Client
    Affects Versions: M4
            Reporter: Gordon Sim
            Assignee: Rafael H. Schloming


>From r732760 the python test suite cannot be run without either the spec refered to from qpid_config available in the expected location or the AMQP_SPEC env var set to an 0-10 format spec.

Setting AMQP_SPEC to an 0-8 format spec file causes:

Traceback (most recent call last):
  File "./run-tests", line 22, in ?
    from qpid.testlib import testrunner
  File "/home/gordon/temp/python/qpid/__init__.py", line 20, in ?
    import spec, codec, connection, content, peer, delegate, client
  File "/home/gordon/temp/python/qpid/connection.py", line 20, in ?
    import datatypes, session, socket
  File "/home/gordon/temp/python/qpid/session.py", line 47, in ?
    class Session(command_invoker(SPEC)):
  File "/home/gordon/temp/python/qpid/generator.py", line 56, in command_invoker
    return invoker("CommandInvoker", spec, is_command)
  File "/home/gordon/temp/python/qpid/generator.py", line 52, in invoker
    (), generate(spec, invoker.__module__, predicate))
  File "/home/gordon/temp/python/qpid/generator.py", line 35, in generate
    for name, enum in spec.enums.items():
AttributeError: Spec instance has no attribute 'enums'


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (QPID-1562) Better separation of 0-10 and 0-8/0-9 support in test framework

Posted by "Gordon Sim (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12757000#action_12757000 ] 

Gordon Sim commented on QPID-1562:
----------------------------------

0-8 still works, but you need to load the 0-8 spec explicitly and you need to have the 0-10 spec available as well (even if you don't use that version). If the 0-10 spec is in the expected location or if it is referenced by AMQP_SPEC, then you can run 0-8 clients simply by loading the 0-8 spec and passing it the Client object created.

> Better separation of 0-10 and 0-8/0-9 support in test framework
> ---------------------------------------------------------------
>
>                 Key: QPID-1562
>                 URL: https://issues.apache.org/jira/browse/QPID-1562
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Client
>    Affects Versions: M4
>            Reporter: Gordon Sim
>            Assignee: Rafael H. Schloming
>            Priority: Minor
>
> From r732760 the python test suite cannot be run without either the spec refered to from qpid_config available in the expected location or the AMQP_SPEC env var set to an 0-10 format spec.
> Setting AMQP_SPEC to an 0-8 format spec file causes:
> Traceback (most recent call last):
>   File "./run-tests", line 22, in ?
>     from qpid.testlib import testrunner
>   File "/home/gordon/temp/python/qpid/__init__.py", line 20, in ?
>     import spec, codec, connection, content, peer, delegate, client
>   File "/home/gordon/temp/python/qpid/connection.py", line 20, in ?
>     import datatypes, session, socket
>   File "/home/gordon/temp/python/qpid/session.py", line 47, in ?
>     class Session(command_invoker(SPEC)):
>   File "/home/gordon/temp/python/qpid/generator.py", line 56, in command_invoker
>     return invoker("CommandInvoker", spec, is_command)
>   File "/home/gordon/temp/python/qpid/generator.py", line 52, in invoker
>     (), generate(spec, invoker.__module__, predicate))
>   File "/home/gordon/temp/python/qpid/generator.py", line 35, in generate
>     for name, enum in spec.enums.items():
> AttributeError: Spec instance has no attribute 'enums'

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1562) Better separation of 0-10 and 0-8/0-9 support in test framework

Posted by "Gordon Sim (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gordon Sim updated QPID-1562:
-----------------------------

    Priority: Minor  (was: Major)
     Summary: Better separation of 0-10 and 0-8/0-9 support in test framework  (was: Codegen requires presence of an 0-10 spec)

Changed title to reflect root cause, namely that the test framework imports both 0-8 and 0-10 APIs and now the import of the 0-10 APIs trigger code generation which requires a valid 0-10 format spec.

> Better separation of 0-10 and 0-8/0-9 support in test framework
> ---------------------------------------------------------------
>
>                 Key: QPID-1562
>                 URL: https://issues.apache.org/jira/browse/QPID-1562
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Client
>    Affects Versions: M4
>            Reporter: Gordon Sim
>            Assignee: Rafael H. Schloming
>            Priority: Minor
>
> From r732760 the python test suite cannot be run without either the spec refered to from qpid_config available in the expected location or the AMQP_SPEC env var set to an 0-10 format spec.
> Setting AMQP_SPEC to an 0-8 format spec file causes:
> Traceback (most recent call last):
>   File "./run-tests", line 22, in ?
>     from qpid.testlib import testrunner
>   File "/home/gordon/temp/python/qpid/__init__.py", line 20, in ?
>     import spec, codec, connection, content, peer, delegate, client
>   File "/home/gordon/temp/python/qpid/connection.py", line 20, in ?
>     import datatypes, session, socket
>   File "/home/gordon/temp/python/qpid/session.py", line 47, in ?
>     class Session(command_invoker(SPEC)):
>   File "/home/gordon/temp/python/qpid/generator.py", line 56, in command_invoker
>     return invoker("CommandInvoker", spec, is_command)
>   File "/home/gordon/temp/python/qpid/generator.py", line 52, in invoker
>     (), generate(spec, invoker.__module__, predicate))
>   File "/home/gordon/temp/python/qpid/generator.py", line 35, in generate
>     for name, enum in spec.enums.items():
> AttributeError: Spec instance has no attribute 'enums'

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (QPID-1562) Better separation of 0-10 and 0-8/0-9 support in test framework

Posted by "Garrett Smith (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756806#action_12756806 ] 

Garrett Smith commented on QPID-1562:
-------------------------------------

This is not tied to the test framework:

With qpid 0-5:

# export AMQP_SPEC=/QPID/specs/amqp.0-8.xml
# python -c "import qpid"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "qpid/__init__.py", line 20, in <module>
    import spec, codec, connection, content, peer, delegate, client
  File "qpid/connection.py", line 20, in <module>
    import datatypes, session, socket
  File "qpid/session.py", line 47, in <module>
    class Session(command_invoker(SPEC)):
  File "qpid/generator.py", line 56, in command_invoker
    return invoker("CommandInvoker", spec, is_command)
  File "qpid/generator.py", line 52, in invoker
    (), generate(spec, invoker.__module__, predicate))
  File "qpid/generator.py", line 35, in generate
    for name, enum in spec.enums.items():
AttributeError: Spec instance has no attribute 'enums'

The scheme used to specify the spec in the Python library is unorthodox and difficult to work with (and around). The meta programming used in the library should be explicit, via constructors or factory functions and not via a side effect of module loading.

Unfortunately, this isn't a one or two line fix. However, it appears that 0.8 support is broken at the moment.

It strikes me as odd that 0-5 was released without successfully testing 0-8 (as it appears by the original description of this issue). Is 0-8 no longer supported?

> Better separation of 0-10 and 0-8/0-9 support in test framework
> ---------------------------------------------------------------
>
>                 Key: QPID-1562
>                 URL: https://issues.apache.org/jira/browse/QPID-1562
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Client
>    Affects Versions: M4
>            Reporter: Gordon Sim
>            Assignee: Rafael H. Schloming
>            Priority: Minor
>
> From r732760 the python test suite cannot be run without either the spec refered to from qpid_config available in the expected location or the AMQP_SPEC env var set to an 0-10 format spec.
> Setting AMQP_SPEC to an 0-8 format spec file causes:
> Traceback (most recent call last):
>   File "./run-tests", line 22, in ?
>     from qpid.testlib import testrunner
>   File "/home/gordon/temp/python/qpid/__init__.py", line 20, in ?
>     import spec, codec, connection, content, peer, delegate, client
>   File "/home/gordon/temp/python/qpid/connection.py", line 20, in ?
>     import datatypes, session, socket
>   File "/home/gordon/temp/python/qpid/session.py", line 47, in ?
>     class Session(command_invoker(SPEC)):
>   File "/home/gordon/temp/python/qpid/generator.py", line 56, in command_invoker
>     return invoker("CommandInvoker", spec, is_command)
>   File "/home/gordon/temp/python/qpid/generator.py", line 52, in invoker
>     (), generate(spec, invoker.__module__, predicate))
>   File "/home/gordon/temp/python/qpid/generator.py", line 35, in generate
>     for name, enum in spec.enums.items():
> AttributeError: Spec instance has no attribute 'enums'

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org