Commit Graph

3627 Commits

Author SHA1 Message Date
Gregory P. Smith
44c2fd34b1 Fix bsddb.db.DBError derived exceptions so they can be unpickled.
(backport of trunk commit 43729)
2006-04-08 07:34:08 +00:00
Georg Brandl
369444609e Patch #1459631: documnent zlib.Decompress.flush() length parameter.
(backport from rev. 43525)
2006-04-01 07:39:45 +00:00
Georg Brandl
a7993a7f82 Bug #1460564: document that socket.fromfd() duplicates the given
file descriptor.
 (backport from rev. 43523)
2006-04-01 07:33:22 +00:00
Thomas Wouters
fe1c16f4be Backport trunk's r43510: In the fdopen(fd, 'a') case on UNIX, don't try to
set fd's flags to -1 if fcntl() and fdopen() both fail.
2006-03-31 22:39:56 +00:00
Georg Brandl
5c1498057a Add guards against fcntl() not being available on Windows.
(backport from rev. 43504)
2006-03-31 20:27:27 +00:00
Georg Brandl
38bb9c6d14 bug #1461855: make os.fdopen() add the O_APPEND flag if using "a" mode.
glibc, for example, does this already on its own, but it seems that
the solaris libc doesn't. This leads to Python code being able to over-
write file contents even though having specified "a" mode.
 (backport from rev. 43501)
2006-03-31 20:00:15 +00:00
Georg Brandl
c97f592c46 Patch #1380952: fix SSL objects timing out on consecutive read()s
(backport from rev. 43491)
2006-03-31 18:01:24 +00:00
Hye-Shik Chang
6c52761464 Ubuntu bug #29289: Fixed a bug that the gb18030 codec raises
RuntimeError on encoding surrogate pair area on UCS4 build.
This is a partial backport of r43320. (Approved by Anthony Baxter)
2006-03-28 08:27:27 +00:00
Tim Peters
1d250001f5 Merge rev 43181 from the trunk.
Try to repair at least one segfault on the Mac buildbot,
as diagnosed by Nick Coghlan.

test_capi.py:  A test module should never spawn a thread as
a side effect of being imported.  Because this one did, the
segfault one of its thread tests caused didn't occur until
a few tests after test_regrtest.py thought test_capi was
finished.  Repair that.  Also join() the thread spawned
at the end, so that test_capi is truly finished when
regrtest reports that it's done.

_testcapimodule.c test_thread_state():  this spawns a
couple of non-threading.py threads, passing them a PyObject*
argument, but did nothing to ensure that those threads
finished before returning.  As a result, the PyObject*
_could_ (although this was unlikely) get decref'ed out of
existence before the threads got around to using it.
Added explicit synchronization (via a Python mutex) so
that test_thread_state can reliably wait for its spawned
threads to finish.
2006-03-28 07:09:33 +00:00
Anthony Baxter
022a55c0d9 update - still some old .cvsignore files lying around 2006-03-23 02:26:07 +00:00
Armin Rigo
2f58855af4 Backport of r41629: hotshot generated half-meaningless numbers since the
introduction of C calls profiling events.
2006-03-20 09:37:16 +00:00
Neal Norwitz
5a8605ec1c Backport 43147:
Fix problem spotted by Coverity that occurs if tzinfo.tzname().replace()
returns a non-string when converting %Z.
2006-03-20 02:05:58 +00:00
Georg Brandl
d9ca66f2b2 Backport: Fix missing NULL checks after PyTuple_New, PyList_New, PyDict_New 2006-03-17 19:04:15 +00:00
Neal Norwitz
854e91889f Backport 43037:
Move test code out of xxmodule and into _testcapimodule.c where it belongs.
2006-03-15 05:44:35 +00:00
Neal Norwitz
8a2bffc235 Backport 42932:
Try to be a bit more consistent on all platforms:
 python .
 python < .

both print a message, return non-zero and do not core dump.
This hopefully fixes the failure on Solaris.
2006-03-14 06:47:07 +00:00
Neal Norwitz
9165680203 Backport 43022:
Fix and test (manually w/xx module) passing NULLs to PyObject_Str() and
PyObject_Unicode().  This problem was originally reported from Coverity
and addresses mail on python-dev "checkin r43015".

This inlines the conversion of the string to unicode and cleans
up/simplifies some code at the end of the PyObject_Unicode().

We really need a complete C API test module for all public APIs
and passing good and bad parameter values.
2006-03-14 06:10:22 +00:00
Hye-Shik Chang
b0c3bdde45 Backport from trunk r42989:
Bug #1448490: Fixed a bug that ISO-2022 codecs could not handle
SS2 (single-shift 2) escape sequences correctly.
2006-03-13 10:24:31 +00:00
Tim Peters
82e8f38434 Merge rev 42904 from the trunk.
_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.
2006-03-11 04:55:45 +00:00
Neal Norwitz
360641c6e3 Backport fixes reported by Coverity. 2006-03-08 06:39:50 +00:00
Hye-Shik Chang
361cd4bd6c Backport r42894: SF #1444030 Fix several potential defects found
by Coverity.
2006-03-07 15:59:09 +00:00
Thomas Wouters
82735da016 Backport trunk's r42890 (thomas.wouters):
Coverity found bug: test result of PyTuple_New() against NULL before use.

and r42891 (thomas.wouters):

Fix gcc 4.0.x warning about use of uninitialized value.
2006-03-07 14:16:02 +00:00
Thomas Wouters
d704935378 Backport trunk's r42888 (thomas.wouters):
Coverity found refleak: need to free 'v' after calling Tkinter_Error().
2006-03-07 14:06:31 +00:00
Thomas Wouters
4fbad67edf Backport trunk's r42885 (thomas.wouters):
Coverity-found bug: don't use temp->next *before* checking it for NULL. Also
return rather than use it again.
2006-03-07 13:39:26 +00:00
Thomas Wouters
e34fc700fc Backport trunk's r42878 (neal.norwitz):
Thanks to Coverity, these were all reported by their Prevent tool.

and r42881 (thomas.wouters):

Don't DECREF a borrowed reference.
2006-03-07 12:08:42 +00:00
Georg Brandl
e5db6b2134 Patch #931938: prevent setting sys.prefix to "" 2006-02-20 17:37:39 +00:00