<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted">
    <title>gmane.comp.python.twisted</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24300"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24299"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24298"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24297"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24296"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24295"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24294"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24293"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24292"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24291"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24290"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24289"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24288"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24287"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24286"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24285"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24284"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24283"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24282"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.twisted/24281"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24300">
    <title>Weekly Bug Summary</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24300</link>
    <description>&lt;pre&gt;_______________________________________________
Twisted-Python mailing list
Twisted-Python&amp;lt; at &amp;gt;twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
&lt;/pre&gt;</description>
    <dc:creator>exarkun&lt; at &gt;twistedmatrix.com</dc:creator>
    <dc:date>2012-05-20T04:05:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24299">
    <title>Re: Getting rid of "DirtyReactorWarning"</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24299</link>
    <description>&lt;pre&gt;
I think you should talk to jml about his ideas for a new base 
`TestCase`-like class which is better factored with respect to its 
handling of Twisted-related reponsibilities.

I don't think just removing `DirtyReactorWarning` from all the places it 
is currently emitted is a good idea (if only because it is providing 
*us* value, and because new behavior merits new interfaces).

More generally, I don't think ReactorBuilder is the best approach for 
unit testing anything except reactor implementations, just as I don't 
think using a real reactor (with real time, real networking, etc) is the 
best way approach for unit testing application code that uses the 
reactor.

We need to keep improving our test doubles, documenting their usage, and 
porting our own test suite (the application-y parts, at least) to them.

Jean-Paul
&lt;/pre&gt;</description>
    <dc:creator>exarkun&lt; at &gt;twistedmatrix.com</dc:creator>
    <dc:date>2012-05-18T20:21:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24298">
    <title>Re: Synchronous calls using Twisted?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24298</link>
    <description>&lt;pre&gt;
If "the usual way" is as a WSGI application, then blockingCallFromThread 
is probably the best fit.

Django is intended to be used in a multi-threaded (or multi-process) 
environment, not an asynchronous one.  It can't take advantage of 
Twisted's single-threaded asynchronous APIs (eg Deferreds).

Based on your original email, I think you had a pretty good grasp of 
what needed to be done, but it sounds like you got hung up on unit 
testing.

The unit tests work the same way as the actual application works.  That 
is, in actual deployment, you have one thread running the reactor and N 
threads, each running the Django application.  You use 
blockingCallFromThread in any of those N threads to talk to the one 
reactor thread.

The most obvious way for your unit tests to work is for them to do the 
same thing.  Run the reactor in one thread, run your (Django-based, 
blockingCallFromThread-using) unit tests in a different thread.

The deadlock you mentioned will go away, because now the code is 
executing as ex&lt;/pre&gt;</description>
    <dc:creator>exarkun&lt; at &gt;twistedmatrix.com</dc:creator>
    <dc:date>2012-05-18T20:17:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24297">
    <title>Re: Synchronous calls using Twisted?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24297</link>
    <description>&lt;pre&gt;Hello,
On 17/05/2012 02:00, Jasper St. Pierre wrote:
Once again, maybe I *cannot* make Django do asynchronous calls simply
because I am not used to Twisted and asynchronous calls.

 +----------+   +-------------+   +------------+   +-----------+
 | Database |---| Core Server |---| Web Server |---| Web client|
 +----------+   +-------------+   +------------+   +-----------+

A bit more context.
What I call "core server" is more or less a proxy to a database. It
exposes some high-level functions to access and manipulate the database,
doing some additional checks to ensure that user is allowed to do what
he is trying to do, and ensuring that he does not mess up the integrity
of the database. I am trying to make this server be a Twisted server.
The "web server" is built using Django. It has access to the database
only using the high-level functions exposed by the core server.
Until I got stuck with this synchronous/asynchronous questions, I
thought Twisted would be a nice tool to use to make the core serve&lt;/pre&gt;</description>
    <dc:creator>Louis</dc:creator>
    <dc:date>2012-05-18T16:32:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24296">
    <title>Re: Synchronous calls using Twisted?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24296</link>
    <description>&lt;pre&gt;

Hi Andrew

    What is the advantage of using stackless with twisted?

Regards

gelin yan
_______________________________________________
Twisted-Python mailing list
Twisted-Python&amp;lt; at &amp;gt;twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
&lt;/pre&gt;</description>
    <dc:creator>gelin yan</dc:creator>
    <dc:date>2012-05-18T04:06:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24295">
    <title>Re: Synchronous calls using Twisted?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24295</link>
    <description>&lt;pre&gt;half async/half sync is not as obscure as you may think:

www.cs.wustl.edu/~schmidt/PDF/PLoP-95.pdf

On May 17, 2012, at 12:06:04PM, Andrew Francis wrote:


_______________________________________________
Twisted-Python mailing list
Twisted-Python&amp;lt; at &amp;gt;twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
&lt;/pre&gt;</description>
    <dc:creator>Mike Winter</dc:creator>
    <dc:date>2012-05-17T20:17:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24294">
    <title>Re: Synchronous calls using Twisted?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24294</link>
    <description>&lt;pre&gt;Message: 1

Date: Thu, 17 May 2012 00:58:57 +0200
From: Louis &amp;lt;spalax&amp;lt; at &amp;gt;gresille.org&amp;gt;
Subject: [Twisted-Python] Synchronous calls using Twisted?
To: twisted-python&amp;lt; at &amp;gt;twistedmatrix.com
Message-ID: &amp;lt;4FB43131.2030805&amp;lt; at &amp;gt;gresille.org&amp;gt;
Content-Type: text/plain; charset=ISO-8859-1





I am not sure why inline generators won't work?

Over the years, I use Stackless Python with Twisted. I use Twisted for many of the reasons you describe. For myself there is another dimension: I find that a lot of the code I write are orchestrations - that is in order to compute something, I have to make a few network calls sequentially. 

 I use a technique that Christopher Armstrong (what happened to him?) called a blockOn. For the sake of being academic (roll your eyes here),  this is an example of an obscure design pattern called "Half-sync/Half-async."

Essentially one does the following:

def blockOn(deferred): 
    ch = stackless.channel() 
    def cb(result): 
        ch.send(result) 
    deferred.addBoth(cb) 
&lt;/pre&gt;</description>
    <dc:creator>Andrew Francis</dc:creator>
    <dc:date>2012-05-17T19:06:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24293">
    <title>Re: Synchronous calls using Twisted?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24293</link>
    <description>&lt;pre&gt;The point of blockingCallFromThread is as a last resort when
interfacing with a synchronous API that can't be replaced, like the
DBAPI. It fools Twisted into thinking an external synchronous API is
asynchronous, by carefully punting it to a new thread.

I don't understand why you can't make Django do asynchronous calls.
Maybe a bit more context would help.

On Wed, May 16, 2012 at 6:58 PM, Louis &amp;lt;spalax&amp;lt; at &amp;gt;gresille.org&amp;gt; wrote:



&lt;/pre&gt;</description>
    <dc:creator>Jasper St. Pierre</dc:creator>
    <dc:date>2012-05-17T00:00:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24292">
    <title>Re: Commercial support contracts for Twisted - any interest?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24292</link>
    <description>&lt;pre&gt;One final reminder - if you're interested in support contracts for 
Twisted, please fill out the questionnaire linked below.

&lt;/pre&gt;</description>
    <dc:creator>Itamar Turner-Trauring</dc:creator>
    <dc:date>2012-05-16T23:45:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24291">
    <title>Synchronous calls using Twisted?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24291</link>
    <description>&lt;pre&gt;  Hello,
  I am writing an application, which architecture is (I hope my
beautiful drawing is not messed up):

  +-------------+   +------------+   +-----------+
  | Core Server |---| Web Server |---| Web client|
  +-------------+   +------------+   +-----------+

  That is, I have a core server (itself interacting with a database, but
I think this is not important). I have a second piece of software, which
is both a client regarding the core server, and a web server. At last,
the web client is the web browser of your choice.
  The web server is a Django application, which means that (as far as I
know) I cannot (easily) make it use asynchronous calls.
  At last, for the communication between the core server and the web
server (which is, from this point of vue, a client), I was looking for
something that let me use remote objects as if they were local. That is
when I discovered Twisted.



  Twisted seems to be the kind of tool I want to use because it seems to
be powerful, can use SSL, authentication, transm&lt;/pre&gt;</description>
    <dc:creator>Louis</dc:creator>
    <dc:date>2012-05-16T22:58:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24290">
    <title>Re: Declaring AMP responders away from</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24290</link>
    <description>&lt;pre&gt;Have a look at what I did in Frack:

http://bazaar.launchpad.net/~washort/frack/trunk/view/head:/frack/wiring.py#L27
http://bazaar.launchpad.net/~washort/frack/trunk/view/head:/frack/responder.py#L85

You can unbundle the locator and dispatcher bits. I only used this for
a single separate class, but with some imagination the principle could
be extended to multiple objects I bet.
&lt;/pre&gt;</description>
    <dc:creator>Allen Short</dc:creator>
    <dc:date>2012-05-16T15:07:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24289">
    <title>Declaring AMP responders away from</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24289</link>
    <description>&lt;pre&gt;Hi,

I'm writing a service that exposes a bunch of methods over AMP.

These methods are easily logically grouped into separate modules (i.e. message-related, picture-related…). So, I'd like to define the behavior for those methods in those modules.

However, the amp.Command.responder decorator only works inside the class definition of an AMP subclass.  (http://twistedmatrix.com/documents/current/api/twisted.protocols.amp.Command.html#responder).

Does that mean I should have multiple AMP subclasses? How do I get all of them to listen on the same port? Is this what the mysterious "routes" feature I've been hearing about does?

Right now I'm doing it like this, which works but isn't very pretty or nice:

user.py:
-----
class Register(amp.Command):
    arguments = […]
    response = […]
    errors = […]


def register(self, …):
    # do actual registering behavior here
-----

api.py:
-----
from project import auth

class API(amp.AMP):
    register = auth.Register.responder(auth.register)
-----


cheer&lt;/pre&gt;</description>
    <dc:creator>Laurens Van Houtven</dc:creator>
    <dc:date>2012-05-16T14:26:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24288">
    <title>Getting rid of "DirtyReactorWarning"</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24288</link>
    <description>&lt;pre&gt;I have a ticket open for allowing tests that look like this, where each 
run has a new reactor instance:


def test_somethingShouldHappen(self, reactor):
      result = []
      reactor.listenTCP(...)
      self.runReactor(reactor)
      self.assertEqual(result, ["hooray"])


Further thought suggests however that this doesn't add much, 
necessarily, over the current "return a Deferred" idiom for most users. 
Experience with ReactorBuilder framework that has similar testing 
mechanism suggests it's far too easy to fail to stop the reactor. 
Moreover, things like coiterate() don't work since they rely on 
pre-imported global reactor, and given the "from twisted.internet import 
reactor" idiom this testing style won't work well for many people's code.

But! ReactorBuilder tests are superior in one way: no 
DirtyReactorWarning. You don't have to wait until all connections are 
closed, which is difficult, or make sure to cancel every timeout. This 
makes test writing simpler.

Perhaps we should get rid of DirtyRe&lt;/pre&gt;</description>
    <dc:creator>Itamar Turner-Trauring</dc:creator>
    <dc:date>2012-05-15T10:26:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24287">
    <title>Re: Cannot install Twisted version 8 through PIP</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24287</link>
    <description>&lt;pre&gt;Ok,

Thanks for your help.
Best regards,

&lt;/pre&gt;</description>
    <dc:creator>Pascal Briet</dc:creator>
    <dc:date>2012-05-14T14:00:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24286">
    <title>Re: Cannot install Twisted version 8 through PIP</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24286</link>
    <description>&lt;pre&gt;
We have a strict backwards compatibility policy; anything that changes 
or is removed will have deprecation warnings for at least 2 releases and 
one year.

So the thing to do is, upgrade to version 9, run your program and make 
sure its tests pass, and fix any code that triggers deprecation warnings 
in Twisted. Repeat with each version until you're up to date. In most 
cases this may take as little as a couple of hours of work; possibly 
none if you didn't happen to be using any deprecated APIs.
&lt;/pre&gt;</description>
    <dc:creator>Itamar Turner-Trauring</dc:creator>
    <dc:date>2012-05-14T13:54:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24285">
    <title>Re: Cannot install Twisted version 8 through PIP</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24285</link>
    <description>&lt;pre&gt;Hi,

Thanks for your answer.

Well, there is no specific reason that we use the 8.2.0 version.
It's just... history. We never needed to upgrade it.

Do you think we can easily upgrade to 9/10/11/12 ??
Thanks very much,

&lt;/pre&gt;</description>
    <dc:creator>Pascal Briet</dc:creator>
    <dc:date>2012-05-14T13:35:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24284">
    <title>Re: Cannot install Twisted version 8 through PIP</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24284</link>
    <description>&lt;pre&gt;My understanding is that pip uses PyPI, and personally I know of no one 
who removed stuff from PyPI; more likely PyPI decided to remove old 
versions of software to save space.

Any reason you're using 8.2? It's almost 4 years old at this point, and 
we've fixed a lot of bugs and added a lot of features since then.

-Itamar
&lt;/pre&gt;</description>
    <dc:creator>Itamar Turner-Trauring</dc:creator>
    <dc:date>2012-05-14T13:29:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24283">
    <title>Cannot install Twisted version 8 through PIP</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24283</link>
    <description>&lt;pre&gt;Hi,

We're having some troubles today, because it seems that old packages of
Twisted are not available anymore.
We are currently relying on Twisted 8.2.0.

pip install twisted==8.2.0  is failing  (first version available seems to
be 9.0.0)
The package was still available last Friday.

Is there a critical reason explaining that it has been removed from the
servers ?

Thanks very much,
Best regards,

&lt;/pre&gt;</description>
    <dc:creator>Pascal Briet</dc:creator>
    <dc:date>2012-05-14T13:14:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24282">
    <title>Re: question : json.loads failed using LineReceiver data</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24282</link>
    <description>&lt;pre&gt;
Read your log message.  This is not a valid JSON string:

'{"a_flw_fwd":12,"a_flw_rtr":5029,"a_rpm":519,"b_flw_fwd":23,"b_flw_rtr":8,"b_rpm":913}'

Presumably your objective is to receive something like this instead:

{"a_flw_fwd":12,"a_flw_rtr":5029,"a_rpm":519,"b_flw_fwd":23,"b_flw_rtr":8,"b_rpm":913}

The problem is unrelated to Twisted or the console.  The sender is 
sending the wrong data, or else your parsing of it is incorrect.

Jean-Paul
&lt;/pre&gt;</description>
    <dc:creator>exarkun&lt; at &gt;twistedmatrix.com</dc:creator>
    <dc:date>2012-05-14T12:47:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24281">
    <title>Re: question : json.loads failed using LineReceiver data</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24281</link>
    <description>&lt;pre&gt;Perhaps the JSON spans more than one line? Printing out the repr() of 
the lines you're receiving may be informative.
&lt;/pre&gt;</description>
    <dc:creator>Itamar Turner-Trauring</dc:creator>
    <dc:date>2012-05-14T10:47:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.twisted/24280">
    <title>question : json.loads failed using LineReceiverdata</title>
    <link>http://permalink.gmane.org/gmane.comp.python.twisted/24280</link>
    <description>&lt;pre&gt;Dear All ..

I'm trying to received json formated text using LineReceiver

Here is my code
----START----
class ArduinoReceiver(LineReceiver):
     def __init__(self):
         print 'INIT : ArduinoReceiver'

     def lineReceived(self, line):
         line = line.strip()
         print 'Received line = '+line
         if 'Arduino' in line :
             return
         self.linedict=json.loads(line)

----STOP-----
but I got error msg in the log as :
----START----
2012-05-14 15:42:00+0700 [-] Received line = 
'{"a_flw_fwd":12,"a_flw_rtr":5029,"a_rpm":519,"b_flw_fwd":23,"b_flw_rtr":8,"b_rpm":913}'
2012-05-14 15:42:00+0700 [-] Unhandled Error
     Traceback (most recent call last):
       File 
"/usr/local/lib/python2.6/dist-packages/Twisted-11.1.0_r33425-py2.6-linux-i686.egg/twisted/python/log.py", 
line 84, in callWithLogger
         return callWithContext({"system": lp}, func, *args, **kw)
       File 
"/usr/local/lib/python2.6/dist-packages/Twisted-11.1.0_r33425-py2.6-linux-i686.egg/twisted/python/log.py", &lt;/pre&gt;</description>
    <dc:creator>bino oetomo</dc:creator>
    <dc:date>2012-05-14T08:53:53</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.python.twisted">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.twisted</link>
  </textinput>
</rdf:RDF>

