Commit Graph

984 Commits

Author SHA1 Message Date
Neal Norwitz
df4626fb8a Backport of SF bug # 585792, Invalid mmap crashes Python interpreter
Raise ValueError if user passes a size to mmap which is larger
than the file.

Also need Tim's fix in test_mmap.py, 1.22 which flushes the file
before mmap'ing it.
2002-09-05 22:30:03 +00:00
Michael W. Hudson
55ec86e27c backport gvanrossum's checkin of
revision 1.180 of ACKS

date: 2002/06/10 20:00:52;  author: gvanrossum;  state: Exp;  lines: +1 -0
SF patch 564549 (Erik Andersén).

The WeakKeyDictionary constructor didn't work when a dict arg was
given.  Fixed by moving a line.  Also adding a unit test.

Bugfix candidate.
2002-08-23 16:30:07 +00:00
Guido van Rossum
96303ce055 Fix some endcase bugs in unicode rfind()/rindex() and endswith().
These were reported and fixed by Inyeol Lee in SF bug 595350.  The
endswith() bug is already fixed in 2.3; I'll fix the others in
2.3 next.
2002-08-20 16:57:58 +00:00
Tim Peters
506d6d91b4 SF bug 595919: popenN return only text mode pipes
popen2() and popen3() created text-mode pipes even when binary mode
was asked for.  This was specific to Windows.
2002-08-19 00:43:06 +00:00
Guido van Rossum
5f2f103579 News about Neil's fix to correctly invoke __rmul__. 2002-08-09 15:57:52 +00:00
Guido van Rossum
f75ba0b6e5 Backport:
SF patch 588728 (Nathan Srebro).

The __delete__ method wrapper for descriptors was not supported

(I added a test, too.)
2002-08-01 19:03:43 +00:00
Tim Peters
8156b9019c Attempting to resurrect a dying instance of a new-style class in a
__del__ method died with

    Fatal Python error: GC object already in linked list

in both release and debug builds.  Fixed that.  Added a new test that
dies without the fix.
2002-07-11 07:06:44 +00:00
Tim Peters
b1fb9abf09 SF bug 578752: COUNT_ALLOCS vs heap types
Repair segfaults and infinite loops in COUNT_ALLOCS builds in the
presence of new-style (heap-allocated) classes/types.

Note:  test_gc fails in a COUNT_ALLOCS build now, because it expects
a new-style class to get garbage collected.
2002-07-08 22:30:52 +00:00
Tim Peters
8625d7e5b5 PyNode_AddChild(): Backporting an aggressive over-allocation policy
when a parse node grows a very large number of children.  This sidesteps
platform realloc() disasters on several platforms.
2002-07-08 19:35:56 +00:00
Raymond Hettinger
d605adfe2d Fix SF Bug 572567: Memory leak in object comparison 2002-06-24 13:25:41 +00:00
Guido van Rossum
9d21cd7e1a Backport:
SF bug 567538: Generator can crash the interpreter (Finn Bock).

This was a simple typo.  Strange that the compiler didn't catch it!
Instead of WHY_CONTINUE, two tests used CONTINUE_LOOP, which isn't a
why_code at all, but an opcode; but even though 'why' is declared as
an enum, comparing it to an int is apparently not even worth a
warning -- not in gcc, and not in VC++. :-(
2002-06-12 03:48:46 +00:00
Guido van Rossum
7e57639a30 Record the latest fixes. 2002-06-10 21:40:01 +00:00
Guido van Rossum
761037af5c Backport to 2.2.x:
Address SF bug 519621: slots weren't traversed by GC.

While I was at it, I added a tp_clear handler and changed the
tp_dealloc handler to use the clear_slots helper for the tp_clear
handler.

Also set mp->flags = READONLY for the __weakref__ pseudo-slot.

[Note that I am *not* backporting the part of that patch that
tightened the __slot__ rules.]
2002-06-04 21:19:55 +00:00
Andrew M. Kuchling
35902e4bd9 Fix typo 2002-05-09 14:34:47 +00:00
Walter Dörwald
1c097b7102 Backport the following changes:
Misc/NEWS 1.387->1.388
Lib/test/string_tests.py 1.10->1.11, 1.12->1.14,
Lib/test/test_unicode.py 1.50->1.51, 1.53->1.54, 1.55->1.56
Lib/test/test_string.py 1.15->1.16
Lib/string.py 1.61->1.63
Lib/test/test_userstring.py 1.5->1.6, 1.11, 1.12
Objects/stringobject.c 2.156->2.159
Objects/unicodeobject.c 2.137->2.139
Doc/lib/libstdtypes.tec 1.87->1.88

Add a method zfill to str, unicode and UserString
and change Lib/string.py accordingly
(see SF patch http://www.python.org/sf/536241)

This also adds Guido's fix to test_userstring.py
and the subinstance checks in test_string.py
and test_unicode.py.
2002-04-22 11:57:06 +00:00
Anthony Baxter
ee571fa06c backport gvanrossum's patch:
Add news about deprecated complex ops.

Original patches were:
python/dist/src/Misc/NEWS:1.387
2002-04-18 05:38:53 +00:00
Anthony Baxter
c11ee1efff News for new strip method argument. Made the news message a bit
more informative.
2002-04-18 05:21:16 +00:00
Tim Peters
4e91ac7552 Windows installer: disabled Wise's "delete in-use files" uninstall
option.  It was the cause of at least one way UNWISE.EXE could vanish
(install a python; uninstall it; install it again; reboot the machine;
abracadabra the uinstaller is gone).
2002-04-17 04:36:35 +00:00
Tim Peters
19b08d3b3b SF bug 543148: Memory leak with stackframes + inspect.
Put a bound on the number of frameobjects that can live in the
frameobject free_list.

Also fixed on the trunk.  I don't intend to backport to 2.1 (too
much work -- lots of cyclic structures leak there).
2002-04-13 05:25:28 +00:00
Michael W. Hudson
0069623e89 I always forget the release date in here... 2002-04-09 14:21:43 +00:00
Michael W. Hudson
fc70e4b2c6 Updates from Sean Reifschneider. 2002-04-09 09:29:28 +00:00
Guido van Rossum
5b172978bb Add bool(), True, False (as ints) for backwards compatibility. 2002-04-08 13:31:12 +00:00
Guido van Rossum
e5ea439bc8 - A type can now inherit its metatype from its base type. Previously,
when PyType_Ready() was called, if ob_type was found to be NULL, it
  was always set to &PyType_Type; now it is set to base->ob_type,
  where base is tp_base, defaulting to &PyObject_Type.
2002-04-08 01:39:56 +00:00
Guido van Rossum
6741437fbd Some more news. (There's also a fix to _localemodule.c that I don't
dare describe, and of course lots of jiggling of the docs and the
Windows installer metadata.)
2002-04-05 22:53:16 +00:00
Guido van Rossum
7e45ccb470 Backport half a patch from the trunk. This inherits tp_is_gc from a
base class.
2002-04-05 22:32:23 +00:00