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
Tim Peters
fbbfb4b976
C:\Code\python>type c.txt
...
Merge rev 52377 from trunk:
newIobject(): repaired incorrect cast to quiet MSVC warning.
2006-10-18 05:30:25 +00:00
Thomas Heller
dcbf64d34d
ctypes callback functions only support 'fundamental' result types.
...
Check this and raise an error when something else is used - before
this change ctypes would hang or crash when such a callback was
called. This is a partial fix for #1574584 .
Backported from trunk.
2006-10-17 19:41:10 +00:00
Martin v. Löwis
2c7aa634cb
Bug #1567666 : Emulate GetFileAttributesExA for Win95.
2006-10-15 09:44:02 +00:00
Georg Brandl
3c48709e3a
Bug #1548891 : The cStringIO.StringIO() constructor now encodes unicode
...
arguments with the system default encoding just like the write()
method does, instead of converting it to a raw buffer.
(backport from rev. 52301)
2006-10-12 09:47:17 +00:00
Martin v. Löwis
463a42b5de
Bug #1565150 : Fix subsecond processing for os.utime on Windows.
2006-10-09 20:44:50 +00:00
Barry Warsaw
6bf550138d
List gc.get_count() in the module docstring.
2006-10-09 19:42:33 +00:00
Hye-Shik Chang
f4fe46d74b
Backport from trunk r52223:
...
Bug #1572832 : fix a bug in ISO-2022 codecs which may cause segfault
when encoding non-BMP unicode characters. (Submitted by Ray Chason)
2006-10-08 14:01:45 +00:00
Kristján Valur Jónsson
2c8851e614
Backport the .sln and .vcproj files for PCBuild8 from the python trunk to the 2.5 maintainance branch. This fixes build problems with visual studio 2005, and cleans up profile guided optimization.
2006-10-07 14:56:30 +00:00
Andrew M. Kuchling
d79524a4cc
[Backport to 2-5maint of r52147 | andrew.kuchling ; the buildbots seem OK
...
with this change.]
Cause a PyObject_Malloc() failure to trigger a MemoryError, and then
add 'if (PyErr_Occurred())' checks to various places so that NULL is
returned properly.
2006-10-05 17:26:33 +00:00
Armin Rigo
4b63c21d6f
Forward-port of r52136: a review of overflow-detecting code.
...
* unified the way intobject, longobject and mystrtoul handle
values around -sys.maxint-1.
* in general, trying to entierely avoid overflows in any computation
involving signed ints or longs is extremely involved. Fixed a few
simple cases where a compiler might be too clever (but that's all
guesswork).
* more overflow checks against bad data in marshal.c.
* 2.5 specific: fixed a number of places that were still confusing int
and Py_ssize_t. Some of them could potentially have caused
"real-world" breakage.
* list.pop(x): fixing overflow issues on x was messy. I just reverted
to PyArg_ParseTuple("n"), which does the right thing. (An obscure
test was trying to give a Decimal to list.pop()... doesn't make
sense any more IMHO)
* trying to write a few tests...
2006-10-04 11:44:06 +00:00
Armin Rigo
c6f2f884b4
Compilation problem caused by conflicting typedefs for uint32_t
...
(unsigned long vs. unsigned int).
2006-10-04 10:23:57 +00:00
Georg Brandl
6d7c36332f
Bug #1556784 : allow format strings longer than 127 characters in
...
datetime's strftime function.
(backport from rev. 52072)
2006-09-30 11:17:43 +00:00
Gregory P. Smith
6fed7937c6
fix: DB.stat flags and txn keyword arguments were backwards.
2006-09-30 06:05:07 +00:00
Georg Brandl
b14b59fcf9
Backport rev. 51987: superfluous semicola.
2006-09-25 06:53:42 +00:00
Jack Diederich
187e64806f
backport of r51950
...
* regression bug, count_next was coercing a Py_ssize_t to an unsigned Py_size_t
which breaks negative counts
* added test for negative numbers
2006-09-21 18:32:11 +00:00