From: Nadeem Vawda Date: Wed, 2 Jan 2013 22:13:53 +0000 (+0100) Subject: Issue #16828: Fix error incorrectly raised by bz2.compress(b'') and bz2.BZ2Compressor... X-Git-Tag: v3.4.0a1~1703 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef408aea3dbf9dcedbad441b52af170fa82842ae;p=python Issue #16828: Fix error incorrectly raised by bz2.compress(b'') and bz2.BZ2Compressor.compress(b''). Initial patch by Martin Packman. --- ef408aea3dbf9dcedbad441b52af170fa82842ae diff --cc Lib/test/test_bz2.py index fb2f782886,912fac1c33..8703df7909 --- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@@ -47,9 -47,10 +47,10 @@@ class BaseTest(unittest.TestCase) ] TEXT = b''.join(TEXT_LINES) DATA = b'BZh91AY&SY.\xc8N\x18\x00\x01>_\x80\x00\x10@\x02\xff\xf0\x01\x07n\x00?\xe7\xff\xe00\x01\x99\xaa\x00\xc0\x03F\x86\x8c#&\x83F\x9a\x03\x06\xa6\xd0\xa6\x93M\x0fQ\xa7\xa8\x06\x804hh\x12$\x11\xa4i4\xf14S\xd2\x88\xe5\xcd9gd6\x0b\n\xe9\x9b\xd5\x8a\x99\xf7\x08.K\x8ev\xfb\xf7xw\xbb\xdf\xa1\x92\xf1\xdd|/";\xa2\xba\x9f\xd5\xb1#A\xb6\xf6\xb3o\xc9\xc5y\\\xebO\xe7\x85\x9a\xbc\xb6f8\x952\xd5\xd7"%\x89>V,\xf7\xa6z\xe2\x9f\xa3\xdf\x11\x11"\xd6E)I\xa9\x13^\xca\xf3r\xd0\x03U\x922\xf26\xec\xb6\xed\x8b\xc3U\x13\x9d\xc5\x170\xa4\xfa^\x92\xacDF\x8a\x97\xd6\x19\xfe\xdd\xb8\xbd\x1a\x9a\x19\xa3\x80ankR\x8b\xe5\xd83]\xa9\xc6\x08\x82f\xf6\xb9"6l$\xb8j@\xc0\x8a\xb0l1..\xbak\x83ls\x15\xbc\xf4\xc1\x13\xbe\xf8E\xb8\x9d\r\xa8\x9dk\x84\xd3n\xfa\xacQ\x07\xb1%y\xaav\xb4\x08\xe0z\x1b\x16\xf5\x04\xe9\xcc\xb9\x08z\x1en7.G\xfc]\xc9\x14\xe1B@\xbb!8`' + EMPTY_DATA = b'BZh9\x17rE8P\x90\x00\x00\x00\x00' def setUp(self): - self.filename = TESTFN + self.filename = support.TESTFN def tearDown(self): if os.path.isfile(self.filename): diff --cc Misc/NEWS index eaa8cfc30d,5a9e1aea35..9e629e4164 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -199,10 -123,9 +199,13 @@@ Core and Builtin Library ------- + - Issue #16828: Fix error incorrectly raised by bz2.compress(b'') and + bz2.BZ2Compressor.compress(b''). Initial patch by Martin Packman. + +- Issue #16833: In http.client.HTTPConnection, do not concatenate the request + headers and body when the payload exceeds 16 KB, since it can consume more + memory for no benefit. Patch by Benno Leslie. + - Issue #16541: tk_setPalette() now works with keyword arguments. - Issue #16820: In configparser, `parser.popitem()` no longer raises ValueError.