Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Can't use Haigha-gevent without installing pyevent #10

vitaly-krugl opened this Issue Mar 12, 2012 · 1 comment


None yet
2 participants

vitaly-krugl commented Mar 12, 2012

(initially discussed in agoragames/pyevent#3 (comment))

Haigha includes all transports from its connection.py script (from haigha.transports import *), which automatically picks up event_transport.py and crashes if pyevent can't be loaded.

I think that this can be overcome by doing lazy-imports inside the following code block instead of "import *", but I am not sure what would be the best for the tests:

if not isinstance(transport, Transport):
  if transport=='event':
    from haigha.transports.event_transport import EventTransport
    self._transport = EventTransport( self )
  elif transport=='gevent':
    from haigha.transports.gevent_transport import GeventTransport
    self._transport = GeventTransport( self )
  elif transport=='gevent_pool':
    self._transport = GeventPoolTransport( self )

@ghost ghost assigned awestendorf Mar 12, 2012


awestendorf commented Mar 26, 2012

Fixed and released in 0.4.2


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment