summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* Folder.getlast(): avoid PyChecker warning.Guido van Rossum2001-10-171-1/+1
|
* Remove unused import; reported by Neal Norwitz.Fred Drake2001-10-171-1/+1
|
* Minor code cleanups based on comments from Neal Norwitz.Fred Drake2001-10-171-3/+2
|
* [ #403753 ] zlib decompress; uncontrollable memory usageJeremy Hylton2001-10-162-0/+33
| | | | | | | | | | | | | Mostly by Toby Dickenson and Titus Brown. Add an optional argument to a decompression object's decompress() method. The argument specifies the maximum length of the return value. If the uncompressed data exceeds this length, the excess data is stored as the unconsumed_tail attribute. (Not to be confused with unused_data, which is a separate issue.) Difference from SF patch: Default value for unconsumed_tail is "" rather than None. It's simpler if the attribute is always a string.
* SF bug [#468061] __str__ ignored in str subclass.Tim Peters2001-10-161-0/+31
| | | | | | | | | | | | | | | | | object.c, PyObject_Str: Don't try to optimize anything except exact string objects here; in particular, let str subclasses go thru tp_str, same as non-str objects. This allows overrides of tp_str to take effect. stringobject.c: + string_print (str's tp_print): If the argument isn't an exact string object, get one from PyObject_Str. + string_str (str's tp_str): Make a genuine-string copy of the object if it's of a proper str subclass type. str() applied to a str subclass that doesn't override __str__ ends up here. test_descr.py: New str_of_str_subclass() test.
* Fix SF bug #459767: ftplib fails with files > 2GBGuido van Rossum2001-10-161-5/+13
| | | | | size(), parse150(): try int() first, catch OverflowError, fall back to long().
* Remove obsolete __dynamic__ distinction.Tim Peters2001-10-151-126/+8
|
* Remove obsolete __dynamic__ distinction.Tim Peters2001-10-152-76/+1
|
* Remove obsolete __static__/__dynamic__ distinction.Tim Peters2001-10-151-11/+3
|
* pstats-compatible analysis module.Fred Drake2001-10-151-0/+93
| | | | | hotshot.stats.load(logfilename) returns a pstats.Stats instance, which is about as compatible as it gets.
* runcall(): Expose the return value of the profiled function; this allowsFred Drake2001-10-151-1/+1
| | | | | | changing an application to collect profile data on one part of the app while still making use of the profiled component, without relying on side effects.
* Avoid deep recursion when reading the header of the log file.Fred Drake2001-10-151-28/+39
| | | | | Add support for extracting function names from the log file, keeping the extract-names-from-sources support as a fallback.
* Get rid of __defined__ and tp_defined -- there's no need toGuido van Rossum2001-10-151-16/+1
| | | | | distinguish __dict__ and __defined__ any more. In the C structure, tp_cache takes its place -- but this hasn't been implemented yet.
* Covert pickle tests to use unittest.Jeremy Hylton2001-10-155-193/+294
| | | | | Extend tests to cover a few more cases. For cPickle, test several of the undocumented features.
* Use cStringIO when available.Jeremy Hylton2001-10-151-36/+4
| | | | Remove test code. It's available in Lib/test/picklertester.py.
* Completely get rid of __dynamic__ and the correspondingGuido van Rossum2001-10-151-53/+21
| | | | | Py_TPFLAGS_DYNAMICTYPE bit. There is no longer a performance benefit, and I don't really see the use case any more.
* Patch 471400: escape single-dot lines; by Jason Hildebrand.Guido van Rossum2001-10-151-0/+2
| | | | | RFC 2049 recommends never outputting a line consisting of a single dot.
* SF bug #469910 by Alfonso Baciero: Bugfix for imaplib for macintoshGuido van Rossum2001-10-151-1/+1
| | | | Pass binary mode to makefile().
* test_typed_subpart_iterator_default_type(): Test for when the messageBarry Warsaw2001-10-151-0/+18
| | | | has no Content-Type: header, it should be treated as text/plain.
* typed_subpart_iterator(): When getting the main type use 'text' as theBarry Warsaw2001-10-151-2/+2
| | | | | | failobj, and when getting the subtype use 'plain' as the failobj. text/plain is supposed to be the default if the message contains no Content-Type: header.
* "ib" should be "boundary"; reported by Neal Norwitz.Fred Drake2001-10-131-1/+1
|
* Added missing parameter in call to http_error_default();Fred Drake2001-10-131-1/+1
| | | | reported by Neal Norwitz.
* SMTPError should be SMTPException; reported by Neal Norwitz.Fred Drake2001-10-131-2/+2
|
* Ignore execfile() return value; reported by Neal Norwitz.Fred Drake2001-10-131-1/+1
|
* "f" should be "self"; reported by Neal Norwitz.Fred Drake2001-10-131-1/+1
|
* _os should be os; reported by Neal Norwitz.Fred Drake2001-10-131-1/+1
|
* Remove extra param from call to self.error().Fred Drake2001-10-131-1/+1
| | | | Reported by Neal Norwitz.
* Move grid_location into Misc. Fixes bug #426892.Martin v. Löwis2001-10-131-8/+8
|
* Remove some unused imports.Fred Drake2001-10-131-4/+17
| | | | | | Remove the log file after we are done with it. This should clean up after the test even on Windows, since the file is now closed before we attempt removal.
* When we reach the end of the log file, close the logreader object.Fred Drake2001-10-131-1/+3
|
* You can't unlink open files on Windows.Tim Peters2001-10-131-1/+1
| | | | | | Simply commented it out, and then test_hotshot passes on Windows. Leaving to Fred to fix "the right way" (it seems to be a feature of unittest that all unittests try to unlink open files <wink>).
* Correct __repr__: include module name, avoid extra space for empty status,Martin v. Löwis2001-10-121-3/+2
| | | | use 0x format for id. Proposed by Cesar Eduardo Barros in patch #470680.
* Preliminary user-level interface to HotShot. We still need the analysisFred Drake2001-10-122-0/+173
| | | | tool; look for that on Monday.