Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-announce-list@python.org Delivered-To: python-announce-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'handler': 0.05; '"""': 0.07; 'sys': 0.07; 'bug.': 0.09; 'framework.': 0.09; 'function:': 0.09; 'hooks': 0.09; 'instances.': 0.09; 'rod': 0.09; 'windows,': 0.09; 'runs': 0.10; 'api': 0.11; 'python': 0.11; 'django': 0.11; 'def': 0.12; 'bug': 0.12; 'thread': 0.14; '1.1.0': 0.16; '__future__': 0.16; 'blocking': 0.16; 'deferred': 0.16; 'konstantinos': 0.16; 'threads,': 0.16; 'threads.': 0.16; 'to:addr:python-announce- list': 0.16; 'twisted': 0.16; 'library': 0.18; 'first.': 0.19; 'unlike': 0.19; 'example': 0.22; 'import': 0.22; 'tests': 0.22; 'setup,': 0.24; 'skip:e 30': 0.24; 'logging': 0.26; 'fixed': 0.29; 'feature': 0.29; 'skip:p 30': 0.29; 'url:bugs': 0.29; 'reporting': 0.29; 'absolute': 0.30; 'skip:@ 10': 0.30; 'code': 0.31; 'easier': 0.31; 'safely': 0.31; 'trivial': 0.31; 'run': 0.32; 'url:python': 0.33; '(i.e.': 0.33; 'installing': 0.36; 'useful': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'should': 0.36; 'ben': 0.38; 'to:addr:python.org': 0.39; 'new': 0.61; 'networking': 0.64; 'results': 0.69; 'caused': 0.69; 'manner.': 0.74; 'features:': 0.84; 'gavin': 0.84; 'url:latest': 0.91 X-Virus-Scanned: amavisd-new at kolabsys.net X-Spam-Flag: NO X-Spam-Score: 1.995 X-Spam-Level: * X-Spam-Status: No, score=1.995 tagged_above=-10 required=6.31 tests=[HTML_MESSAGE=0.001, MIME_HEADER_CTYPE_ONLY=1.996, NO_RECEIVED=-0.001, NO_RELAYS=-0.001] autolearn=no Sender: itamar@itamarst.org Date: Sat, 15 Mar 2014 08:23:58 -0400 From: Itamar Turner-Trauring To: python-announce-list@python.org Subject: Crochet 1.1.0 - Use Twisted anywhere! X-Mailman-Approved-At: Mon, 17 Mar 2014 11:19:58 +0100 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 X-BeenThere: python-announce-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: python-list@python.org List-Id: Announcement-only list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Approved: python-announce-list@python.org Newsgroups: comp.lang.python.announce Message-ID: Lines: 60 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395051600 news.xs4all.nl 2848 [2001:888:2000:d::a6]:39999 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python.announce:1244 Crochet is an MIT-licensed library that makes it easier for blocking or threaded applications like Flask or Django to use the Twisted networking framework. Crochet provides the following features: * Runs Twisted's reactor in a thread it manages. * The reactor shuts down automatically when the process' main thread finishes. * Hooks up Twisted's log system to the Python standard library logging framework. Unlike Twisted's built-in logging bridge, this includes support for blocking Handler instances. * A blocking API to eventual results (i.e. Deferred instances). This last feature can be used separately, so Crochet is also useful for normal Twisted applications that use threads. Downloads: https://pypi.python.org/pypi/crochet Documentation: https://crochet.readthedocs.org/en/latest/ *Trivial Example * """ Download a web page in a blocking manner. """ from __future__ import print_function import sys from twisted.web.client import getPage from crochet import setup, wait_for_reactor setup() @wait_for_reactor def download_page(url): return getPage(url) # download_page() now behaves like a normal blocking function: print(download_page(sys.argv[1])) *What's New in 1.1.0* Bug fixes: * EventualResult.wait() can now be used safely from multiple threads, thanks to Gavin Panella for reporting the bug. * Fixed reentrancy deadlock in the logging code caused by http://bugs.python.org/issue14976, thanks to Rod Morehead for reporting the bug. * Crochet now installs on Python 3.3 again, thanks to Ben Cordero. * Crochet should now work on Windows, thanks to Konstantinos Koukopoulos. * Crochet tests can now run without adding its absolute path to PYTHONPATH or installing it first. Documentation: * EventualResult.original_failure is now documented. **