summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* SF patch #969180, hotshot incorrectly computes elapsed time by JasonNeal Norwitz2004-06-131-5/+7
| | | | | | | | | | | | | | | | | Beardsley. If the seconds are different, we still need to calculate the differences between milliseconds. Also, on a Gentoo Linux (2.6.5) dual Athlon MP box with glibc 2.3, time can go backwards. This probably happens when the process switches the CPU it's running on. Time can also go backwards when running NTP. If we detect a negative time delta (ie, time went backwards), return a delta of 0. This prevents an illegal array access elsewhere. I think it's safest to *not* update prev_timeofday in this case, so we return without updating. Backport candidate.
* Remove warning (static not being first) when building with -WNeal Norwitz2004-06-131-2/+2
|
* Remove warning about implicit declaration of strcmp()Neal Norwitz2004-06-131-0/+1
|
* Fixup error exits in nlargest() and nsmallest().Raymond Hettinger2004-06-131-8/+16
|
* Install C version of heapq.nsmallest().Raymond Hettinger2004-06-131-5/+162
|
* Install C version of heapq.nlargest().Raymond Hettinger2004-06-121-0/+76
| | | | Maxheap version of heapq.smallest() is forthcoming.
* Ensure path is initialized to prevent freeing random memoryNeal Norwitz2004-06-091-4/+2
| | | | | (reported by Thomas Heller). If have_unicode_filename is set, path looks like it will not be used, so there's no need to free it.
* Patch #774665: Make Python LC_NUMERIC agnostic.Martin v. Löwis2004-06-083-66/+9
|
* SF 952807: Unpickling pickled instances of subclasses of datetime.date,Tim Peters2004-06-071-6/+3
| | | | | | | datetime.datetime and datetime.time could yield insane objects. Thanks to Jiwon Seo for the fix. Bugfix candidate. I'll backport it to 2.3.
* Plug a few memory leaks in utime(). path is allocated from withinNeal Norwitz2004-06-061-4/+12
| | | | | | | PyArg_ParseTuple() since the format is "et" This change should be reviewed carefully. Bugfix candidate.
* Valgrind was reporting an uninitialized read for bad input.Neal Norwitz2004-06-061-1/+2
| | | | | | | | | This fixes the problem and the test passes. I'm not sure the test is really correct though. It seems like it would be better to raise an exception. I think that wasn't done for backwards compatability. Bugfix candidate.
* Fix for #932977: MacOSX does not pass the whole pathname in argv[0] forJack Jansen2004-06-031-0/+17
| | | | | | | | #!-scripts, only the filename part, and this can lead to incorrect initialization of sys.path and sys.executable if there is another python on $PATH before the one used in #!. The fix was picked up from the darwinports crowd, thanks!
* Warn abou missing mutate flag to ioctl. Fixes #696535.Martin v. Löwis2004-06-031-1/+7
|
* Patch #929192: Improvements to bluetooth support.Martin v. Löwis2004-06-031-78/+169
| | | | | | | | Added setbdaddr and makebdaddr. Extended makesockaddr to understand Bluetooth addresses. Changed getsockaddr to expect the Bluetooth addresses as a string, not a six element tuple. Reformatted some of the Bluetooth code to be more consistent with PEP 7.
* Remove pcre moduleAndrew M. Kuchling2004-06-024-5771/+0
|
* - SF #962502: Add two more methods for unicode type; width() andHye-Shik Chang2004-06-022-2/+2
| | | | | | | iswide() for east asian width manipulation. (Inspired by David Goodger, Reviewed by Martin v. Loewis) - Move _PyUnicode_TypeRecord.flags to the end of the struct so that no padding is added for UCS-4 builds. (Suggested by Martin v. Loewis)
* Patch #924294: Do not check for AF_INET6 if it is not defined.Martin v. Löwis2004-06-021-1/+1
| | | | Will backport to 2.3.
* Patch #954115: Fix os.stat handling of UNC roots.Martin v. Löwis2004-06-021-18/+94
| | | | Will backport to 2.3.
* Add weakref support to sockets and re pattern objects.Raymond Hettinger2004-05-312-1/+25
|
* Add weakref support to array.array and file objects.Raymond Hettinger2004-05-311-2/+7
|
* Make sets and deques weak referencable.Raymond Hettinger2004-05-301-2/+8
|
* Band-aid type fix forMichael W. Hudson2004-05-261-0/+19
| | | | | | | [ 728330 ] Don't define _SGAPI on IRIX The Right Thing would be nice, for now this'll do. At least it isn't going to break anything *other* than IRIX...
* stupid, stupid, stupid... raw_input() already supports readline() if theSkip Montanaro2004-05-241-23/+0
| | | | readline module is loaded.
* Exposed readline() function from the readline module.Skip Montanaro2004-05-231-0/+23
|
* Set data pointer to NULL after an error; this keeps the mmap_dealloc() ↵Andrew M. Kuchling2004-05-191-0/+1
| | | | | | function from trying to do msync(-1);munmap(-1). 2.3 bugfix candidate, but this bug isn't critical enough that the fix has to go into 2.3.4
* SF patch #872326: Generator expression implementationRaymond Hettinger2004-05-191-6/+115
| | | | | | | | | | | | | | (Code contributed by Jiwon Seo.) The documentation portion of the patch is being re-worked and will be checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's rationale for the design decisions on binding behavior (as described in in his patch comments and in discussions on python-dev). The test file, test_genexps.py, is written in doctest format and is meant to exercise all aspects of the the patch. Further additions are welcome from everyone. Please stress test this new feature as much as possible before the alpha release.
* Make type check work with subclassesRaymond Hettinger2004-05-181-1/+2
|
* Make sure "del d[n]" is properly supported. Was necessary because theRaymond Hettinger2004-05-121-0/+41
| | | | | | same method that implements __setitem__ also implements __delitem__. Also, there were several good use cases (removing items from a queue and implementing Forth style stack ops).
* In order to fix SF bug # 824977, we replace calloc()/free() calls inBarry Warsaw2004-05-111-9/+16
| | | | | | | binascii_a2b_qp() and binascii_b2a_qp() with calls to PyMem_Malloc() and PyMem_Free(). These won't return NULL unless the allocations actually fail, so it won't trigger a bogus memory error on some platforms <cough>AIX</cough> when passed a length of zero.
* SF #832236: merge from release23-maint branch: wrap a bunch ofGreg Ward2004-05-111-0/+18
| | | | | _EXPORT_INT calls in #ifdef's, to avoid breaking the build on MkLinux (Linux 2.0).
* SF #950057: itertools.chain doesn't "process" exceptions as they occurRaymond Hettinger2004-05-081-0/+12
| | | | | | | Both cycle() and chain() were handling exceptions only when switching input sources. The patch makes the handle more immediate. Will backport.
* Fix _sre.CODESIZE on 64-bit machines in UCS-4 mode. Fixes #931848.Martin v. Löwis2004-05-071-1/+1
| | | | Backported to 2.3.
* Fix [ 947405 ] os.utime() raises bad exception for unicode filenamesMark Hammond2004-05-041-1/+6
|
* Correct the file name of _heapq module.Hye-Shik Chang2004-04-251-0/+0
|
* * Restore the pure python version of heapq.py.Raymond Hettinger2004-04-191-364/+0
| | | | * Mark the C version as private and only use when available.
* * Restore the pure python version of heapq.py.Raymond Hettinger2004-04-191-0/+364
| | | | * Mark the C version as private and only use when available.
* Special case normalization of empty strings. Fixes #924361.Martin v. Löwis2004-04-171-0/+7
| | | | Backported to 2.3.
* Change two instance of format strings for PyString_FromFormat() to use %ldBrett Cannon2004-04-131-2/+2
| | | | instead of %d .
* * Add unittests for iterators that report their lengthRaymond Hettinger2004-04-121-0/+2
| | | | | | * Document the differences between them * Fix corner cases covered by the unittests * Use Py_RETURN_NONE where possible for dictionaries
* Fixes for AF_UNIX support on OS/2:Andrew MacIntyre2004-04-111-0/+4
| | | | | | | | | - return the full size of the sockaddr_un structure, without which bind() fails with EINVAL; - set test_socketserver to use a socket name that meets the form required by the underlying implementation; - don't bother exercising the forking AF_UNIX tests on EMX - its fork() can't handle the stress.
* Provide more information representations of repeat() and count().Raymond Hettinger2004-04-081-2/+27
|
* OS/2's TCP/IP stack supports AF_UNIX sockets, with the limitation thatAndrew MacIntyre2004-04-041-4/+4
| | | | | the socket name must start with /socket32/. Unlike Unix systems, this file never exists in the file system.
* OS/2 has support for spawnvp() and spawnvpe() in the C libraries suppliedAndrew MacIntyre2004-04-041-0/+229
| | | | | | | with major C compilers (VACPP, EMX+gcc and [Open]Watcom). Also tidy up the export of spawn*() symbols in the os module to match what is found/implemented.
* OS/2 VACPP build updates/fixesAndrew MacIntyre2004-03-291-1/+1
|
* A few more PyThreadState_Get to PyThreadState_GET conversionsNicholas Bastin2004-03-252-2/+2
|
* Changed random calls to PyThreadState_Get() to use the macroNicholas Bastin2004-03-241-1/+1
|
* Make socket.sslerror a subclass of socket.error .Brett Cannon2004-03-233-1/+6
| | | | Added socket.error to the socket module's C API.
* Patch #871657: Set EDOM for `nan' return values on FreeBSD and OpenBSD.Hye-Shik Chang2004-03-221-5/+5
| | | | This fixes a problem that math.sqrt(-1) doesn't raise math.error.
* Added configure check for broken poll() on some unix systems (MacOS X 10.3)Nicholas Bastin2004-03-211-6/+6
| | | | Fixes SF Bug #850981
* SF bug 847019 datetime.datetime initialization needs more strict checkingTim Peters2004-03-211-2/+10
| | | | | | | | | It's possible to create insane datetime objects by using the constructor "backdoor" inserted for fast unpickling. Doing extensive range checking would eliminate the backdoor's purpose (speed), but at least a little checking can stop honest mistakes. Bugfix candidate.