Bug #1045

RSB Pyton lacks protocol classes

Added by S. Wrede over 9 years ago. Updated over 9 years ago.

Status:ResolvedStart date:06/28/2012
Priority:HighDue date:
Assignee:J. Wienke% Done:

100%

Category:Python
Target version:rsb-0.7

Description

The rsb_python-0.7.0.22-py2.7.egg seems to lack the protocol buffer classes. That's what I read from the following trace:

In [2]: i = createInformer(Scope("/example/informer"),dataType=str)
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/Users/swrede/Documents/Projects/HUMAVIPS/SVN-BIU/<ipython-input-2-cf9bc7bbbf08> in <module>()
----> 1 i = createInformer(Scope("/example/informer"),dataType=str)

/Library/Python/2.7/site-packages/rsb_python-0.7.0.22-py2.7.egg/rsb/__init__.pyc in createInformer(scope, config, dataType)
   1446     @return: a new Informer object.
   1447     """ 
-> 1448     return Informer(Scope.ensureScope(scope), dataType, config)
   1449 
   1450 def createService(scope):

/Library/Python/2.7/site-packages/rsb_python-0.7.0.22-py2.7.egg/rsb/__init__.pyc in __init__(self, scope, theType, config, configurator)
   1200             self.__configurator = configurator
   1201         else:
-> 1202             connectors = self.getConnectors('out', config)
   1203             for connector in connectors:
   1204                 connector.setQualityOfServiceSpec(config.getQualityOfServiceSpec())

/Library/Python/2.7/site-packages/rsb_python-0.7.0.22-py2.7.egg/rsb/__init__.pyc in getConnectors(clazz, direction, config)
   1136                     assert(False)
   1137             elif transport.getName() == 'socket':
-> 1138                 import rsb.transport.socket
   1139                 if direction == 'in':
   1140                     klass = rsb.transport.socket.InPushConnector

/Users/swrede/Documents/Projects/HUMAVIPS/SVN-BIU/build/bdist.macosx-10.7-intel/egg/rsb/transport/socket/__init__.py in <module>()

/Users/swrede/Documents/Projects/HUMAVIPS/SVN-BIU/build/bdist.macosx-10.7-intel/egg/rsb/transport/conversion.py in <module>()

ImportError: No module named protocol.EventId_pb2

Initial hypothesis: Pypi job does not seem to package the RSB protocol.

Associated revisions

Revision e84cfbda
Added by J. Wienke over 9 years ago

In the setup.py, after building the protocol files, reinitialize the list of available packages for RSB as we have just generated new modules which needs to be included there. This ensures that on a fresh generation of the protocol these newly generated modules immediately will be included in any distribution of rsb-python

fixes #1045

Revision cd1e1763
Added by J. Moringen almost 7 years ago

Fixed transport options processing and inheritance in src/**/*.lisp

fixes #1045

The previous implementation merged default options at all transport
option processing stages such as `uri->scope-and-options'.

Now, `uri->scope-and-options' just returns options. Defaults are only
merged in as a final step. Likewise for filtering out disabled
transports.

  • src/configuration.lisp (transport-options): do not take enabled
    property into account
    (process-transport-options): removed; no longer needed
    (effective-transport-options): new function; remove entry with
    defaults and entries for disabled transports
    (merge-transport-options): new function; merge two sets of transports
    options, one take priority over the other
  • src/uris.lisp (uri->scope-and-options): do accept default options;
    just extract the options in the URI; adapted documentation string
    (%transport-options): removed; no longer needed
    (%merge-options): likewise
  • src/participant.lisp
    (make-participant-using-class :around class client scope): use
    `merge-transport-options' instead of a default value of the
    `transports' keyword parameter
    (make-participant-using-class class client scope): make transports and
    converters keyword parameters required; use
    `effective-transport-options' instead of `process-transport-options'
    (make-participant t uri): do not handle transport option defaults;
    just merge URI options with supplied transport options
  • src/informer.lisp (make-informer scope t): pass transport options
    through without modification
  • src/listener.lisp (make-listener scope): likewise
  • src/reader.lisp (make-reader scope): likewise
  • src/compat.lisp (define-participant-creation-uri-methods): adapted to
    transport options handling changes
  • src/patterns/request-reply/server.lisp
    (make-participant-using-class class server scope): use
    `merge-transport-options' and `effective-transport-options' and check
    whether any transports have effectively been selected
  • src/patterns/request-reply/local-server.lisp
    (make-local-server scope): pass transport options
    through without modification; do the same for other options while at
    it
  • src/patterns/request-reply/remote-server.lisp
    (make-remote-server scope): likewise
  • test/uris.lisp (test case uris-root::uri->scope-and-options-smoke):
    adapted cases to changes in `uri->scope-and-options'; expect errors to
    be signaled for invalid URIs
  • test/informer.lisp (define-basic-participant-test-cases informer):
    adapted transport options
  • test/listener.lisp (define-basic-participant-test-cases listener):
    likewise
  • test/reader.lisp (define-basic-participant-test-cases reader):
    likewise
  • test/patterns/request-reply/local-server.lisp
    (test suite local-server-root): likewise
    (define-basic-participant-test-cases local-server): likewise
  • test/patterns/request-reply/remote-server.lisp
    (define-basic-participant-test-cases remote-server): likewise

Revision a2a04035
Added by J. Moringen almost 7 years ago

Restored previously disabled/removed test cases in test/**/*.lisp

refs #1045

Participant creation test cases containing an initarg of the form

:transports ((t …) …)

did not work previously due to defects in transport option
handling. Since these are now fixed, the test cases could be restored.

  • test/informer.lisp (define-basic-participant-test-cases informer):
    added test case of the form mentioned above
  • test/listener.lisp (define-basic-participant-test-cases listener):
    likewise
  • test/reader.lisp (define-basic-participant-test-cases reader):
    re-enabled test case of the form mentioned above
  • test/patterns/request-reply/local-server.lisp
    (define-basic-participant-test-cases local-server): added tests cases
    for transports keyword parameter; one is of the form described above
  • test/patterns/request-reply/remote-server.lisp
    (define-basic-participant-test-cases remote-server): likewise

Revision 5897b6ce
Added by J. Moringen almost 7 years ago

Store uninterpreted transport options in src/patterns/request-reply/server.lisp

refs #1045

Child participants of the server will merge with defaults and interpret
the result. Thus storing uninterpreted options is the right thing to do.

  • src/patterns/request-reply/server.lisp
    (make-participant-using-class class server scope): store uninterpreted
    transport options; still interpret supplied transport options to check
    whether at least one transport will be selected

Revision df6b1048
Added by J. Moringen almost 7 years ago

Handle inheritance of transport options in src/rsb/construction.lisp

refs #1045

  • src/rsb/construction.lisp (header): updated copyright
    (events->bag uri bag): allow inherited transport options subordinate
    to the explicitly supplied one

History

#1 Updated by J. Wienke over 9 years ago

  • Status changed from New to In Progress

#2 Updated by J. Wienke over 9 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3670.

#3 Updated by J. Wienke over 9 years ago

Sebastian, can you test this again. I just pushed a new version to pypi. At least the console output of the job looks good now.

#4 Updated by S. Wrede over 9 years ago

Great. Works fine now!

Also available in: Atom PDF