From 533c8690ef114f0ec2cdcce763458a14b25bfefc Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Sun, 21 Feb 2010 11:45:13 -0500 Subject: [PATCH] Doc tweaks. --- AUTHORS | 4 ++-- doc/design_patterns.rst | 2 +- doc/modules/db_pool.rst | 2 +- eventlet/backdoor.py | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/AUTHORS b/AUTHORS index 0a052f1..063b105 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,7 +5,7 @@ Original Authors Contributors ------------ -* R. Tyler Ballance +* R\. Tyler Ballance * Denis Bilenko * AG Projects * Mike Barton @@ -32,7 +32,7 @@ Thanks To * Chuck Thier, reporting a bug in processes.py * Brantley Harris, reporting bug #4 * Taso Du Val, reproing an exception squelching bug, saving children's lives ;-) -* Sergey Shepelev, PEP 8 police :-), reporting bug #5, design and implementations of convenience functions listen and connect +* Sergey Shepelev, PEP 8 police :-), reporting bug #5, design and implementations of convenience functions listen and connect * Luci Stanescu, for reporting twisted hub bug * Marcus Cavanaugh, for test case code that has been incredibly useful in tracking down bugs * Brian Brunswick, for many helpful questions and suggestions on the mailing list diff --git a/doc/design_patterns.rst b/doc/design_patterns.rst index fdd8f5f..aa60d43 100644 --- a/doc/design_patterns.rst +++ b/doc/design_patterns.rst @@ -91,7 +91,7 @@ Here's a somewhat contrived example: a server that receives POSTs from clients t The full version of this example is in the :ref:`feed_scraper_example`, which includes code to start the WSGI server on a particular port. -This example uses a global (gasp) :class:`GreenPool ` to control concurrency. If we didn't have a global limit on the number of outgoing requests, then a client could cause the server to open tens of thousands of concurrent connections to external servers, thereby getting feedparser's IP banned, or various other accidental-or-on-purpose bad behavior. The pool isn't a complete DoS protection, but it's the bare minimum. +This example uses a global (gasp) :class:`GreenPool ` to control concurrency. If we didn't have a global limit on the number of outgoing requests, then a client could cause the server to open tens of thousands of concurrent connections to external servers, thereby getting feedscraper's IP banned, or various other accidental-or-on-purpose bad behavior. The pool isn't a complete DoS protection, but it's the bare minimum. .. highlight:: python :linenothreshold: 1 diff --git a/doc/modules/db_pool.rst b/doc/modules/db_pool.rst index 7a9d887..771dfbe 100644 --- a/doc/modules/db_pool.rst +++ b/doc/modules/db_pool.rst @@ -3,7 +3,7 @@ The db_pool module is useful for managing database connections. It provides three primary benefits: cooperative yielding during database operations, concurrency limiting to a database host, and connection reuse. db_pool is intended to be database-agnostic, compatible with any DB-API 2.0 database module. -*Caveat: however, it has currently only been tested and used with MySQLdb.* +*It has currently been tested and used with both MySQLdb and psycopg2.* A ConnectionPool object represents a pool of connections open to a particular database. The arguments to the constructor include the database-software-specific module, the host name, and the credentials required for authentication. After construction, the ConnectionPool object decides when to create and sever connections with the target database. diff --git a/eventlet/backdoor.py b/eventlet/backdoor.py index e3bc95b..a557bd7 100644 --- a/eventlet/backdoor.py +++ b/eventlet/backdoor.py @@ -3,7 +3,8 @@ import sys import errno from code import InteractiveConsole -from eventlet import api, hubs +import eventlet +from eventlet import hubs from eventlet.support import greenlets try: @@ -106,5 +107,5 @@ def backdoor((conn, addr), locals=None): if __name__ == '__main__': - backdoor_server(api.tcp_listener(('127.0.0.1', 9000)), {}) + backdoor_server(eventlet.listen(('127.0.0.1', 9000)), {})