Your message dated Mon, 11 Jun 2012 13:35:04 +1000
with message-id <[email protected]>
has caused the   report #656137,
regarding readme.txt: asynchronous usage is a misleading lie
to be marked as having been forwarded to the upstream software
author(s) [email protected]

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
656137: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656137
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656137

----------  Forwarded Message  ----------

Subject: Bug#656137: readme.txt: asynchronous usage is a misleading lie
Date: Tue, 17 Jan 2012, 06:53:06
From: Enrico Zini <[email protected]>
To: Debian Bug Tracking System <[email protected]>

Package: python-asterisk
Version: 0.1a3+r160-4.1
Severity: normal

Hello,

in readme.txt there is an entry called "Asynchronous Usage", which shows
how to integrate PyAsterisk in a select-based event loop.

That bit leads you to believe that PyAsterisk can work in an
asynchronous environment like Twisted or Tornado. In fact, looking at
the code, that is most sadly untrue:

 - Asterisk.Manager reads from the file descriptor using readline():
   this blocks the main loop indefintiely, until a newline is read. If
   the connection to asterisk hangs (say, network goes down) halfway
   through a reply, goodbye event loop.
 - Actions are synchronous. After sending a command to asterisk, a
   readline() is issued right away. Again, this blocks the event loop
   until asterisk replies, if it ever does.

So, the only way to integrate PyAsterisk in a select loop is to fork a
child process and run select on a pipe to it.

You would wish that an upstream who puts such comments in the code
actually knew what they were doing:

        if line.startswith('ActionID: '):
                # Asterisk is a pile of shite!!!!!!!!!
                packet.ActionID = line[10:]

Not that they aren't right, of course :)


Ciao,

Enrico


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-asterisk depends on:
ii  python          2.7.2-9
ii  python-support  1.0.14

python-asterisk recommends no packages.

python-asterisk suggests no packages.

-- no debconf information





-----------------------------------------

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---

Reply via email to