[Twisted-Python] Twisted 9.0.0?
Hi everyone! I am a bit puzzled about the way new version of Twisted is released. Or better: the way the old version seems to be taken out of service. Last weeks I've been developing agains version Twisted 9.0.0. Yesterday I wanted to deploy my code to my production server, but to my surprise I could not easy_install that version anymore: $ easy_install Twisted==9.0.0 Searching for Twisted==9.0.0 Reading http://pypi.python.org/simple/Twisted/ Reading http://www.twistedmatrix.com Reading http://twistedmatrix.com/products/download Reading http://twistedmatrix.com/projects/core/ Reading http://twistedmatrix.com/ No local packages or download links found for Twisted==9.0.0 Best match: None (Okay, actually I'm using buildout to setup my environment, but the above demonstrates my problem more clearly.) I'm sure the new version of Twisted is better and improved but I still wonder why version 9.0.0 has effectively been decommissioned. Or am I missing something and is it still possible to easy_install version 9.0.0? Thanks, Mark -- Mark van Lent m.van.l...@zestsoftware.nl ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Twisted 9.0.0?
On 10:45 am, m.van.l...@zestsoftware.nl wrote: Hi everyone! I am a bit puzzled about the way new version of Twisted is released. Or better: the way the old version seems to be taken out of service. Last weeks I've been developing agains version Twisted 9.0.0. Yesterday I wanted to deploy my code to my production server, but to my surprise I could not easy_install that version anymore: $ easy_install Twisted==9.0.0 Searching for Twisted==9.0.0 Reading http://pypi.python.org/simple/Twisted/ Reading http://www.twistedmatrix.com Reading http://twistedmatrix.com/products/download Reading http://twistedmatrix.com/projects/core/ Reading http://twistedmatrix.com/ No local packages or download links found for Twisted==9.0.0 Best match: None (Okay, actually I'm using buildout to setup my environment, but the above demonstrates my problem more clearly.) I'm sure the new version of Twisted is better and improved but I still wonder why version 9.0.0 has effectively been decommissioned. Or am I missing something and is it still possible to easy_install version 9.0.0? Decommissioned? Not really. There is a link to older releases at the top of http://twistedmatrix.com/trac/wiki/Downloads. You can find releases going all the way back to 2.0 there. Perhaps easy_install isn't the best way to manage deployments to your production server? Jean-Paul ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Twisted 10.0.0 released
On 08:37 am, ch...@simplistix.co.uk wrote: Jonathan Lange wrote: * A new Windows installer that ships without zope.interface Interesting, why? The installer is now built using bdist_msi. If there's a way to bundle zope.interface in the MSI, then this might be interesting to pursue. Also, I'm pretty sure that the 9.0 Windows installer _also_ didn't include zope.interface. So this isn't a new situation with 10.0. Is zope.interface not used/required anymore? If so, why is it shipping in the non-windows version? It doesn't ship in any of the packages for other platforms, either (nor do any of our other external dependencies). Jean-Paul ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Twisted 9.0.0?
exar...@twistedmatrix.com wrote: Perhaps easy_install isn't the best way to manage deployments to your production server? No, but buildout is... However, this process of discovering packages (hit pypi, scrape web pags if the distro isn't on pypi) is the only solution the python community (be it pip, easy_install, virtualenv or buildout) is using to download packages... Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Twisted 9.0.0?
exar...@twistedmatrix.com wrote: On 04:53 pm, kevin.h...@gmail.com wrote: Is there any particular reason Twisted doesn't upload packages to PyPI itself? Messing about with web forms is no fun and setup.py register has issues. What issues? I've never had problems with either the register or upload commands... Having the distributions on PyPI makes the OP's problem go away, and reduces the maintenance burned for you guys who release twisted... Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Twisted 9.0.0?
Jonathan Lange wrote: I don't know how the PyPI announcement was done (although I'd love to!), but I think you can announce new versions without decommissioning old ones. PyPI already does the right thing w.r.t. hide previous versions (either way works, it doesn't affect tools like easy_install) but ONLY if you put your distros on PyPI... ...obviously PyPI has not knowledge of your website and so can't do anything about it. Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Twisted 9.0.0?
Glyph Lefkowitz wrote: On Mar 4, 2010, at 7:59 AM, Jonathan Lange wrote: On Thu, Mar 4, 2010 at 10:45 AM, Mark van Lent m.van.l...@zestsoftware.nl wrote: Hi everyone! I am a bit puzzled about the way new version of Twisted is released. Or better: the way the old version seems to be taken out of service. Last weeks I've been developing agains version Twisted 9.0.0. Yesterday I wanted to deploy my code to my production server, but to my surprise I could not easy_install that version anymore: $ easy_install Twisted==9.0.0 Searching for Twisted==9.0.0 Reading http://pypi.python.org/simple/Twisted/ Reading http://www.twistedmatrix.com Reading http://twistedmatrix.com/products/download Reading http://twistedmatrix.com/projects/core/ Reading http://twistedmatrix.com/ No local packages or download links found for Twisted==9.0.0 Best match: None (Okay, actually I'm using buildout to setup my environment, but the above demonstrates my problem more clearly.) I'm sure the new version of Twisted is better and improved but I still wonder why version 9.0.0 has effectively been decommissioned. Or am I missing something and is it still possible to easy_install version 9.0.0? It's an oversight. I think it's actually a bug in easy_install, or at least a mis-design. To make something easy_installable, you don't provide structured information in PyPI; there may be a way to do that, but most packages I've seen (Twisted included) just provide a link to a page which then provides a link to a file with a filename of vaguely the appropriate shape. easy_install works by screen-scraping that link. In our case, the home page, http://twistedmatrix.com, links directly to a Twisted-version.tar.bz2, which is then used. If someone (perhaps Mark van Lent!) could point us at how to provide the correctly structured information to easy_install via PyPI so it will _stop_ screen-scraping our website, and just point at the correct files, this problem could be addressed. I think that easy_install and related tools can be directed to the proper download location by providing a Download-URL on the PyPI page. E.g. the page for Twisted 9.0.0: http://pypi.python.org/pypi/Twisted/9.0.0 should have a Download-URL link to: http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/ Regards, Ziga ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Twisted 9.0.0?
On 07:54 pm, ziga.seilna...@gmail.com wrote: Glyph Lefkowitz wrote: If someone (perhaps Mark van Lent!) could point us at how to provide the correctly structured information to easy_install via PyPI so it will _stop_ screen-scraping our website, and just point at the correct files, this problem could be addressed. I think that easy_install and related tools can be directed to the proper download location by providing a Download-URL on the PyPI page. E.g. the page for Twisted 9.0.0: http://pypi.python.org/pypi/Twisted/9.0.0 should have a Download-URL link to: http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/ That's easy enough to adjust. There. Someone want to try it and see if it works? Jean-Paul ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Twisted 9.0.0?
exar...@twistedmatrix.com wrote: On 07:54 pm, ziga.seilna...@gmail.com wrote: I think that easy_install and related tools can be directed to the proper download location by providing a Download-URL on the PyPI page. E.g. the page for Twisted 9.0.0: http://pypi.python.org/pypi/Twisted/9.0.0 should have a Download-URL link to: http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/ That's easy enough to adjust. There. Someone want to try it and see if it works? Jean-Paul It looks like it works now: I:\ easy_install Twisted==9.0.0 Searching for Twisted==9.0.0 Reading http://pypi.python.org/simple/Twisted/ Reading http://www.twistedmatrix.com Reading http://twistedmatrix.com/products/download Reading http://twistedmatrix.com/projects/core/ Reading http://twistedmatrix.com/ Reading http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/ Best match: Twisted 9.0.0 Downloading http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/Twisted-9.0.0.win32-py2.5.exe Now, how to get rid of the egg yolk... Regards, Ziga ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] IMAP4 Client extrange behavior
Hello all I have solved this, here are my final functions, I thing to notice is that with twisted 8.2 the one from the debian/ubuntu repos this functions do not work properly, in the other hand, they work just fine with twisted 9 and 10 def selectMailbox(self, mailbox): Select the mailbox to examin if debug: print On selectMailbox mailbox = self.factory.mailbox return self.select(mailbox).addCallback(self.cbSelectSuccess) def cbSelectSuccess(self, selected): Examine the INBOX mailbox for new mails if debug: print On cbSelectSuccess self.messageCount = selected['EXISTS'] print Messages: , self.messageCount unseen = imap4.Query(unseen=True) return self.search(unseen ).addCallback(self.cbSearch) def cbSearch(self,messages): if debug: print on cbSearch messageSet = imap4.MessageSet() for message in messages: messageSet += message if messageSet: self.fetchMessage(messageSet, False ).addCallback(self.cbProcMessage) else: return def cbProcMessage(self, messages): if debug: print on cbProcEnvelop for message in messages.iteritems(): body = message[1]['RFC822'] print body 2010/2/22 César García cel...@gmail.com: Hello all, I have this imap4 client http://www.pastebin.com/m4e387f1a most of the code is barrowed from a IRC friend, bob_f , it works fine but as soon as more that 1 email arrrives to the inbox, it only prints the first new messages but not the others, I wonder what am I doing wrong Thanks a lot Here is the code: #!/usr/bin/env python #coding=utf-8 Client de IMAP4 que descarga contenido del INBOX de una cuenta en especifico para luego extraer el numero de telefono que debe venir en los correos enviados import StringIO import sys from Config import retCredentials from twisted.internet.task import LoopingCall from twisted.internet import protocol from twisted.internet import defer from twisted.mail import imap4 from twisted.python import util from twisted.python import log from twisted.internet import reactor debug = 1 class IMAP4Client(imap4.IMAP4Client): def serverGreeting(self,caps): Metodo llamado cuando el servidor contesta if debug: print On serverGreeting self.serverCapabilities = caps if self.greetDeferred is not None: d, self.greetDeferred = self.greetDeferred, None d.addCallback(self.cbLogin) d.callback(self) def cbLogin(self, proto): Callback to IMAP login if debug: print On Login login = self.login(self.factory.username, self.factory.password) login.addCallback(self.startPolling) def startPolling(self, proto): Callback to poll every x seconds call = LoopingCall(self.selectMailbox,mailbox=INBOX) call.start(20, now=True) def selectMailbox(self, mailbox): Select the mailbox to examin if debug: print On selectMailbox mailbox = self.factory.mailbox return self.select(mailbox).addCallback(self.cbSelectSuccess) def cbSelectSuccess(self, selected): Examine the INBOX mailbox for new mails if debug: print On cbSelectSuccess self.messageCount = selected['EXISTS'] print Messages: , self.messageCount unseen = selected['EXISTS'] - selected['RECENT'] if selected['RECENT'] == 0: print No new messages return return self.fetchMessage(%s:* % (unseen) ).addCallback(self.cbProcMessages) def cbProcMessages(self,messages): print messages class IMAP4ClientFactory(protocol.ClientFactory): protocol = IMAP4Client def __init__(self, username, password, onConn): self.username = username self.password = password self.mailbox = 'INBOX' self.onConn = onConn def buildProtocol(self,addr): if debug: print On buildProtocol p = self.protocol() p.factory = self p.greetDeferred = self.onConn auth = imap4.CramMD5ClientAuthenticator(self.username) p.registerAuthenticator(auth) return p def clientConectionFailed(self, connector, reason): d, self.onConn = self.onConn, None d.errback(reason) def ebConnection(reason): log.startLogging(sys.stdout) log.err(reason) reactor.stop() PORT = 143 RESULT = INBOX def main(): credentials = retCredentials() hostname = credentials['server'] username = credentials['mailbox'] password = util.getPassword('IMAP4 Password: ') onConn = defer.Deferred( ).addErrback(ebConnection ) factory =
[Twisted-Python] Twisted Python on Nokia E71x (Running the phone Python Interpreter)
Has anyone experimented with twisted-python on the Nokia E71x or E72 smartphones? Prince Riley ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
[Twisted-Python] Lore to Sphinx Conversion Progress Report 6
It's been a while, I know you were all waiting with baited breath... First a few fixes: - Thanks to Tim Allen and Steve Steiner, several theme issues were fixed. This fixes a few minor display bugs and should make pages validate properly. - inline markup will now include child contents. This causes rst not to display properly in cases of nested inline markup, but should make it easier to manually fix these places later - :download: links are now generated for non-rst files ending in .py (most of the examples), as welll as .tac and .sql files - toc entries which end in a / character now have index appended to them in the ReST output, which fixes a few issues where the built-Sphinx docs would end up with broken navigation links. A couple of issues were also fixed at the PyCon sprints: - cite tags are now handled...sort of. According to Glyph, these aren't really very important, so we just return the contents of the tag without any special markup. If we feel the need to put citation markup back into the docs we can do that post-transition. - Glyph also found an easy way to improve the CSS of the theme somewhat. The issue where the sidebar drops below the main content should now be less of a problem, though it's not gone entirely. - Glyph and I also discussed a few different ways to handle links to the API docs and agreed on a way forward. Basically, well change the code class='API' tags into something like: :api:`path.to.documented object label`, and then create a docutils extension to convert that into a link. The beginnings of this are in the hg repos, but it looks like it won't be quite as simple as we thought. First, the way pydoctor generates links is deceptively simple. If you look up a module, like twisted.internet.defer, the link looks like this: http://twistedmatrix.com/documents/9.0.0/api/twisted.internet.defer.html If you look up a class, like twisted.internet.defer.Deferred for example, the link looks like this: http://twistedmatrix.com/documents/current/api/twisted.internet.defer.Deferred.html Pretty simple right? But if you look up a function or method like twisted.internet.defer.Deferred.callback, the link has an anchor, like so: http://twistedmatrix.com/documents/9.0.0/api/twisted.internet.defer.Deferred.html#addCallback So we'll need to do some checking on either the api docs or on twisted itself to determine what sort of object is being linked to. Shouldn't be super-difficult, just haven't had time yet. Second, I haven't yet figured out how to access the Sphinx config object from a docutils role function. I'm sure this is just a matter of finding an example or getting an answer from the mailing list, but I just haven't gotten to it yet. I think the API links are the only major issue still remaining until we start doing the conversion, so once this issue is handled, I'll probably file a ticket and create a branch in SVN for the conversion. If anyone has any docs tickets open, now is the time to get them fixed! And if anyone has some great ideas about how to organize the new docs in the repository, I'd love to hear them. As always, converted docs are here: http://twistedsphinx.funsize.net/ The lore2Sphinx Hg repos is here: http://bitbucket.org/khorn/lore2sphinx/ Comments, ideas, patches and pull requests gratefully accepted (or at least discussed). Kevin Horn ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Twisted 9.0.0?
On Thu, Mar 04, 2010 at 01:55:50PM -0500, Glyph Lefkowitz wrote: Now that our release process is better documented (THANK YOU JML), you might be able to have a look at http://twistedmatrix.com/trac/wiki/ReleaseProcess and figure out where 'setup.py upload' could fit in without uploading a tarball that is _not_ actually our official release. If setup.py upload involves setup.py sdist then I guess this is ticket #4138 again. I still plan to tackle it sometime soon, but totally would not object if anybody else wanted to dive in. :D ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Lore to Sphinx Conversion Progress Report 6
On 10:49 pm, kevin.h...@gmail.com wrote: If you look up a class, like twisted.internet.defer.Deferred for example, the link looks like this: http://twistedmatrix.com/documents/current/api/twisted.internet.defer.Deferred.html Pretty simple right? But if you look up a function or method like twisted.internet.defer.Deferred.callback, the link has an anchor, like so: http://twistedmatrix.com/documents/9.0.0/api/twisted.internet.defer.Deferred.html#addCallback So we'll need to do some checking on either the api docs or on twisted itself to determine what sort of object is being linked to. Shouldn't be super-difficult, just haven't had time yet. Did you notice that http://twistedmatrix.com/documents/9.0.0/api/twisted.internet.defer.Deferred.addCallback.html also exists? Jean-Paul ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Lore to Sphinx Conversion Progress Report 6
On Thu, Mar 4, 2010 at 5:05 PM, exar...@twistedmatrix.com wrote: On 10:49 pm, kevin.h...@gmail.com wrote: If you look up a class, like twisted.internet.defer.Deferred for example, the link looks like this: http://twistedmatrix.com/documents/current/api/twisted.internet.defer.Deferred.html Pretty simple right? But if you look up a function or method like twisted.internet.defer.Deferred.callback, the link has an anchor, like so: http://twistedmatrix.com/documents/9.0.0/api/twisted.internet.defer.Deferred.html#addCallback So we'll need to do some checking on either the api docs or on twisted itself to determine what sort of object is being linked to. Shouldn't be super-difficult, just haven't had time yet. Did you notice that http://twistedmatrix.com/documents/9.0.0/api/twisted.internet.defer.Deferred.addCallback.html also exists? Jean-Paul I hadn't actually. If all functions and methods have a similar page in the PyDoctor output, then I think what I have now will pretty much work as-is (almost). Do we think that just generating links to the individual function/method pages is acceptable? Kevin Horn ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Lore to Sphinx Conversion Progress Report 6
On Thu, Mar 4, 2010 at 6:10 PM, Michael Hudson-Doyle mica...@gmail.comwrote: On 5 March 2010 12:31, Kevin Horn kevin.h...@gmail.com wrote: On Thu, Mar 4, 2010 at 5:05 PM, exar...@twistedmatrix.com wrote: On 10:49 pm, kevin.h...@gmail.com wrote: If you look up a class, like twisted.internet.defer.Deferred for example, the link looks like this: http://twistedmatrix.com/documents/current/api/twisted.internet.defer.Deferred.html Pretty simple right? But if you look up a function or method like twisted.internet.defer.Deferred.callback, the link has an anchor, like so: http://twistedmatrix.com/documents/9.0.0/api/twisted.internet.defer.Deferred.html#addCallback So we'll need to do some checking on either the api docs or on twisted itself to determine what sort of object is being linked to. Shouldn't be super-difficult, just haven't had time yet. Did you notice that http://twistedmatrix.com/documents/9.0.0/api/twisted.internet.defer.Deferred.addCallback.html also exists? Jean-Paul I hadn't actually. If all functions and methods have a similar page in the PyDoctor output, then I think what I have now will pretty much work as-is (almost). Do we think that just generating links to the individual function/method pages is acceptable? It's what the lore-processed documentation currently links to. It would be nice to fix this (and I sort of vaguely know how), but that should in no way hold up the move away from lore! Cheers, mwh OK, if that's the way Lore does it, then I'm happy to call that good enough for now. It seems to work here in my local version of the docs, I'll update the online stuff at http://twistedsphinx.funsize.net soonish. Kevin Horn ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] SSHSessionProcessProtocol.inConnectionLost() behavior and Git over Conch
On 4 March 2010 17:46, Bo Shi bs1...@gmail.com wrote: Hi All, I've been struggling with this issue off and on for the better part of a month now. Having implemented a simple git SSH server using some of the Conch examples in the official documentation, I encountered an issue that would cause a git client to throw an error only part of the time. I think it's a bug in conch. The little program to reproduce the issue is found at http://gist.github.com/321403 (raw version for download) http://gist.github.com/raw/321403/82ab2111a2709c8fe50a77aabb08565749087408/gitconnbug.py and can be executed to start the sample server. Run a command like # The /abspath/to/git/repo should be readable by the server user $ git clone ssh://u...@localhost:/abspath/to/git/repo (password user) To test the server. On my workstation, I am able to reproduce the error at least once every 5 tries. It's definitely not consistent. The behavior I see is attached at the end of this email. The client fails due to a premature inConnectionLost() call in the SSHSessionProcessProtocol that sends an EOF. As a workaround, when TraceProcessProtocol.inConnectionLost() is overriden to do nothing, the client error goes away. This is somewhat foreign territory for me so I'm not sure whether it's a bug in git or whether it's a bug in the twisted ProcessProtocol implementation. RFC 4254 isn't terribly helpful here: 5.3. Closing a Channel When a party will no longer send more data to a channel, it SHOULD send SSH_MSG_CHANNEL_EOF. So on the surface the current behavior of sending an EOF appears fine, however, I can't really find any definitive cases of this type of problem popping up via, say, default OpenSSH/git combinations. Any advice? Is the gitconnbug.py implementation flawed? Should I open a ticket? Any git experts know of a case where git-upload-pack might close it's stdout pipe? I think what's actually happening here is that git-upload-pack is closing its *stdin*. Why conch reacts to that by shutting down the channel, I don't really know -- it doesn't seem right to me. Maybe it's a simple logic error and it method should be 'outConnectionClosed' instead? At any rate, I think this is a bug -- please file a ticket. And thanks for the complete example! Cheers, mwh ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] Twisted Python on Nokia E71x (Running the phone Python Interpreter)
Hi see my post dated 30.05.2009 18:59 did some experimenting with E61i and twisted pre 8.0 pretty much worked. Now with the problems starting on E61i with the Python releases from 1.97 up to the latest 2.0 (certificate woes) and an extremely shabby implementation of the cam module I lost interest. HTH, Werner Prince Riley wrote: Has anyone experimented with twisted-python on the Nokia E71x or E72 smartphones? Prince Riley ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python