summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Enable GC for new-style instances. This touches lots of files, sinceGuido van Rossum2001-10-0513-26/+90
| | | | | | | | | | | | | | | | | | | | | | many types were subclassable but had a xxx_dealloc function that called PyObject_DEL(self) directly instead of deferring to self->ob_type->tp_free(self). It is permissible to set tp_free in the type object directly to _PyObject_Del, for non-GC types, or to _PyObject_GC_Del, for GC types. Still, PyObject_DEL was a tad faster, so I'm fearing that our pystone rating is going down again. I'm not sure if doing something like void xxx_dealloc(PyObject *self) { if (PyXxxCheckExact(self)) PyObject_DEL(self); else self->ob_type->tp_free(self); } is any faster than always calling the else branch, so I haven't attempted that -- however those types whose own dealloc is fancier (int, float, unicode) do use this pattern.
* With Andrew's blessing: distutils version number is now 1.0.3.Thomas Heller2001-10-051-1/+1
|
* Introduced the oddly-missing PyList_CheckExact(), and used it to replaceTim Peters2001-10-052-1/+2
| | | | a hard-coded type check.
* Explicitely list the metadata attributes to showThomas Heller2001-10-051-295/+304
| | | | | in the gui. Updated to include the new exe-file.
* Get rid of unique local ISSTRICTINT macro in favor of std PyInt_CheckExact.Tim Peters2001-10-051-9/+6
|
* A regexp example was rendered asTim Peters2001-10-051-1/+1
| | | | | | | | | | foo\d when it was clearly intended to render as foo$ Fred, is this a right way to fix it? If not, the earlier place in the same paragraph that does render as foo$ is also wrong.
* SMTPServer.__init__(): Print the start information on the DEBUGSTREAMBarry Warsaw2001-10-051-1/+2
| | | | so that it can be suppressed.
* Remove false statement about running make in the Modules directory.Guido van Rossum2001-10-051-3/+2
|
* Remove some long-unsupported Mac OS modules.Fred Drake2001-10-055-425/+0
| | | | This closes SF patch #460737.
* Frankly, I'd like my "L." as well!Fred Drake2001-10-051-1/+1
|
* Another contributor.Guido van Rossum2001-10-051-1/+2
| | | | Give Fred his Jr.
* Fix typo in docstringAndrew M. Kuchling2001-10-051-1/+1
|
* Document addition of chroot.Martin v. Löwis2001-10-041-0/+2
|
* Add chroot call. Implements feature #459267.Martin v. Löwis2001-10-045-3/+27
|
* Update a couple of old addresses that point to CNRI.Fred Drake2001-10-042-9/+11
|
* Non-failing test for SF bug #467059.Fred Drake2001-10-041-0/+42
|
* Apply modified SF patch 467580: ConfigParser.getboolean(): FALSE, TRUE.Guido van Rossum2001-10-041-6/+8
| | | | | | | | | | | | | | This patch allows ConfigParser.getboolean() to interpret TRUE, FALSE, YES, NO, ON and OFF instead just '0' and '1'. While just allowing '0' and '1' sounds more correct users often demand to use more descriptive directives in configuration files. Instead of forcing every programmer do brew his own solution a system should include the batteries for this. [My modification to the patch is a slight rewording of the docstring and use of lowercase instead of uppercase templates. The code is still case sensitive. GvR.]
* run_suite(): If testclass is not available, provide an even more generalFred Drake2001-10-041-4/+8
| | | | | | | error message. run_unittest(): Provide the testclass to run_suite() so it can construct the error message. This closes SF bug #467763.
* Make new classes dynamic by default.Guido van Rossum2001-10-043-26/+24
|
* Changed the reindenter to strip only trailing spaces and tabs from lines,Tim Peters2001-10-041-3/+16
| | | | | not other control characters string.rstrip() got rid of. This caters to the \f thingies Barry likes putting in Python source files.
* Fix bug in profiler modifications detected only in debug builds.Fred Drake2001-10-041-3/+26
| | | | | | | | | The new profiler event stream includes a "return" event even when an exception is being propogated, but the machinery that called the profile hook did not save & restore the exception. In debug mode, the exception was detected during the execution of the profile callback, which did not have the proper internal flags set for the exception. Saving & restoring the exception state solves the problem.
* TestIterators: Tim Peters suggests a more succinct spelling ofBarry Warsaw2001-10-041-12/+4
| | | | "listify an iterator".
* More test data for test_email.pyBarry Warsaw2001-10-042-0/+49
|
* test_header_splitter(), test_body_line_iterator(): Move the test dataBarry Warsaw2001-10-041-70/+32
| | | | into tests/data/msg_*.txt files.
* Give me back my page breaks.Barry Warsaw2001-10-0412-22/+22
|
* Add note about profiling.Guido van Rossum2001-10-041-0/+15
|
* Script arguments localhost:localport and remotehost:remoteport are nowBarry Warsaw2001-10-041-18/+28
| | | | | | | | | | | | | optional, and default to `localhost' and ports 8025 and 25 respectively. SMTPChannel.__init__(): Calculate __fqdn using socket.getfqdn() instead of gethostby*() and friends. This allows us to run this script even if we don't have access to dns (assuming the localhost is configured properly). Also, restore my precious page breaks. Hands off, oh Whitespace Normalizer!
* Add various typecasts (back and forth from char * to unsigned char *)Greg Ward2001-10-041-5/+5
| | | | to make the SGI C compiler happier (bug #445960).
* Remove a couple of unused local variables (bug #445960, compiler warningsGreg Ward2001-10-041-4/+2
| | | | on IRIX 6.5).
* Updated to reflect the rationalized profiler event reporting.Fred Drake2001-10-041-46/+27
|
* Rationalize the events passed to the profiler (no changes for the tracer).Fred Drake2001-10-042-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | The profiler does not need to know anything about the exception state, so we no longer call it when an exception is raised. We do, however, make sure we *always* call the profiler when we exit a frame. This ensures that timing events are more easily isolated by a profiler and finally clauses that do a lot of work don't have their time mis-allocated. When an exception is propogated out of the frame, the C callback for the profiler now receives a PyTrace_RETURN event with an arg of NULL; the Python-level profile hook function will see a 'return' event with an arg of None. This means that from Python it is impossible for the profiler to determine if the frame exited with an exception or if it returned None, but this doesn't matter for profiling. A C-based profiler could tell the difference, but this doesn't seem important. ceval.c:eval_frame(): Simplify the code in two places so that the profiler is called for every exit from a frame and not for exceptions. sysmodule.c:profile_trampoline(): Make sure we don't expose Python code to NULL; use None instead.
* Add note about profile fix.Guido van Rossum2001-10-041-0/+5
|
* Make clear that tuple() accepts the same kind of arguments as list().Tim Peters2001-10-041-1/+3
|
* Added a little type/class NEWS.Tim Peters2001-10-041-0/+6
|
* This test relied on hard tab characters, so failed after whitespaceTim Peters2001-10-041-5/+5
| | | | normalization. Now uses \t in strings instead of hard tabs.
* class_docstrings(): The new-style class tests should use new-styleTim Peters2001-10-041-4/+4
| | | | classes (sheesh!).
* type_new(): cast PyObject_MALLOC's result to char*, for clarity.Tim Peters2001-10-041-1/+1
|
* Whitespace normalization.Tim Peters2001-10-0418-65/+65
|
* SF bug [#467331] ClassType.__doc__ always None.Tim Peters2001-10-043-7/+59
| | | | | | | | | For a dynamically constructed type object, fill in the tp_doc slot with a copy of the argument dict's "__doc__" value, provided the latter exists and is a string. NOTE: I don't know what to do if it's a Unicode string, so in that case tp_doc is left NULL (which shows up as Py_None if you do Class.__doc__). Note that tp_doc holds a char*, not a general PyObject*.
* Hopefully fix the profiler right. Add a test suite that checks thatGuido van Rossum2001-10-043-18/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it deals correctly with some anomalous cases; according to this test suite I've fixed it right. The anomalous cases had to do with 'exception' events: these aren't generated when they would be most helpful, and the profiler has to work hard to recover the right information. The problems occur when C code (such as hasattr(), which is used as the example here) calls back into Python code and clears an exception raised by that Python code. Consider this example: def foo(): hasattr(obj, "bar") Where obj is an instance from a class like this: class C: def __getattr__(self, name): raise AttributeError The profiler sees the following sequence of events: call (foo) call (__getattr__) exception (in __getattr__) return (from foo) Previously, the profiler would assume the return event returned from __getattr__. An if statement checking for this condition and raising an exception was commented out... This version does the right thing.
* Expand the documentation of the low-level tracing/profiling interface.Fred Drake2001-10-031-2/+23
| | | | This reflects what is currently in CVS, which may change before 2.2 is final.
* Add some more test cases to be sure we do the right thing in various cases.Fred Drake2001-10-031-0/+117
|
* Undo previous patch; it did not quite work out.Fred Drake2001-10-031-1/+1
|
* Fix a spelling error that has been bugging me for longer than I care to admit.Greg Ward2001-10-031-1/+1
|
* Set .addr in a few more places (patch approved by Sam Rushing)Andrew M. Kuchling2001-10-031-0/+2
|
* dynamics(): add a dummy __getattr__ method to the C class so that theGuido van Rossum2001-10-031-0/+5
| | | | | | test for modifying __getattr__ works, now that slot_tp_getattr_hook zaps the slot if there's no hook. Added an XXX comment with a ref back to slot_tp_getattr_hook.
* typeobject.c, slot_tp_gettattr_hook(): fix the speedup hack -- theGuido van Rossum2001-10-031-0/+12
| | | | | | | | test for getattribute==NULL was bogus because it always found object.__getattribute__. Pick it apart using the trick we learned from slot_sq_item, and if it's just a wrapper around PyObject_GenericGetAttr, zap it. Also added a long XXX comment explaining the consequences.
* remove empty __del__ method from BaseRequestHandler to avoid cyclic garbageSkip Montanaro2001-10-031-3/+0
| | | | loss for no reason.
* *EXPERIMENTAL* speedup of slot_sq_item. This sped up the followingGuido van Rossum2001-10-033-40/+96
| | | | | | | | | | | | | | | | | | | | | | | test dramatically: class T(tuple): __dynamic__ = 1 t = T(range(1000)) for i in range(1000): tt = tuple(t) The speedup was about 5x compared to the previous state of CVS (1.7 vs. 8.8, in arbitrary time units). But it's still more than twice as slow as as the same test with __dynamic__ = 0 (0.8). I'm not sure that I really want to go through the trouble of this kind of speedup for every slot. Even doing it just for the most popular slots will be a major effort (the new slot_sq_item is 40+ lines, while the old one was one line with a powerful macro -- unfortunately the speedup comes from expanding the macro and doing things in a way specific to the slot signature). An alternative that I'm currently considering is sketched in PLAN.txt: trap setattr on type objects. But this will require keeping track of all derived types using weak references.
* Made the classmethod docstring test a bit less trivial.Tim Peters2001-10-031-3/+3
|