Commit Graph

4285 Commits

Author SHA1 Message Date
Kristján Valur Jónsson b9d39916ac Properly implement Georg Brandl's Patch #1185447 to the 2.5 maintainance branch 2007-04-22 10:18:46 +00:00
Kristján Valur Jónsson 5e4e31f76a Fix various minor issues discovered with static analysis using Visual Studio 2005 Team System.
Removed obsolete comment, since .dll modules are no longer supported on windows, only .pyd.
2007-04-21 12:46:49 +00:00
Neal Norwitz ef4364f3b8 Fix unpack so it works on 64-bit platforms. 2007-04-05 05:06:49 +00:00
Raymond Hettinger b2064d7280 Fix-up error-exits on struct_unpack(). 2007-04-04 21:57:12 +00:00
Raymond Hettinger 3608f0570e Bug #1563759: struct.unpack doens't support buffer protocol objects 2007-04-04 20:32:03 +00:00
Martin v. Löwis 8863544522 Bug #1686475: Support stat'ing open files on Windows again. 2007-04-04 18:30:56 +00:00
Matthias Klose 5d2d2ef1f5 - Fix an off-by-one bug in locale.strxfrm().
Patch taken from http://bugs.debian.org/416934.
2007-04-03 04:39:34 +00:00
Raymond Hettinger d6030acd7f Array module's buffer interface can now handle empty arrays. 2007-04-02 22:39:08 +00:00
Raymond Hettinger 4bbcb64d5d SF #1693079 Array module cannot pickle empty arrays 2007-04-02 17:03:46 +00:00
Neal Norwitz 65407fb734 Backport 54594:
Fix SF #1688393, sock.recvfrom(-24) crashes

Also fix some method names that were copied incorrectly (trunk fixed).
2007-03-31 18:56:11 +00:00
Georg Brandl 7b1be36bb7 In Windows' time.clock(), when QueryPerformanceFrequency() fails,
the C lib's clock() is used, but it must be divided by CLOCKS_PER_SEC
as for the POSIX implementation (thanks to #pypy).
 (backport from rev. 54606)
2007-03-29 12:42:16 +00:00
Thomas Heller b151f721a9 Prevent creation (followed by a segfault) of array types when the size
overflows the valid Py_ssize_t range.  Check return values of
PyMem_Malloc.

Backported from trunk.
2007-03-23 19:56:45 +00:00
Thomas Heller 50d1d0bad5 Explain the purpose of the b_needsfree flag. This answers Neals
question (well, two months too late).
2007-03-22 20:33:04 +00:00
Thomas Heller 02b8feea9f Back out "Patch #1643874: memory leak in ctypes fixed."
The code in this patch leaves no way to give up the ownership of a
BSTR instance.
2007-03-22 19:43:37 +00:00
Georg Brandl d6e73c1785 Bug #1622896: fix a rare corner case where the bz2 module raised an
error in spite of a succesful compression.
 (backport from rev. 54336)
2007-03-13 12:34:35 +00:00
Thomas Heller 8bf469ddc1 Merged revisions 54248 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Lib/ctypes

........
  r54248 | thomas.heller | 2007-03-09 21:39:22 +0100 (Fr, 09 Mär 2007) | 7 lines

  Bug #1651235: When a tuple was passed to a ctypes function call,
  Python would crash instead of raising an error.

  The crash was caused by a section of code that should have been
  removed long ago, at that time ctypes had other ways to pass
  parameters to function calls.
........
2007-03-09 20:48:57 +00:00
Thomas Heller f7eed5e2d1 Merged revisions 54244 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Lib/ctypes

........
  r54244 | thomas.heller | 2007-03-09 20:21:28 +0100 (Fr, 09 Mär 2007) | 3 lines

  Fix bug #1646630: ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0)
  returned string up to the first NUL character.
........
2007-03-09 20:21:16 +00:00
Walter Dörwald 05b5c7fe0e Backport checkin:
Patch for bug #1633621: if curses.resizeterm() or
curses.resize_term() is called, update _curses.LINES,
_curses.COLS, curses.LINES and curses.COLS.
2007-03-06 20:46:26 +00:00
Georg Brandl 62b1b001e6 Patch #1654417: make operator.{get,set,del}slice use the full range
of Py_ssize_t.
 (backport from rev. 54177)
2007-03-06 19:00:09 +00:00
Georg Brandl 02d7cffb8f Patch #1646728: datetime.fromtimestamp fails with negative
fractional times.  With unittest.
  (backport from rev. 54167 by Guido)
2007-03-06 17:46:17 +00:00
Georg Brandl 75e3c527f6 Fix another reincarnation of bug #1576657 in defaultdict.
(backport from rev. 54160)
2007-03-06 13:33:07 +00:00
Martin v. Löwis b8d661bd5e Revert r53672, just fix signature of time_isoformat instead. 2007-02-18 08:50:38 +00:00
Martin v. Löwis 1e335b2968 Patch #1657276: Make NETLINK_DNRTMSG conditional. 2007-02-13 12:14:29 +00:00
Martin v. Löwis 2e8b602ac1 Bug #1653736: Complain about keyword arguments to time.isoformat. 2007-02-08 09:13:51 +00:00
Raymond Hettinger 9f0e1ea964 Do not let overflows in enumerate() and count() pass silently. 2007-02-07 23:57:05 +00:00
Raymond Hettinger 113776c411 Check for a common user error with defaultdict(). 2007-02-07 21:40:49 +00:00
Georg Brandl 3d26ef1d10 Bug #1645944: os.access now returns bool but docstring is not updated
(backport from rev. 53579)
2007-01-27 19:38:56 +00:00
Thomas Heller 817b489422 Merged revisions 53556 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes

........
  r53556 | thomas.heller | 2007-01-25 19:34:14 +0100 (Do, 25 Jan 2007) | 3 lines

  Fix for #1643874: When calling SysAllocString, create a PyCObject
  which will eventually call SysFreeString to free the BSTR resource.
........
2007-01-25 19:19:35 +00:00
Andrew M. Kuchling b8c6e1f33f [Bug #1552726] Avoid unnecessary polling at the interpreter prompt when certain versions of readline are being used 2007-01-22 16:10:27 +00:00
Georg Brandl 8e932e7d68 Bug #1486663: don't reject keyword arguments for subclasses of builtin
types.
 (backport from rev. 53509)
2007-01-21 10:28:56 +00:00
Neal Norwitz e962300d0c Add a comment for some code I don't understand. Why would needsfree
be true if we didn't malloc the code?  Seems like the code is wrong
or could use comments.

Also verify if the buildbots are working properly for the 2.5 branch.
2007-01-18 07:16:31 +00:00
Thomas Heller 2a98c56c13 Merged revisions 53466 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes

........
  r53466 | thomas.heller | 2007-01-17 10:40:34 +0100 (Mi, 17 Jan 2007) | 2 lines

  Replace C++ comments with C comments.
........
2007-01-17 09:53:03 +00:00
Thomas Heller 3193763bdf Must update the version number on the extension module as well. 2007-01-10 20:44:21 +00:00
Raymond Hettinger 5b44cbe6d8 Fix zero-length corner case for iterating over a mutating deque. 2007-01-08 18:05:53 +00:00
Gregory P. Smith 1a050f5f52 support linking the _bsddb extension module against BerkeleyDB 4.5
[backport of r53252]
2007-01-05 02:09:06 +00:00
Martin v. Löwis bea1c70144 Bug #1566280: Explicitly invoke threading._shutdown from Py_Main,
to avoid relying on atexit.
2007-01-04 21:06:57 +00:00
Thomas Wouters 04e820443b Backport trunk checkin r51565:
Fix SF bug #1545837: array.array borks on deepcopy. array.__deepcopy__()
needs to take an argument, even if it doesn't actually use it.
2006-12-29 14:42:17 +00:00
Andrew M. Kuchling 9333ce189f [Patch #1615868 by Lars Gustaebel] Use Py_off_t to fix BZ2File.seek() for offsets > 2Gb 2006-12-18 19:26:13 +00:00
Martin v. Löwis 95b744cea9 Patch #1544279: Improve thread-safety of the socket module by moving
the sock_addr_t storage out of the socket object.
2006-12-03 11:24:00 +00:00
Thomas Heller 84a90cade5 Fix #1563807: _ctypes built on AIX fails with ld ffi error.
The contents of ffi_darwin.c must be compiled unless __APPLE__ is
defined and __ppc__ is not.

Backport from trunk.
2006-11-28 20:43:11 +00:00
Thomas Heller 558e56d599 Fix bug #1598620: A ctypes structure cannot contain itself.
Backport from trunk.
2006-11-24 19:00:39 +00:00
Neal Norwitz 5890a6a8a6 Backport of 52811:
Bug #1599782: Fix segfault on bsddb.db.DB().type().

The problem is that _DB_get_type() can't be called without the GIL
because it calls a bunch of PyErr_* APIs when an error occurs.
There were no other cases in this file that it was called without the GIL.
Removing the BEGIN/END THREAD around _DB_get_type() made everything work.
2006-11-21 05:29:34 +00:00
Georg Brandl dd3bffb679 Bug #1588217: don't parse "= " as a soft line break in binascii's
a2b_qp() function, instead leave it in the string as quopri.decode()
does.
 (backport from rev. 52765)
2006-11-16 17:08:48 +00:00
Walter Dörwald f2d5c6d117 Backport checkin:
Replace C++ comment with C comment (fixes SF bug #1593525).
2006-11-09 16:30:39 +00:00
Neal Norwitz c975b9477b Backport 52503:
Fix crash in test on HP-UX.  Apparently, it's not possible to delete a lock if
it's held (even by the current thread).
2006-10-28 21:37:42 +00:00
Neal Norwitz b5fdf0da21 Backport 52501:
Add some asserts.  In sysmodule, I think these were to try to silence
some warnings from Klokwork.  They verify the assumptions of the format
of svn version output.

The assert in the thread module helped debug a problem on HP-UX.
2006-10-28 21:36:37 +00:00
Martin v. Löwis 64cd9efd80 Get DBL_MAX from float.h not values.h. 2006-10-27 07:06:59 +00:00
Martin v. Löwis 2ec1df2785 Check for values.h. 2006-10-27 06:43:00 +00:00
Martin v. Löwis 62e58040c1 [Backport of r52452]
Patch #1549049: Rewrite type conversion in structmember.
Fixes #1545696 and #1566140.

The new warnings have been omitted in the backport.
2006-10-27 06:17:21 +00:00
Martin v. Löwis 63a9b8b067 - Patch #1560695: Add .note.GNU-stack to ctypes' sysv.S so that
ctypes isn't considered as requiring executable stacks.
2006-10-22 10:55:25 +00:00