cpython/Doc/lib
Tim Peters 5af0e41482 Bug #788520: Queue class has logic error when non-blocking
I don't agree it had a bug (see the report), so this is *not* a candidate
for backporting, but the docs were confusing and the Queue implementation
was old enough to vote.

Rewrote put/put_nowait/get/get_nowait from scratch, to use a pair of
Conditions (not_full and not_empty), sharing a common mutex.  The code
is 1/4 the size now, and 6.25x easier to understand.  For blocking
with timeout, we also get to reuse (indirectly) the tedious timeout
code from threading.Condition.  The Full and Empty exceptions raised
by non-blocking calls are now easy (instead of nearly impossible) to
explain truthfully:  Full is raised if and only if the Queue truly
is full when the non-blocking put call checks the queue size, and
similarly for Empty versus non-blocking get.

What I don't know is whether the new implementation is slower (or
faster) than the old one.  I don't really care.  Anyone who cares
a lot is encouraged to check that.
2004-07-12 00:45:14 +00:00
..
.cvsignore
asttable.tex
caseless.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
compiler.tex Minor grammatical fix. 2003-10-30 05:42:15 +00:00
distutils.tex fix typo 2004-03-25 16:14:17 +00:00
email-dir.py Add a missing import. Closes SF # 816344. 2003-11-21 20:28:15 +00:00
email-mime.py Split the long email package examples into separate files and use 2002-10-01 14:17:10 +00:00
email-simple.py Split the long email package examples into separate files and use 2002-10-01 14:17:10 +00:00
email-unpack.py Split the long email package examples into separate files and use 2002-10-01 14:17:10 +00:00
email.tex Move a footnote to the end of the sentence, so the note mark won't 2003-01-29 05:10:27 +00:00
emailcharsets.tex Describe Charset.__repr__(). 2003-03-06 06:07:34 +00:00
emailencoders.tex Proofread and spell checked, all except the Examples section (which 2002-10-01 04:33:16 +00:00
emailexc.tex Vast update to email version 2. This could surely use proofreading. 2002-10-01 01:05:52 +00:00
emailgenerator.tex Generator's constructor: The documentation was incorrect regarding how 2003-11-19 02:22:36 +00:00
emailheaders.tex Describe the new Header.encode() argument "splitchars". 2003-03-06 06:06:54 +00:00
emailiter.tex body_line_iterator() now takes a decode argument. 2003-03-11 04:40:14 +00:00
emailmessage.tex SF patch #859286: documentation bool change fix 2003-12-31 18:37:28 +00:00
emailmimebase.tex For email 2.5b1, we no longer add a trailing newline to 2003-03-11 05:03:25 +00:00
emailparser.tex fix typo in reference to RFC 3464 DSN MIME type 2004-02-24 20:58:10 +00:00
emailutil.tex Proofread and spell checked, all except the Examples section (which 2002-10-01 04:33:16 +00:00
internet.tex
language.tex
lib.tex Added documentation for the "smtpd" module. 2004-07-11 16:25:25 +00:00
libaifc.tex
libal.tex Fix unbalanced parenthesis in text. 2003-07-14 18:36:47 +00:00
liballos.tex
libamoeba.tex
libanydbm.tex Merge the old dumbdbm documetation into the new docs that have been added. 2003-07-21 15:30:15 +00:00
libarray.tex SF feature request #686323: Minor array module enhancements 2004-03-14 05:43:59 +00:00
libascii.tex
libasynchat.tex Fix typos: despatcher -> dispatcher. 2002-09-17 15:19:12 +00:00
libasyncore.tex Check in the updated version of patch #957240, which doesn't rely 2004-06-30 09:02:33 +00:00
libatexit.tex Added example of using positional and keyword args with atexit.register(). 2003-04-08 17:46:53 +00:00
libaudioop.tex
libbase64.tex Documentation for new RFC 3548 functions. 2004-01-04 01:14:01 +00:00
libbasehttp.tex make a reference to the SimpleHTTPServer module a hyperlink to the 2004-06-09 14:50:19 +00:00
libbastion.tex [Bug #729817] Document the rexec and Bastion modules as dead 2003-05-13 14:16:18 +00:00
libbinascii.tex
libbinhex.tex
libbisect.tex * Move collections.deque() in from the sandbox 2004-01-29 06:37:52 +00:00
libbltin.tex
libbsddb.tex move the note about the bsddb185 module above the "See also" box; that 2004-06-24 06:03:59 +00:00
libbz2.tex Unparenting BZ2File, as discussed in SF patch #661796. 2003-02-11 18:46:20 +00:00
libcalendar.tex - update description of isleap() 2003-12-31 04:51:56 +00:00
libcd.tex
libcfgparser.tex ConfigParser: 2004-05-18 04:24:02 +00:00
libcgi.tex SF bug #987486: fix typo. 2004-07-10 11:15:56 +00:00
libcgihttp.tex
libcgitb.tex SF Patch 569574 - enhancements to cgitb for plain text display 2003-06-17 12:58:31 +00:00
libchunk.tex
libcmath.tex Patch #826074: cmath.log optional base argument, fixes #823209 2004-06-14 07:40:10 +00:00
libcmd.tex general markup improvements 2003-12-31 05:01:23 +00:00
libcmp.tex
libcmpcache.tex
libcode.tex fix various typos; thanks, George Yoshida! 2004-05-12 03:07:27 +00:00
libcodecs.tex add cp866 row 2004-07-02 02:14:34 +00:00
libcodeop.tex add missing closing quote. 2004-06-17 13:29:11 +00:00
libcollections.tex Minor wording and spacing nits. 2004-06-12 07:59:40 +00:00
libcolorsys.tex Fix broken link (closes bug #852236). Thanks to Fedor Baart for bug file and 2003-12-11 04:37:24 +00:00
libcommands.tex
libcompileall.tex
libconsts.tex - documented Ellipsis, NotImplemented 2003-01-02 05:13:51 +00:00
libcookie.tex Patch #963318: Add support for client-side cookie management. 2004-05-31 18:22:40 +00:00
libcookielib.tex [Patch #969900] Various corrections and updates to cookielib docs 2004-07-10 18:41:28 +00:00
libcopy.tex Remove list of pickle protocol names used by the copy module; there 2004-05-05 04:24:30 +00:00
libcopyreg.tex work around whitespace bugs in the HTML version 2003-12-30 22:17:16 +00:00
libcrypt.tex
libcrypto.tex
libcsv.tex show how easy it is to manipulate individual columns - from a request on 2004-07-08 19:49:10 +00:00
libcurses.tex SF patch #855195: fix typos 2003-12-07 13:00:25 +00:00
libcursespanel.tex Use personal e-mail address 2002-10-30 21:08:34 +00:00
libdatetime.tex lots of markup adjustments 2003-12-30 20:36:20 +00:00
libdbhash.tex Minor fixups 2003-09-16 21:45:22 +00:00
libdbm.tex
libdecimal.tex Minor improvements, fixups and wording changes everywhere. 2004-07-11 12:40:19 +00:00
libdifflib.tex add direct link to the article in DDJ 2004-01-21 18:30:28 +00:00
libdircache.tex use conventional whitespace in interactive example 2003-12-31 07:41:52 +00:00
libdis.tex Fix unbalanced parethesis. 2003-05-10 08:51:28 +00:00
libdl.tex
libdoctest.tex Patch #932930: suggest the use of rawstrings for backslashes. 2004-05-31 19:01:00 +00:00
libdocxmlrpc.tex Correct methoddesc environments. 2003-04-18 21:48:13 +00:00
libdumbdbm.tex Merge the old dumbdbm documetation into the new docs that have been added. 2003-07-21 15:30:15 +00:00
libdummythread.tex - fix use of \refmodule markup 2002-12-30 23:00:36 +00:00
libdummythreading.tex - fix use of \refmodule markup 2002-12-30 23:00:36 +00:00
liberrno.tex
libexcs.tex Clarified that TypeErrors can be raised by any 2003-08-04 08:33:50 +00:00
libfcntl.tex use file() in preference to open() 2004-06-30 21:06:45 +00:00
libfilecmp.tex Update doc to reflect code changes for obsoleting use_statcache parameter 2003-02-06 21:17:17 +00:00
libfileinput.tex add missing "if" 2003-11-10 14:43:16 +00:00
libfl.tex
libfm.tex
libfnmatch.tex
libformatter.tex
libfpectl.tex
libfpformat.tex
libftplib.tex Fixed spacing and unbalanced brackets or parenthesis. 2003-05-10 03:35:37 +00:00
libfuncs.tex SF Bug #215126: Over restricted type checking on eval() function 2004-07-02 06:41:07 +00:00
libfuture.tex markup updates 2003-09-05 15:50:20 +00:00
libgc.tex Documented gc.get_referrers() as dangerous. 2003-10-28 12:10:38 +00:00
libgdbm.tex
libgetopt.tex add missing period 2004-01-26 19:40:18 +00:00
libgetpass.tex
libgettext.tex [Bug 949832] Fix example; edit sentence 2004-07-10 16:01:10 +00:00
libgl.tex
libglob.tex
libgopherlib.tex SF 810242. Fix doubled word errors. 2003-09-22 15:00:55 +00:00
libgrp.tex
libgzip.tex Remove mention of deprecated xreadlines method. 2002-08-06 17:03:25 +00:00
libheapq.tex Improve the documented advice on how to best use heapq.heapreplace(). 2004-06-20 09:07:53 +00:00
libhmac.tex
libhotshot.tex - add warning that hotshot doesn't work well with threads 2004-01-16 17:30:16 +00:00
libhtmllib.tex fix loss of a space after indexing markup 2003-12-18 06:26:56 +00:00
libhtmlparser.tex - remove crufty markup that's no longer needed to make the 2003-12-30 16:18:23 +00:00
libhttplib.tex Patch #831747: Add skip_accept_encoding parameter to putrequest. 2003-11-19 19:51:55 +00:00
libimageop.tex The format of the string data used in the imageop module is described 2004-01-10 20:43:43 +00:00
libimaplib.tex Added description for authenticate and namespace 2004-05-20 12:12:58 +00:00
libimgfile.tex SF 810242. Fix doubled word errors. 2003-09-22 15:00:55 +00:00
libimghdr.tex
libimp.tex Cleanup from patch #683257: 2003-02-12 23:02:21 +00:00
libinspect.tex Clarify docs for inspect.getargspec() that the fourth value is None when there 2004-07-10 21:13:06 +00:00
libintro.tex
libitertools.tex Style nit. 2004-07-11 13:20:11 +00:00
libjpeg.tex
libkeyword.tex
liblinecache.tex
liblocale.tex Patch #774665: Make Python LC_NUMERIC agnostic. 2004-06-08 18:52:54 +00:00
liblogging.tex Replaced some tabs with spaces in verbatim section. 2004-07-07 15:59:49 +00:00
libmailbox.tex markup adjustment 2004-05-11 05:29:34 +00:00
libmailcap.tex
libmain.tex
libmarshal.tex Patch #923098: Share interned strings in marshal. 2004-06-27 16:51:46 +00:00
libmath.tex Reworded fabs() for consistency with the others. Noted that all 2003-04-28 21:32:03 +00:00
libmd5.tex
libmhlib.tex
libmimetools.tex Fix minor typos. 2003-05-12 03:23:51 +00:00
libmimetypes.tex guess_all_extensions(): Return the empty list instead of None when 2003-06-09 22:27:41 +00:00
libmimewriter.tex Add deprecation notices to the documentation to reflect recent additions to 2002-09-25 22:13:27 +00:00
libmimify.tex Add deprecation notices to the documentation to reflect recent additions to 2002-09-25 22:13:27 +00:00
libmisc.tex
libmm.tex
libmmap.tex SF 964876 mapping a 0 length file 2004-06-06 16:51:46 +00:00
libmpz.tex
libmsvcrt.tex minor markup adjustment 2003-12-18 20:58:34 +00:00
libmultifile.tex SF 810242. Fix doubled word errors. 2003-09-22 15:00:55 +00:00
libmutex.tex
libnetrc.tex clarify - restrict version mention to the trunk version 2003-04-23 20:35:14 +00:00
libnew.tex
libni.tex
libnis.tex
libnntplib.tex - Several methods of nntplib.NNTP have grown an optional file argument 2003-04-19 18:04:57 +00:00
libobjs.tex mention built-in constants. 2003-01-01 20:37:14 +00:00
liboperator.tex Guido grants a Christmas wish: 2003-12-17 20:50:46 +00:00
liboptparse.tex Fix minor error in example. 2004-07-10 23:06:07 +00:00
libos.tex Feature request #935915: Add os.path.devnull. 2004-06-08 08:29:33 +00:00
libossaudiodev.tex SF #814606: merge from release23-maint branch: clarify/cleanup 2004-05-05 01:36:16 +00:00
libpanel.tex
libparser.tex
libpdb.tex Textual change to make the doc reflect reality 2004-07-04 04:47:40 +00:00
libpickle.tex add an index entry for __getnewargs__() 2004-05-05 04:56:06 +00:00
libpipes.tex
libpkgutil.tex remove out-of-date warning 2004-03-26 17:11:10 +00:00
libplatform.tex - make this section format 2003-10-21 17:58:55 +00:00
libpopen2.tex [Bug #850818] Accept Gregory H. Ball's suggested rewrite of a confusing description 2003-12-23 17:01:38 +00:00
libpoplib.tex [Bug #873205] Update URL 2004-01-11 23:00:16 +00:00
libposix.tex
libposixfile.tex
libposixpath.tex SF bug #827902: ctime is not creation time 2003-10-29 00:46:19 +00:00
libpprint.tex Add parameters indent, width and depth to pprint.pprint() and pprint.pformat() 2003-12-03 20:26:05 +00:00
libprofile.tex more markup nits 2004-03-23 21:40:07 +00:00
libpty.tex
libpwd.tex
libpyclbr.tex fix typo in markup 2003-11-10 14:50:54 +00:00
libpycompile.tex Patch #661719: Expose compilation errors as exceptions on request. 2003-01-15 11:51:06 +00:00
libpydoc.tex mention new module doc display feature of pydoc in libref and NEWS 2003-09-10 19:04:13 +00:00
libpyexpat.tex Fix minor typos. 2003-05-12 03:23:51 +00:00
libpython.tex
libqueue.tex Bug #788520: Queue class has logic error when non-blocking 2004-07-12 00:45:14 +00:00
libquopri.tex
librand.tex
librandom.tex SF bug #812202: randint is always even 2003-10-05 09:09:15 +00:00
libre.tex Fixed \versionadded for the (?(id/name)yes|no) expression support. 2003-10-18 15:28:22 +00:00
libreadline.tex stupid, stupid, stupid... raw_input() already supports readline() if the 2004-05-24 14:20:16 +00:00
libregex.tex fix various typos; thanks, George Yoshida! 2004-05-12 03:07:27 +00:00
libregsub.tex
librepr.tex Updated to reflect new types. 2004-05-22 16:38:11 +00:00
libresource.tex SF bug #770107: Typo in documentation of resource module 2003-07-13 00:46:40 +00:00
librestricted.tex [Bug #729817] Document the rexec and Bastion modules as dead 2003-05-13 14:16:18 +00:00
librexec.tex [Bug #729817] Document the rexec and Bastion modules as dead 2003-05-13 14:16:18 +00:00
librfc822.tex Fix double word typos. 2003-08-25 04:28:05 +00:00
librgbimg.tex
librlcompleter.tex Typo fix 2003-04-14 15:32:18 +00:00
librobotparser.tex update norobots link 2003-07-14 17:04:50 +00:00
librotor.tex [Patch #679505] Document that this module is deprecated 2003-04-24 13:19:09 +00:00
libsched.tex
libselect.tex select.select() now accepts a sequence (as defined by PySequence_Fast()) for 2003-09-10 19:37:42 +00:00
libsets.tex Nits from a review of the documentation update. 2003-11-26 17:52:45 +00:00
libsgi.tex
libsgmllib.tex
libsha.tex [Bug #978556] Update SHA spec URL; bugfix candidate 2004-06-29 13:35:01 +00:00
libshelve.tex Patch #553171: Add writeback parameter. Also add protocol parameter. 2003-04-19 20:59:03 +00:00
libshlex.tex - general markup cleanup 2003-12-31 05:18:46 +00:00
libshutil.tex [Bug #810879] Document that copyfile() can fail if you don't have permissions; also, fix a double negative. 2004-05-05 17:21:51 +00:00
libsignal.tex Take out my (long since disabled) POSIX signal mask handling code. 2003-03-13 13:56:53 +00:00
libsimplehttp.tex
libsimplexmlrpc.tex Fix a couple of markup errors. 2003-01-17 22:47:33 +00:00
libsite.tex Clarify docs on where .pth files can exist. 2004-03-20 21:41:28 +00:00
libsmtpd.tex Added documentation for the "smtpd" module. 2004-07-11 16:25:25 +00:00
libsmtplib.tex SF patch #859286: documentation bool change fix 2003-12-31 18:37:28 +00:00
libsndhdr.tex
libsocket.tex Added socket.getservbyport(), and make its second argument and that of 2004-06-28 00:50:43 +00:00
libsocksvr.tex Clarify the default setting for daemon_threads. 2002-11-22 14:29:42 +00:00
libsomeos.tex
libstat.tex fix various descriptions of "ctime" 2004-05-12 03:51:40 +00:00
libstatcache.tex
libstatvfs.tex
libstdtypes.tex Document that encode() and decode() raise UnicodeError 2004-07-01 19:58:47 +00:00
libstdwin.tex SF patch#786531 'the the' typo. Contributed by George Yoshida 2003-08-12 00:01:16 +00:00
libstring.tex Modified string.split documentation to reflect behaviour of splitting emtpy string. Closes SF bug #811604 2004-03-21 16:59:59 +00:00
libstringio.tex Fix some digicool addresses I noticed 2004-01-08 15:01:08 +00:00
libstringprep.tex Implement IDNA (Internationalized Domain Names in Applications). 2003-04-18 10:39:54 +00:00
libstrings.tex
libstruct.tex
libsun.tex a couple other sunos4 support items removed 2004-02-07 12:50:19 +00:00
libsunau.tex
libsunaudio.tex
libsymbol.tex
libsys.tex Comment that getfilesystemencoding returns mbcs even on NT+. Fixes #964870. 2004-06-16 04:53:46 +00:00
libsyslog.tex
libtabnanny.tex use consistent email address for Tim 2003-12-30 16:15:35 +00:00
libtarfile.tex markup changes 2004-01-13 23:41:32 +00:00
libtelnetlib.tex Clarify that the timeout argument to read_until() is in seconds. 2003-04-29 13:39:05 +00:00
libtempfile.tex fix markup buglets 2003-09-11 18:18:54 +00:00
libtermios.tex
libtest.tex Fix capitalization of title for subsection 2. 2004-03-18 07:37:15 +00:00
libtextwrap.tex SF bug #892854: typo in textwrap doc page 2004-02-08 18:09:32 +00:00
libthread.tex Add versionadded. Remove duplicate "to" 2003-07-09 12:41:55 +00:00
libthreading.tex Add versionadded info for the 2 new threading module functions 2003-06-30 21:47:47 +00:00
libtime.tex Point out that %p has no effect on the output hour in strptime unless %I is 2004-05-10 18:53:00 +00:00
libtimeit.tex Show how to re-enable GC during timings. 2004-01-04 21:19:18 +00:00
libtoken.tex
libtokenize.tex
libtraceback.tex Add a versionadded tag for traceback.format_exc() 2003-12-13 22:34:09 +00:00
libtty.tex
libturtle.tex SF bug #844123: "up" instead of "down" in turtle module documentation 2003-12-06 01:35:56 +00:00
libtypes.tex Remove extra 'types' 2003-01-10 13:52:30 +00:00
libundoc.tex update the documentation contact address 2003-07-30 02:55:28 +00:00
libunicodedata.tex Add unidata_version. Bump generator version number. 2002-11-25 09:13:37 +00:00
libunittest.tex - add a "See also" reference to the doctest module 2003-12-31 04:34:50 +00:00
libunix.tex
liburllib.tex Note that reading from a socket may not always return all of the 2004-03-25 16:51:12 +00:00
liburllib2.tex Patch 851752 (fixes bug 820583) 2004-07-11 02:13:17 +00:00
liburlparse.tex Typo(!): "normal" -> "number" 2002-10-17 19:23:43 +00:00
libuser.tex minor cleanup of example 2003-12-30 23:01:19 +00:00
libuserdict.tex Fix double word typos. 2003-08-25 04:28:05 +00:00
libuu.tex Remove mentionings of DOS. 2002-10-10 18:24:54 +00:00
libwarnings.tex showwarning() calls formatwarning(), not showwarning(). 2003-07-01 14:37:59 +00:00
libwave.tex
libweakref.tex Make weak references subclassable: 2004-07-02 18:57:45 +00:00
libwebbrowser.tex
libwhichdb.tex
libwhrandom.tex
libwinreg.tex Fix typo 2002-06-25 15:26:59 +00:00
libwinsound.tex remove out-of-date count of the functions in winsound 2004-04-28 03:57:47 +00:00
libxdrlib.tex Fix spelling. 2003-01-06 18:41:01 +00:00
libxmllib.tex
libxmlrpclib.tex fix various typos; thanks, George Yoshida! 2004-05-12 03:07:27 +00:00
libxreadlines.tex - use the same markup for the deprecation as for that of 2003-12-31 04:41:47 +00:00
libzipfile.tex Fix double word typos. 2003-08-25 04:28:05 +00:00
libzlib.tex Patch #640236: Better eplain unused data. 2003-06-21 14:15:25 +00:00
markup.tex Point to the PyXML package as an extended version of the "xml" package 2002-10-23 20:58:32 +00:00
mimelib.tex email is at version 2.5 now 2003-03-21 21:14:48 +00:00
minidom-example.py
netdata.tex
required_1.py SF #642236, optparse LaTeX docs by Johannes Gijsbers 2003-01-06 16:51:37 +00:00
required_2.py SF #642236, optparse LaTeX docs by Johannes Gijsbers 2003-01-06 16:51:37 +00:00
tkinter.tex Add version changed/added to doc 2004-02-28 15:19:33 +00:00
tzinfo-examples.py "Premature" doc changes, for new astimezone() rules, and the new 2003-01-22 04:45:50 +00:00
windows.tex
xmldom.tex Add apparently missing word for InvalidStateError definition. 2004-06-17 21:34:05 +00:00
xmldomminidom.tex - make sure the methods minidom adds to the basic DOM are attributed 2004-03-25 16:39:46 +00:00
xmldompulldom.tex
xmlsax.tex Change email address. 2003-04-18 22:04:34 +00:00
xmlsaxhandler.tex fix documentation for ContentHandler.ignorableWhitespace() 2004-05-06 03:47:48 +00:00
xmlsaxreader.tex Change email address. 2003-04-18 22:04:34 +00:00
xmlsaxutils.tex fix various typos; thanks, George Yoshida! 2004-05-12 03:07:27 +00:00