summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Unhappy buildbots. Revert 64052. Long doubles have unexpected effects on ↵Raymond Hettinger2008-06-091-20/+24
| | | | some builds.
* Address double-rounding scenarios by setting all variables to long doubles.Raymond Hettinger2008-06-091-24/+19
|
* Issue #2138: Add math.factorial().Raymond Hettinger2008-06-091-0/+50
|
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-0985-1103/+1103
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Remove locking part of new buffer protocol.Travis E. Oliphant2008-06-061-5/+0
|
* Issue 3501: Make heapq support both __le__ and __lt__.Raymond Hettinger2008-06-061-11/+28
|
* Performance improvement: Use PyDict_Get/SetItem instead ofThomas Heller2008-06-061-3/+9
| | | | PyDict_Get/SetItemString.
* Issue #1798: Add ctypes calling convention that allows safe access of errno.Thomas Heller2008-06-064-4/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ctypes maintains thread-local storage that has space for two error numbers: private copies of the system 'errno' value and, on Windows, the system error code accessed by the GetLastError() and SetLastError() api functions. Foreign functions created with CDLL(..., use_errno=True), when called, swap the system 'errno' value with the private copy just before the actual function call, and swapped again immediately afterwards. The 'use_errno' parameter defaults to False, in this case 'ctypes_errno' is not touched. On Windows, foreign functions created with CDLL(..., use_last_error=True) or WinDLL(..., use_last_error=True) swap the system LastError value with the ctypes private copy. The values are also swapped immeditately before and after ctypes callback functions are called, if the callbacks are constructed using the new optional use_errno parameter set to True: CFUNCTYPE(..., use_errno=TRUE) or WINFUNCTYPE(..., use_errno=True). New ctypes functions are provided to access the ctypes private copies from Python: - ctypes.set_errno(value) and ctypes.set_last_error(value) store 'value' in the private copy and returns the previous value. - ctypes.get_errno() and ctypes.get_last_error() returns the current ctypes private copies value.
* Backport from py3k: Implement the new buffer interface from pep3118Thomas Heller2008-06-054-24/+264
| | | | for ctypes instances. Closes issue #2404.
* MacOS X: Enable 4-way universal buildsRonald Oussoren2008-06-052-2/+2
| | | | | | | | | | | | | | | | | | This patch adds a new configure argument on OSX: --with-universal-archs=[32-bit|64-bit|all] When used with the --enable-universalsdk option this controls which CPU architectures are includes in the framework. The default is 32-bit, meaning i386 and ppc. The most useful alternative is 'all', which includes all 4 CPU architectures supported by MacOS X (i386, ppc, x86_64 and ppc64). This includes limited support for the Carbon bindings in 64-bit mode as well, limited because (a) I haven't done extensive testing and (b) a large portion of the Carbon API's aren't available in 64-bit mode anyway. I've also duplicated a feature of Apple's build of python: setting the environment variable 'ARCHFLAGS' controls the '-arch' flags used for building extensions using distutils.
* Revert revisions 63943 and 63942 (Issue #1798: Add ctypes callingThomas Heller2008-06-044-184/+4
| | | | | | | | convention that allows safe access to errno) This code does not yet work on OS X (__thread storage specifier not available), so i needs a configure check plus a more portable solution.
* Fix ctypes.set_errno for gcc.Thomas Heller2008-06-041-2/+4
|
* Issue #1798: Add ctypes calling convention that allows safe access toThomas Heller2008-06-044-4/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | errno (and LastError, on Windows). ctypes maintains a module-global, but thread-local, variable that contains an error number; called 'ctypes_errno' for this discussion. This variable is a private copy of the systems 'errno' value; the copy is swapped with the 'errno' variable on several occasions. Foreign functions created with CDLL(..., use_errno=True), when called, swap the values just before the actual function call, and swapped again immediately afterwards. The 'use_errno' parameter defaults to False, in this case 'ctypes_errno' is not touched. The values are also swapped immeditately before and after ctypes callback functions are called, if the callbacks are constructed using the new optional use_errno parameter set to True: CFUNCTYPE(..., use_errno=TRUE) or WINFUNCTYPE(..., use_errno=True). Two new ctypes functions are provided to access the 'ctypes_errno' value from Python: - ctypes.set_errno(value) sets ctypes_errno to 'value', the previous ctypes_errno value is returned. - ctypes.get_errno() returns the current ctypes_errno value. --- On Windows, the same scheme is implemented for the error value which is managed by the GetLastError() and SetLastError() windows api calls. The ctypes functions are 'ctypes.set_last_error(value)' and 'ctypes.get_last_error()', the CDLL and WinDLL optional parameter is named 'use_last_error', defaults to False. --- On Windows, TlsSetValue and TlsGetValue calls are used to provide thread local storage for the variables; ctypes compiled with __GNUC__ uses __thread variables.
* Change all functions that expect one unicode character to accept a pair ofWalter Dörwald2008-06-021-73/+74
| | | | surrogates in narrow builds. Fixes issue #1706460.
* Fix misspelled sys.platform name and misspelled filename.Thomas Heller2008-06-021-1/+1
|
* Fix issue 2782: be less strict about the format string type in strftime.Gregory P. Smith2008-06-021-21/+25
| | | | | Accept unicode and anything else ParseTuple "s#" can deal with. This matches the time.strftime behavior.
* New environment variable PYTHONIOENCODING.Martin v. Löwis2008-06-011-0/+1
|
* Fixed rowcount for SELECT statements. They're -1 now (again), for better ↵Gerhard Häring2008-05-312-15/+11
| | | | DB-API 2.0 compliance.
* Implement heapq in terms of less-than (to match list.sort()).Raymond Hettinger2008-05-311-14/+26
|
* * Mark intermedidate computes values (hi, lo, yr) as volatile.Raymond Hettinger2008-05-301-19/+31
| | | | | | | * Expand comments. * Swap variable names in the sum_exact code so that x and y are consistently chosen as the larger and smaller magnitude values respectively.
* ctypes NULL function pointers have a boolean False value now.Thomas Heller2008-05-291-21/+21
|
* Fix compiler warning.Thomas Heller2008-05-291-1/+1
|
* Fix two typos.Raymond Hettinger2008-05-291-2/+2
|
* Define macros so that this still compiles on Python prior to r63675.Gregory P. Smith2008-05-261-0/+11
|
* Renamed PyString to PyBytesChristian Heimes2008-05-2686-1127/+1127
|
* Patch #1722225: Support QNX 6.Martin v. Löwis2008-05-233-0/+10
|
* Tweak the comments and formatting.Raymond Hettinger2008-05-231-76/+47
|
* Issue #2819: Add math.sum, a function that sums a sequence of floatsMark Dickinson2008-05-231-0/+223
| | | | | efficiently but with no intermediate loss of precision. Based on Raymond Hettinger's ASPN recipe. Thanks Jean Brouwers for the patch.
* bsddb module updated to version 4.7.0Jesus Cea2008-05-222-6/+85
|
* On HPUX, -fPIC must be used for linking. _ctypes now builds on HP-UXThomas Heller2008-05-201-0/+1
| | | | | | | IA64 and PA machines. The ctypes unittests work fine on the IA64, but dump core in test_qsort on the PA.
* Revert copy_reg -> copyreg rename.Georg Brandl2008-05-202-8/+8
|
* issue2858: Fix potential memory corruption when bsddb.db.DBEnv.lock_getGregory P. Smith2008-05-171-21/+22
| | | | | and other bsddb.db object constructors raised an exception. Debugging & patch by Neal Norowitz.
* Added Python 3.0 warning to cPickle.Alexandre Vassalotti2008-05-161-0/+6
|
* #2890: support os.O_ASYNC and fcntl.FASYNC.Georg Brandl2008-05-162-0/+8
|
* Following Amaury's adviceChristian Heimes2008-05-161-1/+1
|
* Fixed #2870: cmathmodule.c compile errorChristian Heimes2008-05-161-1/+1
|
* Deprecate sunaudiodev/SUNAUDIODEV for removal in 3.0.Brett Cannon2008-05-161-0/+4
|
* Deprecate imgfile for removal in 3.0.Brett Cannon2008-05-151-0/+5
|
* Deprecated 'fm' for removal in 3.0.Brett Cannon2008-05-151-0/+5
|
* FL, flp, and fl from IRIX have been deprecated for removal in 3.0.Brett Cannon2008-05-151-0/+5
|
* Deprecate DEVICE, GL, gl, and the related modules cgen and cgensupport for ↵Brett Cannon2008-05-152-0/+8
| | | | removal in 3.0.
* Deprecate CL, CL_old, and cl for 3.0.Brett Cannon2008-05-141-1/+5
|
* The CD and cd modules for IRIX are deprecated for 3.0.Brett Cannon2008-05-141-0/+4
|
* Deprecate al/AL for removal in 3.0.Brett Cannon2008-05-141-0/+4
|
* bsddb module updated to version 4.6.4Jesus Cea2008-05-132-301/+1443
|
* Deprecate the timing module for removal in Python 3.0.Brett Cannon2008-05-121-0/+4
|
* Deprecate the sv module as per PEP 4.Brett Cannon2008-05-121-0/+4
|
* Depreate imageop for removal in 3.0.Brett Cannon2008-05-121-0/+5
|
* Put Lib/lib-old back on to sys.path for module renames.Brett Cannon2008-05-111-1/+4
|
* #1326: document and test zipimporter.archive and zipimporter.prefix.Georg Brandl2008-05-111-2/+9
|