old_contents: from eventlet import coros
  
  class channel(coros.queue):
  
      def __init__(self):
          coros.queue.__init__(self, 0)
  
      def receive(self):
          return self.wait()
  
      @property
      def balance(self):
          return self.sem.balance
  
  import warnings
  warnings.warn("channel is deprecated; use coros.queue(0) which behaves the same", DeprecationWarning, stacklevel=2)
  
new_contents: from eventlet import coros
  
  class channel(coros.Channel):
  
      def receive(self):
          return self.wait()
  
      @property
      def balance(self):
          return len(self.items) - len(self._waiters)
  
  import warnings
  warnings.warn("channel.py is deprecated by coros.Channel", DeprecationWarning, stacklevel=2)
  
  if __name__ == '__main__':
      from eventlet import proc, api
      c = channel()
      proc.spawn(c.send, 'X')
      proc.spawn(c.send, 'Y')
      assert c.wait() == 'X', c
      assert c.wait() == 'Y', c
      assert api.with_timeout(1, c.wait, timeout_value='hello') == 'hello', c
  
  
subject: fix to use coros.Channel