Re: [Twisted-Python] Twisted-Python Digest, Vol 93, Issue 12
Scratch that bit about verification emails not sending, turns out it works fine in firefox, not in chrome. Thanks, Scott On Sat, Dec 10, 2011 at 9:24 PM, Scott M Ferguson wrote: > Hi all, > > A little intro first, I'm a developer by day, > sql/plsql/java/perl/c/c++/... I've been looking for an opensource > project to get to know and contribute to and came across twisted a > week or so ago. It looks pretty interesting, years ago I spent time > writing networking/remote access code. > > Anyway, I want to help and am starting to look through the 'easy' bugs > - Python is pretty new to me so I figure that's where I should be. I > took a look at http://twistedmatrix.com/trac/ticket/4966, which might > be out-of-date. I don't see __all__ in twisted.web.server.py. Am I > missing something there? > > Also, does the email verification on the website work? I've tried it a > few times and haven't received an email, also nothing in my spam/trash > related to it - sorry if this shouldn't go to the list. > > Thanks, > Scott Ferguson > > On Sat, Dec 10, 2011 at 12:00 PM, > wrote: >> Send Twisted-Python mailing list submissions to >> twisted-python@twistedmatrix.com >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python >> or, via email, send a message with subject or body 'help' to >> twisted-python-requ...@twistedmatrix.com >> >> You can reach the person managing the list at >> twisted-python-ow...@twistedmatrix.com >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Twisted-Python digest..." >> >> >> Today's Topics: >> >> 1. Re: Boston Twisted Sprint: Last-Minute December Edition (Tenth) >> 2. Re: Boston Twisted Sprint: Last-Minute December Edition >> (Kevin Horn) >> 3. MemoryError in twisted.internet.abstract.FileDescriptor >> (Augusto Mecking Caringi) >> 4. Re: MemoryError in twisted.internet.abstract.FileDescriptor >> (Itamar Turner-Trauring) >> 5. Re: Boston Twisted Sprint: Last-Minute December Edition (Glyph) >> >> >> -- >> >> Message: 1 >> Date: Fri, 9 Dec 2011 13:32:23 -0500 >> From: Tenth >> Subject: Re: [Twisted-Python] Boston Twisted Sprint: Last-Minute >> December Edition >> To: Twisted general discussion >> Message-ID: >> >> Content-Type: text/plain; charset="iso-8859-1" >> >> I should also mention that the Sprint will now officially be starting at >> Noon, if that makes it more convenient for anyone... >> >> Thanks, >> >> - Dave >> -- next part -- >> An HTML attachment was scrubbed... >> URL: >> http://twistedmatrix.com/pipermail/twisted-python/attachments/20111209/c24e4597/attachment-0001.htm >> >> -- >> >> Message: 2 >> Date: Fri, 9 Dec 2011 13:00:38 -0600 >> From: Kevin Horn >> Subject: Re: [Twisted-Python] Boston Twisted Sprint: Last-Minute >> December Edition >> To: Twisted general discussion >> Message-ID: >> >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Thu, Dec 8, 2011 at 8:23 PM, Glyph wrote: >> >>> >>> I'll be there, and I'll be working on at least 2 exciting and mysterious >>> features :). >>> >> >> Exciting! Mysterious! >> >> Also, for this sprint or for future sprints, if you're not in the Boston >>> metro area, we'd love to co-ordinate with events in other cities. If you'd >>> like to host something but you've never organized a sprint before, there >>> are many people on this list who would be happy to help you figure that out >>> :). >>> >>> -glyph >>> >> >> FYI, the DFW Pythoneers have a coding/presentation session every second >> Saturday (where it doesn't conflict with anything really obvious, like >> PyCon/PyTexas, etc.) >> >> It's probably a bit too short notice this time to try to hijack the >> meeting, but if you have future sprints on second Saturdays (this is at >> least the second one, I don't know if that's by accident or design), I'm >> happy to try to take it over in furtherance of Twisted. >> >> Kevin Horn >> -- next part -- >> An HTML attachment was scrubbed... >> URL: >> http://twistedmatrix.com/pipermail/twisted-python/attachments/20111209/7fe48b10/attachment-0001.htm >> >> -- >> >> Message: 3 >> Date: Fri, 9 Dec 2011 19:20:44 -0200 >> From: Augusto Mecking Caringi >> Subject: [Twisted-Python] MemoryError in >> twisted.internet.abstract.FileDescriptor >> To: twisted-python@twistedmatrix.com >> Message-ID: >> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> Hi! >> >> I'm writing a software using Python Twisted with the following >> architecture: >> >> [server]<->[providers] >> >> The providers (that can be thousands) send events to the >> centralized server, usually we have a few events per minute for each >> provider, but a b
Re: [Twisted-Python] Twisted-Python Digest, Vol 93, Issue 12
On Dec 10, 2011, at 9:24 PM, Scott M Ferguson wrote: > A little intro first, I'm a developer by day, > sql/plsql/java/perl/c/c++/... I've been looking for an opensource > project to get to know and contribute to and came across twisted a > week or so ago. It looks pretty interesting, years ago I spent time > writing networking/remote access code. Glad to hear it, welcome :). > Anyway, I want to help and am starting to look through the 'easy' bugs > - Python is pretty new to me so I figure that's where I should be. I > took a look at http://twistedmatrix.com/trac/ticket/4966, which might > be out-of-date. I don't see __all__ in twisted.web.server.py. Am I > missing something there? Nope. __all__ should typically be defined on public modules, just as a hint for documentation and tools, so that's why the ticket sort of refers to it as if it's there. But twisted/web/server.py is a super old module, one that predates most of the documentation Really the thing to do with that ticket is to put a @var declaration into the module docstring, though. That should be a pretty trivial patch, to help you get comfortable with the process and the tools :). Feel free to ask if you have any other questions about contributing, -glyph ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] MemoryError in twisted.internet.abstract.FileDescriptor
On 10 Dec, 05:25 pm, augustocari...@gmail.com wrote: On Fri, Dec 9, 2011 at 7:31 PM, Itamar Turner-Trauring wrote: What's the best solution? Apply the patch attached on this ticket, moving to a producer/consumer approach, or any other idea? The patch will just delay the problem... you're creating a huge number of strings, faster than the transport can write them out. The solution is indeed to use the consumer API to pause creation of more data until the transport clears its buffers. Right, I will try with the consumer API. But I have one last question: In my previous example, the memory usage grows until a MemoryError exception. But other scenario is when my "event send loop" iterates a high number of times (but not enough to raise a exception) and then stops. I expected that when the loop ends, all the strings would be flushed and as a consequence, the memory usage of the process would return to a normal level. But this does not happen... It's normal? Data may or may not be put onto the network as you are directing a transport to write it. It's up to the particular transport implementation to decide on buffering logic, including logic about whether data is sent immediately when a write() call is, or only later after control returns to the event loop. As of Twisted 11.1, the posix-based reactor implementations all buffer data until control is returned to the event loop. This has been the case for some time, but not _all_ time, and it may change in the future. Jean-Paul ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Twisted-Python Digest, Vol 93, Issue 12
> On Dec 10, 2011, at 9:24 PM, Scott M Ferguson wrote: > > > Nope. __all__ should typically be defined on public modules, just as a hint > for documentation and tools, so that's why the ticket sort of refers to it > as if it's there. But twisted/web/server.py is a super old module, one that > predates most of the documentation > > Really the thing to do with that ticket is to put a @var declaration into > the module docstring, though. That should be a pretty trivial patch, to > help you get comfortable with the process and the tools :). > > Feel free to ask if you have any other questions about contributing, > > -glyph > > > ___ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > Thanks for the response, as you mentioned that sounds like a good place to get comfortable with the process - I'll start there and ping the list as questions come up. Thanks, Scott ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
[Twisted-Python] How to Solve a Problem Like Santa with Stackless and Twisted
Hi Folks: I don't know what to file this under but here goes: Santa repeatedly sleeps until wakened by either all of his nine reindeer, back from their holidays, or by a group of three of his ten elves. If awakened by the reindeer, he harnesses each of them to his sleigh, delivers toys with them and finally unharnesses them (allowing them to go off on holiday). If awakened by a group of elves, he shows each of the group into his study, consults with them on toy R&D and finally shows them each out (allowing them to go back to work). Santa should give priority to the reindeer in the case that there is both a group of elves and a group of reindeer waiting I recently modified the stackless.py library to support yet another new concurrency feature: join patterns. Well I think of my version as a sawed-off version of join patterns. Join patterns are a synchronization and message passing construct. The closest thing to a join pattern in Twisted is a deferred list. Stackless has nothing of the sort. The Santa Claus Problem is a notorious problem in concurrency (http://www.youtube.com/watch?v=pqO6tKN2lc4). I have come up with a relatively short solution. I think one would be hard pressed to come up with a shorter solution in Python. My desire was to compete with Simon Peyton Jones Haskell version in "Beautiful Code." The full solution is here: http://andrewfr.wordpress.com/2011/11/30/the-santa-claus-problem-with-join-patterns. The nucleus is: def santa(reindeer, elves): joinObject = stackless.join().addPattern([ch for _, ch, _ in reindeer]).\ addPattern([ch for _, ch, _ in elves],3) reindeerPattern, elfPattern = joinObject.patterns while True: pattern = joinObject.join() if reindeerPattern.ready(): print "*** REINDEER GET PRIORITY ***" reindeerPattern.join() pattern = reindeerPattern if pattern is reindeerPattern: harness(reindeerPattern) deliveryToys(reindeerPattern) unharness(reindeerPattern) elif pattern is elfPattern: consultWithSanta(elfPattern) stopTwisted() In this solution I use Twisted to control the timer (I use the blockOn technique that Christopher Armstrong first used). def tick(seconds): tickCh = stackless.channel() reactor.callLater(seconds, tickCh.send, None) tickCh.receive() However I could just as easily make reindeer and elves web services or RestFull interfaces. I am still working on the Join Pattern API. Also it has also been a goal of mine to write a stacklessreactor to better integrate Stackless with the Twisted Reactor. Cheers, Andrew___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python