cpython/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
..
bsddb Adds support for DB.pget and DBCursor.pget methods. 2004-06-28 04:06:49 +00:00
compiler Whitespace normalization. 2004-07-07 20:54:48 +00:00
curses Modernize code a bit: use isinstance instead of type(); return True/False 2003-09-02 11:52:06 +00:00
distutils Fix SF#983164. 2004-07-06 19:23:27 +00:00
email _parsegen(): Add a missing check for NeedMoreData. 2004-05-15 16:26:28 +00:00
encodings Whitespace normalization. 2004-07-07 20:54:48 +00:00
hotshot Move testing code into "if __name__ == '__main__'" so it's not run on import. 2003-03-28 16:28:48 +00:00
idlelib release dates 2004-07-08 05:59:43 +00:00
lib-old
lib-tk Patch #911176: Move test function into __main__ 2004-03-22 21:49:47 +00:00
logging Add exception handling for BaseRotatingFileHandler (SF #979252) 2004-07-08 10:24:04 +00:00
plat-aix3
plat-aix4
plat-atheos
plat-beos5
plat-darwin These were somehow never added to CVS. 2002-12-30 22:14:35 +00:00
plat-freebsd2
plat-freebsd3
plat-freebsd4
plat-freebsd5
plat-generic
plat-irix5 Fixed invalid syntax. 2004-03-03 16:34:31 +00:00
plat-irix6 Fixed invalid syntax. 2004-03-03 16:34:31 +00:00
plat-linux2 Regenerate. Fixes #618012. 2002-11-23 12:09:28 +00:00
plat-mac Two issues spotted by Ronald OUssoren: 2004-03-13 23:50:48 +00:00
plat-netbsd1
plat-next3
plat-os2emx EMX lacks an implementation of link(). As Mailman wants os.link() to 2003-12-02 12:31:09 +00:00
plat-riscos Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
plat-sunos5
plat-unixware7
site-packages
test Patch [ 972332 ] urllib2 FTPHandler bugs / John J. Lee 2004-07-11 17:14:13 +00:00
xml fix documentation for ContentHandler.ignorableWhitespace() 2004-05-06 03:47:48 +00:00
BaseHTTPServer.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
Bastion.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
CGIHTTPServer.py Fix for SF 777848. 2004-03-20 22:18:03 +00:00
ConfigParser.py ConfigParser: 2004-05-18 04:24:02 +00:00
Cookie.py Fix a bunch of typos in documentation, docstrings and comments. 2003-10-20 14:01:56 +00:00
DocXMLRPCServer.py Patch #727805: Remove extra line ending from CGI responses. 2003-05-01 05:05:09 +00:00
FCNTL.py
HTMLParser.py [Bug #921657] Allow '@' in unquoted HTML attributes. Not strictly legal according to the HTML REC, but HTMLParser is already a pretty loose parser. Reported by Bernd Zimmermann. 2004-06-05 15:31:45 +00:00
MimeWriter.py
Queue.py Bug #788520: Queue class has logic error when non-blocking 2004-07-12 00:45:14 +00:00
SimpleHTTPServer.py Let library modules use the new keyword arguments for list.sort(). 2003-10-16 05:53:16 +00:00
SimpleXMLRPCServer.py SF patch #834015: Remove imports of unused modules 2003-11-02 09:47:05 +00:00
SocketServer.py TCPServer: Fixed typo in class docstring. 2003-10-09 23:48:52 +00:00
StringIO.py Add missing docstrings. 2004-03-14 07:54:37 +00:00
TERMIOS.py
UserDict.py The default argument in dict.setdefault() defaults to None. 2004-05-27 09:41:04 +00:00
UserList.py Guido grants a Christmas wish: 2003-12-17 20:43:33 +00:00
UserString.py Add comments for unicode-only methods to give hints on AttributeError 2004-06-04 04:23:29 +00:00
_LWPCookieJar.py Patch #963318: Add support for client-side cookie management. 2004-05-31 18:22:40 +00:00
_MozillaCookieJar.py Patch #963318: Add support for client-side cookie management. 2004-05-31 18:22:40 +00:00
__future__.py
__phello__.foo.py
_strptime.py Replace str.find()!=1 with the more readable "in" operator. 2004-05-04 09:21:43 +00:00
aifc.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
anydbm.py
asynchat.py Replace left(), right(), and __reversed__() with the more general purpose 2004-03-01 23:16:22 +00:00
asyncore.py In poll(), check connections for exceptional conditions 2004-07-10 17:36:11 +00:00
atexit.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
audiodev.py
base64.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
bdb.py Enable the profiling of C functions (builtins and extensions) 2004-03-24 21:57:10 +00:00
binhex.py Remove a useless operation, setting name to itself 2004-06-07 03:45:56 +00:00
bisect.py SF Patch #864863: Bisect C implementation 2004-01-05 10:13:35 +00:00
calendar.py There is no reason to have an underscore after self 2004-06-07 03:47:06 +00:00
cgi.py Change parse_qsl() to accept control-name's with no equal sign (e.g., "name") 2004-03-21 22:16:15 +00:00
cgitb.py [Patch #987052 from Thomas Guettler] 2004-07-10 14:14:51 +00:00
chunk.py
cmd.py Whitespace normalization. 2004-07-07 20:54:48 +00:00
code.py - Finally fixed the bug in compile() and exec where a string ending 2003-02-13 22:07:59 +00:00
codecs.py Ignore sizehint argument. Fixes SF #844561. 2004-02-26 15:22:17 +00:00
codeop.py Fix typo fix. 2003-11-20 13:38:01 +00:00
colorsys.py
commands.py
compileall.py Patch #975885: print file name in err msg in quiet mode 2004-06-20 20:59:56 +00:00
cookielib.py [Patch #969907] Add traceback to warning output 2004-07-10 18:32:12 +00:00
copy.py Refactor the copy dispatcher code in copy.py. Simplifies and shortens 2004-03-08 05:59:33 +00:00
copy_reg.py Revert previous checkin and just add a comment about constructor_ob. 2003-06-27 16:58:43 +00:00
csv.py Make the fieldnames argument optional in the DictReader. If self.fieldnames 2003-10-03 14:03:01 +00:00
dbhash.py typo 2003-05-05 14:16:41 +00:00
decimal.py Improve Context construction and representation: 2004-07-10 14:14:37 +00:00
difflib.py SequenceMatcher(None, [], []).get_grouped_opcodes() now returns a generator 2004-07-10 23:54:07 +00:00
dircache.py Patch #707167: Pass dircache exceptions to the caller. Fixes #682813. 2003-09-20 15:52:21 +00:00
dis.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
doctest.py Whitespace normalization. 2004-07-07 20:54:48 +00:00
dumbdbm.py Give dumbdbm a sync() method which Shelve can call. Should solve some 2003-07-14 12:15:15 +00:00
dummy_thread.py Cause calling interrupt_main in main thread raise KeyboardInterrupt instantly. 2003-06-13 23:56:32 +00:00
dummy_threading.py Brett Cannon's dummy_thread and dummy_threading modules (SF patch 2002-12-30 22:30:22 +00:00
filecmp.py SF bug #453515: filecmp.dircmp case sensitivity bug 2003-09-02 05:42:02 +00:00
fileinput.py Test that chmod() actually exists before calling it (it doesn't on MacOS9). 2003-01-08 16:33:16 +00:00
fnmatch.py SF patch #765238: fix fnmatch.__all__ 2003-07-13 16:06:26 +00:00
formatter.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
fpformat.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
ftplib.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
getopt.py A few naughty external scripts do 'raise getopt.error, "blah"', and 2003-02-06 19:52:56 +00:00
getpass.py Fix SF #640094, on win32 getpass runs into unix_getpass 2002-11-20 23:15:54 +00:00
gettext.py Replace str.find()!=1 with the more readable "in" operator. 2004-05-04 09:21:43 +00:00
glob.py
gopherlib.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
gzip.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
heapq.py Improve the documented advice on how to best use heapq.heapreplace(). 2004-06-20 09:07:53 +00:00
hmac.py Speed HMAC.copy() by installing a secret backdoor argument to 2004-03-20 20:11:29 +00:00
htmlentitydefs.py Add two dictionaries to htmlentitydefs: name2codepoint maps 2003-04-16 09:46:13 +00:00
htmllib.py Docstring fix: XHTML 1.0 entities are supported 2003-10-27 15:47:48 +00:00
httplib.py Fix a bug that robotparser starves memory when the server responses 2004-06-05 13:30:56 +00:00
ihooks.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
imaplib.py Added IMAP4_stream to __all__ 2004-06-02 00:42:36 +00:00
imghdr.py
imputil.py
inspect.py SF bug #973092: inspect.getframeinfo bug if 'context' is to big 2004-06-15 11:22:53 +00:00
keyword.py Replace str.find()!=1 with the more readable "in" operator. 2004-05-04 09:21:43 +00:00
linecache.py Whitespace normalization. 2003-06-29 16:59:43 +00:00
locale.py atof: correct parameter name 2004-04-10 16:39:32 +00:00
macpath.py Feature request #935915: Add os.path.devnull. 2004-06-08 08:29:33 +00:00
macurl2path.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
mailbox.py [Bug #925107] Make .readline() consider self.stop. This makes read() and readline() very similar, so they're refactored into _read. Patch by Johannes Gijsbers. 2004-07-07 14:09:21 +00:00
mailcap.py
markupbase.py [Patch #965175] Incorporate a suggestion for a better error message 2004-07-10 21:49:45 +00:00
mhlib.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
mimetools.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
mimetypes.py Remove self from the arguments for the function add_type(). 2003-12-19 18:15:10 +00:00
mimify.py Get rid of many apply() calls. 2003-02-27 20:14:51 +00:00
modulefinder.py Fix SF item #876278: Unbounded recursion in modulefinder. 2004-05-11 15:10:59 +00:00
multifile.py Stacks based on lists work better and read more clearly when they 2004-05-04 08:21:52 +00:00
mutex.py * Move collections.deque() in from the sandbox 2004-01-29 06:37:52 +00:00
netrc.py SF bug 557704: netrc module can't handle all passwords 2003-04-24 20:11:20 +00:00
new.py
nntplib.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
ntpath.py Make ntpath compress multiple slashes between drive letter and the rest of the 2004-07-10 20:42:22 +00:00
nturl2path.py
opcode.py Install two code generation optimizations that depend on NOP. 2004-06-21 16:31:15 +00:00
optparse.py Fix support for the "prog" keyword to the OptionParser constructor, as well 2004-04-01 07:40:35 +00:00
os.py Feature request #935915: Add os.path.devnull. 2004-06-08 08:29:33 +00:00
os2emxpath.py Feature request #935915: Add os.path.devnull. 2004-06-08 08:29:33 +00:00
pdb.doc
pdb.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
pickle.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
pickletools.py dis(): Added an optional memo argument, so that multiple pickles in a 2003-02-05 19:55:53 +00:00
pipes.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
pkgutil.py SF patch #806246: use basestring where possible 2003-09-17 05:50:59 +00:00
platform.py Added normalization for Windows system name. Closes SF #945665. 2004-06-19 17:17:00 +00:00
popen2.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
poplib.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
posixfile.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
posixpath.py Remove tabs introduced in last commit. 2004-07-11 19:16:21 +00:00
pprint.py typo - fixes 954030. 2004-05-14 16:31:56 +00:00
profile.doc Fix a bunch of typos in documentation, docstrings and comments. 2003-10-20 14:01:56 +00:00
profile.py Whitespace normalization. 2004-07-07 20:54:48 +00:00
pstats.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
pty.py [Bug #897935] Fix fd leak in pty.spawn(). Reported by James Henstridge; 2.3 bugfix candidate. 2004-06-05 16:27:16 +00:00
py_compile.py Getting rid of macfs. 2003-02-27 23:18:46 +00:00
pyclbr.py Guido grants a Christmas wish: 2003-12-17 20:43:33 +00:00
pydoc.py Change pydoc.stripid() be able to match against 64-bit addresses by having 2004-06-19 01:22:48 +00:00
quopri.py
random.py Fix typo in comment. 2004-06-07 02:07:15 +00:00
re.py Give people who run "pydoc re" a clue. 2003-01-31 00:35:58 +00:00
reconvert.py Remove specific Python version from #! 2004-04-06 19:42:34 +00:00
regex_syntax.py
regsub.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
repr.py Committing Tim's patch for SF bug #983585: 2004-07-01 20:28:47 +00:00
rexec.py Remove reference to pcre module 2004-06-02 17:40:43 +00:00
rfc822.py Make Message.__str__ more efficient. 2003-11-11 19:39:17 +00:00
rlcompleter.py Fix a bunch of typos in documentation, docstrings and comments. 2003-10-20 14:01:56 +00:00
robotparser.py Replace str.find()!=1 with the more readable "in" operator. 2004-05-04 09:21:43 +00:00
sched.py Get rid of many apply() calls. 2003-02-27 20:14:51 +00:00
sets.py Remove deprecation of sets.Set.update(). 2003-11-19 15:52:14 +00:00
sgmllib.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
shelve.py Fixup bare try/except. 2003-05-27 06:30:52 +00:00
shlex.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
shutil.py shutil.move() will raise an exception when trying to move a directory into 2004-06-19 21:11:35 +00:00
site.py Change argument list for addsitedir() to not require a second argument and thus 2004-07-09 23:38:18 +00:00
smtpd.py remove debugging print 2004-06-26 19:42:10 +00:00
smtplib.py Debug output is now printed to sys.stderr . 2004-07-10 23:14:30 +00:00
sndhdr.py
socket.py Add weakref support to sockets and re pattern objects. 2004-05-31 03:09:25 +00:00
sre.py SF #926075: Fixed the bug that returns a wrong pattern object for 2004-04-20 21:11:11 +00:00
sre_compile.py Fix _sre.CODESIZE on 64-bit machines in UCS-4 mode. Fixes #931848. 2004-05-07 07:18:13 +00:00
sre_constants.py Implemented non-recursive SRE matching. 2003-10-17 22:13:16 +00:00
sre_parse.py Simple Optimizations: 2004-03-26 23:24:00 +00:00
stat.py
statcache.py
statvfs.py
string.py Add rsplit method for str and unicode builtin types. 2003-12-15 18:49:53 +00:00
stringold.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
stringprep.py Whitespace normalization. 2004-07-07 20:54:48 +00:00
sunau.py
sunaudio.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
symbol.py SF patch #872326: Generator expression implementation 2004-05-19 08:20:33 +00:00
symtable.py
tabnanny.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
tarfile.py [Patch 988444] 2004-07-10 22:02:11 +00:00
telnetlib.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
tempfile.py mktemp() shouldn't rely on os.path.exists(), which can return False if 2003-11-10 02:16:36 +00:00
textwrap.py SF #965425: fix so hyphenated words surrounded by punctuation are 2004-06-03 01:59:41 +00:00
this.py Back rev 1.3 out per Raymond's request. 2004-02-06 04:40:56 +00:00
threading.py threading.Thread objects will now print a traceback for an exception raised 2004-07-03 03:52:35 +00:00
timeit.py SF patch #868736: Disable GC for timeit 2004-01-04 03:47:51 +00:00
toaiff.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
token.py Updates to track Grammar changes. The patch to token.py loosens the regexp to 2002-10-03 09:42:01 +00:00
tokenize.py Get rid of many apply() calls. 2003-02-27 20:14:51 +00:00
trace.py Open file in universal newline mode when passing to compile(). Solution 2004-04-16 03:28:19 +00:00
traceback.py Whitespace normalization. 2004-01-18 20:29:55 +00:00
tty.py
types.py [ 683376 ] Adding NotImplementedType to types.py 2003-02-10 19:38:33 +00:00
tzparse.py
unittest.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
urllib.py Replace sequential split/join calls on strings with a single replace call. 2004-03-23 23:50:17 +00:00
urllib2.py Patch [ 972332 ] urllib2 FTPHandler bugs / John J. Lee 2004-07-11 17:14:13 +00:00
urlparse.py rsync is now a recognized protocol that uses "netloc" (i.e. specifies a network 2004-06-29 04:02:40 +00:00
user.py
uu.py
warnings.py SF bug 917108: warnings.py does not define _test(). 2004-03-21 17:06:20 +00:00
wave.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
weakref.py Make weak references subclassable: 2004-07-02 18:57:45 +00:00
webbrowser.py [Patch #981794] Add support for Firefox/Firebird 2004-07-10 22:07:02 +00:00
whichdb.py Fix a bunch of typos in documentation, docstrings and comments. 2003-10-20 14:01:56 +00:00
whrandom.py
xdrlib.py Replace backticks with repr() or "%r" 2004-02-12 17:35:32 +00:00
xmllib.py Do not use the default namespace for attributes. 2004-05-02 20:37:13 +00:00
xmlrpclib.py [Bug #841757] Patch from /F to allow Unicode strings as struct keys 2004-06-05 12:35:58 +00:00
zipfile.py Make struct formats for specifying file size to be unsigned instead of signed 2004-07-10 19:09:20 +00:00