Thomas Heller [Mon, 13 Mar 2006 07:33:38 +0000 (07:33 +0000)]
Remove the slightly broken test_leaks.py.
Change test_functions.py so that it can be run multiple time without
failing: Assign a restype to the function in test_intresult, and move
the definition of class POINT to module level so that no new class is
created each time the test is run.
Trent Mick [Sun, 12 Mar 2006 23:40:58 +0000 (23:40 +0000)]
Adding the /useenv means that one's PATH actually gets through. This is
important for the _ssl.vproj build. It calls build_ssl.py which tries to
find a Perl to use. Without "/useenv" Visual Studio is getting a PATH
from somewhere else (presumably from its internal environment
configuration). The result is that build_ssl.py fallsback to its
"well-known" locations for a Perl install.
Thomas Wouters [Sun, 12 Mar 2006 00:29:36 +0000 (00:29 +0000)]
- Reindent a confusingly indented piece of code (no intended code changes
there)
- Add missing DECREFs of inner-scope 'temp' variable
- Add various missing DECREFs by changing 'return NULL' into 'goto onError'
- Avoid double DECREF when last _PyUnicode_Resize() fails
Coverity found one of the missing DECREFs, but oddly enough not the others.
Thomas Wouters [Sun, 12 Mar 2006 00:13:09 +0000 (00:13 +0000)]
Plug the last 657 referenceleaks in test_bsddb3: a circular reference
between a TestCase instance, the database it opened (or a cursor to a
database) and a bound method as a registered database callback, and a lack
of GC-handling in bsddb caused the TestCases to linger. Fix the test, for
now, as backward compatibility makes adding GC to bsddb annoying.
Tim Peters [Sat, 11 Mar 2006 23:05:39 +0000 (23:05 +0000)]
Give the _ssl project a harmless command to perform
for its "clean" action. Else the clean step run by
the buildbot reports failure, due to the _ssl project
whining about not being able to spawn an empty string.
Tim Peters [Fri, 10 Mar 2006 23:37:10 +0000 (23:37 +0000)]
When the new -w option (yay! great idea) reruns a
failed test, first display the name of the test (else
it's not always clear from the output which test is
getting run).
Guido van Rossum [Fri, 10 Mar 2006 02:28:35 +0000 (02:28 +0000)]
Um, I thought I'd already checked this in.
Anyway, this is the changes to the with-statement
so that __exit__ must return a true value in order
for a pending exception to be ignored.
The PEP (343) is already updated.
Tim Peters [Thu, 9 Mar 2006 22:31:45 +0000 (22:31 +0000)]
NodeInfo.__gen_init(): Fiddle so that reindent.py is
happy with the output as-is. This incidentally also
gets rid of "an extra" blank line at the end of the output
block that probably wasn't intended (although it doesn't
matter one way or the other).
Tim Peters [Thu, 9 Mar 2006 01:42:24 +0000 (01:42 +0000)]
Simple utility to add svn:eol-style to text files under
SVN control. Like reindent.py, I expect to run this
mindlessly from time to time, checking in whatever it
happens to do ;-)
Georg Brandl [Wed, 8 Mar 2006 18:09:27 +0000 (18:09 +0000)]
Patch #1434038: property() now uses the getter's docstring if there is
no "doc" argument given. This makes it possible to legitimately use
property() as a decorator to produce a read-only property.
Thomas Wouters [Wed, 8 Mar 2006 01:47:19 +0000 (01:47 +0000)]
Clean up _bsddb.c: add a couple dozen missing Py_DECREF()'s, a handful of
missing PyObject_Del()'s, simplify some code by using Py_BuildValue()
instead of creating a tuple with items manually, stop clobbering builtin
exceptions in a few places, and guard against NULL-returning functions some
more.
This fixes 117 of the 780 (!?!#%@#$!!) reference leaks in test_bsddb3. I
ain't not done yet, although this review of 5kloc was just the easy part.
Tim Peters [Tue, 7 Mar 2006 23:53:32 +0000 (23:53 +0000)]
_hotshot hotshot_profiler(): If write_header() returned
an error code, this let `self` leak. This is a disaster
on Windows, since `self` already points to a newly-opened
file object, and it was impossible for Python code to
close the thing since the only reference to it was in a
blob of leaked C memory.
test_hotshot test_bad_sys_path(): This new test provoked
the C bug above. This test passed, but left an open
"@test" file behind, which caused a massive cascade of
bogus test failures in later, unrelated tests on Windows.
Changed the test code to remove the @test file it leaves
behind, which relies on the change above to close that
file first.
Checking in the code for PEP 357.
This was mostly written by Travis Oliphant.
I've inspected it all; Neal Norwitz and MvL have also looked at it
(in an earlier incarnation).
Neal Norwitz [Tue, 7 Mar 2006 04:48:24 +0000 (04:48 +0000)]
Thanks to Coverity, these were all reported by their Prevent tool.
All of these (except _lsprof.c) should be backported. Particularly
the hotshot change which validates sys.path. Can someone backport?
Neal Norwitz [Mon, 6 Mar 2006 23:07:34 +0000 (23:07 +0000)]
Try to cleanup the error handling a bit so there aren't false positives
from static analysis. v was already checked for NULL above, so we don't
need a second check.