Commit Graph

3643 Commits

Author SHA1 Message Date
Andrew M. Kuchling
f8f1783eb5 Check for error on module creation 2006-06-09 13:55:00 +00:00
Brett Cannon
dbda788a51 Backport change to binascii.hexlify() to use s# for its arguments instead of t#
in order to match its documentation.
2006-06-08 16:24:56 +00:00
Gregory P. Smith
2e56541d45 - Bug #1493322: bsddb: the __len__ method of a DB object has been fixed to
return correct results.  It could previously incorrectly return 0 in some
  cases.  Fixes SF bug 1493322 (pybsddb bug 1184012).
2006-06-06 00:23:21 +00:00
Hye-Shik Chang
04d547e397 (Backport from trunk) Fix a potentially invalid memory access of
CJKCodecs' shift-jis decoder.
2006-06-05 01:09:46 +00:00
Gregory P. Smith
ee6ca70548 fix potential use of uninitialized char ** to construct a list if log_archive
is called with the (unsupported and unexported in this version) flag DB_ARCH_REMOVE.

also fix a log_list memory leak on error return in the event that python can't create
a new list object.
2006-06-05 00:40:31 +00:00
Andrew M. Kuchling
02647d411a [Bug #1497414] _self is a reserved word in the WATCOM 10.6 C compiler.
Fix by renaming the variable.

In a different module, Neal fixed it by renaming _self to self.  There's
already a variable named 'self' here, so I used selfptr.
2006-06-03 20:34:33 +00:00
Martin v. Löwis
cd9a3bbc0f Backport of 46010
- Test for sys/statvfs.h before including it, as statvfs is present
  on some OSX installations, but its header file is not.
2006-05-16 07:06:33 +00:00
Thomas Wouters
4c99867d4b Backport SF bug/patch #1433877: string parameter to ioctl not null terminated
The new char-array used in ioctl calls wasn't explicitly NUL-terminated;
quite probably the cause for the test_pty failures on Solaris that we
circumvented earlier.
2006-05-05 10:52:43 +00:00
Martin v. Löwis
bab8ace8d9 Work around deadlock risk. 2006-05-01 06:29:06 +00:00
Georg Brandl
8ac119237a Bug #1473625: stop pickling in text mode make floats locale dependent. 2006-04-30 11:12:03 +00:00
Georg Brandl
fee327c85a Bug #1478429: make datetime.datetime.fromtimestamp accept every float,
possibly "rounding up" to the next whole second.
 (backport from rev. 45792)
2006-04-28 19:09:29 +00:00
Thomas Wouters
eba52802cd Backport trunk's r45715:
Define MAXPATHLEN to be at least PATH_MAX, if that's defined. Python uses
MAXPATHLEN-sized buffers for various output-buffers (like to realpath()),
and that's correct on BSD platforms, but not Linux (which uses PATH_MAX, and
does not define MAXPATHLEN.) Cursory googling suggests Linux is following a
newer standard than BSD, but in cases like this, who knows. Using the
greater of PATH_MAX and 1024 as a fallback for MAXPATHLEN seems to be the
most portable solution.
2006-04-25 15:33:48 +00:00
Martin v. Löwis
41a1a9ea54 Patch #1191065: Fix preprocessor problems on systems where recvfrom
is a macro.
2006-04-15 08:35:45 +00:00
Armin Rigo
dfdc6af572 Backport of r45303: buffer overflow. 2006-04-12 12:04:10 +00:00
Georg Brandl
e539fad2e7 Clear errno before calling opendir() and readdir().
(backport from rev. 45262)
2006-04-11 07:04:09 +00:00
Georg Brandl
653d87d1d7 Bug #1467952: backport: make os.listdir() raise if readdir() fails 2006-04-11 06:51:25 +00:00
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