summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Add a test for the 'closed' attribute on the C-profiler object.Guido van Rossum2002-07-171-0/+3
|
* Add missing comma.Jeremy Hylton2002-07-171-1/+1
|
* Add a rather generous set of tests allowed to be skipped on sunos5.Guido van Rossum2002-07-171-0/+23
|
* Use sys.executable to run Python, as suggested by Neal Norwitz.Tim Peters2002-07-171-2/+3
|
* 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?
* Given the persistent id code a shot at a class before calling save_global().Jeremy Hylton2002-07-161-5/+5
| | | | | Some persistent picklers (well, probably, the *only* persistent pickler) would like to pickle some classes in a special way.
* 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.
* 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.
* 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.
* 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.
* 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).
* 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.
* _structure(): Don't get the whole Content-Type: header, just get theBarry Warsaw2002-07-111-1/+1
| | | | type with get_type().
* test_trashcan() and supporting class Ouch(): Jeremy noted that this testTim Peters2002-07-111-3/+9
| | | | | | | | | | | | | | takes much longer to run in the context of the test suite than when run in isolation. That's because it forces a large number of full collections, which take time proportional to the total number of gc'ed objects in the whole system. But since the dangerous implementation trickery that caused this test to fail in 2.0, 2.1 and 2.2 doesn't exist in 2.3 anymore (the trashcan mechanism stopped doing evil things when the possibility for compiling without cyclic gc was taken away), such an expensive test is no longer justified. This checkin leaves the test intact, but fiddles the constants to reduce the runtime by about a factor of 5.
* _dispatch(): Comment improvements.Barry Warsaw2002-07-111-3/+3
|
* subtype_resurrection(): Removed unused import.Tim Peters2002-07-111-1/+0
|
* Extend function() to support an optional closure argument.Jeremy Hylton2002-07-111-0/+24
| | | | Also, simplify some ref counting for other optional arguments.
* subtype_resurrection(): The test suite with -l properly reported theTim Peters2002-07-111-2/+13
| | | | immortal object here as a leak. Made the object mortal again at the end.
* Repaired optimistic comment in new test.Tim Peters2002-07-111-4/+3
|
* Added a test that provokes the hypothesized (in my last checkin comment)Tim Peters2002-07-111-0/+20
| | | | | | | | | | | debug-build failure when an instance of a new-style class is resurrected by a __del__ method -- we simply never had any code that tried this. This is already fixed in 2.3 CVS. In 2.2.1, it blows up via Fatal Python error: GC object already in linked list I'll fix it in 2.2.1 CVS next.
* 1. Prevent Undo before IOmark in PyShell.PyShellKurt B. Kaiser2002-07-112-13/+22
| | | | | 2. Consolidate Undo code in EditorWindow.EditorWindow 3. Remove Formatting and Run menus from PyShell
* assertHasattr(): Made failure msg better than useless.Tim Peters2002-07-101-1/+4
| | | | test_others(): httplib failed in two new ways. Blame Thumb Boy <wink>.
* Fix for SF bug 579107.Jeremy Hylton2002-07-091-36/+88
| | | | | | | | | | The recent SSL changes resulted in important, but subtle changes to close() semantics. Since builtin socket makefile() is not called for SSL connections, we don't get separately closeable fds for connection and response. Comments in the code explain how to restore makefile semantics. Bug fix candidate.
* ndiffAssertEqual(): Stringify the arguments before runningBarry Warsaw2002-07-091-4/+16
| | | | | | | .splitlines() on them, since they may be Header instances. test_multilingual(), test_header_ctor_default_args(): New tests of make_header() and that Header can take all default arguments.
* make_header(): New function to take the output of decode_header() andBarry Warsaw2002-07-091-6/+45
| | | | | | | | | | | create a Header instance. Closes feature request #539481. Header.__init__(): Allow the initial string to be omitted. __eq__(), __ne__(): Support rich comparisons for equality of Header instances withy Header instances or strings. Also, update a bunch of docstrings.
* Fix SF Bug 564931: compile() traceback must include filename.Thomas Heller2002-07-091-0/+9
|
* Anthony Baxter's patch for non-strict parsing. This adds a `strict'Barry Warsaw2002-07-091-24/+71
| | | | | | | | | | | | | | | | | argument to the constructor -- defaulting to true -- which is different than Anthony's approach of using global state. parse(), parsestr(): Grow a `headersonly' argument which stops parsing once the header block has been seen, i.e. it does /not/ parse or even read the body of the message. This is used for parsing message/rfc822 type messages. We need test cases for the non-strict parsing. Anthony will supply these. _parsebody(): We can get rid of the isdigest end-of-line kludges, although we still need to know if we're parsing a multipart/digest so we can set the default type accordingly.
* Add the concept of a "default type". Normally the default type isBarry Warsaw2002-07-091-0/+22
| | | | | | | | | | text/plain but the RFCs state that inside a multipart/digest, the default type is message/rfc822. To preserve idempotency, we need a separate place to define the default type than the Content-Type: header. get_default_type(), set_default_type(): Accessor and mutator methods for the default type.
* __init__(): Don't attach the subparts if its an empty tuple. If theBarry Warsaw2002-07-091-2/+5
| | | | boundary was given in the arguments, call set_boundary().
* clone(): A new method for creating a clone of this generator (forBarry Warsaw2002-07-091-27/+24
| | | | | | | | | | | | | recursive generation). _dispatch(): If the message object doesn't have a Content-Type: header, check its default type instead of assuming it's text/plain. This makes for correct generation of message/rfc822 containers. _handle_multipart(): We can get rid of the isdigest kludge. Just print the message as normal and everything will work out correctly. _handle_mulitpart_digest(): We don't need this anymore either.
* __init__(): Be sure to set the default type to message/rfc822.Barry Warsaw2002-07-091-0/+2
|
* _structure(): A handy little debugging aid that I don't (yet) intendBarry Warsaw2002-07-091-0/+10
| | | | to make public, but that others might still find useful.
* TestEmailBase.ndiffAssertEqual(): Python 2.1's difflib doesn't have anBarry Warsaw2002-07-091-32/+186
| | | | | | | | | | ndiff function, so just alias it to assertEqual in that case. Various: make sure all openfile()/read()'s are wrapped in try/finally's so the file gets closed. A bunch of new tests checking the corner cases for multipart/digest and message/rfc822.
* New files which test the corners of multipart/message andBarry Warsaw2002-07-092-0/+48
| | | | message/rfc822 compliance.
* With the addition of Oleg's support for RFC 2231, it's time to bumpBarry Warsaw2002-07-091-1/+1
| | | | the version number to 2.1.
* Change the "__ private" names to "_ protected"; this has been a pain forFred Drake2002-07-081-31/+31
| | | | subclassing so many times it should simply be changed.
* Got rid of special case for Macintosh realloc slowdown: Tim fixed the problem.Jack Jansen2002-07-082-6/+1
|
* Fix from SF patch #527518: proxy config with user+pass authentication.Jeremy Hylton2002-07-071-3/+8
| | | | Bug fix candidate.
* Fix for SF bug #432621: httplib: multiple Set-Cookie headersJeremy Hylton2002-07-073-4/+131
| | | | | | | | | | If multiple header fields with the same name occur, they are combined according to the rules in RFC 2616 sec 4.2: Appending each subsequent field-value to the first, each separated by a comma. The order in which header fields with the same field-name are received is significant to the interpretation of the combined field value.
* Fix SF bug #575360Jeremy Hylton2002-07-061-0/+6
| | | | | | | Subclasses of Exception that define an __init__ must call Exception.__init__ or define self.args. Otherwise, str() will fail. Bug fix candidate.
* Handle HTTP/0.9 responses.Jeremy Hylton2002-07-061-19/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Section 19.6 of RFC 2616 (HTTP/1.1): It is beyond the scope of a protocol specification to mandate compliance with previous versions. HTTP/1.1 was deliberately designed, however, to make supporting previous versions easy.... And we would expect HTTP/1.1 clients to: - recognize the format of the Status-Line for HTTP/1.0 and 1.1 responses; - understand any valid response in the format of HTTP/0.9, 1.0, or 1.1. The changes to the code do handle response in the format of HTTP/0.9. Some users may consider this a bug because all responses with a sufficiently corrupted status line will look like an HTTP/0.9 response. These users can pass strict=1 to the HTTP constructors to get a BadStatusLine exception instead. While this is a new feature of sorts, it enhances the robustness of the code (be tolerant in what you accept). Thus, I consider it a bug fix candidate. XXX strict needs to be documented.
* Modifying EditorWindow causes breakpoints in that module to be removedKurt B. Kaiser2002-07-062-3/+11
| | | | | | from both sides of the split debugger. M Debugger.py M EditorWindow.py
* Decent burial for venerated ancestor (urn in attic)Kurt B. Kaiser2002-07-061-342/+0
|
* Remove dead code.Kurt B. Kaiser2002-07-061-38/+0
|
* 1. Test Sourceforge checkin, idle-dev postingKurt B. Kaiser2002-07-061-1/+0
| | | | 2. Remove extraneous comment
* Combine OldStackViewer.py with Debugger.py, removing dead code.unknown2002-07-053-290/+164
| | | | | | M Debugger.py : Incorporate StackViewer, NamespaceViewer classes M StackViewer.py : remove import OldStackViewer U OldStackViewer.py : remove file