summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* SF bug #473525 pyclbr brokenTim Peters2001-10-241-5/+6
| | | | | | | | As the comments in the module implied, pyclbr was easily confused by "strange stuff" inside single- (but not triple-) quoted strings. It isn't anymore. Its behavior remains flaky in the presence of nested functions and classes, though. Bugfix candidate.
* Apply the first chunk of the second patch from SF bug #471720:Guido van Rossum2001-10-231-3/+11
| | | | | | | | | | | | | ThreadingMixIn/TCPServer forgets close (Max Neunhöffer). This ensures that handle_error() and close_request() are called when an error occurs in the thread. (I am not applying the second chunk of the patch, which moved the finish() call into the finally clause in BaseRequestHandler's __init__ method; that would be a semantic change that I cannot accept at this point - the data would be sent even if the handler raised an exception.)
* test_curses is an expected skip on Linux too.Guido van Rossum2001-10-231-0/+1
|
* font/tabs config dialog page now reads its data from the config fileSteven M. Gava2001-10-233-30/+108
|
* SF bug [#473864] doctest expects spurios space.Tim Peters2001-10-231-0/+6
| | | | | | Repair unlikely surprise due to magical softspace attr and the use of print with a trailing comma in doctest examples. Bugfix candidate.
* Record that test_curses doesn't run on win32.Tim Peters2001-10-221-0/+1
|
* Fixed denial-of-weak-ref-support test; Jeremy changed the error messageFred Drake2001-10-221-1/+1
| | | | | | used by the weakref code since he didn't like the word "referencable". Is it really necessary to be more specific than to test for TypeError here, though?
* A few formatting nits:Jeremy Hylton2001-10-221-5/+5
| | | | | Don't put paren in column 0 (to please font-lock mode). Put space after comma in argument list.
* Patch #473187: Add a test script that exercises most of the functions inAndrew M. Kuchling2001-10-222-1/+214
| | | | | the curses module. It's not run automatically; '-u curses' must be specified as an argument to regrtest
* sre.split should return the last segment, even if emptyFredrik Lundh2001-10-221-0/+1
| | | | (sorry, barry)
* Fix for SF bug #472940: can't getattr() attribute shown by dir()Guido van Rossum2001-10-221-5/+5
| | | | | | | | | | There really isn't a good reason for instance method objects to have their own __dict__, __doc__ and __name__ properties that just delegate the request to the function (callable); the default attribute behavior already does this. The test suite had to be fixed because the error changes from TypeError to AttributeError.
* Methods of built-in types now properly check for keyword argumentsGuido van Rossum2001-10-221-0/+9
| | | | | (formerly these were silently ignored). The only built-in methods that take keyword arguments are __call__, __init__ and __new__.
* Make tabnanny happy. (Piers, please run the test suite beforeGuido van Rossum2001-10-221-7/+7
| | | | | checking in changes. The test suite requires consistent use of spaces and tabs.)
* update version numberPiers Lauder2001-10-211-1/+1
|
* fixed character set description in docstring (SRE uses PythonFredrik Lundh2001-10-211-80/+15
| | | | | | | | | | | | | | | | | strings, not C strings) removed USE_PYTHON defines, and related sre.py helpers skip calling the subx helper if the template is callable. interestingly enough, this means that def callback(m): return literal result = pattern.sub(callback, string) is much faster than result = pattern.sub(literal, string)
* fix send method not noticing when partial sends happenPiers Lauder2001-10-211-1/+7
|
* sre.Scanner fixes (from Greg Chapman). also added a Scanner sanityFredrik Lundh2001-10-212-5/+26
| | | | | | check to the test suite. added a few missing exception checks in the _sre module
* rewrote the pattern.sub and pattern.subn methods in CFredrik Lundh2001-10-211-17/+25
| | | | | | | | | removed (conceptually flawed) getliteral helper; the new sub/subn code uses a faster code path for literal replacement strings, but doesn't (yet) look for literal patterns. added STATE_OFFSET macro, and use it to convert state.start/ptr to char indexes
* added tests for long ints and ints where they are > 32 bits.Skip Montanaro2001-10-191-0/+14
| | | | should have been checked in as part of patch #470254.
* Additional test and documentation for the unicode() changes.Marc-André Lemburg2001-10-192-21/+62
| | | | This patch should also be applied to the 2.2b1 trunk.
* Another merge from mimelib:Barry Warsaw2001-10-191-0/+27
| | | | | TestMIMEMessage.test_epilogue(), TestIdempotent.test_preamble_epilogue(): Test cases for SF bug #472481.
* Another email package test fileBarry Warsaw2001-10-191-0/+22
|
* Another merge from mimelib:Barry Warsaw2001-10-191-0/+2
| | | | | | _handle_multipart(): If there is an epilogue and the epilogue does not itself start with a newline, add a newline before writing the epilogue. Closes SF bug #472481.
* SF patch #460805 by Chris Gonnerman: Support for unsetenv()Guido van Rossum2001-10-191-2/+26
| | | | | | | | This adds unsetenv to posix, and uses it in the __delitem__ method of os.environ. (XXX Should we change the preferred name for putenv to setenv, for consistency?)
* Assume a 64-bit start and len if O_LARGEFILE is available.Martin v. Löwis2001-10-181-1/+8
|
* Whitespace normalization.Tim Peters2001-10-1819-69/+62
|
* The assignment to result.st_rdev can raise AttributeError as well asGuido van Rossum2001-10-181-1/+1
| | | | | TypeError (on systems where it's not defined at all, it raises AttributeError; when it's defined, assignment to it raises TypeError).
* changed misleading argument nameFredrik Lundh2001-10-181-13/+13
|
* SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.Guido van Rossum2001-10-181-2/+119
| | | | | | | | | | | | | | | | | This is a big one, touching lots of files. Some of the platforms aren't tested yet. Briefly, this changes the return value of the os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the time functions localtime(), gmtime(), and strptime() from tuples into pseudo-sequences. When accessed as a sequence, they behave exactly as before. But they also have attributes like st_mtime or tm_year. The stat return value, moreover, has a few platform-specific attributes that are not available through the sequence interface (because everybody expects the sequence to have a fixed length, these couldn't be added there). If your platform's struct stat doesn't define st_blksize, st_blocks or st_rdev, they won't be accessible from Python either. (Still missing is a documentation update.)
* SF bug [#472347] pydoc and properties.Tim Peters2001-10-182-3/+35
| | | | | | | | | | | | | | | The GUI-mode code to display properties blew up if the property functions (get, set, etc) weren't simply methods (or functions). "The problem" here is really that the generic document() method dispatches to one of .doc{routine, class, module, other}(), but all of those require a different(!) number of arguments. Thus document isn't general-purpose at all: you have to know exactly what kind of thing is it you're going to document first, in order to pass the correct number of arguments to .document for it to pass on. As an expedient hack, just tacked "*ignored" on to the end of the formal argument lists for the .docXXX routines so that .document's caller doesn't have to know in advance which path .document is going to take.
* Do not expect line number events when running under "python -O".Fred Drake2001-10-181-0/+3
| | | | | The right fix is to generate line number events anyway ;-), but this will have to do for now.
* SRE bug #441409:Fredrik Lundh2001-10-182-3/+13
| | | | | | | | compile should raise error for non-strings SRE bug #432570, 448951: reset group after failed match also bumped version number to 2.2.0
* Add a test for calling a weakref proxy with a dictionary of keyword args.Fred Drake2001-10-181-0/+3
|
* Fix the frozen bytecode for __hello__ (betcha didn't know that existedGuido van Rossum2001-10-183-0/+31
| | | | | | | | | | :-). Add a test that prevents the __hello__ bytecode from going stale unnoticed again. The test also tests the loophole noted in SF bug #404545. This test will fail right now; I'll check in the fix in a minute.
* Make sure we do not core dump when using proxies with the binary slotFred Drake2001-10-181-0/+8
| | | | handlers. This was fixed in Objects/weakrefobject.c 1.2.
* SF bug #471720: ThreadingMixIn/TCPServer forgets closeGuido van Rossum2001-10-181-1/+6
| | | | | Solved with a helper method that calls finish_request() and then close_request(). The code is by Max Neunhöffer.
* Reindent __repr__.Martin v. Löwis2001-10-181-11/+11
|
* Add test for local assigned to only in a nested list compJeremy Hylton2001-10-182-0/+19
|
* Fix SF bug #472234: type(obj) calls type->tp_init (Roeland Rengelink)Guido van Rossum2001-10-181-0/+12
| | | | | The fix is a band-aid: type_call() now makes the same exception for a single-argument call to type() as type_new() was already making.
* Patch #470744: Simplify __repr__ error handling.Martin v. Löwis2001-10-181-16/+4
|
* Add trivial test cases for RAND_add() and RAND_status().Jeremy Hylton2001-10-181-1/+15
| | | | (The rest of the test cases are trivial, so I don't feel too bad.)
* test for int and long int overflow (allows operation on 64-bit platforms)Skip Montanaro2001-10-171-2/+11
| | | | closes patch 470254
* Two merges from the mimelib project:Barry Warsaw2001-10-171-0/+34
| | | | | | | | | test_no_semis_header_splitter(): This actually should still split. test_no_split_long_header(): An example of an unsplittable line. test_no_semis_header_splitter(): Test for SF bug # 471918, Generator splitting long headers.
* Two merges from the mimelib project:Barry Warsaw2001-10-171-4/+35
| | | | | | | | _split_header(): Split on folding whitespace if the attempt to split on semi-colons failed. _split_header(): Patch by Matthew Cowles for fixing SF bug # 471918, Generator splitting long headers.
* Oops. Catching OverflowError from int() doesn't help, since it raisesGuido van Rossum2001-10-171-2/+2
| | | | ValueError on too-large inputs.
* Make sure the output lists are sorted, even if run with -r.Jeremy Hylton2001-10-171-0/+6
|
* Vastly improved stacksize calculation.Jeremy Hylton2001-10-171-18/+51
| | | | | | | | | | | | | | | | | | | | | There are now no known cases where the compiler package computes a stack depth lower than the one computed by the builtin compiler. (To achieve this state, we had to fix bugs in both compilers :-). The chief change is to do the depth calculations with respect to basic blocks. The stack effect of block is calculated. Then the flow graph is traversed using breadth-first search to find the max weight path through the graph. Had to fix the StackDepthTracker to calculate the right info for several opcodes: LOAD_ATTR, CALL_FUNCTION (and friends), MAKE_CLOSURE, and DUP_TOPX. XXX Still need to handle free variables in MAKE_CLOSURE. XXX There are still a lot of places where the computed stack depth is larger than for the builtin compiler. These won't cause the interpreter to overflow the frame, but they waste space.
* Handle testlist_safe as if it were testlist.Jeremy Hylton2001-10-171-0/+4
|
* track addition of testlist_safe to GrammarJeremy Hylton2001-10-171-7/+8
|
* SF patch #467430.Guido van Rossum2001-10-171-3/+4
| | | | | | - replace some log_error() calls with log_message() - flush self.rfile before forking too (hope this works on Windows)