Guido van Rossum
076d9eef7b
Bug #1301 : fixed a bad assert in _tkinter.
2008-01-03 23:54:04 +00:00
Christian Heimes
eebb79cc69
Added copysign(x, y) function to the math module
2008-01-03 22:32:26 +00:00
Christian Heimes
000a074c95
Modified PyImport_Import and PyImport_ImportModule to always use absolute imports by calling __import__ with an explicit level of 0
...
Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
2008-01-03 22:16:32 +00:00
Christian Heimes
e2ca4245c9
Added math.isinf() and math.isnan()
2008-01-03 20:23:15 +00:00
Jeffrey Yasskin
2f3c16be73
Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (just
...
the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361,
r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new
documentation. The only significant difference is that round(x) returns a float
to preserve backward-compatibility. See http://bugs.python.org/issue1689 .
2008-01-03 02:21:52 +00:00
Martin v. Löwis
17cb5cf403
Return results from Python callbacks to Tcl as Tcl objects.
...
Fixes Tk issue #1851526
2008-01-01 21:05:17 +00:00
Brett Cannon
8d993aae8f
Fix the docstrings of time.localtime() and gmtime() for the tm_mday field.
...
Will backport.
2007-12-24 19:58:25 +00:00
Guido van Rossum
02de8979cc
Patch #1583 by Adam Olsen.
...
This adds signal.set_wakeup_fd(fd) which sets a file descriptor to
which a zero byte will be written whenever a C exception handler runs.
I added a simple C API as well, PySignal_SetWakeupFd(fd).
2007-12-19 19:41:06 +00:00
Christian Heimes
e93237dfcc
#1629 : Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
2007-12-19 02:37:44 +00:00
Guido van Rossum
3c887b2802
Issue #1645 by Alberto Bertogli. Fix a comment.
2007-12-18 20:10:42 +00:00
Thomas Heller
153038efa4
Issue #1642 : Fix segfault in ctypes when trying to delete attributes.
2007-12-18 19:00:34 +00:00
Christian Heimes
a63f268351
Fixed warning in ssl module
2007-12-14 04:38:13 +00:00
Christian Heimes
2518b25578
Fixed a warning in _codecs_iso2022.c and some non C89 conform // comments.
2007-12-14 03:02:34 +00:00
Raymond Hettinger
adf9ffdfbe
Fix bug 1604. deque.__init__() did not clear existing contents like list.__init__. Not a backport candidate.
2007-12-13 00:08:37 +00:00
Christian Heimes
842c178442
Fixed a nasty problem in the xxmodule.c
2007-12-12 18:09:06 +00:00
Gerhard Häring
99b9df8e11
Forward-port of commit 59184.
...
- 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-12-11 21:07:40 +00:00
Guido van Rossum
137c49ce6a
Patch #1643738 by Ulisses Furquim -- make the is_tripped variable
...
in signalmodule.c more robust. Includes Martin von Loewis's suggestion
to set is_tripped after .tripped.
2007-12-10 23:00:12 +00:00
Martin v. Löwis
7b3cc06a9a
Forward-port r59310:
...
os.access now returns True on Windows for any existing directory.
2007-12-03 23:09:04 +00:00
Martin v. Löwis
6b449f4f2b
Issue #1727780 : Support loading pickles of random.Random objects created
...
on 32-bit systems on 64-bit systems, and vice versa. As a consequence
of the change, Random pickles created by Python 2.6 cannot be loaded
in Python 2.5.
2007-12-03 19:20:02 +00:00
Christian Heimes
0f6d4e6cd3
I followed MA Lemberg's suggestion and added comments to the late initialization of the type slots.
2007-12-03 14:28:04 +00:00
Christian Heimes
3305c52de7
Applied my patch #1455 with some extra fixes for VS 2005
...
The new msvc9compiler module supports VS 2005 and VS 2008. I've also fixed build_ext to support PCbuild8 and PCbuild9 and backported my fix for xxmodule.c from py3k. The old code msvccompiler is still in place in case somebody likes to build an extension with VS 2003 or earlier.
I've also updated the cygwin compiler module for VS 2005 and VS 2008. It works with VS 2005 but I'm unable to test it with VS 2008. We have to wait for a new version of cygwin.
2007-12-03 13:47:29 +00:00
Christian Heimes
3628187b66
Fix for feature request #1528 Add os.fchmod
...
Georg Brandl has added fchmod() and fchown(). I've contributed lchown but I'm not able to test it on Linux. However it should be available on Mac and some other flavors of Unix.
I've made a quick test of fchmod() and fchown() on my system. They are working as expected.
2007-11-30 21:11:28 +00:00
Thomas Heller
8fc2a34014
Remove unused global variable, and remove unneeded COMError.__str__
...
implementation in C.
2007-11-27 12:22:11 +00:00
Georg Brandl
b67da6ed2b
#1735632 : add O_NOATIME constant to os module.
...
Also document a few other O_ constants that were missing from documentation.
2007-11-24 13:56:09 +00:00
Christian Heimes
e8954f8ce7
Backport of the PCbuild9 directory from the py3k branch.
...
I've finished the last task for the PCbuild9 directory today. I don't think there is much left to do. Now you can all play around with the shiny new VS 2008 and try the PGO builds. I was able to get a speed improvement of about 10% on py3k.
Have fun! :)
2007-11-22 11:21:16 +00:00
Christian Heimes
901071bde5
Fixed #1372 : zlibmodule.c: int overflow in PyZlib_decompress
2007-11-21 00:46:21 +00:00
Amaury Forgeot d'Arc
5087980c1e
The incremental decoder for utf-7 must preserve its state between calls.
...
Solves issue1460.
Might not be a backport candidate: a new API function was added,
and some code may rely on details in utf-7.py.
2007-11-20 23:31:27 +00:00
Nick Coghlan
8c4592a77a
Backport some main.c cleanup from the py3k branch
2007-11-20 14:55:57 +00:00
Nick Coghlan
327a39b047
Patch #1739468 : Directories and zipfiles containing __main__.py are now executable
2007-11-18 11:56:28 +00:00
Guido van Rossum
5397fd1a51
A patch from issue 1378 by roudkerk:
...
Currently on Windows set_error() make use of a large array which maps
socket error numbers to error messages.
This patch removes that array and just lets PyErr_SetExcFromWindowsErr()
generate the message by using the Win32 function FormatMessage().
2007-11-16 00:24:44 +00:00
Christian Heimes
1bc4af4bdd
readline module cleanup
...
fixed indention to tabs
use Py_RETURN_NONE macro
added more error checks to on_completion_display_matches_hook
open question: Does PyList_SetItem(l, i, o) steal a reference to o in the case of an error?
2007-11-12 18:58:08 +00:00
Martin v. Löwis
f354894e7b
Only set rl_completion_display_matches_hook if there
...
is a Python hook function. Fixes #1425 .
2007-11-12 04:53:02 +00:00
Raymond Hettinger
d3ffd341b8
Use a freelist to speed-up block allocation and deallocation in collections.deque().
2007-11-10 01:54:03 +00:00
Gregory P. Smith
fc006692ad
* db->get_types is only available in BerkeleyDB >= 4.2
...
* get compiling with older versions of python again for a stand alone release.
2007-11-05 09:06:28 +00:00
Gregory P. Smith
ac11e02143
Add the bsddb.db.DBEnv.lock_id_free method.
...
Improve test_lock's tempdir creation and cleanup.
2007-11-05 02:56:31 +00:00
Gregory P. Smith
ec10a4a402
Fixes bug 477182 on pybsddb.sf.net. DB objects now load the flags and
...
pay attention to them when opening an existing database. This means
that d[] behaves properly even on databases previously created with DB_DUP
or DB_DUPSORT flags to allow duplicate keys.
http://sourceforge.net/tracker/index.php?func=detail&aid=477182&group_id=13900&atid=113900
Do not backport, this bugfix could be considered an API change.
2007-11-05 02:32:26 +00:00
Gregory P. Smith
aae141a751
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.
2007-11-01 21:08:14 +00:00
Neal Norwitz
9c4382f2a3
Fix some compiler warnings for signed comparisons on Unix and Windows.
2007-10-31 06:33:20 +00:00
Thomas Heller
469b2a52cd
ffi_type_longdouble may be already #defined.
...
See issue 1324.
2007-10-25 19:47:32 +00:00
Travis E. Oliphant
8feafab346
Add phuang patch from Issue 708374 which adds offset parameter to mmap module.
2007-10-23 02:40:56 +00:00
Thomas Heller
91ac42243c
Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
...
See also https://bugs.launchpad.net/bugs/72505 .
Ported from release25-maint branch.
2007-10-19 18:11:41 +00:00
Neal Norwitz
f3ca169bb4
Get this module to compile with bsddb versions prior to 4.3
2007-10-12 03:52:34 +00:00
Neal Norwitz
e545ff30a6
Fix Coverity 168: Close the file before returning (exiting).
2007-10-12 03:03:23 +00:00
Neal Norwitz
088beae1f2
Get rid of compiler warning about retval being used (returned) without
...
being initialized. (gcc warning and Coverity 202)
2007-10-12 03:01:54 +00:00
Neal Norwitz
c740d834ee
Get rid of warnings on a bunch of platforms by using a proper prototype.
2007-10-12 03:01:30 +00:00
Raymond Hettinger
68995867d5
Accept Jim Jewett's api suggestion to use None instead of -1 to indicate unbounded deques.
2007-10-10 00:26:46 +00:00
Gregory P. Smith
10bed54ae2
Fix a double free when positioning a database cursor to a non-existant
...
string key (and probably a few other situations with string keys).
This was reported with a patch as pybsddb sourceforge bug 1708868 by
jjjhhhlll at gmail.
2007-10-09 06:50:43 +00:00
Gregory P. Smith
392505391e
Splits Modules/_bsddb.c up into bsddb.h and _bsddb.c and adds a C API
...
object available as bsddb.db.api. This is based on the patch submitted
by Duncan Grisby here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1551895&group_id=13900&atid=313900
See this thread for additional info:
http://sourceforge.net/mailarchive/forum.php?thread_name=E1GAVDK-0002rk-Iw%40apasphere.com&forum_name=pybsddb-users
It also cleans up the code a little by removing some ifdef/endifs for
python prior to 2.1 and for unsupported Berkeley DB <= 3.2.
2007-10-09 06:02:21 +00:00
Gregory P. Smith
e70be5cbb9
Stab in the dark attempt to fix the test_bsddb3 failure on sparc and S-390
...
ubuntu buildbots.
2007-10-06 07:48:10 +00:00
Raymond Hettinger
556b43d936
Restore BEGIN/END THREADS macros which were squashed in the previous checkin
2007-10-05 19:07:31 +00:00