- 27 Haz, 2001 2 kayıt (commit)
-
-
Tim Peters yazdı
that required explicitly calling LazyList.clear() in the two tests that use LazyList (I added a LazyList Fibonacci generator too). A real bitch: the extremely inefficient first version of the 2-3-5 test *looked* like a slow leak on Win98SE, but it wasn't "really": it generated so many results that the heap grew over 4Mb (tons of frames! the number of frames grows exponentially in that test). Then Win98SE malloc() starts fragmenting address space allocating more and more heaps, and the visible memory use grew very slowly while the disk was thrashing like mad. Printing fewer results (i.e., keeping the heap burden under 4Mb) made that illusion vanish. Looks like there's no hope for plugging the LazyList leaks automatically short of adding frameobjects and genobjects to gc. OTOH, they're very easy to break by hand, and they're the only *kind* of plausibly realistic leaks I've been able to provoke. Dilemma.
-
Martin v. Löwis yazdı
Implement sys.maxunicode. Explicitly wrap around upper/lower computations for wide Py_UNICODE. When decoding large characters with UTF-8, represent expected test results using the \U notation.
-
- 26 Haz, 2001 24 kayıt (commit)
-
-
Guido van Rossum yazdı
- the correct range for the error message is range(0x110000); - put the 4-byte Unicode-size code inside the same else branch as the 2-byte code, rather generating unreachable code in the 2-byte case. - Don't hide the 'else' behine the '}'. (I would prefer that in 4-byte mode, any value should be accepted, but reasonable people can argue about that, so I'll put that off.)
-
Fredrik Lundh yazdı
-
Martin v. Löwis yazdı
when checking surrogates.
-
Tim Peters yazdı
SIZEOF_SHORT by hand here. Also added dynamic check that SIZEOF_SHORT is correct for the platform (in _testcapimodule).
-
Tim Peters yazdı
not writable -- too dangerous!) from Python code.
-
Martin v. Löwis yazdı
Add configure option --enable-unicode. Add config.h macros Py_USING_UNICODE, PY_UNICODE_TYPE, Py_UNICODE_SIZE, SIZEOF_WCHAR_T. Define Py_UCS2. Encode and decode large UTF-8 characters into single Py_UNICODE values for wide Unicode types; likewise for UTF-16. Remove test whether sizeof Py_UNICODE is two.
-
Jack Jansen yazdı
such as the Core Foundation ones.
-
Jack Jansen yazdı
-
Jack Jansen yazdı
First small step towards bgen-generated CoreFoundation. there is hardly any real functionality yet, but method chains seem to work, and so do Retain/Release semantics.
-
Tim Peters yazdı
Makes it much easier to find references via dumb editor search (former "frame" in particular was near-hopeless).
-
Fredrik Lundh yazdı
sizeof(int)
-
Barry Warsaw yazdı
-
Barry Warsaw yazdı
mapping objects as an argument.
-
Barry Warsaw yazdı
a non-dictionary mapping object. Include tests for several expected failure modes.
-
Barry Warsaw yazdı
"mapping" object, specifically one that supports PyMapping_Keys() and PyObject_GetItem(). This allows you to say e.g. {}.update(UserDict()) We keep the special case for concrete dict objects, although that seems moderately questionable. OTOH, the code exists and works, so why change that? .update()'s docstring already claims that D.update(E) implies calling E.keys() so it's appropriate not to transform AttributeErrors in PyMapping_Keys() to TypeErrors. Patch eyeballed by Tim.
-
Fredrik Lundh yazdı
wrt surrogates. (this extends the valid range from 65535 to 1114111)
-
Fredrik Lundh yazdı
HAVE_USABLE_WCHAR_T
-
Fredrik Lundh yazdı
unicodeobject.h, which forces sizeof(Py_UNICODE) == sizeof(Py_UCS4). (this may be good enough for platforms that doesn't have a 16-bit type. the UTF-16 codecs don't work, though)
-
Fredrik Lundh yazdı
sizeof(Py_UNICODE) >= sizeof(long). also changed surrogate expansion to work if sizeof(Py_UNICODE) > 2.
-
Fredrik Lundh yazdı
HAVE_USABLE_WCHAR_T
-
Jack Jansen yazdı
-
Just van Rossum yazdı
-
Just van Rossum yazdı
package to be loaded from a PYD resource.
-
Tim Peters yazdı
Not anymore <wink>. Pure hack. Doesn't fix any other "if 0:" glitches.
-
- 25 Haz, 2001 8 kayıt (commit)
-
-
Tim Peters yazdı
Iterators list for bringing it up!
-
Just van Rossum yazdı
Return self.trace_dispatch from dispatch_return() to enable stepping through generators. (An alternative would be to create a new "yield" debugger event, but that involves many more changes, and might break Bdb subclasses.)
-
Fred Drake yazdı
-
Jack Jansen yazdı
-
Steven M. Gava yazdı
-
Martin v. Löwis yazdı
-
Martin v. Löwis yazdı
-
Tim Peters yazdı
Add a temporary driver to help track down remaining leak(s).
-
- 24 Haz, 2001 6 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
Martin v. Löwis yazdı
-
Martin v. Löwis yazdı
-
Martin v. Löwis yazdı
-
Tim Peters yazdı
clearing a shallow copy _run_examples() makes itself can't hurt anything.
-
Tim Peters yazdı
break cycles, which are a special problem when running generator tests that provoke exceptions by invoking the .next() method of a named generator-iterator: then the iterator is named in globs, and the iterator's frame gets a tracekback object pointing back to globs, and gc doesn't chase these types so the cycle leaks. Also changed _run_examples() to make a copy of globs itself, so its callers (direct and indirect) don't have to (and changed the callers to stop making their own copies); *that* much is a change I've been meaning to make for a long time (it's more robust the new way). Here's a way to provoke the symptom without doctest; it leaks at a prodigious rate; if the last two "source" lines are replaced with g().next() the iterator isn't named and then there's no leak: source = """\ def g(): yield 1/0 k = g() k.next() """ code = compile(source, "<source>", "exec") def f(globs): try: exec code in globs except ZeroDivisionError: pass while 1: f(globals().copy()) After this change, running test_generators in an infinite loop still leaks, but reduced from a flood to a trickle.
-