summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Script to run the pystones "benchmark" under HotShot.Fred Drake2002-07-181-0/+35
|
* Simplify; the low-level log reader is now always a modern iterator,Fred Drake2002-07-181-6/+1
| | | | | and should never return None. (It only did this for an old version of HotShot that was trying to still work with a patched Python 2.1.)
* Expose the fileno() method of the underlying profiler.Fred Drake2002-07-181-0/+4
|
* Expose the fileno() method of the underlying log reader.Fred Drake2002-07-181-6/+4
| | | | | Remove the crufty support for Python's that don't have StopIteration; the HotShot patch for Python 2.1 has not been maintained.
* - When the log reader detects end-of-file, close the file.Fred Drake2002-07-181-45/+84
| | | | | | | | - The log reader now provides a "closed" attribute similar to the profiler. - Both the profiler and log reader now provide a fileno() method. - Use METH_NOARGS where possible, allowing simpler code in the method implementations.
* Remove extraneous semicolon.Jeremy Hylton2002-07-181-1/+1
| | | | (Silences compiler warning for Compaq C++ 6.5 on Tru64.)
* Add default timeout functionality. This adds setdefaulttimeout() andGuido van Rossum2002-07-183-1/+97
| | | | | getdefaulttimeout() functions to the socket and _socket modules, and appropriate tests.
* Gave this a facelift: "/" vs "//", whrandom vs random, etc. BoostedTim Peters2002-07-181-35/+46
| | | | | | | | | | | | | | the default range to end at 2**20 (machines are much faster now). Fixed what was quite a arguably a bug, explaining an old mystery: the "!sort" case here contructs what *was* a quadratic-time disaster for the old quicksort implementation. But under the current samplesort, it always ran much faster than *sort (the random case). This never made sense. Turns out it was because !sort was sorting an integer array, while all the other cases sort floats; and comparing ints goes much quicker than comparing floats in Python. After changing !sort to chew on floats instead, it's now slower than the random sort case, which makes more sense (but is just a few percent slower; samplesort is massively less sensitive to "bad patterns" than quicksort).
* Gave hotshot.LogReader a close() method, to allow users to close theTim Peters2002-07-182-4/+4
| | | | | file object that LogReader opens. Used it then in test_hotshot; the test passes again on Windows. Thank Guido for the analysis.
* We're no longer trying to support older Python versions with thisGuido van Rossum2002-07-181-7/+2
| | | | codebase, so get rid of the pre-2.2 contingency.
* test_hotshot fails on Windows now. Added XXX comment explaining why,Tim Peters2002-07-171-0/+4
| | | | and that I don't know how to fix it. Fred?
* (py-pychecker-run): Use the last pychecker invocation as the defaultBarry Warsaw2002-07-171-1/+3
| | | | contents of the next command.
* Added documentation for the buffer_text and related attributes of theFred Drake2002-07-171-0/+23
| | | | xmlparser object provided by pyexpat, new in Python 2.3.
* Mark the closed attribute of the profiler with PyDoc_STR(), and addedFred Drake2002-07-171-2/+3
| | | | a docstring for the info attribute of the logreader object.
* Added a docstring for the closed attribute.Fred Drake2002-07-171-4/+9
| | | | | | write_header(): When we encounter a non-string object in sys.path, record a fairly mindless placeholder rather than dying. Possibly could record the repr of the object found, but not clear whether that matters.
* SF patch 552161 - Py_AddPendingCall doesn't unlock on fail (DanielGuido van Rossum2002-07-171-1/+3
| | | | | | Dunbar) Can't test this, but looks correct to me.
* Removed more stray instances of statichere, but left _sre.c alone.Tim Peters2002-07-178-9/+9
|
* Change staticforward and statichere to just use static.Fred Drake2002-07-171-2/+2
| | | | Removed ^M from some line-ends.
* Remove now-obsolete staticforward/statichere discussion.Fred Drake2002-07-171-10/+2
|
* staticforward bites the dust.Jeremy Hylton2002-07-1761-222/+126
| | | | | | | | | | | | | | | The staticforward define was needed to support certain broken C compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the static keyword when it was used with a forward declaration of a static initialized structure. Standard C allows the forward declaration with static, and we've decided to stop catering to broken C compilers. (In fact, we expect that the compilers are all fixed eight years later.) I'm leaving staticforward and statichere defined in object.h as static. This is only for backwards compatibility with C extensions that might still use it. XXX I haven't updated the documentation.
* Some modernization. Get rid of the redundant next() method. AlwaysGuido van Rossum2002-07-171-66/+37
| | | | | assume tp_iter and later fields exist. Use PyObject_GenericGetAttr instead of providing our own tp_getattr hook.
* Add a test for the 'closed' attribute on the C-profiler object.Guido van Rossum2002-07-171-0/+3
|
* Add missing comma.Jeremy Hylton2002-07-171-1/+1
|
* Add test_zlib and test_struct to list of slow testsJeremy Hylton2002-07-171-1/+1
|
* Windows has no actual need for BAD_STATIC_FORWARD, so got rid of it.Tim Peters2002-07-171-4/+0
|
* Add a rather generous set of tests allowed to be skipped on sunos5.Guido van Rossum2002-07-171-0/+23
|
* Remove RCSId; this produces annoying warnings.Fred Drake2002-07-171-3/+0
| | | | | This is already removed from Expat 1.95.4, so the problem will not recur when we update.
* Wipe out some warnings about non-ANSI code and an unsafe arg toGuido van Rossum2002-07-171-7/+4
| | | | isdigit().
* reduce(): Clarified what is returned in the case of a sequence 1 item long andFred Drake2002-07-171-6/+6
| | | | initial/default value.
* We need to (require 'compile) to guarantee that compile-internal isBarry Warsaw2002-07-171-0/+1
| | | | defined. /Really/ closes SF # 580631.
* Use sys.executable to run Python, as suggested by Neal Norwitz.Tim Peters2002-07-171-2/+3
|
* There's no need for generators to define an explicit next() method.Tim Peters2002-07-171-22/+1
|
* Bunch of tests to make sure that StopIteration is a sink state.Guido van Rossum2002-07-161-0/+76
|
* Fix typos and such caught by the pycheckerbot.Jeremy Hylton2002-07-161-3/+3
|
* Whitespace normalization.Tim Peters2002-07-1614-50/+48
|
* Send HTTP requests with a single send() call instead of many.Jeremy Hylton2002-07-161-15/+26
| | | | | | | | | | | | | | | | | | | | | | The implementation now stores all the lines of the request in a buffer and makes a single send() call when the request is finished, specifically when endheaders() is called. This appears to improve performance. The old code called send() for each line. The sends are all short, so they caused bad interactions with the Nagle algorithm and delayed acknowledgements. In simple tests, the second packet was delayed by 100s of ms. The second send was delayed by the Nagle algorithm, waiting for the ack. The delayed ack strategy delays the ack in hopes of piggybacking it on a data packet, but the server won't send any data until it receives the complete request. This change minimizes the problem that Nagle + delayed ack will cause a problem, although a request large enough to be broken into two packets will still suffer some delay. Luckily the MSS is large enough to accomodate most single packets. XXX Bug fix candidate?
* Remove the next() method -- one is supplied automatically byGuido van Rossum2002-07-161-16/+11
| | | | | | | | PyType_Ready() because the tp_iternext slot is set (fortunately, because using the tp_iternext implementation for the the next() implementation is buggy). Also changed the allocation order in enum_next() so that the underlying iterator is only moved ahead when we have successfully allocated the result tuple and index.
* Remove the next() method -- one is supplied automatically byGuido van Rossum2002-07-161-10/+1
| | | | | | PyType_Ready() because the tp_iternext slot is set. Also removed the redundant (and expensive!) call to raise StopIteration from rangeiter_next().
* Make StopIteration a sink state. This is done by clearing out theGuido van Rossum2002-07-161-28/+11
| | | | | | | | | | di_dict field when the end of the list is reached. Also make the error ("dictionary changed size during iteration") a sticky state. Also remove the next() method -- one is supplied automatically by PyType_Ready() because the tp_iternext slot is set. That's a good thing, because the implementation given here was buggy (it never raised StopIteration).
* Make StopIteration a sink state. This is done by clearing out theGuido van Rossum2002-07-161-62/+47
| | | | | | | | | | object references (it_seq for seqiterobject, it_callable and it_sentinel for calliterobject) when the end of the list is reached. Also remove the next() methods -- one is supplied automatically by PyType_Ready() because the tp_iternext slot is set. That's a good thing, because the implementation given here was buggy (it never raised StopIteration).
* Whitespace normalization.Guido van Rossum2002-07-161-66/+66
|
* Make StopIteration a sink state. This is done by clearing out theGuido van Rossum2002-07-161-11/+10
| | | | | | | | | it_seq field when the end of the list is reached. Also remove the next() method -- one is supplied automatically by PyType_Ready() because the tp_iternext slot is set. That's a good thing, because the implementation given here was buggy (it never raised StopIteration).
* Record the decision that StopIteration is a sink state (see recentGuido van Rossum2002-07-161-0/+7
| | | | | | discussion in python-dev with subject "Termination of two-arg iter()"). Implementation will follow.
* Given the persistent id code a shot at a class before calling save_global().Jeremy Hylton2002-07-162-10/+10
| | | | | Some persistent picklers (well, probably, the *only* persistent pickler) would like to pickle some classes in a special way.
* The object returned by tp_new() may not have a tp_init.Jeremy Hylton2002-07-161-1/+2
| | | | | | If the object is an ExtensionClass, for example, the slot is not even defined. So we must check that the type has the slot (implied by HAVE_CLASS) before calling tp_init().
* The atexit module effectively turned itself off if sys.exitfunc alreadyTim Peters2002-07-163-24/+53
| | | | | | | | | | | existed at the time atexit first got imported. That's a bug, and this fixes it. Also reworked test_atexit.py to test for this too, and to stop using an "expected output" file, and to test what actually happens at exit instead of just simulating what it thinks atexit will do at exit. Bugfix candidate, but it's messy so I'll backport to 2.2 myself.
* (py-imenu-create-index-function): Skip over stuff that looks like codeBarry Warsaw2002-07-161-0/+2
| | | | | but which is in a comment or string. Closes SF bug # 572341 reported by Adrian van den Dries.
* Make list_iter() really static.Guido van Rossum2002-07-161-1/+1
|
* (py-pychecker-run): Thomas Heller points out that this function messesBarry Warsaw2002-07-161-2/+2
| | | | | | up the compile command's history. Fix that by using compile-internal. Fixes SF bug # 580631
* valid_identifier(): use an unsigned char* so that isalpha() will doGuido van Rossum2002-07-161-2/+2
| | | | the right thing even if char is unsigned.