1.. bpo: 7544 2.. date: 7892 3.. nonce: TTDd8s 4.. release date: 2010-03-06 5.. section: Core and Builtins 6 7Preallocate thread memory before creating the thread to avoid a fatal error 8in low memory condition. 9 10.. 11 12.. bpo: 7820 13.. date: 7891 14.. nonce: hEaQ9f 15.. section: Core and Builtins 16 17The parser tokenizer restores all bytes in the right if the BOM check fails. 18 19.. 20 21.. bpo: 7309 22.. date: 7890 23.. nonce: pAF_KB 24.. section: Core and Builtins 25 26Fix unchecked attribute access when converting UnicodeEncodeError, 27UnicodeDecodeError, and UnicodeTranslateError to strings. 28 29.. 30 31.. bpo: 7649 32.. date: 7889 33.. nonce: KS0hoy 34.. section: Core and Builtins 35 36"u'%c' % char" now behaves like "u'%s' % char" and raises a 37UnicodeDecodeError if 'char' is a byte string that can't be decoded using 38the default encoding. 39 40.. 41 42.. bpo: 6902 43.. date: 7888 44.. nonce: RDRX1R 45.. section: Core and Builtins 46 47Fix problem with built-in types format incorrectly with 0 padding. 48 49.. 50 51.. bpo: 2560 52.. date: 7887 53.. nonce: kdK-75 54.. section: Core and Builtins 55 56Remove an unnecessary 'for' loop from ``my_fgets()`` in Parser/myreadline.c. 57 58.. 59 60.. bpo: 7988 61.. date: 7886 62.. nonce: 9h758B 63.. section: Core and Builtins 64 65Fix default alignment to be right aligned for ``complex.__format__``. Now 66it matches other numeric types. 67 68.. 69 70.. bpo: 5211 71.. date: 7885 72.. nonce: bktLaF 73.. section: Core and Builtins 74 75The complex type no longer uses implicit coercion in mixed-type binary 76arithmetic operations. 77 78.. 79 80.. bpo: 7904 81.. date: 7884 82.. nonce: fiQRfj 83.. section: Library 84 85Changes to urllib.parse.urlsplit to handle schemes as defined by RFC3986. 86Anything before :// is considered a scheme and is followed by an authority 87(or netloc) and by '/' led path, which is optional. 88 89.. 90 91.. bpo: 1555570 92.. date: 7883 93.. nonce: ruR9CS 94.. section: Library 95 96email no longer inserts extra blank lines when a \r\n combo crosses an 8192 97byte boundary. 98 99.. 100 101.. bpo: 6906 102.. date: 7882 103.. nonce: BJTdHl 104.. section: Library 105 106Tk should not set Unicode environment variables on Windows. 107 108.. 109 110.. bpo: 1054943 111.. date: 7881 112.. nonce: uHWve2 113.. section: Library 114 115Fix ``unicodedata.normalize('NFC', text)`` for the Public Review Issue #29 116(http://unicode.org/review/pr-29.html). 117 118.. 119 120.. bpo: 7494 121.. date: 7880 122.. nonce: ZnUIo2 123.. section: Library 124 125Fix a crash in ``_lsprof`` (cProfile) after clearing the profiler, reset 126also the pointer to the current pointer context. 127 128.. 129 130.. bpo: 7232 131.. date: 7879 132.. nonce: dD983K 133.. section: Library 134 135Add support for the context management protocol to the ``tarfile.TarFile`` 136class. 137 138.. 139 140.. bpo: 7250 141.. date: 7878 142.. nonce: SqXm2h 143.. section: Library 144 145Fix info leak of os.environ across multi-run uses of 146``wsgiref.handlers.CGIHandler``. 147 148.. 149 150.. bpo: 1729305 151.. date: 7877 152.. nonce: pRiKEW 153.. section: Library 154 155Fix doctest to handle encode error with "backslashreplace". 156 157.. 158 159.. bpo: 691291 160.. date: 7876 161.. nonce: SkVfbl 162.. section: Library 163 164``codecs.open()`` should not convert end of lines on reading and writing. 165 166.. 167 168.. bpo: 7975 169.. date: 7875 170.. nonce: lm8Hlp 171.. section: Library 172 173Correct regression in dict methods supported by bsddb.dbshelve. 174 175.. 176 177.. bpo: 7959 178.. date: 7874 179.. nonce: 0Si0xg 180.. section: Library 181 182ctypes callback functions are now registered correctly with the cycle 183garbage collector. 184 185.. 186 187.. bpo: 7970 188.. date: 7873 189.. nonce: zsdvhZ 190.. section: Library 191 192``email.Generator.flatten`` now correctly flattens message/rfc822 messages 193parsed by ``email.Parser.HeaderParser``. 194 195.. 196 197.. bpo: 3426 198.. date: 7872 199.. nonce: bunX9f 200.. section: Library 201 202``os.path.abspath`` now returns unicode when its arg is unicode. 203 204.. 205 206.. bpo: 7633 207.. date: 7871 208.. nonce: kpPZYL 209.. section: Library 210 211In the decimal module, ``Context`` class methods (with the exception of 212canonical and is_canonical) now accept instances of int and long wherever a 213Decimal instance is accepted, and implicitly convert that argument to 214Decimal. Previously only some arguments were converted. 215 216.. 217 218.. bpo: 6003 219.. date: 7870 220.. nonce: TAoZ-e 221.. section: Library 222 223Add an argument to ``zipfile.Zipfile.writestr`` to specify the compression 224type. 225 226.. 227 228.. bpo: 7893 229.. date: 7869 230.. nonce: IFB3BV 231.. section: Library 232 233``unittest.TextTestResult`` is made public and a ``resultclass`` argument 234added to the TextTestRunner constructor allowing a different result class to 235be used without having to subclass. 236 237.. 238 239.. bpo: 7588 240.. date: 7868 241.. nonce: rOCPeT 242.. section: Library 243 244``unittest.TextTestResult.getDescription`` now includes the test name in 245failure reports even if the test has a docstring. 246 247.. 248 249.. bpo: 5801 250.. date: 7867 251.. nonce: eOropo 252.. section: Library 253 254Remove spurious empty lines in wsgiref. 255 256.. 257 258.. bpo: 1537721 259.. date: 7866 260.. nonce: cM7u3p 261.. section: Library 262 263Add a ``writeheader()`` method to ``csv.DictWriter``. 264 265.. 266 267.. bpo: 7427 268.. date: 7865 269.. nonce: c1z170 270.. section: Library 271 272Improve the representation of httplib.BadStatusLine exceptions. 273 274.. 275 276.. bpo: 7481 277.. date: 7864 278.. nonce: FOM-ZK 279.. section: Library 280 281When a ``threading.Thread`` failed to start it would leave the instance 282stuck in initial state and present in ``threading.enumerate()``. 283 284.. 285 286.. bpo: 1068268 287.. date: 7863 288.. nonce: GTy8EE 289.. section: Library 290 291The subprocess module now handles EINTR in internal ``os.waitpid()`` and 292``os.read()`` system calls where appropriate. 293 294.. 295 296.. bpo: 6729 297.. date: 7862 298.. nonce: WSzBED 299.. section: Library 300 301Add ``ctypes.c_ssize_t`` to represent ssize_t. 302 303.. 304 305.. bpo: 6247 306.. date: 7861 307.. nonce: qqe0rR 308.. section: Library 309 310The argparse module has been added to the standard library. 311 312.. 313 314.. bpo: 0 315.. date: 7860 316.. nonce: sY1Wyi 317.. section: Library 318 319The sqlite3 module was updated to pysqlite 2.6.0. This fixes several 320obscure bugs and allows loading SQLite extensions from shared libraries. 321 322.. 323 324.. bpo: 7808 325.. date: 7859 326.. nonce: Onia6y 327.. section: Library 328 329Fix reference leaks in _bsddb and related tests. 330 331.. 332 333.. bpo: 6544 334.. date: 7858 335.. nonce: NLvwqS 336.. section: Library 337 338Fix a reference leak in the kqueue implementation's error handling. 339 340.. 341 342.. bpo: 0 343.. date: 7857 344.. nonce: yVX0tF 345.. section: Library 346 347Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as 348msvcr100.dll is not a platform assembly anymore. 349 350.. 351 352.. bpo: 7242 353.. date: 7856 354.. nonce: VzdbKI 355.. section: Library 356 357On Solaris 9 and earlier calling ``os.fork()`` from within a thread could 358raise an incorrect RuntimeError about not holding the import lock. The 359import lock is now reinitialized after fork. 360 361.. 362 363.. bpo: 7999 364.. date: 7855 365.. nonce: -6kN7B 366.. section: Library 367 368``os.setreuid()`` and ``os.setregid()`` would refuse to accept a -1 369parameter on some platforms such as OS X. 370 371.. 372 373.. bpo: 7849 374.. date: 7854 375.. nonce: XQLva6 376.. section: Tests 377 378The utility ``test.test_support.check_warnings()`` verifies if warnings are 379effectively raised. A new utility ``check_py3k_warnings()`` is available. 380 381.. 382 383.. bpo: 0 384.. date: 7853 385.. nonce: iFGi5W 386.. section: Tests 387 388The four path modules (genericpath, macpath, ntpath, posixpath) share a 389common TestCase for some tests: test_genericpath.CommonTest. 390 391.. 392 393.. bpo: 0 394.. date: 7852 395.. nonce: xd6x8Q 396.. section: Tests 397 398Print platform information when running the whole test suite, or using the 399``--verbose`` flag. 400 401.. 402 403.. bpo: 767675 404.. date: 7851 405.. nonce: cR-mRY 406.. section: Tests 407 408Enable test_pep277 on POSIX platforms with Unicode-friendly filesystem 409encoding. 410 411.. 412 413.. bpo: 6292 414.. date: 7850 415.. nonce: RJOYAi 416.. section: Tests 417 418For the moment at least, the test suite runs cleanly if python is run with 419the -OO flag. Tests requiring docstrings are skipped. 420 421.. 422 423.. bpo: 7712 424.. date: 7849 425.. nonce: Co5Xm7 426.. section: Tests 427 428test_support gained a new ``temp_cwd`` context manager which is now also 429used by regrtest to run all the tests in a temporary directory. The 430original CWD is saved in ``test.test_support.SAVEDCWD``. Thanks to Florent 431Xicluna who helped with the patch. 432 433.. 434 435.. bpo: 3920 436.. date: 7848 437.. nonce: 5cWPGY 438.. section: Build 439 440Define _BSD_SOURCE on OpenBSD 4.4 through 4.9. (See also: bpo-7903) 441