summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Rearranged and added comments to object.h, to clarify many thingsTim Peters2002-07-073-82/+125
| | | | | | | | | | | that have taken me "too long" to reverse-engineer over the years. Vastly reduced the nesting level and redundancy of #ifdef-ery. Took a light stab at repairing comments that are no longer true. sys_gettotalrefcount(): Changed to enable under Py_REF_DEBUG. It was enabled under Py_TRACE_REFS, which was much heavier than necessary. sys.gettotalrefcount() is now available in a Py_REF_DEBUG-only build.
* Fix from SF patch #527518: proxy config with user+pass authentication.Jeremy Hylton2002-07-071-3/+8
| | | | Bug fix candidate.
* Removed 3 unlikely #includes that were only needed for the non-gc flavorTim Peters2002-07-071-5/+0
| | | | of the trashcan code.
* 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.
* Trashcan cleanup: Now that cyclic gc is always there, the trashcanTim Peters2002-07-073-100/+96
| | | | | | | | | | | | | | | | | | | mechanism is no longer evil: it no longer plays dangerous games with the type pointer or refcounts, and objects in extension modules can play along too without needing to edit the core first. Rewrote all the comments to explain this, and (I hope) give clear guidance to extension authors who do want to play along. Documented all the functions. Added more asserts (it may no longer be evil, but it's still dangerous <0.9 wink>). Rearranged the generated code to make it clearer, and to tolerate either the presence or absence of a semicolon after the macros. Rewrote _PyTrash_destroy_chain() to call tp_dealloc directly; it was doing a Py_DECREF again, and that has all sorts of obscure distorting effects in non-release builds (Py_DECREF was already called on the object!). Removed Christian's little "embedded change log" comments -- that's what checkin messages are for, and since it was impossible to correlate the comments with the code that changed, I found them merely distracting.
* Removed WITH_CYCLE_GC #ifdef-ery. Holes:Tim Peters2002-07-0712-106/+22
| | | | | | + I'm not sure what to do about configure.in. Left it alone. + Ditto pyexpat.c. Fred or Martin will know what to do.
* 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
* printlist(): Replaced the guts with a call to textwrap. Yay!Tim Peters2002-07-041-30/+19
|
* gc_list_move defined but not used.Michael W. Hudson2002-07-041-15/+0
|
* Docstring improvements. In particular, added docstrings for theGreg Ward2002-07-041-10/+27
| | | | | standalone wrap() and fill() functions. This should address the misunderstanding that led to SF bug 577106.
* Fix a typo.Thomas Heller2002-07-041-1/+1
|
* Revise asyncore documentation and document asynchat for the first time.Steve Holden2002-07-034-55/+347
|
* No need to be ambiguous about *how* extended slices and built-in typesFred Drake2002-07-031-11/+25
| | | | | | | have changed. Uncomment a heading so that PendingDeprecationWarning doesn't seem so out of place.
* Fix up a few more consistency nits and incorrectly applied markup.Fred Drake2002-07-031-21/+29
| | | | Further clarify the English-centricity of fix_sentence_endings.
* append(): Clarify the expected type of charset.Barry Warsaw2002-07-031-1/+2
|
* Debugger Exception Info and GUI Stack Exception Traceback: finishKurt B. Kaiser2002-07-031-10/+23
| | | | implementation.
* Stop trying to cater to platforms with a broken HUGE_VAL definition. ItTim Peters2002-07-032-12/+25
| | | | | breaks other platforms (in this case, the hack for broken Cray systems in turn caused failure on a Mac system broken in a different way).
* Update freeze to use zlib 1.1.4.Mark Hammond2002-07-031-2/+2
| | | | From patch: [ 574532 ] Update freeze to use zlib 1.1.4
* Add annotations that describe the change in the "errors" and "failures"Fred Drake2002-07-021-0/+4
| | | | attributes of the TestResult.
* Update the documentation of the errors and failures attributes of theFred Drake2002-07-021-6/+48
| | | | | | TestResult object. Add an example of how to get even more information for apps that can use it. Closes SF bug #558278.
* Another stab at SF 576327: zipfile when sizeof(long) == 8Tim Peters2002-07-021-100/+106
| | | | | | | | binascii_crc32(): The previous patch forced this to return the same result across platforms. This patch deals with that, on a 64-bit box, the *entry* value may have "unexpected" bits in the high four bytes. Bugfix candidate.
* visit_decref(): Added another assert.Tim Peters2002-07-021-0/+1
|
* Don't list all the keyword args to the TextWrapper constructor in theGreg Ward2002-07-021-15/+23
| | | | | | | | | | | classdesc -- just use "..." with prose explaining the correspondence between keyword args and instance attributes. Document 'width' along with the other instance attributes. Describe default values consistently. Typo fixes.
* Be consistent with the functions in the posix/nt module: docstringsFred Drake2002-07-021-3/+3
| | | | don't include a " -> None" for functions that have no return value.
* Attempt to clarify removedirs().Fred Drake2002-07-021-1/+1
| | | | Based on SF bug #574773.
* Deal with & remove the XXX comments.Fred Drake2002-07-021-30/+24
| | | | Change the markup to be more like the rest of the documentation.
* Abstract the creation of signature lines for callable things; the newFred Drake2002-07-022-7/+20
| | | | | | | \py@sigline macro will wrap the argument list so it will not extend into the right margin. Substantially based on a contribution from Dave Cole. This addresses one of the comments in SF bug #574742.
* Fix for SF bug #576327: zipfile when sizeof(long) == 8Tim Peters2002-07-021-1/+11
| | | | | | | | | | binascii_crc32(): Make this return a signed 4-byte result across platforms. The other way to make this platform-independent would be to make it return an unsigned unbounded int, but the evidence suggests other code out there treats it like a signed 4-byte int (e.g., existing code writing the result with struct.pack "l" format). Bugfix candidate.
* Convert raise to call exception class. Add whitespace.Jeremy Hylton2002-07-021-1/+1
|
* Repair badly formatted code.Jeremy Hylton2002-07-021-19/+17
|
* Finished transitioning to using gc_refs to track gc objects' states.Tim Peters2002-07-022-42/+71
| | | | | | | This was mostly a matter of adding comments and light code rearrangement. Upon untracking, gc_next is still set to NULL. It's a cheap way to provoke memory faults if calling code is insane. It's also used in some way by the trashcan mechanism.
* Remove bogus assignment to self.length in NamedNodeMap.__delitem__().Fred Drake2002-07-021-1/+0
|
* Minor markup adjustments, consistency changes, and shorten a longFred Drake2002-07-021-12/+13
| | | | line.
* Add refcount info for PyErr_SetFromWindowsErr() andFred Drake2002-07-021-0/+7
| | | | PyErr_SetFromWindowsErrWithFilename().
* Docs for PyErr_SetFromWindowsErrWithFilename() andThomas Heller2002-07-021-0/+23
| | | | | PyErr_SetFromWindowsErr(). Fixes SF# 576016, with additional markup.
* Do not depend on pymemcompat.h (was only used for PyXML); Martin likesFred Drake2002-07-021-4/+6
| | | | it all inline.
* Mac OS X Jaguar (developer preview) seems to have a working getaddrinfo().Jack Jansen2002-07-021-0/+5
|
* Reserved another gc_refs value for untracked objects. Every live gcTim Peters2002-07-022-8/+26
| | | | | | | | | | | | object should now have a well-defined gc_refs value, with clear transitions among gc_refs states. As a result, none of the visit_XYZ traversal callbacks need to check IS_TRACKED() anymore, and those tests were removed. (They were already looking for objects with specific gc_refs states, and the gc_refs state of an untracked object can no longer match any other gc_refs state by accident.) Added more asserts. I expect that the gc_next == NULL indicator for an untracked object is now redundant and can also be removed, but I ran out of time for this.
* Bring this back into sync with PyXML revision 1.58.Fred Drake2002-07-011-3/+10
|
* OK, I couldn't stand it <0.5 wink>: removed all uncertainty about what'sTim Peters2002-07-011-96/+163
| | | | | | | | | | | | | | | | | | | in gc_refs, even at the cost of putting back a test+branch in visit_decref. The good news: since gc_refs became utterly tame then, it became clear that another special value could be useful. The move_roots() and move_root_reachable() passes have now been replaced by a single move_unreachable() pass. Besides saving a pass over the generation, this has a better effect: most of the time everything turns out to be reachable, so we were breaking the generation list apart and moving it into into the reachable list, one element at a time. Now the reachable stuff stays in the generation list, and the unreachable stuff is moved instead. This isn't quite as good as it sounds, since sometimes we guess wrongly that a thing is unreachable, and have to move it back again. Still, overall, it yields a significant (but not dramatic) boost in collection speed.
* visit_decref(): Two optimizations.Tim Peters2002-06-301-5/+3
| | | | | | | | | | | | | | | | | | | | | | 1. You're not supposed to call this with a NULL argument, although the docs could be clearer about that. The other visit_XYZ() functions don't bother to check. This doesn't either now, although it does assert non-NULL-ness now. 2. It doesn't matter whether the object is currently tracked, so don't bother checking that either (if it isn't currently tracked, it may have some nonsense value in gc_refs, but it doesn't hurt to decrement gibberish, and it's cheaper to do so than to make everyone test for trackedness). It would be nice to get rid of the other tests on IS_TRACKED. Perhaps trackedness should not be a matter of not being in any gc list, but should be a matter of being in a new "untracked" gc list. This list simply wouldn't be involved in the collection mechanism. A newly created object would be put in the untracked list. Tracking would simply unlink it and move it into the gen0 list. Untracking would do the reverse. No test+branch needed then. visit_move() may be vulnerable then, though, and I don't know how this would work with the trashcan.
* SF bug #574132: Major GC related performance regressionTim Peters2002-06-301-13/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "The regression" is actually due to that 2.2.1 had a bug that prevented the regression (which isn't a regression at all) from showing up. "The regression" is actually a glitch in cyclic gc that's been there forever. As the generation being collected is analyzed, objects that can't be collected (because, e.g., we find they're externally referenced, or are in an unreachable cycle but have a __del__ method) are moved out of the list of candidates. A tricksy scheme uses negative values of gc_refs to mark such objects as being moved. However, the exact negative value set at the start may become "more negative" over time for objects not in the generation being collected, and the scheme was checking for an exact match on the negative value originally assigned. As a result, objects in generations older than the one being collected could get scanned too, and yanked back into a younger generation. Doing so doesn't lead to an error, but doesn't do any good, and can burn an unbounded amount of time doing useless work. A test case is simple (thanks to Kevin Jacobs for finding it!): x = [] for i in xrange(200000): x.append((1,)) Without the patch, this ends up scanning all of x on every gen0 collection, scans all of x twice on every gen1 collection, and x gets yanked back into gen1 on every gen0 collection. With the patch, once x gets to gen2, it's never scanned again until another gen2 collection, and stays in gen2. Bugfix candidate, although the code has changed enough that I think I'll need to port it by hand. 2.2.1 also has a different bug that causes bound method objects not to get tracked at all (so the test case doesn't burn absurd amounts of time in 2.2.1, but *should* <wink>).
* Patch #569753: Remove support for WIN16.Martin v. Löwis2002-06-3018-241/+102
| | | | Rename all occurrences of MS_WIN32 to MS_WINDOWS.
* Bump required PyXML version to 0.6.5.Martin v. Löwis2002-06-301-1/+1
|