[issue1346874] httplib simply ignores CONTINUE
Rick Harris <[EMAIL PROTECTED]> added the comment: I'm implemented the behavior described by Mike above with a patch to 2.6. The patch will raise an ExpectationFailed before sending the body if the server responds with a 417 (Expectation Failed). This patch should only modify behavior for requests that specify "Expect: 100-continue" in the request's headers. Note: The spec says that the client should send the body if the server does not respond within some reasonable period of time. This is not currently supported. Anyone have any thoughts on how that could be done? -- keywords: +patch nosy: +rharris versions: +Python 2.6 -Python 2.4 Added file: http://bugs.python.org/file11073/issue1346874.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1346874> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2116] weakref copy module interaction
New submission from Rick Harris: The copy module will not properly copy/deepcopy weakrefs, it will bomb out with __new__ not having enough args. This is a problem b/c it makes deepcopying of objects that make use of Weak(Key|Value)Dictionaries difficult. To replicate: import copy, weakref class Test(object): pass t = Test() wr = weakref.ref(t) wr_new = copy.copy(wr) -- components: Library (Lib) files: copy.patch messages: 62413 nosy: rharris severity: normal status: open title: weakref copy module interaction type: crash versions: Python 2.5 Added file: http://bugs.python.org/file9433/copy.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2116> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2116] weakref copy module interaction
Rick Harris <[EMAIL PROTECTED]> added the comment: Sorry about forgetting the -c arg! The patch is intended for python/trunk/Lib/copy.py. It looks like Raymond Hettinger has made a similar-ish change recently to make Ellipsis copyable. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2116> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2651] Strings passed to KeyError do not round trip
New submission from Rick Harris <[EMAIL PROTECTED]>: Here is a bug in Python 2.5 which would be nice to fix for Py3k (since we are already breaking compatibility): Take a string: s = "Hello" Create a KeyError exception with that string: e = KeyError(s) Counterintuitively, casting the exception to a string doesn't return the same string: str(e) != s Instead, when KeyError is cast to a string it affixes single-quotes around the string. I have create a test which shows that the other built-in exceptions (except for 3 Unicode Errors which seem to be unusual in that they don't accept just a string), do indeed round-trip the string unaltered. This actually caused a bug (in an old version of zope.DocumentTemplate). I am including the test case I wrote for now; I will begin looking into a solution shortly and hopefully whip up a patch. -- components: Interpreter Core files: testExceptionStringRoundTrip.py messages: 65586 nosy: rharris severity: normal status: open title: Strings passed to KeyError do not round trip type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10048/testExceptionStringRoundTrip.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2651> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2651] Strings passed to KeyError do not round trip
Rick Harris <[EMAIL PROTECTED]> added the comment: I think it is important to round-trip for at least two reasons: 1) Consistency. Other built-in exceptions behave this way, why should KeyError be any different? Okay, technically 3 UnicodeErrors don't allow just strings to be passed in (perhaps they should :-); but for common exception classes, they all behave the same way. To quote PEP-20: "Special cases aren't special enough to break the rules" 2) Intuitiveness. Decorating the string with quotes is unexpected; it has already caused at least one bug and could cause more. Ensuring intuitive round-trip behavior is an important enough issue that is explicitly discussed in PEP 327 for the decimal type. Why can't intuitiveness be restored to KeyError in Py3K? __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2651> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1675951] [gzip] Performance for small reads and fix seek problem
Rick Harris added the comment: Are compatibility concerns the main reason this patch has yet to be applied? If so, could we allay those fears by keeping the default seek-y behavior and only introducing the new seek-less style when a 'noseek' flag is passed? -- nosy: +rharris ___ Python tracker <http://bugs.python.org/issue1675951> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com