summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove now-unnecessary "from __future__ import nested_scopes" stmts.Tim Peters2001-07-124-12/+7
|
* py-cvs-rel2_1 (Rev 1.3) merge - whitespace normalizationKurt B. Kaiser2001-07-121-2/+2
|
* py-cvs-rel1_2 (Rev 1.4) merge,Kurt B. Kaiser2001-07-121-2/+1
| | | | | "Add Alt-slash to Unix keydefs (I somehow need it on RH 6.2). Get rid of assignment to unused self.text.wordlist." --GvR
* Actually remove directories from sys.path if they do not exist; the intentFred Drake2001-07-121-0/+4
| | | | is to avoid as many stat() calls as we can.
* Remove reference cycle breaking code. The GC now takes care of it.Neil Schemenauer2001-07-121-7/+1
|
* Test GC of frame objects.Neil Schemenauer2001-07-121-0/+11
|
* Make the test pass now that 10**-15 returns a float instead of raisingGuido van Rossum2001-07-121-3/+1
| | | | an exception.
* py-cvs merge, python 1.5.2 compatabilitySteven M. Gava2001-07-121-2/+18
|
* py-cvs merge, better error dialogSteven M. Gava2001-07-121-3/+7
|
* py-cvs merge, additionsSteven M. Gava2001-07-121-0/+6
|
* py-cvs merge, correct indentationSteven M. Gava2001-07-121-1/+1
|
* py-cvs merge, correct typoSteven M. Gava2001-07-121-2/+2
|
* py-cvs merge, update colour changing infoSteven M. Gava2001-07-121-1/+2
|
* PEP 250: Add lib/site-packages to sys.path on Windows; also sys.prefixTim Peters2001-07-121-3/+1
| | | | to sys.path if os.sep == ':' (Macs?). See PEP 250.
* py-cvs merge, idle_dir loading changedSteven M. Gava2001-07-121-1/+1
|
* py-cvs merge, version updateSteven M. Gava2001-07-121-1/+1
|
* SF patch #440170: Tests for fileinput module.Tim Peters2001-07-112-1/+159
| | | | | New test_fileinput.py from Nick Mathewson, fiddled to use TESTFN and sundry style nits.
* SF patch #440144: Tests and minor bugfix for uu module.Tim Peters2001-07-112-1/+124
| | | | | New test_uu.py from Nick Mathewson, fiddled to work on Windows too. Somebody should check that it still works on non-Windows boxes, though!
* xmlrpclib for python 2.2; initial checkinFredrik Lundh2001-07-111-0/+934
|
* SF patch #440144: Tests and minor bugfix for uu moduleTim Peters2001-07-111-1/+1
| | | | | | | | | decode(): While writing tests for uu.py, Nick Mathewson discovered that the 'Truncated input file' exception could never get raised, because its "if not str:" test was actually testing the builtin function "str", not the local string vrbl "s" as intended. Bugfix candidate.
* Initial revisionKurt B. Kaiser2001-07-111-0/+157
|
* Ported to Windows:Guido van Rossum2001-07-101-5/+6
| | | | | | - Set the host to "localhost" instead of "". - Skip the AF_UNIX tests when socket.AF_UNIX is not defined.
* A test suite for SocketServer.py that exposes the various bugs justGuido van Rossum2001-07-101-0/+161
| | | | | | | | | fixed. Regrettably, this must be run manually -- somehow the I/O redirection of the regression test breaks the test. When run under the regression test, this raises ImportError with a warning to that effect. Bugfix candidate!
* IMPORTANT FIX: This should definitely go into the 2.1.1 release!!!Guido van Rossum2001-07-101-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix various serious problems: - The ThreadingTCPServer class and its derived classes were completely broken because the main thread would close the request before the handler thread had time to look at it. This was introduced by Ping's close_request() patch. The fix moves the close_request() calls to after the handler has run to completion in the BaseServer class and the ForkingMixIn class; when using the ThreadingMixIn, closing the request is the handler's responsibility. - The ForkingUDPServer class has always been been broken because the socket was closed in the child before calling the handler. I fixed this by simply not calling server_close() in the child at all. - I cannot get the UnixDatagramServer class to work at all. The recvfrom() call doesn't return a meaningful client address. I added a comment to this effect. Maybe it works on other Unix versions. - The __all__ variable was missing ThreadingMixIn and ForkingMixIn. - Bumped __version__ to "0.4". - Added a note about the test suite (to be checked in shortly).
* map re.sub() to string.replace(), when possibleFredrik Lundh2001-07-081-12/+17
|
* bug #436596Fredrik Lundh2001-07-061-2/+2
| | | | re.findall doesn't take a maxsplit argument
* When reading a continuation line, make sure we still use the transformedFred Drake2001-07-062-1/+9
| | | | | | | name when filling in the internal data structures, otherwise we incorrectly raise a KeyError. This fixes SF bug #432369.
* Allow underscores in tag names and quote characters in unquoted attributeFred Drake2001-07-051-2/+2
| | | | | | | values. The change for attribute values matches the way Mozilla and Navigator view the world, at least. This closes SF bug #436621.
* Rip out tests for xrange() features no longer supported.Guido van Rossum2001-07-051-14/+0
|
* Added a non-recursive implementation of conjoin(), and a Knight's Tourunknown2001-07-041-2/+291
| | | | | | | | | | | | solver. In conjunction, they easily found a tour of a 200x200 board: that's 200**2 == 40,000 levels of backtracking. Explicitly resumable generators allow that to be coded as easily as a recursive solver (easier, actually, because different levels can use level-customized algorithms without pain), but without blowing the stack. Indeed, I've never written an exhaustive Tour solver in any language before that can handle boards so large ("exhaustive" == guaranteed to find a solution if one exists, as opposed to probabilistic heuristic approaches; of course, the age of the universe may be a blip in the time needed!).
* dummy checkin for testing, please ignoreunknown2001-07-041-1/+0
|
* Fix for SF bug #425868.unknown2001-07-041-3/+3
| | | | | | We should not depend on two spaces between words, so use the white space after the to-be-encoded word only as lookahead and don't actually consume it in the regular expression.
* Clean up a bare except: clause.unknown2001-07-041-1/+1
|
* Clean up a bare except: clause.unknown2001-07-041-1/+1
|
* Make the implementations of getElementsByTagName() andFred Drake2001-07-041-11/+5
| | | | | getElementsByTagNameNS() consistent in form as well as functionality (cosmetic).
* Only write out one blank line before the request data.Fred Drake2001-07-042-3/+3
| | | | This closes SF patch #419459.
* reapplied darryl gallion's minimizing repeat fix. I'm still not 100%Fredrik Lundh2001-07-022-1/+3
| | | | | sure about this one, but test #133283 now works even with the fix in place, and so does the test suite. we'll see what comes up...
* added martin's BIGCHARSET patch to SRE 2.1.1. martin reports 2xFredrik Lundh2001-07-022-12/+74
| | | | speedups for certain unicode character ranges.
* Avoid using os.path.normcase() on sys.path elements; doing so causes pathsFred Drake2001-07-021-19/+22
| | | | | | to be presented in an unfamiliar case on case-preserving filesystems. This closes SF patch #436173.
* Nuke hard tabs.Tim Peters2001-07-023-244/+242
|
* Whitespace normalization; the plat-riscos file didn't even get byTim Peters2001-07-021-6/+6
| | | | tabnanny.py.
* A clever union-find implementation from c.l.py, due to David Eppstein.Tim Peters2001-07-021-0/+77
| | | | | This is another one that leaks memory without an explict clear! Time to bite this bullet.
* Derive an industrial-strength conjoin() via cross-recursion loop unrolling,Tim Peters2001-06-301-9/+83
| | | | and fiddle the conjoin tests to exercise all the new possible paths.
* Turns out Neil didn't intend for *all* of his gen-branch work to getTim Peters2001-06-293-36/+51
| | | | | | | | | | | | | | | | | | | | committed. tokenize.py: I like these changes, and have tested them extensively without even realizing it, so I just updated the docstring and the docs. tabnanny.py: Also liked this, but did a little code fiddling. I should really rewrite this to *exploit* generators, but that's near the bottom of my effort/benefit scale so doubt I'll get to it anytime soon (it would be most useful as a non-trivial example of ideal use of generators; but test_generators.py has already grown plenty of food-for-thought examples). inspect.py: I'm sure Ping intended for this to continue running even under 1.5.2, so I reverted this to the last pre-gen-branch version. The "bugfix" I checked in in-between was actually repairing a bug *introduced* by the conversion to generators, so it's OK that the reverted version doesn't reflect that checkin.
* Solve SF bug #231249: cgi.py opens too many (temporary) files.Guido van Rossum2001-06-291-4/+12
| | | | | | | | | | | | | | | | | | | | | | class FieldStorage: this patch changes read_lines() and co. to use a StringIO() instead of a real file. The write() calls are redirected to a private method that replaces it with a real, external file only when it gets too big (> 1000 bytes). This avoids problems in forms using the multipart/form-data encoding with many fields. The original code created a temporary file for *every* field (not just for file upload fields), thereby sometimes exceeding the open file limit of some systems. Note that the simpler solution "use a real file only for file uploads" can't be used because the form field parser has no way to tell which fields correspond to file uploads. It's *possible* but extremely unlikely that this would break someone's code; they would have to be stepping way outside the documented interface for FieldStorage and use f.file.fileno(), or depend on overriding make_file() to return a file-like object with additional known properties.
* Added a simple but general backtracking generator (conjoin), and a coupleTim Peters2001-06-291-1/+162
| | | | | | | | | examples of use. These poke stuff not specifically targeted before, incl. recursive local generators relying on nested scopes, ditto but also inside class methods and rebinding instance vars, and anonymous partially-evaluated generators (the N-Queens solver creates a different column-generator for each row -- AFAIK this is my invention, and it's really pretty <wink>). No problems, not even a new leak.
* Another "if 0:" hack, this time to complain about otherwise invisibleTim Peters2001-06-281-0/+33
| | | | | | "return expr" instances in generators (which latter may be generators due to otherwise invisible "yield" stmts hiding in "if 0" blocks). This was fun the first time, but this has gotten truly ugly now.
* This no longer leaks memory when run in an infinite loop. However,Tim Peters2001-06-271-81/+58
| | | | | | | | | | | | | | | | | | | | | that required explicitly calling LazyList.clear() in the two tests that use LazyList (I added a LazyList Fibonacci generator too). A real bitch: the extremely inefficient first version of the 2-3-5 test *looked* like a slow leak on Win98SE, but it wasn't "really": it generated so many results that the heap grew over 4Mb (tons of frames! the number of frames grows exponentially in that test). Then Win98SE malloc() starts fragmenting address space allocating more and more heaps, and the visible memory use grew very slowly while the disk was thrashing like mad. Printing fewer results (i.e., keeping the heap burden under 4Mb) made that illusion vanish. Looks like there's no hope for plugging the LazyList leaks automatically short of adding frameobjects and genobjects to gc. OTOH, they're very easy to break by hand, and they're the only *kind* of plausibly realistic leaks I've been able to provoke. Dilemma.
* Encode surrogates in UTF-8 even for a wide Py_UNICODE.Martin v. Löwis2001-06-271-2/+2
| | | | | | | Implement sys.maxunicode. Explicitly wrap around upper/lower computations for wide Py_UNICODE. When decoding large characters with UTF-8, represent expected test results using the \U notation.
* gen_getattr: make the gi_running and gi_frame members discoverable (butTim Peters2001-06-261-2/+22
| | | | not writable -- too dangerous!) from Python code.