summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* SF patch #489173: Make os.spawnv not block the interpreter, fromTim Peters2001-12-071-3/+10
| | | | | | | | | | | | Anthony Roach. Release the global interpreter lock around platform spawn calls. Bugfix candidate? Hard to say; I favor "yes, bugfix". These clearly *should* have been releasing the GIL all along, if for no other reason than compatibility with the similar os.system(). But it's possible some program out there is (a) multithreaded, (b) calling a spawn function with P_WAIT, and (c) relying on the spawn call to block all their threads until the spawned program completes. I think it's very unlikely anyone is doing that on purpose, but someone may be doing so by accident.
* O_cwrite(): rewrote for clarity, replacing all the (Oobject *)selfGuido van Rossum2001-12-071-16/+17
| | | | | | | | | | | casts with a variable oself that has the proper type. A smart compiler may put this thing into a register. (I'm not sure what good this does except satisfy my desire to understand this function; I got a report about an uninitialized read from Insure++ about this function and it hurt my eyes to even look at it. I gotta run away or I'll get tempted to reformat the entire file...)
* Fix for #489672 (Neil Norwitz): memory leak in test_sre.Guido van Rossum2001-12-071-1/+4
| | | | | | | | | (At least for the repeatable test case that Tim produced.) pattern_subx(): Add missing DECREF(filter) in both exit branches (normal and error return). Also fix a DECREF(args) that should certainly be a DECREF(match) -- because it's inside if (!args) and right after allocation of match.
* audioop_ratecv() again: settle for a sloppier upper bound that's lessTim Peters2001-12-071-34/+19
| | | | obnoxious to compute and easier to explain. No compromise on safety.
* Undefine addrinfo.h constants if the system header defined them.Martin v. Löwis2001-12-061-4/+35
| | | | Fixes #486099.
* Fix [ #489673 ] memory leak in test_symtable: Free the st_future slot.Jeremy Hylton2001-12-061-0/+1
| | | | | | | The st_future slot of the symtable is not freed by PySymtable_Free() because it is shared by the symtable and compiling structs in compiel.c. Since it is shared, it is explicitly deallocated when the compiling struct is freed.
* SF bug #488514: -Qnew needs workTim Peters2001-12-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Big Hammer to implement -Qnew as PEP 238 says it should work (a global option affecting all instances of "/"). pydebug.h, main.c, pythonrun.c: define a private _Py_QnewFlag flag, true iff -Qnew is passed on the command line. This should go away (as the comments say) when true division becomes The Rule. This is deliberately not exposed to runtime inspection or modification: it's a one-way one-shot switch to pretend you're using Python 3. ceval.c: when _Py_QnewFlag is set, treat BINARY_DIVIDE as BINARY_TRUE_DIVIDE. test_{descr, generators, zipfile}.py: fiddle so these pass under -Qnew too. This was just a matter of s!/!//! in test_generators and test_zipfile. test_descr was trickier, as testbinop() is passed assumptions that "/" is the same as calling a "__div__" method; put a temporary hack there to call "__truediv__" instead when the method name is "__div__" and 1/2 evaluates to 0.5. Three standard tests still fail under -Qnew (on Windows; somebody please try the Linux tests with -Qnew too! Linux runs a whole bunch of tests Windows doesn't): test_augassign test_class test_coercion I can't stay awake longer to stare at this (be my guest). Offhand cures weren't obvious, nor was it even obvious that cures are possible without major hackery. Question: when -Qnew is in effect, should calls to __div__ magically change into calls to __truediv__? See "major hackery" at tail end of last paragraph <wink>.
* audioop_ratecv(): I left a potentially unsafe multiply uncheckedTim Peters2001-12-051-15/+15
| | | | | yesterday -- repair that. Also renamed the silly size_times_nchannels to bytes_per_frame.
* Fix memory leak in the parser module: There were two leaks inFred Drake2001-12-051-5/+22
| | | | | | parser_tuple2st() and a failure to propogate an error in build_node_children() (masking yet another leak, of course!). This closes SF bug #485133 (confirmed by Insure++).
* SF bug 482574: audioop.ratecv crashes.Tim Peters2001-12-051-6/+62
| | | | | | | | | | | | Bugfix candidate. A numerically naive computation of output buffer size caused crashes and spurious MemoryErrors for reasonable arguments. audioop_ratecv(): Avoid spurious overflow by careful reworking of the buffer size computations, triggering MemoryError if and only if the final buffer size can't be represented in a C int (although PyString_FromStringAndSize may legitimately raise MemoryError even if it does fit in a C int). All reasonable arguments should work as intended now, and all unreasonable arguments should be cuaght.
* Make sure to propogate errors that arise when profiling data cannot beFred Drake2001-12-041-71/+112
| | | | | written to the log file, and turn off the profiler. This closes SF bug #483925.
* More sprintf -> PyOS_snprintf.Tim Peters2001-12-041-2/+3
|
* posix_execve(), posix_spawnve(), posix_putenv():Tim Peters2001-12-031-6/+14
| | | | | sprintf -> PyOS_snprintf. This is the last of this stuff I intend to do.
* Changed logic for finding python home in Mac OS X framework Pythons.Jack Jansen2001-12-021-47/+45
| | | | | | Now sys.executable points to the executable again, in stead of to the shared library. The latter is used only for locating the python home.
* Check for NULL return value of PyList_New (follow-up to patch #486743).Martin v. Löwis2001-12-021-0/+3
|
* Patch #481718: Time module doc string changes.Martin v. Löwis2001-12-021-2/+4
|
* Patch #486743: remove bad INCREF, propagate exception in append_objects.Martin v. Löwis2001-12-021-6/+11
|
* Remove INET6 define. Use ENABLE_IPV6 instead.Martin v. Löwis2001-12-023-33/+33
|
* unicodedata_decomposition(): sprintf -> PyOS_snprintf.Tim Peters2001-11-301-2/+4
|
* Use identity instead of equality when looking for referrers. Fixes #485781.Martin v. Löwis2001-11-291-3/+4
|
* More sprintf -> PyOS_snprintf.Tim Peters2001-11-284-7/+11
|
* Use PyOS_snprintf() instead of sprintf().Jeremy Hylton2001-11-281-4/+4
|
* Repair a botched PyOS_snprintf conversion.Tim Peters2001-11-281-1/+1
|
* sprintf -> PyOS_snprintf in some "obviously safe" cases.Tim Peters2001-11-2813-36/+50
| | | | | Also changed <>-style #includes to ""-style in some places where the former didn't make sense.
* Fixes for possible buffer overflows in sprintf() usages.Marc-André Lemburg2001-11-283-4/+4
|
* Fix docstring typoAndrew M. Kuchling2001-11-281-1/+1
|
* Correct typo. Fixes #484611.Martin v. Löwis2001-11-241-1/+1
|
* Rename get_referents to get_referrers. Fixes #483815.Martin v. Löwis2001-11-241-12/+12
|
* Test for negative buffer sizes. Fixes #482871.Martin v. Löwis2001-11-191-0/+5
|
* assert.h was not always included by Python.h; make sure we import it forFred Drake2001-11-181-0/+3
| | | | older versions. (Thanks to Martijn Faassen.)
* A change to sync with pickle.py:Barry Warsaw2001-11-151-8/+0
| | | | | | | | | | find_class(): We no longer mask all exceptions[1] by transforming them into SystemError. The latter is definitely not the right thing to do, so we let any exceptions that occur in the PyObject_GetAttr() call to simply propagate up if they occur. [1] Note that pickle only masked ImportError, KeyError, and AttributeError, but cPickle masked all exceptions.
* CVS patch #477161: New "access" keyword for mmap, from Jay T Miller.Tim Peters2001-11-131-69/+166
| | | | | | | | | | This gives mmap() on Windows the ability to create read-only, write- through and copy-on-write mmaps. A new keyword argument is introduced because the mmap() signatures diverged between Windows and Unix, so while they (now) both support this functionality, there wasn't a way to spell it in a common way without introducing a new spelling gimmick. The old spellings are still accepted, so there isn't a backward- compatibility issue here.
* new_code(): The last patch to this left behind an unreferenced local;Tim Peters2001-11-131-1/+0
| | | | deleted its declaration.
* load_string(): Force use of unsigned compare in a context that wasTim Peters2001-11-121-6/+8
| | | | clearly (but incorrectly) assuming it.
* Limit string size on one-character-strings. Fixes #480384.Martin v. Löwis2001-11-111-2/+2
|
* Patch in bug report #477700: Fix memory leaks in gdbm & curses.Martin v. Löwis2001-11-112-3/+5
|
* Patch #473265: UpdatePairedHandlers nonsensical.Martin v. Löwis2001-11-101-3/+3
|
* Merge 1.42 from PyXML: Flag errors resulting from argument conversion problems.Martin v. Löwis2001-11-101-2/+1
| | | | Fixes problem with not detecting UTF-8 errors.
* Use PyObject_CheckReadBuffer().Jeremy Hylton2001-11-091-6/+1
|
* Fix memory leak. This is part of SF patch #478006.Fred Drake2001-11-091-0/+1
|
* Fix memory leak. This is (very!) similar to part of SF patch #478006.Fred Drake2001-11-091-0/+1
|
* Fixes to compile cPickle.c & socketmodule.c on cygwin and possiblyMichael W. Hudson2001-11-092-5/+10
| | | | | other platforms that have funny ideas about whether addresses of functions in dlls are compile-time constants.
* Fix memory leaks detecting in bug report #478003.Martin v. Löwis2001-11-072-5/+11
|
* Remove obsolete e-mail addressAndrew M. Kuchling2001-11-051-1/+1
|
* SF patch 473749 compile under OS/2 VA C++, from Michael Muller.Tim Peters2001-11-051-1/+4
| | | | Changes enabling Python to compile under OS/2 Visual Age C++.
* Correct argument parsing for alp_getstatus, which is METH_VARARGS.Martin v. Löwis2001-11-031-1/+1
|
* Patch #474169: Move fdopen calls out of critical section.Martin v. Löwis2001-11-021-4/+8
|
* Correct getnameinfo refcounting and tuple parsing. Fixes #476648.Martin v. Löwis2001-11-021-6/+4
|
* Simplify initmd5() to use PyModule_AddIntConstant().Fred Drake2001-11-021-3/+2
|
* Clean up a Tab inconsistency.Fred Drake2001-11-021-4/+2
| | | | Simplfy the insint() macro to use PyModule_AddIntConstant().