1.. release date: 2016-07-11 2.. bpo: 27278 3.. date: 9361 4.. nonce: y_HkGw 5.. original section: Library 6.. section: Security 7 8Fix os.urandom() implementation using getrandom() on Linux. Truncate size 9to INT_MAX and loop until we collected enough random bytes, instead of 10casting a directly Py_ssize_t to int. 11 12.. 13 14.. bpo: 22636 15.. date: 9357 16.. nonce: 3fQW_g 17.. original section: Library 18.. section: Security 19 20Avoid shell injection problems with ctypes.util.find_library(). 21 22.. 23 24.. bpo: 27473 25.. date: 9385 26.. nonce: _nOtTA 27.. section: Core and Builtins 28 29Fixed possible integer overflow in bytes and bytearray concatenations. 30Patch by Xiang Zhang. 31 32.. 33 34.. bpo: 23034 35.. date: 9384 36.. nonce: GWaUqn 37.. section: Core and Builtins 38 39The output of a special Python build with defined COUNT_ALLOCS, 40SHOW_ALLOC_COUNT or SHOW_TRACK_COUNT macros is now off by default. It can 41be re-enabled using the "-X showalloccount" option. It now outputs to 42stderr instead of stdout. 43 44.. 45 46.. bpo: 27443 47.. date: 9383 48.. nonce: 87ZwZ1 49.. section: Core and Builtins 50 51__length_hint__() of bytearray iterators no longer return a negative integer 52for a resized bytearray. 53 54.. 55 56.. bpo: 27007 57.. date: 9382 58.. nonce: Gg8Um4 59.. section: Core and Builtins 60 61The fromhex() class methods of bytes and bytearray subclasses now return an 62instance of corresponding subclass. 63 64.. 65 66.. bpo: 26844 67.. date: 9381 68.. nonce: I0wdnY 69.. section: Library 70 71Fix error message for imp.find_module() to refer to 'path' instead of 72'name'. Patch by Lev Maximov. 73 74.. 75 76.. bpo: 23804 77.. date: 9380 78.. nonce: ipFvxc 79.. section: Library 80 81Fix SSL zero-length recv() calls to not block and not raise an error about 82unclean EOF. 83 84.. 85 86.. bpo: 27466 87.. date: 9379 88.. nonce: C_3a8E 89.. section: Library 90 91Change time format returned by http.cookie.time2netscape, confirming the 92netscape cookie format and making it consistent with documentation. 93 94.. 95 96.. bpo: 21708 97.. date: 9378 98.. nonce: RpPYiv 99.. section: Library 100 101Deprecated dbm.dumb behavior that differs from common dbm behavior: creating 102a database in 'r' and 'w' modes and modifying a database in 'r' mode. 103 104.. 105 106.. bpo: 26721 107.. date: 9377 108.. nonce: L37Y7r 109.. section: Library 110 111Change the socketserver.StreamRequestHandler.wfile attribute to implement 112BufferedIOBase. In particular, the write() method no longer does partial 113writes. 114 115.. 116 117.. bpo: 22115 118.. date: 9376 119.. nonce: vG5UQW 120.. section: Library 121 122Added methods trace_add, trace_remove and trace_info in the tkinter.Variable 123class. They replace old methods trace_variable, trace, trace_vdelete and 124trace_vinfo that use obsolete Tcl commands and might not work in future 125versions of Tcl. Fixed old tracing methods: trace_vdelete() with wrong mode 126no longer break tracing, trace_vinfo() now always returns a list of pairs of 127strings, tracing in the "u" mode now works. 128 129.. 130 131.. bpo: 26243 132.. date: 9375 133.. nonce: dBtlhI 134.. section: Library 135 136Only the level argument to zlib.compress() is keyword argument now. The 137first argument is positional-only. 138 139.. 140 141.. bpo: 27038 142.. date: 9374 143.. nonce: yGMV4h 144.. section: Library 145 146Expose the DirEntry type as os.DirEntry. Code patch by Jelle Zijlstra. 147 148.. 149 150.. bpo: 27186 151.. date: 9373 152.. nonce: OtorpF 153.. section: Library 154 155Update os.fspath()/PyOS_FSPath() to check the return value of __fspath__() 156to be either str or bytes. 157 158.. 159 160.. bpo: 18726 161.. date: 9372 162.. nonce: eIXHIl 163.. section: Library 164 165All optional parameters of the dump(), dumps(), load() and loads() functions 166and JSONEncoder and JSONDecoder class constructors in the json module are 167now keyword-only. 168 169.. 170 171.. bpo: 27319 172.. date: 9371 173.. nonce: vDl2zm 174.. section: Library 175 176Methods selection_set(), selection_add(), selection_remove() and 177selection_toggle() of ttk.TreeView now allow passing multiple items as 178multiple arguments instead of passing them as a tuple. Deprecated 179undocumented ability of calling the selection() method with arguments. 180 181.. 182 183.. bpo: 27079 184.. date: 9370 185.. nonce: c7d0Ym 186.. section: Library 187 188Fixed curses.ascii functions isblank(), iscntrl() and ispunct(). 189 190.. 191 192.. bpo: 27294 193.. date: 9369 194.. nonce: 0WSp9y 195.. section: Library 196 197Numerical state in the repr for Tkinter event objects is now represented as 198a combination of known flags. 199 200.. 201 202.. bpo: 27177 203.. date: 9368 204.. nonce: U6jRnd 205.. section: Library 206 207Match objects in the re module now support index-like objects as group 208indices. Based on patches by Jeroen Demeyer and Xiang Zhang. 209 210.. 211 212.. bpo: 26754 213.. date: 9367 214.. nonce: J3n0QW 215.. section: Library 216 217Some functions (compile() etc) accepted a filename argument encoded as an 218iterable of integers. Now only strings and byte-like objects are accepted. 219 220.. 221 222.. bpo: 26536 223.. date: 9366 224.. nonce: DgLWm- 225.. section: Library 226 227socket.ioctl now supports SIO_LOOPBACK_FAST_PATH. Patch by Daniel Stokes. 228 229.. 230 231.. bpo: 27048 232.. date: 9365 233.. nonce: EVe-Bk 234.. section: Library 235 236Prevents distutils failing on Windows when environment variables contain 237non-ASCII characters 238 239.. 240 241.. bpo: 27330 242.. date: 9364 243.. nonce: GJaFCV 244.. section: Library 245 246Fixed possible leaks in the ctypes module. 247 248.. 249 250.. bpo: 27238 251.. date: 9363 252.. nonce: Q6v6Qv 253.. section: Library 254 255Got rid of bare excepts in the turtle module. Original patch by Jelle 256Zijlstra. 257 258.. 259 260.. bpo: 27122 261.. date: 9362 262.. nonce: 06t7zN 263.. section: Library 264 265When an exception is raised within the context being managed by a 266contextlib.ExitStack() and one of the exit stack generators catches and 267raises it in a chain, do not re-raise the original exception when exiting, 268let the new chained one through. This avoids the :pep:`479` bug described in 269issue25782. 270 271.. 272 273.. bpo: 16864 274.. date: 9360 275.. nonce: W7tJDa 276.. section: Library 277 278sqlite3.Cursor.lastrowid now supports REPLACE statement. Initial patch by 279Alex LordThorsen. 280 281.. 282 283.. bpo: 26386 284.. date: 9359 285.. nonce: 9L3Ut4 286.. section: Library 287 288Fixed ttk.TreeView selection operations with item id's containing spaces. 289 290.. 291 292.. bpo: 8637 293.. date: 9358 294.. nonce: lHiUSA 295.. section: Library 296 297Honor a pager set by the env var MANPAGER (in preference to one set by the 298env var PAGER). 299 300.. 301 302.. bpo: 16182 303.. date: 9356 304.. nonce: RgFXyr 305.. section: Library 306 307Fix various functions in the "readline" module to use the locale encoding, 308and fix get_begidx() and get_endidx() to return code point indexes. 309 310.. 311 312.. bpo: 27392 313.. date: 9355 314.. nonce: obfni7 315.. section: Library 316 317Add loop.connect_accepted_socket(). Patch by Jim Fulton. 318 319.. 320 321.. bpo: 27477 322.. date: 9354 323.. nonce: iEuL-9 324.. section: IDLE 325 326IDLE search dialogs now use ttk widgets. 327 328.. 329 330.. bpo: 27173 331.. date: 9353 332.. nonce: M-fYaV 333.. section: IDLE 334 335Add 'IDLE Modern Unix' to the built-in key sets. Make the default key set 336depend on the platform. Add tests for the changes to the config module. 337 338.. 339 340.. bpo: 27452 341.. date: 9352 342.. nonce: dLxZ8W 343.. section: IDLE 344 345make command line "idle-test> python test_help.py" work. __file__ is 346relative when python is started in the file's directory. 347 348.. 349 350.. bpo: 27452 351.. date: 9351 352.. nonce: RtWnyR 353.. section: IDLE 354 355add line counter and crc to IDLE configHandler test dump. 356 357.. 358 359.. bpo: 27380 360.. date: 9350 361.. nonce: Q39r9U 362.. section: IDLE 363 364IDLE: add query.py with base Query dialog and ttk widgets. Module had 365subclasses SectionName, ModuleName, and HelpSource, which are used to get 366information from users by configdialog and file =>Load Module. Each subclass 367has itw own validity checks. Using ModuleName allows users to edit bad 368module names instead of starting over. Add tests and delete the two files 369combined into the new one. 370 371.. 372 373.. bpo: 27372 374.. date: 9349 375.. nonce: k3Wj2V 376.. section: IDLE 377 378Test_idle no longer changes the locale. 379 380.. 381 382.. bpo: 27365 383.. date: 9348 384.. nonce: y7ys_A 385.. section: IDLE 386 387Allow non-ascii chars in IDLE NEWS.txt, for contributor names. 388 389.. 390 391.. bpo: 27245 392.. date: 9347 393.. nonce: u9aKO1 394.. section: IDLE 395 396IDLE: Cleanly delete custom themes and key bindings. Previously, when IDLE 397was started from a console or by import, a cascade of warnings was emitted. 398Patch by Serhiy Storchaka. 399 400.. 401 402.. bpo: 24137 403.. date: 9346 404.. nonce: v8o-IT 405.. section: IDLE 406 407Run IDLE, test_idle, and htest with tkinter default root disabled. Fix code 408and tests that fail with this restriction. Fix htests to not create a 409second and redundant root and mainloop. 410 411.. 412 413.. bpo: 27310 414.. date: 9345 415.. nonce: KiURpC 416.. section: IDLE 417 418Fix IDLE.app failure to launch on OS X due to vestigial import. 419 420.. 421 422.. bpo: 26754 423.. date: 9344 424.. nonce: Qm_N79 425.. section: C API 426 427PyUnicode_FSDecoder() accepted a filename argument encoded as an iterable of 428integers. Now only strings and byte-like objects are accepted. 429 430.. 431 432.. bpo: 28066 433.. date: 9343 434.. nonce: _3xImV 435.. section: Build 436 437Fix the logic that searches build directories for generated include files 438when building outside the source tree. 439 440.. 441 442.. bpo: 27442 443.. date: 9342 444.. nonce: S2M0cz 445.. section: Build 446 447Expose the Android API level that python was built against, in 448sysconfig.get_config_vars() as 'ANDROID_API_LEVEL'. 449 450.. 451 452.. bpo: 27434 453.. date: 9341 454.. nonce: 4nRZmn 455.. section: Build 456 457The interpreter that runs the cross-build, found in PATH, must now be of the 458same feature version (e.g. 3.6) as the source being built. 459 460.. 461 462.. bpo: 26930 463.. date: 9340 464.. nonce: 9JUeSD 465.. section: Build 466 467Update Windows builds to use OpenSSL 1.0.2h. 468 469.. 470 471.. bpo: 23968 472.. date: 9339 473.. nonce: 7AuSK9 474.. section: Build 475 476Rename the platform directory from plat-$(MACHDEP) to 477plat-$(PLATFORM_TRIPLET). Rename the config directory (LIBPL) from 478config-$(LDVERSION) to config-$(LDVERSION)-$(PLATFORM_TRIPLET). Install the 479platform specific _sysconfigdata module into the platform directory and 480rename it to include the ABIFLAGS. 481 482.. 483 484.. bpo: 0 485.. date: 9338 486.. nonce: U46i2u 487.. section: Build 488 489Don't use largefile support for GNU/Hurd. 490 491.. 492 493.. bpo: 27332 494.. date: 9337 495.. nonce: OuRZp9 496.. section: Tools/Demos 497 498Fixed the type of the first argument of module-level functions generated by 499Argument Clinic. Patch by Petr Viktorin. 500 501.. 502 503.. bpo: 27418 504.. date: 9336 505.. nonce: W2m_8I 506.. section: Tools/Demos 507 508Fixed Tools/importbench/importbench.py. 509 510.. 511 512.. bpo: 19489 513.. date: 9335 514.. nonce: jvzuO7 515.. section: Documentation 516 517Moved the search box from the sidebar to the header and footer of each page. 518Patch by Ammar Askar. 519 520.. 521 522.. bpo: 27285 523.. date: 9334 524.. nonce: wZur0b 525.. section: Documentation 526 527Update documentation to reflect the deprecation of ``pyvenv`` and normalize 528on the term "virtual environment". Patch by Steve Piercy. 529 530.. 531 532.. bpo: 27027 533.. date: 9333 534.. nonce: 5oRSGL 535.. section: Tests 536 537Added test.support.is_android that is True when this is an Android build. 538