summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add a blurb on the 3 Windows bugs I worked on over the last couple of days.Mark Hammond2002-07-161-0/+8
|
* Fix bug 581232 - [Windows] Can not interrupt time.sleep()Mark Hammond2002-07-161-3/+46
| | | | time.sleep() will now be interrupted on the main thread when Ctrl+C is pressed. Other threads are never interrupted.
* Added the "weird" ccTLDs ac, gg, im, and je. These are not recognizedBarry Warsaw2002-07-151-5/+17
| | | | | | by ISO 3166 as country codes, but the are reserved by IANA nonetheless. The commonly used uk ccTLD is part of this group, near as I can tell.
* XXXROUNDUP(): Turns out this fixed Andrew MacIntyre's memory-mgmtTim Peters2002-07-151-10/+33
| | | | | | | | | | disaster too, so this change is here to stay. Beefed up the comments and added some stats Andrew reported. Also a small change to the macro body, to make it obvious how XXXROUNDUP(0) ends up returning 0. See SF patch 578297 for context. Not a bugfix candidate, as the functional changes here have already been backported to the 2.2 line (this patch just improves clarity).
* Added Andrew MacIntyre -- overdue!Tim Peters2002-07-151-1/+2
|
* /F revealed that ShellExecute() only requires shellapi.h, not theTim Peters2002-07-151-1/+2
| | | | full-blown windows.h, so changed accordingly.
* Clarify that the description of sys.path[0] is only valid upon programGuido van Rossum2002-07-151-2/+5
| | | | start-up.
* Tim_one's change to aggressively overallocate nodes when adding childAndrew MacIntyre2002-07-151-9/+2
| | | | | | nodes (in Parser/node.c) resolves the gross memory consumption exhibited by the EMX runtime on OS/2, so the test should be exercised on this platform.
* docompare(): Another reasonable optimization from Jonathan Hogg for theTim Peters2002-07-152-1/+2
| | | | | | explicit comparison function case: use PyObject_Call instead of PyEval_CallObject. Same thing in context, but gives a 2.4% overall speedup when sorting a list of ints via list.sort(__builtin__.cmp).
* Fix bug 231273 - [windows] os.popen doens't kill subprocess when interruptedMark Hammond2002-07-141-1/+1
| | | | Don't pass CREATE_NEW_CONSOLE to CreateProcess(), meaning our child process is in the same "console group" and therefore interrupted by the same Ctrl+C that interrupts the parent.
* Fix bug 439992 - [win32] KeyboardInterrupt Not Caught.Mark Hammond2002-07-141-0/+33
| | | | This gets us closer to consistent Ctrl+C behaviour on NT and Win9x. NT now reliably generates KeyboardInterrupt exceptions for NT when a file IO operation was aborted. Bugfix candidate
* WINDOWS_LEAN_AND_MEAN: There is no such symbol, although a very fewTim Peters2002-07-144-4/+5
| | | | | | | MSDN sample programs use it, apparently in error. The correct name is WIN32_LEAN_AND_MEAN. After switching to the correct name, in two cases more was needed because the code actually relied on things that disappear when WIN32_LEAN_AND_MEAN is defined.
* SF patch # 580411, move frame macros from frameobject.h into ceval.cNeal Norwitz2002-07-142-23/+10
| | | | | remove unused macros use co alias instead of f->f_code in macros
* Undef MIN and MAX before defining them, to avoid warnings on certainGuido van Rossum2002-07-131-0/+2
| | | | platforms.
* Don't declare a function with staticforward.Jeremy Hylton2002-07-131-2/+2
| | | | | Just declare it static so that lame (BAD_STATIC_FORWARD) compilers don't see a mismatch between the prototype and the function.
* Add more itemsAndrew M. Kuchling2002-07-121-13/+46
| | | | | Use \cfunction instead of \function in various places Add contributor names
* Clarify the return value of __nonzero__(): It *must* be an integer.Fred Drake2002-07-121-3/+3
| | | | Closes SF bug #579991.
* fixed wrong classic MacOS pathname assumptionJust van Rossum2002-07-121-1/+1
|
* Remove httplib from tested modules.Jeremy Hylton2002-07-121-15/+0
| | | | | | | | The test of httplib makes it difficult to maintain httplib. There are two many idioms that pyclbr doesn't seem to understand, and I don't understand how to update these tests to make them work. Also remove commented out test of urllib2.
* Get the meta class inheritance right.Jeremy Hylton2002-07-121-5/+6
|
* Mention new encoding.Marc-André Lemburg2002-07-121-0/+2
|
* Palm OS encoding from Sjoerd MullenderMarc-André Lemburg2002-07-121-0/+67
|
* Change _begin() back to begin().Jeremy Hylton2002-07-122-6/+5
| | | | Client code could create responses explicitly.
* Fernando Pérez of SF bug 579701 fame.Guido van Rossum2002-07-121-0/+1
|
* Fix SF bug 579701 (Fernando Pérez); an input line consisting of one orGuido van Rossum2002-07-121-8/+8
| | | | | | | more spaces only crashed pdb. While I was at it, cleaned up some style nits (spaces between function and parenthesis, and redundant parentheses in if statement).
* minor fixes, removed obsolete warningJust van Rossum2002-07-121-10/+3
|
* Well, Fred never did explain why the code to determine whether theMichael W. Hudson2002-07-121-7/+3
| | | | | | calling Python was installed was so complicated, so I simplified it. This should get the snake-farm's build scripts working again.
* HAVE_LIMITS_H -- raise #error if not defined; limits.h is std CTim Peters2002-07-122-12/+2
| | | | | | ULONG_MAX -- removed; std C requires it in limits.h LONGLONG_MAX -- removed; never used ULONGLONGMAX -- removed; never used