cpython/Lib
Guido van Rossum 90cb9067b8 SF Patch #102980, by Luke Kenneth Casson Leighton: BaseServer class
for SocketServer.py (inherited by TCPServer)

Luke wrote:

  The socketserver code, with a little bit of tweaking, can be made
  sufficiently general to service "requests" of any kind, not just by sockets.
  The BaseServer class was created, for example, to poll a table in a MYSQL
  database every 2 seconds. each entry in the table can be allocated a
  Handler which deals with the entry.

  With this patch, using BaseServer and ThreadedServer classes, the creation
  of the server that reads and handles MySQL table entries instead of a
  socket was utterly trivial: about 50 lines of python code.

  You may consider this code to be utterly useless [why would anyone else
  want to do anything like this???] - you are entitled to your opinion. if you
  think so, then think of this: have you considered how to cleanly add SSL to
  the TCPSocketServer? What about using shared memory as the
  communications mechanism for a server, instead of sockets? What about
  communication using files?

  The SocketServer code is extremely good every useful. it's just that as it
  stands, it is tied to sockets, which is not as useful.

I heartily approve of this idea.
2001-01-19 00:44:41 +00:00
..
compiler a few small optimizations that seem to give a 5-10% speedup; the 2000-11-06 16:03:52 +00:00
curses Make isspace(chr(32)) return true 2000-12-26 16:07:59 +00:00
distutils Patch #103279: sysconfig.py always looks for versions of files in 2001-01-17 15:16:52 +00:00
encodings This patch changes the default behaviour of the builtin charmap 2001-01-03 21:29:14 +00:00
idlelib Fixes for Python 1.6 compatibility - socket bind and connect get a 2000-09-24 06:29:50 +00:00
lib-old Update the code to better reflect recommended style: 2000-12-12 23:11:42 +00:00
lib-tk Patch by kragen@pobox.com: When tracing is turned on, lines shorter 2001-01-01 19:11:07 +00:00
plat-aix3 New AIX specific subdirs 1996-08-08 18:24:58 +00:00
plat-aix4 New AIX specific subdirs 1996-08-08 18:24:58 +00:00
plat-beos5 Donn Cave <donn@oz.net>: 2000-10-07 12:25:17 +00:00
plat-freebsd2 New files from Thomas Gellekum 1998-05-06 15:14:36 +00:00
plat-freebsd3 New files from Thomas Gellekum 1998-05-06 15:14:36 +00:00
plat-freebsd4 tg@freebsd.org 2000-08-31 02:42:11 +00:00
plat-freebsd5 tg@freebsd.org 2000-08-31 02:42:11 +00:00
plat-generic Use python$EXE instead of python, for Darwin. (Patch by Tony 2000-10-09 19:34:12 +00:00
plat-irix5 Update the code to better reflect recommended style: 2000-12-12 23:11:42 +00:00
plat-irix6 Update the code to better reflect recommended style: 2000-12-12 23:11:42 +00:00
plat-linux1 more recent linux header files 1996-01-26 17:43:46 +00:00
plat-linux2 Forgot to add this file. CDROM device parameters. 1999-04-12 14:35:08 +00:00
plat-netbsd1 More generated files for netbsd 1.x, by Anders Andersen. 1997-12-03 18:44:57 +00:00
plat-next3 regen for Next 1996-08-16 18:14:41 +00:00
plat-sunos4 Merge alpha100 branch back to main trunk 1994-08-01 11:34:53 +00:00
plat-sunos5 Forgot to add this file. CDROM device parameters. 1999-04-12 14:35:08 +00:00
site-packages Add a README file so that cvs update -P doesn't obliterate this 2000-03-31 20:03:56 +00:00
test Add test that ensures hash() of objects defining __cmp__ or __eq__ but 2001-01-18 23:47:15 +00:00
xml Text.__init__(): Make sure the data parameter is a string (8-bit or 2001-01-08 04:04:34 +00:00
aifc.py Whitespace standardization. 2001-01-14 18:09:23 +00:00
anydbm.py Whitespace standardization. 2001-01-14 18:09:23 +00:00
asynchat.py Whitespace standardization. 2001-01-14 18:09:23 +00:00
asyncore.py Whitespace standardization. 2001-01-14 18:09:23 +00:00
atexit.py Whitespace standardization. 2001-01-14 18:09:23 +00:00
audiodev.py Whitespace standardization. 2001-01-14 18:09:23 +00:00
base64.py a couple of nits from Patch #100933 2000-07-25 14:34:38 +00:00
BaseHTTPServer.py Whitespace normalization. 2001-01-14 21:54:20 +00:00
Bastion.py Mass check-in after untabifying all files that need it. 1998-03-26 21:13:24 +00:00
bdb.py Whitespace normalization. 2001-01-14 21:54:20 +00:00
binhex.py Whitespace normalization. 2001-01-14 21:54:20 +00:00
bisect.py Fred, THIS NEEDS DOCS! The function docstrings tell the tale. 2000-12-29 02:06:45 +00:00
builtin.py added builtin b/w compat module. 1993-10-22 14:24:22 +00:00
calendar.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
cgi.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
CGIHTTPServer.py An honest attempt to make this work on Unix, Windows, and even 2000-09-19 04:01:01 +00:00
chunk.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
cmd.py Update the code to better reflect recommended style: 2000-12-12 23:20:45 +00:00
code.py mwh@sourceforge found that UnicodeError can be raised by compiling. 2001-01-15 18:13:35 +00:00
codecs.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
codeop.py Moved compile_command() here from code.py, so JPython can provide its 1998-10-22 21:56:15 +00:00
colorsys.py Fix the question marks next to the expansions of some of the 2000-02-14 21:30:52 +00:00
commands.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
compileall.py When run as a script, report failures in the exit code as well. 1999-03-29 20:25:40 +00:00
ConfigParser.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
Cookie.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
copy.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
copy_reg.py In the module docstring, clarify that this is used to register pickle 2000-10-11 22:16:45 +00:00
dbhash.py Clarify why we define error. Suggested by Andrew Dalke. 1999-05-03 18:09:26 +00:00
dircache.py Update the code to better reflect recommended style: 2000-12-12 23:20:45 +00:00
dis.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
doctest.py doctest-- The Little Module That Could --finally makes it to the Big Show <wink>. 2001-01-16 07:10:57 +00:00
dospath.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
dumbdbm.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
filecmp.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
fileinput.py Speed it up by using readlines(sizehint). It's still slower than 2001-01-05 14:44:39 +00:00
fnmatch.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
formatter.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
fpformat.py Whitespace normalization. 2001-01-14 23:36:06 +00:00
ftplib.py Default to passive mode. See SF bug #126851. 2001-01-15 16:32:49 +00:00
getopt.py GetoptError is always initialized with exactly two parameters, so simplify 2001-01-08 15:39:32 +00:00
getpass.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
gettext.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
glob.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
gopherlib.py Fredrik Lundh: 2000-03-28 21:45:46 +00:00
gzip.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
htmlentitydefs.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
htmllib.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
httplib.py Revert a change I accidentally checked in together with Ping's 2001-01-15 14:34:20 +00:00
ihooks.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
imaplib.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
imghdr.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
imputil.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
keyword.py More trivial comment -> docstring transformations by Ka-Ping Yee, 2000-02-04 15:10:34 +00:00
knee.py Mass check-in after untabifying all files that need it. 1998-03-26 21:13:24 +00:00
linecache.py Update the code to better reflect recommended style: 2000-12-12 23:20:45 +00:00
locale.py Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either 2000-07-16 12:04:32 +00:00
macpath.py Update the code to better reflect recommended style: 2000-12-12 23:20:45 +00:00
macstat.py * Lib/linecache.py: don't crash on empty filename 1994-08-23 13:32:20 +00:00
macurl2path.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
mailbox.py Update the code to better reflect recommended style: 2000-12-12 23:20:45 +00:00
mailcap.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
Makefile Remove .pyo files like .pyc files. 1997-10-20 23:16:58 +00:00
mhlib.py Update the code to better reflect recommended style: 2000-12-12 23:20:45 +00:00
mimetools.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
mimetypes.py Untabify to pass the -tt test. 2000-02-10 17:17:14 +00:00
MimeWriter.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
mimify.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
multifile.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
mutex.py Whitespace normalization. 2001-01-14 23:47:14 +00:00
netrc.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
nntplib.py Whitespace normalization. 2001-01-16 07:12:46 +00:00
ntpath.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
nturl2path.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
os.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
pdb.doc Untabified and applied Richard Wolff's changes (plus my own reflowing 1998-09-17 15:01:38 +00:00
pdb.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
persist.py * ftplib.py: added abort() command (sends oob data). 1993-05-24 14:16:22 +00:00
pickle.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
pipes.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
popen2.py test_popen2 broke on Windows shortly after 2.0b2 was released. Fixed it. 2000-10-03 23:07:13 +00:00
poplib.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
posixfile.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
posixpath.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
pprint.py Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either 2000-07-16 12:04:32 +00:00
pre.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
profile.doc Merge alpha100 branch back to main trunk 1994-08-01 11:34:53 +00:00
profile.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
pstats.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
pty.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
py_compile.py Support \r in source files. Closes bug #101425. 2000-09-15 06:57:26 +00:00
pyclbr.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
Queue.py Variant of Skip's patch 103246 (Remove unneeded string exception compat from Queue). 2001-01-15 22:53:46 +00:00
quopri.py Whitespace normalization. 2001-01-15 00:50:52 +00:00
random.py Whitespace normalization. 2001-01-15 01:18:21 +00:00
re.py My fix to the URL accidentally also switched back to the "pre" module. 2000-08-01 21:22:16 +00:00
reconvert.py Whitespace normalization. 2001-01-15 01:18:21 +00:00
regex_syntax.py Whitespace normalization. 2001-01-15 01:18:21 +00:00
regsub.py Whitespace normalization. 2001-01-15 01:18:21 +00:00
repr.py Whitespace normalization. 2001-01-15 01:18:21 +00:00
rexec.py Whitespace normalization. 2001-01-15 01:18:21 +00:00
rfc822.py Whitespace normalization. 2001-01-15 01:18:21 +00:00
rlcompleter.py Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either 2000-07-16 12:04:32 +00:00
robotparser.py Skip Montanaro: 2000-03-27 19:29:31 +00:00
sched.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
sgmllib.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
shelve.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
shlex.py Whitespace normalization. 2001-01-17 08:48:39 +00:00
shutil.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
SimpleHTTPServer.py - Use mimetypes.types_map to initialize extensions_map. 2001-01-14 23:21:25 +00:00
site.py Patch #103134: Support import lines in pth files. 2001-01-11 13:02:43 +00:00
smtplib.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
sndhdr.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
socket.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
SocketServer.py SF Patch #102980, by Luke Kenneth Casson Leighton: BaseServer class 2001-01-19 00:44:41 +00:00
sre.py bumped SRE version number to 2.1. cleaned up and added 1.5.2 2001-01-16 07:37:30 +00:00
sre_compile.py from the really-stupid-bug department: uppercase literals should match 2001-01-15 18:28:14 +00:00
sre_constants.py added "magic" number to the _sre module, to avoid weird errors caused 2001-01-15 12:46:09 +00:00
sre_parse.py bumped SRE version number to 2.1. cleaned up and added 1.5.2 2001-01-16 07:37:30 +00:00
stat.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
statcache.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
statvfs.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
string.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
StringIO.py Untabify! (Barry, this is gonna cost you a bottle of wine! ;) 2000-12-13 20:23:11 +00:00
stringold.py Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either 2000-07-16 12:04:32 +00:00
sunau.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
sunaudio.py Whitespace normalization. 2001-01-15 01:36:40 +00:00
symbol.py Update for augmented assignment. 2000-08-24 21:08:39 +00:00
tabnanny.py Whitespace normalization. 2001-01-15 03:26:36 +00:00
telnetlib.py Whitespace normalization. 2001-01-15 03:26:36 +00:00
tempfile.py Whitespace normalization. 2001-01-15 03:26:36 +00:00
threading.py Whitespace normalization. 2001-01-15 03:26:36 +00:00
toaiff.py Whitespace normalization. 2001-01-15 03:26:36 +00:00
token.py Update for augmented assignment. 2000-08-24 21:08:39 +00:00
tokenize.py Add tokenizer support and tests for u'', U"", uR'', Ur"", etc. 2001-01-15 22:04:30 +00:00
traceback.py Whitespace normalization. 2001-01-15 03:26:36 +00:00
tty.py Whitespace normalization. 2001-01-15 03:26:36 +00:00
types.py Marc-Andre Lemburg: add UnicodeType. 2000-03-10 23:18:11 +00:00
tzparse.py Whitespace normalization. 2001-01-15 03:26:36 +00:00
urllib.py - Make sure to quote the username and password (SF patch #103236 by 2001-01-15 18:31:13 +00:00
urllib2.py Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00
urlparse.py Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00
user.py Lawrence Kesteloot noted: Lib/user.py has a comment that says that the 2000-03-30 15:00:33 +00:00
UserDict.py Add popitem(). 2000-12-12 22:06:00 +00:00
UserList.py Bite the bullet: use rich comparisons here, too. 2001-01-18 16:09:55 +00:00
UserString.py Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00
uu.py Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00
warnings.py Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00
wave.py Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00
webbrowser.py Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00
whichdb.py Add missing 'try:'. Patch by Rob W. W. Hooft, #101071 (closed.) 2000-08-04 08:46:59 +00:00
whrandom.py Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00
xdrlib.py Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00
xmllib.py Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00
zipfile.py Whitespace normalization. Top level of Lib now fixed-point for reindent.py! 2001-01-15 03:34:38 +00:00