Commit Graph

36714 Commits

Author SHA1 Message Date
Neal Norwitz 82be218e97 Remove trailing whitespace in docstring 2007-05-11 06:56:52 +00:00
Neal Norwitz aa87fb6be4 Fix typo in docstring (the module is popen2, not 3). 2007-05-11 06:23:01 +00:00
Neal Norwitz d9841039db Don't ever report a failure when the sum of the reference count differences
are zero.  This should help reduce the false positives.

The message about references leaking is maintained to provide as much
info as possible rather than simply suppressing the message at the source.
2007-05-11 05:55:15 +00:00
Guido van Rossum 360496d9c0 Fix a bug in test_c_api() that caused a negative refcount. 2007-05-10 17:20:15 +00:00
Walter Dörwald 3ebc45d602 Backport checkin:
Fix a segfault when b"" was passed to b2a_qp() -- it was using strchr()
instead of memchr().
2007-05-09 18:10:47 +00:00
Neal Norwitz 0999a1150a Add markup for True/False. Will backport 2007-05-09 06:43:15 +00:00
Collin Winter fa9be8c289 Fix a bug in test.test_support.open_urlresource().
If the call to requires() doesn't precede the filesystem check, we get the following situation:
1. ./python Lib/test/regrtest.py test_foo # test needs urlfetch, not enabled, so skipped
2. ./python Lib/test/regrtest.py -u urlfetch test_foo # test runs
3. ./python Lib/test/regrtest.py test_foo # test runs (!)

By moving the call to requires() *before* the filesystem check, the fact that fetched files are cached on the local disk becomes an implementation detail, rather than a semantics-changing point of note.
2007-05-09 04:14:36 +00:00
Kristján Valur Jónsson abe1d48d20 As per Armin Rigo's suggestion, remove special handing from intobject.c to deal with the peculiarities of classobject's implementation of the number protocol. The nb_long method of classobject now falls back to nb_int if there is no __long__ attribute present. 2007-05-07 16:46:54 +00:00
Neal Norwitz 58e123d75e Verify changes to the trunk go to the normal checkins list 2007-05-07 07:02:26 +00:00
Vinay Sajip 8549ce335f Updates of recent changes to logging. 2007-05-06 17:53:37 +00:00
Georg Brandl cc40ff831c Bug #1713535: typo in logging example. 2007-05-05 18:55:37 +00:00
Brett Cannon 229cee2d3d Deprecate BaseException.message as per PEP 352. 2007-05-05 01:34:02 +00:00
Thomas Heller 2ebc4d8054 Oops, these tests do not run on Windows CE. 2007-05-04 19:56:32 +00:00
Thomas Heller 1ad576c267 Do not truncate 64-bit pointers to 32-bit integers.
Fixes SF #1703286, will backport to release25-maint.
2007-05-04 19:54:22 +00:00
Kristján Valur Jónsson 22ea025481 Minor fix of PCBuild8/_ctypes vcproj, moving include dir into the .vsprops file. 2007-05-04 17:28:06 +00:00
Kristján Valur Jónsson 465bdcc1d1 Update the pcbuild8 solution. Straightened out the _ctypes project by using a .vsproj file and a masm64.rules file to avoid redundancy 2007-05-04 15:48:15 +00:00
Thomas Heller db3bfdf141 On 64-bit Windows, ffi_arg must be 8 bytes long. This fixes the
remaining crashes in the ctypes tests, when functions return float or
double types.
2007-05-04 08:20:41 +00:00
Thomas Heller 0455214f1c Fix some ctypes test crashes, when running with a debug Python
version on win64 by using proper argtypes and restype function
attributes.
2007-05-04 07:14:39 +00:00
Kristján Valur Jónsson c0e9840028 Revert compiler comment to AMD64 for x64/AMD64 builds. 2007-05-04 00:25:08 +00:00
Kristján Valur Jónsson f030394de3 Fix problems in x64 build that were discovered by the testsuite:
- Reenable modules on x64 that had been disabled aeons ago for Itanium.
- Cleared up confusion about compilers for 64 bit windows.  There is only Itanium and x64.  Added macros MS_WINI64 and MS_WINX64 for those rare cases where it matters, such as the disabling of modules above.
- Set target platform (_WIN32_WINNT and WINVER) to 0x0501 (XP) for x64, and 0x0400 (NT 4.0) otherwise, which are the targeted minimum platforms.
- Fixed thread_nt.h.  The emulated InterlockedCompareExchange function didn´t work on x64, probaby due to the lack of a "volatile" specifier.  Anyway, win95 is no longer a target platform.
- Itertools module used wrong constant to check for overflow in count()
- PyInt_AsSsize_t couldn't deal with attribute error when accessing the __long__ member.
- PyLong_FromSsize_t() incorrectly specified that the operand were unsigned.

With these changes, the x64 passes the testsuite, for those modules present.
2007-05-03 20:27:03 +00:00
Kristján Valur Jónsson 170eee9d6a Fix those parts in the testsuite that assumed that sys.maxint would cause overflow on x64. Now the testsuite is well behaved on that platform. 2007-05-03 20:09:56 +00:00
Kristján Valur Jónsson 19ac472ba1 Fix pcbuild8 after recent overhaul: Added the version resource to python26.dll. Adjust stacksize to 2Mb and made large address aware for 32 bits, and set stacksize to 3Mb for 64 bits.
Todo:  Set .dll optimized load addresses, and side-by-side packaging of the python26.dll.
2007-05-03 20:04:53 +00:00
Walter Dörwald 27f4abf3b1 Clarify the behaviour of PyUnicode_DecodeUTF16(): A BOM is only skipped
in native order mode, and only if it's the first two bytes.
2007-05-03 15:13:55 +00:00
Thomas Heller 9b73d0aed5 Don't truncate pointers to integers (on win64 platform). 2007-05-03 12:05:20 +00:00
Thomas Heller 8baeb11041 Fix building _ctypes.pyd for x64 / Windows. 2007-05-03 12:02:08 +00:00
Neal Norwitz 8b267b55ef Remove dead code. This code couldn't be reached because earlier in
the function there is another check for z != Py_None.
2007-05-03 07:20:57 +00:00
Neal Norwitz dc9b32e1ab Handle a couple of uncaught errors. This should be backported 2007-05-03 06:47:18 +00:00
Georg Brandl b8ae3d0138 Actually raise an exception before calling ast_error_finish.
Triggers an assertion otherwise.
2007-05-02 20:02:29 +00:00
Armin Rigo 9790a27065 Fix for #1303614 and #1174712:
- __dict__ descriptor abuse for subclasses of built-in types
- subclassing from both ModuleType and another built-in types

Thanks zseil for the patch.
2007-05-02 19:23:31 +00:00
Neal Norwitz d83eb316dc Stop using PyMem_FREE while the GIL is not held. For details see:
http://mail.python.org/pipermail/python-dev/2007-May/072896.html
2007-05-02 04:47:55 +00:00
Vinay Sajip c0a293c692 Added documentation for new optional credentials argument to SMTPHandler.__init__(). 2007-05-01 10:21:45 +00:00
Vinay Sajip 70c8e8b861 Added new optional credentials argument to SMTPHandler.__init__, and smtp.login() is now called in SMTPHandler.emit() if credentials are specified. 2007-05-01 10:20:03 +00:00
Georg Brandl 09728b7ef3 Patch #1710352: add missing public functions to locale.__all__. 2007-05-01 06:08:15 +00:00
Georg Brandl 5a006b3978 Bug #1710295: exceptions are now new-style classes. 2007-05-01 06:04:11 +00:00
Thomas Heller 68bb9a1418 When accessing the .value attribute of a c_wchar_p instance, and the
instance does not point to a valid wchar_t zero-terminated string,
raise a ValueError.  c_char_p does this already.

The ValueError message now contains the correct pointer address.

Will backport to release25-maint.
2007-04-30 16:04:57 +00:00
Thomas Heller 5a901bd3cc Make sure to call PyErr_NoMemory() in several places where
PyMem_Malloc() could potentially fail.

Will backport to the release25-maint branch.
2007-04-30 15:44:17 +00:00
Kristján Valur Jónsson 7a0da19087 Complete revamp of PCBuild8 directory. Use subdirectories for each project under the main pcbuild solution. Now make extensive use of property sheets to simplify project configuration. x64 build fully supported, and the process for building PGO version (Profiler Guided Optimization) simplified. All projects are now present, except _ssl, which needs to be reimplemented. Also, some of the projects that require external libraries need extra work to fully compile on x64. 2007-04-30 15:17:46 +00:00
Neal Norwitz 714e19a7bd There really are some tests that are problematic. 2007-04-29 23:53:24 +00:00
Georg Brandl 58ef8cd29c Version fix (bug #1708710) 2007-04-27 19:20:00 +00:00
Neal Norwitz 1b59d10ce2 This gets the test working on Solaris. It seems a little hokey to me,
but the test passed on Linux and Solaris, hopefully other platforms too.
2007-04-27 06:45:32 +00:00
Kristján Valur Jónsson bd77c037ed Accomodate 64 bit time_t in the _bsddb module. 2007-04-26 15:24:54 +00:00
Steve Holden 6e6eaa7a67 Minor wording change on slicing aide-memoire. 2007-04-26 14:23:12 +00:00
Kristján Valur Jónsson 94b706be35 The locale "En" appears not to be valid on windows underi VisualStudio.2005. Added "English" to the test_locale.py to make the testsuite pass for that build 2007-04-26 13:44:16 +00:00
Kristján Valur Jónsson 0a440d4184 Export function sanitize_the_mode from fileobject.c as _PyFile_SanitizeMode(). Use this function in posixmodule.c when implementing fdopen(). This fixes test_subprocess.py for a VisualStudio 2005 compile. 2007-04-26 09:15:08 +00:00
Fred Drake 452f5df64a fix some markup errors 2007-04-26 04:42:19 +00:00
Collin Winter cf795b49a9 Fix an issue related to the unittest conversion. 2007-04-25 21:50:25 +00:00
Collin Winter fb5b9890fb Convert test_ossaudiodev to use unittest. 2007-04-25 20:41:34 +00:00
Collin Winter f00c5b5873 Import and raise statement cleanup. 2007-04-25 18:54:36 +00:00
Tim Peters 355954e97a Set missing svn:eol-style property on text files. 2007-04-25 18:48:35 +00:00
Tim Peters 35c7bb202f Whitespace normalization. 2007-04-25 18:47:18 +00:00