Commit Graph

4347 Commits

Author SHA1 Message Date
Thomas Heller f3bb28395f Issue #2682: ctypes callback functions no longer contain a cyclic
reference to themselves.

Backport from trunk.
2008-04-25 19:55:19 +00:00
Gregory P. Smith f623467759 Merge r62235 from trunk.
Fix zlib crash from zlib.decompressobj().flush(val) when val was not positive.
It tried to allocate negative or zero memory.  That fails.
2008-04-09 00:26:44 +00:00
Gerhard Häring a269762fb0 Fix for Issue2515: Don't crash when trying to fetch data from a closed cursor. 2008-04-06 11:05:24 +00:00
Guido van Rossum f122902f76 Remove the advertising clause from the BSD license in timing.h.
I have the email trail to prove that George Neville-Neil approved this.
(Backport of r62097.)
2008-04-01 23:59:06 +00:00
Georg Brandl d9f1da0f22 Backport #1442: report exception when startup file cannot be run. 2008-03-29 01:50:46 +00:00
Gregory P. Smith 631df7550f Backport r61450 from trunk:
Fix chown on 64-bit linux.  It needed to take a long (64-bit on 64bit linux) as
 uid and gid input to accept values >=2**31 as valid while still accepting
 negative numbers to pass -1 to chown for "no change".

 Fixes issue1747858.
2008-03-18 19:21:40 +00:00
Raymond Hettinger 3662c9090d Backport r61286 adding GC to the grouper for itertools.groupby() fixing Issue 2246. 2008-03-06 22:58:42 +00:00
Martin v. Löwis 9c04257bf9 Fix deallocation of array objects when allocation ran out of memory. 2008-02-15 19:11:46 +00:00
Martin v. Löwis 73c01d4101 Added checks for integer overflows, contributed by Google. Some are
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
2008-02-14 11:26:18 +00:00
Amaury Forgeot d'Arc 3e5f8a6975 issue 2045: Infinite recursion when printing a subclass of defaultdict,
if default_factory is set to a bound method.

Backport of r60663.
2008-02-08 01:05:21 +00:00
Thomas Heller 527bf3a826 Fix the way methods are created for the _ctypes.COMError exception
type; this fix is already in the trunk.
2008-02-06 19:58:46 +00:00
Guido van Rossum d66e94d0e6 Backport r59862 (issue #712900): make long regexp matches interruptable
by signals.
2008-02-04 22:00:35 +00:00
Gregory P. Smith 946de92f9b backport r60544 from trunk:
Merge this fix from the pybsddb tree:
r293 | jcea | 2008-01-31 01:08:19 -0800 (Thu, 31 Jan 2008) | 4 lines

Solved memory leak when using cursors with
databases without environment.
2008-02-03 07:26:23 +00:00
Andrew MacIntyre 8af7067a19 Backport 60542:
The wrapper function is supposed to be for spawnvpe() so that's
what we should call [this wrapper only available on OS/2].
2008-02-03 07:20:39 +00:00
Thomas Heller c9b20734f4 Revert rev. 59926, it breaks comtypes (I need to further examine this). 2008-01-28 08:42:22 +00:00
Georg Brandl ee50e3c734 #1940: make it possible to use curses.filter() before curses.initscr()
as the documentation says.
 (backport from rev. 60322)
2008-01-26 14:03:51 +00:00
Thomas Heller fe528ebf68 Invert the checks in get_[u]long and get_[u]longlong. The intent was
to not accept float types; the result was that integer-like objects
were not accepted.
2008-01-24 13:08:54 +00:00
Thomas Heller f43a86b9d7 Backport from trunk:
Fix a potential 'SystemError: NULL result without error'.
  NULL may be a valid return value from PyLong_AsVoidPtr.
Also move an older ctypes NEWS item in the correct category.
2008-01-16 19:24:20 +00:00
Thomas Heller b9c741c43c Added NEWS entry, plus:
Merged revisions 59925 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes

........
  r59925 | thomas.heller | 2008-01-11 20:34:06 +0100 (Fr, 11 Jan 2008) | 5 lines

  Raise an error instead of crashing with a segfault when a NULL
  function pointer is called.

  Will backport to release25-maint.
........
2008-01-11 19:48:46 +00:00
Andrew M. Kuchling 7a062c6dca Patch 1114: fix compilation of curses module on 64-bit AIX, and any other LP64 platforms where attr_t isn't a C long 2008-01-08 14:58:52 +00:00
Guido van Rossum 3b4a5bd9da Fix bug #1301 -- a bad assert in _tkinter. 2008-01-03 23:52:04 +00:00
Brett Cannon 35b84b4123 Backport of fix for issue 1695. 2007-12-24 20:00:42 +00:00
Thomas Heller 4f1cbd27b4 Change ctypes version number to 1.0.3 (when Python 2.5.2 is released,
ctypes 1.0.3 will be also be released).
2007-12-19 17:22:34 +00:00
Thomas Heller 8e9e4d8f95 Issue #1642: Fix segfault in ctypes when trying to delete attributes. 2007-12-18 19:00:59 +00:00
Guido van Rossum 47485a49f0 Backport patch #1643738. 2007-12-10 23:03:55 +00:00
Martin v. Löwis c8dbc92395 os.access now returns True on Windows for any existing directory. 2007-12-03 22:39:10 +00:00
Gerhard Häring 14fbf29692 - Backported a workaround for a bug in SQLite 3.2.x/3.3.x versions where a
statement recompilation with no bound parameters lead to a segfault
- Backported a fix necessary because of an SQLite API change in version 3.5.
  This prevents segfaults when executing empty queries, like our test suite
  does.
2007-11-25 17:40:35 +00:00
Christian Heimes 946a51c187 Fixed #1372: zlibmodule.c: int overflow in PyZlib_decompress 2007-11-21 00:44:57 +00:00
Gregory P. Smith 2e49f781cb * fix failing test_recno.py - backport from trunk.
* bump _bsddb patch version number.
2007-11-07 07:25:20 +00:00
Gregory P. Smith 2c3e0d94b2 Backport r58757, r58758, r58759.
Undoes incorrect dbtables fix and errant strdup introduced as
described below:

r58757 | gregory.p.smith | 2007-11-01 14:08:14 -0700 (Thu, 01 Nov 2007) | 4 lines

Fix bug introduced in revision 58385.  Database keys could no longer
have NULL bytes in them.  Replace the errant strdup with a
malloc+memcpy.  Adds a unit test for the correct behavior.

r58758 | gregory.p.smith | 2007-11-01 14:15:36 -0700 (Thu, 01 Nov 2007) | 3 lines

Undo revision 58533 58534 fixes.  Those were a workaround for
a problem introduced by 58385.

r58759 | gregory.p.smith | 2007-11-01 14:17:47 -0700 (Thu, 01 Nov 2007) | 2 lines

false "fix" undone as correct problem was found and fixed.
2007-11-01 21:22:40 +00:00
Brett Cannon 8012e9c2f7 Silence a compiler warning about a function definition not being a prototype. 2007-10-12 17:41:08 +00:00
Thomas Heller d6f638188f Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
See also https://bugs.launchpad.net/bugs/72505.
2007-10-12 06:53:32 +00:00
Gregory P. Smith 7d9c00ec4f Backport 58385 from trunk: fix a double free bug in the _bsddb module
on DBCursor.get (and a friends) when passing in a string key.
2007-10-09 07:25:24 +00:00
Gregory P. Smith 381e1a46cd Backport rev 58343: fix DBSequence.get_key() to not crash/fail/etc. 2007-10-06 16:05:18 +00:00
Neal Norwitz c9f22b954f Backport 58332: Fix Coverity #159.
This code was broken if save() returned a negative number since i contained
a boolean value and then we compared i < 0 which should never be true.
2007-10-05 05:05:24 +00:00
Sean Reifscheider 1644e6ebd1 issue1140: Guido's patch from revision 58098 (2.6) applied to 2.5. 2007-09-17 09:43:11 +00:00
Sean Reifscheider b5ec5876f2 issue1597011: Fix for bz2 module corner-case error due to error checking bug. 2007-09-17 05:45:20 +00:00
Armin Rigo 303d35082c Backport of r58004. 2007-09-06 08:35:34 +00:00
Martin v. Löwis a326ab2c9f Patch #786737: Allow building in a tree of symlinks pointing to
a readonly source.
2007-09-05 11:47:22 +00:00
Matthias Klose b084402596 - Fix libffi configure for hppa*-*-linux* | parisc*-*-linux*. 2007-09-04 23:47:16 +00:00
Georg Brandl de469d6e91 Fix compilation warning.
(backport from rev. 56833)
2007-08-08 13:50:04 +00:00
Georg Brandl eb4b738963 Revert the fix for #1548891, it broke backwards compatibility with arbitrary read buffers.
Fixes #1730114.
 (backport from rev. 56830)
2007-08-08 13:03:45 +00:00
Hye-Shik Chang 36fe3c0a84 Backport from trunk r56727:
Fix gb18030 codec's bug that doesn't map two-byte characters on
GB18030 extension in encoding. (bug reported by Bjorn Stabell)
2007-08-04 04:15:04 +00:00
Martin v. Löwis bd28ca65d6 Bug #1704793: Raise KeyError if unicodedata.lookup cannot
represent the result in a single character.
2007-07-28 07:01:43 +00:00
Thomas Heller 2b78594b1f PyType_stgdict() returns a borrowed reference which must not be
Py_DECREF'd.
2007-07-13 19:52:41 +00:00
Thomas Heller f9a8544567 Fix for SF# 1649098: avoid zero-sized array declaration in structure. 2007-07-13 17:33:13 +00:00
Thomas Heller 59fc24403d Merged revisions 55896 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes

........
  r55896 | thomas.heller | 2007-06-11 17:58:33 +0200 (Mo, 11 Jun 2007) | 3 lines

  Use "O&" in calls to PyArg_Parse when we need a 'void*' instead of "k"
  or "K" codes.
........
2007-06-15 17:10:41 +00:00
Martin v. Löwis 2276885acd Patch #1733960: Allow T_LONGLONG to accept ints. 2007-06-09 08:01:33 +00:00
Thomas Heller 11c58c4c8d Merged revisions 55129-55131 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk/Lib/ctypes

........
  r55129 | thomas.heller | 2007-05-04 21:54:22 +0200 (Fr, 04 Mai 2007) | 3 lines

  Do not truncate 64-bit pointers to 32-bit integers.

  Fixes SF #1703286, will backport to release25-maint.
........
  r55131 | thomas.heller | 2007-05-04 21:56:32 +0200 (Fr, 04 Mai 2007) | 1 line

  Oops, these tests do not run on Windows CE.
........
2007-06-08 19:39:31 +00:00
Kristján Valur Jónsson b11197045a backport change 55821 to release25-maint 2007-06-07 23:56:18 +00:00