Raymond Hettinger
50a4bb325c
Various fixups (most suggested by Armin Rigo).
2003-11-17 16:42:33 +00:00
Raymond Hettinger
e2c277a69f
Fix output spacing typo
2003-11-16 16:36:58 +00:00
Raymond Hettinger
a690a9967e
* Migrate set() and frozenset() from the sandbox.
...
* Install the unittests, docs, newsitem, include file, and makefile update.
* Exercise the new functions whereever sets.py was being used.
Includes the docs for libfuncs.tex. Separate docs for the types are
forthcoming.
2003-11-16 16:17:49 +00:00
Raymond Hettinger
d456849f19
Fix typo
2003-11-16 13:44:19 +00:00
Raymond Hettinger
6dab05231d
Change ValueErrors to TypeErrors and add PyList_Check() assertions.
2003-11-15 12:40:28 +00:00
Raymond Hettinger
236a2443fb
Verify heappop argument is a list.
2003-11-15 12:33:01 +00:00
Thomas Heller
cf0005baf4
Mention patch #841977 : modulefinder didn't find extension modules in packages
...
Backported to release-maint23
2003-11-14 10:33:20 +00:00
Thomas Heller
aaf1c8dc9e
SF #841977 - modulefinder fails to find extension modules in packages
...
The find_all_submodules() method in modulefinder only
looks for *.py, *.pyc, and *.pyo files. Python
extension modules are only found if they are referenced
in import statements somewhere.
This patch uses the actual list from imp.get_suffixes().
Backported myself.
2003-11-14 10:28:42 +00:00
Tim Peters
780c497972
update_refs(): assert that incoming refcounts aren't 0. The comment
...
for this function has always claimed that was true, but it wasn't
verified before. For the latest batch of "double deallocation" bugs
(stemming from weakref callbacks invoked by way of subtype_dealloc),
this assert would have triggered (instead of waiting for
_Py_ForgetReference to die with a segfault later).
2003-11-14 00:01:17 +00:00
Tim Peters
0bd743cee1
subtype_dealloc(): Simplified overly contorted retracking logic. With
...
this change, I think subtype_dealloc is actually a smidgen less obscure
than it was in 2.3 -- we got rid of a negation in an "if" <wink>.
2003-11-13 22:50:00 +00:00
Tim Peters
f7f9e9966b
subtype_dealloc(): A more complete fix for critical bug 840829 +
...
expanded the test case with a piece that needs the more-complete fix.
I'll backport this to 2.3 maint.
2003-11-13 21:59:32 +00:00
Andrew M. Kuchling
981a918575
Various edits
2003-11-13 21:33:26 +00:00
Gregory P. Smith
b845ef056a
remove "support" for BerkeleyDB 3.1, it hasn't worked for a long time
2003-11-13 08:30:03 +00:00
Martin v. Löwis
d4e48b7f61
Patch #839877 : Remove unused lambda expression.
2003-11-13 07:45:39 +00:00
Martin v. Löwis
f56d015a71
Patch #804543 : strdup saved locales. Backported to 2.3.
2003-11-13 07:43:21 +00:00
Tim Peters
add09b4149
SF bug 840829: weakref callbacks and gc corrupt memory.
...
subtype_dealloc(): This left the dying object exposed to gc, so that
if cyclic gc triggered during the weakref callback, gc tried to delete
the dying object a second time. That's a disaster. subtype_dealloc()
had a (I hope!) unique problem here, as every normal dealloc routine
untracks the object (from gc) before fiddling with weakrefs etc. But
subtype_dealloc has obscure technical reasons for re-registering the
dying object with gc (already explained in a large comment block at
the bottom of the function).
The fix amounts to simply refraining from reregistering the dying object
with gc until after the weakref callback (if any) has been called.
This is a critical bug (hard to predict, and causes seemingly random
memory corruption when it occurs). I'll backport it to 2.3 later.
2003-11-12 20:43:28 +00:00
Tim Peters
045f1de57e
pyexpat stopped building on Windows -- whining about the lack of a
...
HAVE_MEMMOVE define. Just defined it on the cmdline (it doesn't
include Python.h, and Fred doesn't want to change the code).
2003-11-12 19:30:36 +00:00
Raymond Hettinger
7d1dd04334
Fix typo
2003-11-12 16:42:10 +00:00
Raymond Hettinger
bc3cba2881
Explain the advantages of reversed.
2003-11-12 16:39:30 +00:00
Raymond Hettinger
607c00f792
Present each feature in terms of what makes it useful or desirable.
2003-11-12 16:27:50 +00:00
Raymond Hettinger
859db26729
Improve backwards compatibility code to handle True/False.
2003-11-12 15:21:20 +00:00
Raymond Hettinger
ad983e79d6
Improve the implementation of itertools.tee().
...
Formerly, underlying queue was implemented in terms of two lists. The
new queue is a series of singly-linked fixed length lists.
The new implementation runs much faster, supports multi-way tees, and
allows tees of tees without additional memory costs.
The root ideas for this structure were contributed by Andrew Koenig
and Guido van Rossum.
2003-11-12 14:32:26 +00:00
Neil Schemenauer
767126d7b9
Make Message.__str__ more efficient.
2003-11-11 19:39:17 +00:00
Fred Drake
d85ed1b7fc
fix typo in markup
2003-11-10 14:50:54 +00:00
Fred Drake
28eae084bf
fix use of undefined markup
2003-11-10 14:48:48 +00:00
Fred Drake
dbe7980d6a
add missing "if"
2003-11-10 14:43:16 +00:00
Martin v. Löwis
75aa4db04b
Mention that getsid is new in 2.4.
2003-11-10 06:46:15 +00:00
Martin v. Löwis
d8921379e9
Patch #798297 : Add IMAP THREAD command.
2003-11-10 06:44:44 +00:00
Martin v. Löwis
49ee14dac5
Patch #839038 : Add getsid(2).
2003-11-10 06:35:36 +00:00
Guido van Rossum
967b063add
Plug tempfile.mktemp() hole (Iustin Pop).
2003-11-10 02:27:19 +00:00
Guido van Rossum
b256159396
mktemp() shouldn't rely on os.path.exists(), which can return False if
...
the file is a symlink. Instead, use os.lstat directly, if it exists;
fall back on os.stat or the built-in open. Thanks to Iustin Pop.
2003-11-10 02:16:36 +00:00
Alex Martelli
f09994e527
fixed wrong error checking on fcntl call as per SF bug # 821896
...
(same as commit of Sun Nov 2 to the release23-maint branch)
2003-11-09 16:44:09 +00:00
Alex Martelli
0c5b4ad8f2
fixed obvious bug in _send_header as per SF bug #831271
...
(same as commit of Sun Nov 2 to the release23-maint branch)
2003-11-09 16:41:38 +00:00
Alex Martelli
721b776175
fixed buggy comment as per SF bug #827856
...
(same as commit of Sun Nov 2 to the release23-maint branch)
2003-11-09 16:38:39 +00:00
Alex Martelli
c516b0e47c
clarified (in the 5.14 summary) that tests and comparisons all chain,
...
added a specific \ref to 5.9 in lieu of previous vague "see above".
(same as commit of Sun Nov 2 to the release23-maint branch)
2003-11-09 16:33:56 +00:00
Alex Martelli
37dc334276
Add docs for readmodule_ex and its function-descriptors, fixing
...
sf bug#812818.
(same as commit of Sun Nov 2 to the release23-maint branch)
2003-11-09 16:32:54 +00:00
Alex Martelli
50324a604c
Avoid giving advice that's bad for security, as per SF bug #823515
...
(same as commit of Sun Nov 2 to the release23-maint branch)
2003-11-09 16:31:18 +00:00
Brett Cannon
35d8360bf7
Document Py_RETURN_NONE.
2003-11-09 04:15:30 +00:00
Andrew M. Kuchling
f7a6b67e5c
Add 'see also' section pointing to the PEP
2003-11-08 16:05:37 +00:00
Andrew M. Kuchling
1a420251cf
Add some recent changes
2003-11-08 15:58:49 +00:00
Raymond Hettinger
af28e4b66b
Update test to handle list.__reversed__().
2003-11-08 12:39:53 +00:00
Raymond Hettinger
001f228f36
Improve the reverse list iterator to free memory as soon as the iterator
...
is exhausted.
2003-11-08 11:58:44 +00:00
Raymond Hettinger
e21f606657
SF bug #835457 : Small typo in logging documentation
2003-11-08 11:40:03 +00:00
Raymond Hettinger
c24c9106e8
Minor code fixup. Make sure that len reflects the current list size.
2003-11-08 11:35:22 +00:00
Raymond Hettinger
b3af1813eb
Convert heapq.py to a C implementation.
2003-11-08 10:24:38 +00:00
Raymond Hettinger
1021c44b41
Optimize reversed(list) using a custom iterator.
2003-11-07 15:38:09 +00:00
Michael W. Hudson
ff1f194982
Fix the problem addressed by patch
...
[ 819012 ] Fix for former/latter confusion in Extending documentation
although not by using supplied patch.
2003-11-07 11:45:34 +00:00
Raymond Hettinger
dc62aeca4c
Add a new looping idiom
2003-11-07 01:30:58 +00:00
Martin v. Löwis
5ce2fecf8e
Patch #837322 : Clarify owning, borrowing, stealing. Backported to 2.3.
2003-11-06 21:08:11 +00:00
Martin v. Löwis
d2171d2ba4
Overallocate target buffer for normalization more early. Fixes #834676 .
...
Backported to 2.3.
2003-11-06 20:47:57 +00:00