summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Attempt to make all the various string *strip methods the same.Neal Norwitz2003-04-106-58/+64
| | | | | | | | | | | * Doc - add doc for when functions were added * UserString * string object methods * string module functions 'chars' is used for the last parameter everywhere. These changes will be backported, since part of the changes have already been made, but they were inconsistent.
* Move declaration of enc to scope where it is usedNeal Norwitz2003-04-101-2/+1
|
* Add a space after expression to be consistentNeal Norwitz2003-04-101-1/+1
|
* PyErr_NormalizeException(): in the type==NULL test, we should simplyGuido van Rossum2003-04-101-3/+2
| | | | | | | | return. Setting an exception can mess with the exception state, and continuing is definitely wrong (since type is dereferenced later on). Some code that calls this seems to be prepared for a NULL exception type, so let's be safe rather than sorry and simply assume there's nothing to normalize in this case.
* hoist contents of csv submodule up to the package levelSkip Montanaro2003-04-102-1/+2
|
* SF patch #718867: Fix reference leak for time.strptimeRaymond Hettinger2003-04-101-1/+4
| | | | (contributed by Brett Cannon)
* Make Unpickler objects colletable.Jeremy Hylton2003-04-091-23/+65
| | | | Bugfix candidate.
* Make Picklers collectable.Jeremy Hylton2003-04-091-5/+45
| | | | Bug fix candidate.
* Missing DECREF.Jeremy Hylton2003-04-091-0/+1
|
* Patch #718551: cygwinccompiler.get_versions() patchJason Tishler2003-04-091-3/+3
| | | | | | | | | | The cygwinccompiler.get_versions() function only handles versions numbers of the form "x.y.z". The attached patch enhances get_versions() to handle "x.y" too (i.e., the ".z" is optional). This change causes the unnecessary "--entry _DllMain@12" link option to be suppressed for recent Cygwin and Mingw toolchains. Additionally, it directs recent Mingw toolchains to use gcc instead of dllwrap during linking.
* Add test for MessageBeep()Guido van Rossum2003-04-091-1/+13
|
* - New function winsound.MessageBeep() wraps the Win32 APIGuido van Rossum2003-04-091-1/+2
| | | | MessageBeep().
* Add MessageBeep() API.Guido van Rossum2003-04-092-2/+23
|
* Detabified.Guido van Rossum2003-04-091-20/+5
| | | | Removed dead code.
* Make it possible to call instancemethod() with 2 arguments.Guido van Rossum2003-04-091-2/+2
|
* Reformat a few docstrings that caused line wraps in help() output.Guido van Rossum2003-04-092-12/+12
|
* Fix two crashes on Windows:Guido van Rossum2003-04-091-2/+2
| | | | | - CHECK_VALID() was checking the wrong value for a closed fd - fseek(&_iob[fileno], ...) doesn't work for fileno >= 20
* Various improvements to the way the table is formatted, to deal withGuido van Rossum2003-04-091-21/+36
| | | | exceptionally large totals etc.
* - New function sys.call_tracing() allows pdb to debug codeGuido van Rossum2003-04-095-0/+78
| | | | | | recursively. - pdb has a new command, "debug", which lets you step through arbitrary code from the debugger's (pdb) prompt.
* Minor markup adjustments.Fred Drake2003-04-091-3/+2
|
* Try to discourage use of PyObject_Type().Guido van Rossum2003-04-091-0/+5
|
* Don't use (PyObject *)PyObject_Type(x). It is a leaky and verbose wayGuido van Rossum2003-04-091-2/+2
| | | | of saying x->ob_type.
* Re-indent example; fix typoAndrew M. Kuchling2003-04-091-4/+4
|
* property_traverse() should also traverse into prop_doc -- there's noGuido van Rossum2003-04-091-0/+1
| | | | | typecheck that guarantees it's a string, and BTW string subclasses could hide references.
* Patch #709178: remove -static option from cygwinccompilerJason Tishler2003-04-091-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, the cygwinccompiler.py compiler handling in distutils is invoking the cygwin and mingw compilers with the -static option. Logically, this means that the linker should choose to link to static libraries instead of shared/dynamically linked libraries. Current win32 binutils expect import libraries to have a .dll.a suffix and static libraries to have .a suffix. If -static is passed, it will skip the .dll.a libraries. This is pain if one has a tree with both static and dynamic libraries using this naming convention, and wish to use the dynamic libraries. The -static option being passed in distutils is to get around a bug in old versions of binutils where it would get confused when it found the DLLs themselves. The decision to use static or shared libraries is site or package specific, and should be left to the setup script or to command line options.
* Created a minimal MacOSX section.Jack Jansen2003-04-091-92/+176
|
* Detabbed.Jack Jansen2003-04-0923-7956/+7970
|
* Remove the --verify option in favor of the standard -n/--dry-run optionAndrew M. Kuchling2003-04-091-4/+1
|
* Lots of small markup adjustments.Fred Drake2003-04-092-113/+118
|
* Add dependency information for the hotshot package docs.Fred Drake2003-04-091-0/+1
|
* extra punctuation removedAnthony Baxter2003-04-091-1/+1
|
* Add dependency information for the timeit module docs.Fred Drake2003-04-091-0/+1
|
* + libtimeitSkip Montanaro2003-04-091-0/+1
|
* doc for timeit module/script - mostly just a recast of Tim's docstringSkip Montanaro2003-04-091-0/+184
|
* Make staticmethods and classmethods participate in GC.Jeremy Hylton2003-04-081-8/+45
| | | | | | | | | | If a class was defined inside a function, used a static or class method, and used super() inside the method body, it would be caught in an uncollectable cycle. (Simplified version: The static/class method object would point to a function object with a closure that referred to the class.) Bugfix candidate.
* tentative fix for #712322: modification time stamp checking failedJust van Rossum2003-04-081-1/+1
| | | | when DST began.
* install timeit.py as a command line scriptSkip Montanaro2003-04-081-0/+1
|
* add a #! line for unix weeniesSkip Montanaro2003-04-081-0/+2
|
* New tests identical to boom and boom2, except using new-style classes.Tim Peters2003-04-081-0/+44
| | | | | | | These never failed in 2.3, and the tests confirm it. They still blow up in the 2.2 branch, despite that all the gc-vs-__del__ fixes from 2.3 have been backported (and this is expected -- 2.2 needs more work than 2.3 needed).
* correct a couple docstring nitsSkip Montanaro2003-04-081-3/+3
|
* Typo repair.Tim Peters2003-04-081-2/+2
|
* Added example of using positional and keyword args with atexit.register().Fred Drake2003-04-081-0/+15
| | | | Based on a suggestion from a reader.
* Markup fix.Fred Drake2003-04-081-2/+2
|
* s/referrents/referents/g. Gotta love that referrers remains rife with rs.Tim Peters2003-04-084-22/+22
|
* Finished implementing gc.get_referrents(): dealt with error and endTim Peters2003-04-084-7/+58
| | | | cases, wrote docs, added a test.
* Comment repair; no semantic changes.Tim Peters2003-04-071-4/+5
|
* Reworked has_finalizer() to use the new _PyObject_Lookup() insteadTim Peters2003-04-073-78/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of PyObject_HasAttr(); the former promises never to execute arbitrary Python code. Undid many of the changes recently made to worm around the worst consequences of that PyObject_HasAttr() could execute arbitrary Python code. Compatibility is hard to discuss, because the dangerous cases are so perverse, and much of this appears to rely on implementation accidents. To start with, using hasattr() to check for __del__ wasn't only dangerous, in some cases it was wrong: if an instance of an old- style class didn't have "__del__" in its instance dict or in any base class dict, but a getattr hook said __del__ existed, then hasattr() said "yes, this object has a __del__". But instance_dealloc() ignores the possibility of getattr hooks when looking for a __del__, so while object.__del__ succeeds, no __del__ method is called when the object is deleted. gc was therefore incorrect in believing that the object had a finalizer. The new method doesn't suffer that problem (like instance_dealloc(), _PyObject_Lookup() doesn't believe __del__ exists in that case), but does suffer a somewhat opposite-- and even more obscure --oddity: if an instance of an old-style class doesn't have "__del__" in its instance dict, and a base class does have "__del__" in its dict, and the first base class with a "__del__" associates it with a descriptor (an object with a __get__ method), *and* if that descriptor raises an exception when __get__ is called, then (a) the current method believes the instance does have a __del__, but (b) hasattr() does not believe the instance has a __del__. While these disagree, I believe the new method is "more correct": because the descriptor *will* be called when the object is destructed, it can execute arbitrary Python code at the time the object is destructed, and that's really what gc means by "has a finalizer": not specifically a __del__ method, but more generally the possibility of executing arbitrary Python code at object destruction time. Code in a descriptor's __get__() executed at destruction time can be just as problematic as code in a __del__() executed then. So I believe the new method is better on all counts. Bugfix candidate, but it's unclear to me how all this differs in the 2.2 branch (e.g., new-style and old-style classes already took different gc paths in 2.3 before this last round of patches, but don't in the 2.2 branch).
* New private API function _PyInstance_Lookup. gc will use this to figureTim Peters2003-04-072-0/+33
| | | | out whether __del__ exists, without executing any Python-level code.
* add note suggested by rhettinger about example.Anthony Baxter2003-04-071-0/+3
|
* patch [ 698505 ] docs for hotshot moduleAnthony Baxter2003-04-072-0/+124
|