summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Repair indentation in comment.Tim Peters2001-06-251-2/+9
| | | | Add a temporary driver to help track down remaining leak(s).
* Fix typos in inet_pton/inet_ntop.Martin v. Löwis2001-06-241-2/+3
|
* Provide a definition for offsetof.Martin v. Löwis2001-06-241-0/+8
|
* Emulate inet_{pton,ntop} on systems that don't provide it.Martin v. Löwis2001-06-244-3/+47
|
* Move USE_TOOLBOX_OBJECT_GLUE into acconfig.h.Martin v. Löwis2001-06-241-0/+3
|
* Changed some comments. Removed the caution about clearing globs, sinceTim Peters2001-06-241-3/+3
| | | | clearing a shallow copy _run_examples() makes itself can't hurt anything.
* Clear the copy of the globs dict after running examples. This helps toTim Peters2001-06-241-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | break cycles, which are a special problem when running generator tests that provoke exceptions by invoking the .next() method of a named generator-iterator: then the iterator is named in globs, and the iterator's frame gets a tracekback object pointing back to globs, and gc doesn't chase these types so the cycle leaks. Also changed _run_examples() to make a copy of globs itself, so its callers (direct and indirect) don't have to (and changed the callers to stop making their own copies); *that* much is a change I've been meaning to make for a long time (it's more robust the new way). Here's a way to provoke the symptom without doctest; it leaks at a prodigious rate; if the last two "source" lines are replaced with g().next() the iterator isn't named and then there's no leak: source = """\ def g(): yield 1/0 k = g() k.next() """ code = compile(source, "<source>", "exec") def f(globs): try: exec code in globs except ZeroDivisionError: pass while 1: f(globals().copy()) After this change, running test_generators in an infinite loop still leaks, but reduced from a flood to a trickle.
* doctest systematically leaked memory when handling an exception in anTim Peters2001-06-241-1/+1
| | | | | example (an obvious trackback cycle). Repaired. Bugfix candidate.
* Added a "generate k-combinations of a list" example posted to c.l.py.Tim Peters2001-06-241-1/+49
|
* New tests to provoke SyntaxErrors unique to generators. Minor fiddlingTim Peters2001-06-241-6/+85
| | | | of other tests.
* doctest doesn't handle intentional SyntaxError exceptions gracefully,Tim Peters2001-06-241-1/+1
| | | | | because it picks up the first line of traceback.format_exception_only() instead of the last line. Pick up the last line instead!
* Another variant of the 2-3-5 test, mixing generators with a LazyList class.Tim Peters2001-06-241-0/+37
| | | | | | | Good news: Some of this stuff is pretty sophisticated (read nuts), and I haven't bumped into a bug yet. Bad news: If I run the doctest in an infinite loop, memory is clearly leaking.
* Pure brute-force hackery to allow Python to build on Windows again,Tim Peters2001-06-241-0/+12
| | | | | because I need to make progress and don't have time now to think about whatever it is the new code is trying to accomplish.
* More tests.Tim Peters2001-06-241-1/+68
|
* Add a recursive Sieve of Eratosthenes prime generator. Not practical,Tim Peters2001-06-231-1/+39
| | | | but it's a heck of a good generator exerciser (think about it <wink>).
* Add all the examples from PEP 255, and a few email examples.Tim Peters2001-06-231-2/+183
|
* New std test for generators, initially populated with doctests NeilS putTim Peters2001-06-231-0/+139
| | | | together.
* Properly use &&. Closes bug #434988.Martin v. Löwis2001-06-231-2/+2
|
* Properly use &&. Closes bug #434989.Martin v. Löwis2001-06-231-1/+1
|
* Patch #401196: Configuration machinery for IPv6.Martin v. Löwis2001-06-238-344/+2197
| | | | | Contributed by Jun-ichiro "itojun" Hagino. get{addr,name}info emulation code taken from WIDE.
* Fix typoAndrew M. Kuchling2001-06-232-2/+2
|
* Correct erroneous description of precmd.Eric S. Raymond2001-06-231-2/+6
|
* Change the semantics of "return" in generators, as discussed on theTim Peters2001-06-232-25/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Iterators list and Python-Dev; e.g., these all pass now: def g1(): try: return except: yield 1 assert list(g1()) == [] def g2(): try: return finally: yield 1 assert list(g2()) == [1] def g3(): for i in range(3): yield None yield None assert list(g3()) == [None] * 4 compile.c: compile_funcdef and com_return_stmt: Just van Rossum's patch to compile the same code for "return" regardless of function type (this goes back to the previous scheme of returning Py_None). ceval.c: gen_iternext: take a return (but not a yield) of Py_None as meaning the generator is exhausted.
* Remove some bogus trailing whitespace.Fred Drake2001-06-231-2/+2
|
* Fix minor markup nits.Fred Drake2001-06-232-6/+2
|
* Use a named reference to another chapter instead of hard coding theFred Drake2001-06-231-2/+2
| | | | | chapter number. This also makes the reference a hyperlink in the HTML version.
* gen_iternext(): Don't assume that the current thread state's frame isTim Peters2001-06-231-2/+2
| | | | | not NULL. I don't think it can be NULL from Python code, but if using generators via the C API I expect a NULL frame is possible.
* Fix a very minor (but annoying when looking for things!) markup nit.Fred Drake2001-06-237-0/+43
|
* PyFrameObject: rename f_stackbottom to f_stacktop, since it points toTim Peters2001-06-233-10/+14
| | | | | | | | the next free valuestack slot, not to the base (in America, stacks push and pop at the top -- they mutate at the bottom in Australia <winK>). eval_frame(): assert that f_stacktop isn't NULL upon entry. frame_delloc(): avoid ordered pointer comparisons involving f_stacktop when f_stacktop is NULL.
* Add "yeild" to the list of keywords.Fred Drake2001-06-231-2/+18
| | | | Fix a very minor (but annoying when looking for things!) markup nit.
* Consistently use semi-colons after the last property for each selector.Fred Drake2001-06-231-26/+26
|
* Give the pattern used to pick out a source anchor a more specific pattern.Fred Drake2001-06-231-1/+1
|
* Added several names.Fred Drake2001-06-231-0/+4
|
* Contributed updates from Harald Hanche-Olsen, giving details of the branchFred Drake2001-06-231-0/+49
| | | | | cuts for the complex math functions. Includes a brief description of what branch cuts are.
* Added support for our new \infinity and \plusminus macros, and theFred Drake2001-06-231-1/+4
| | | | | | standard \textbar macro (not supported in many versions of LaTeX2HTML). Added newline to error message.
* \infinity,Fred Drake2001-06-231-0/+2
| | | | \plusminus: New macros to allow us to avoid math mode for these symbols.
* Miscellaneous code cleanups.Fred Drake2001-06-231-4/+10
| | | | | Make sure we do not lose track of the build directory -- convert a user- supplied directory to an absolute path.
* Disallow 'yield' in a 'try' block when there's a 'finally' clause.Tim Peters2001-06-231-0/+10
| | | | | Derived from Thomas Wouters's patch on the Iterators list, but doesn't try to read c->c_block[c->c_nblocks].
* Remove an extra tab character.Fred Drake2001-06-221-1/+1
|
* Re-organize a little, clean up some markup.Fred Drake2001-06-221-52/+73
| | | | | | | Added some comments about sys.exit(), SystemExit, and preventing restricted code from exiting the interpreter. This closes SF bug #434743.
* Add sha and _sre to the list of allowed built-in modules.Fred Drake2001-06-221-1/+1
|
* Corrected an error in the information on supporting weak references inFred Drake2001-06-221-9/+7
| | | | | | extension types (the docs reflected a development version of the API). This closes SF bug #435066.
* Adjust to understand use of either single- or double-quotes to quoteFred Drake2001-06-221-20/+23
| | | | | | attribute values, and make the logic surrounding the platform annotations just a little easier to read. Also make the platform notes appear in the generated page; they were supposed to, but did not.
* Add the new texinputs/license.tex to the shared dependencies.Fred Drake2001-06-221-0/+1
|
* This is a trivial command line utility to print MD5 checksums.Guido van Rossum2001-06-221-0/+32
| | | | | | | | | | I published it on the web as http://www.python.org/2.1/md5sum.py so I thought I might as well check it in. Works with Python 1.5.2 and later. Works like the Linux tool ``mdfsum file ...'' except it doesn't take any options or read stdin.
* Fix & clean up the information about building Python with large file supportFred Drake2001-06-221-4/+3
| | | | | | for Linux. This closes SF bug #434975.
* Changed the order of the buttons for EasyDialogs.AskYesNoCancel() from the ↵Just van Rossum2001-06-221-0/+0
| | | | unusual [cancel, no, yes] to the more standard [no, cancel, yes].
* Record Windows build number for 2.0.1 final.Tim Peters2001-06-221-0/+2
|
* don't blow up when the charno SyntaxError value is NoneJust van Rossum2001-06-211-1/+3
|
* repaired expandselection and uncomment breakageJust van Rossum2001-06-211-4/+5
|