Repository navigation
Expand file tree
/
Copy pathNEWS
More file actions
10721 lines (7147 loc) · 396 KB
/
Copy pathNEWS
File metadata and controls
10721 lines (7147 loc) · 396 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
+++++++++++
Python News
+++++++++++
What's New in Python 2.7.9?
===========================
*Release date: 2014-12-10*
Library
-------
- Issue #22959: Remove the *check_hostname* parameter of
httplib.HTTPSConnection. The *context* parameter should be used instead.
- Issue #16043: Add a default limit for the amount of data xmlrpclib.gzip_decode
will return. This resolves CVE-2013-1753.
- Issue #16042: CVE-2013-1752: smtplib: Limit amount of data read by limiting
the call to readline(). Original patch by Christian Heimes.
- Issue #16041: In poplib, limit maximum line length read from the server to
prevent CVE-2013-1752.
- Issue #22960: Add a context argument to xmlrpclib.ServerProxy.
Build
-----
- Issue #22935: Allow the ssl module to be compiled if openssl doesn't support
SSL 3.
- Issue #17128: Use private version of OpenSSL for 2.7.9 OS X 10.5+ installer.
What's New in Python 2.7.9 release candidate 1?
===============================================
*Release date: 2014-11-25*
Core and Builtins
-----------------
- Issue #21963: backout issue #1856 patch (avoid crashes and lockups when
daemon threads run while the interpreter is shutting down; instead, these
threads are now killed when they try to take the GIL), as it seems to
break some existing code.
- Issue #22604: Fix assertion error in debug mode when dividing a complex
number by (nan+0j).
- Issue #22470: Fixed integer overflow issues in "backslashreplace" and
"xmlcharrefreplace" error handlers.
- Issue #22526: Fix iterating through files with lines longer than 2^31 bytes.
- Issue #22519: Fix overflow checking in PyString_Repr.
- Issue #22518: Fix integer overflow issues in latin-1 encoding.
- Issue #22379: Fix empty exception message in a TypeError raised in
``str.join``.
- Issue #22221: Now the source encoding declaration on the second line isn't
effective if the first line contains anything except a comment.
- Issue #22023: Fix ``%S``, ``%R`` and ``%V`` formats of
:c:func:`PyUnicode_FromFormat`.
- Issue #21591: Correctly handle qualified exec statements in tuple form by
moving compatibility layer from run-time to AST transformation.
Library
-------
- Issue #22417: Verify certificates by default in httplib (PEP 476).
- Issue #22927: Allow urllib.urlopen to take a *context* parameter to control
SSL settings for HTTPS connections.
- Issue #22921: Allow SSLContext to take the *hostname* parameter even if
OpenSSL doesn't support SNI.
- Issue #9003 and #22366: httplib.HTTPSConnection, urllib2.HTTPSHandler and
urllib2.urlopen now take optional arguments to allow for server certificate
checking, as recommended in public uses of HTTPS. This backport is part of PEP
467.
- Issue #12728: Different Unicode characters having the same uppercase but
different lowercase are now matched in case-insensitive regular expressions.
- Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian
platforms.
- Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
Based on patch by Aivars Kalvāns.
- Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments.
- Issue #22787: Allow the keyfile argument of SSLContext.load_cert_chain to be
None.
- Issue #22775: Fixed unpickling of Cookie.SimpleCookie with protocol 2.
Patch by Tim Graham.
- Issue #22776: Brought excluded code into the scope of a try block in
SysLogHandler.emit().
- Issue #17381: Fixed ranges handling in case-insensitive regular expressions.
- Issue #19329: Optimized compiling charsets in regular expressions.
- Issue #22410: Module level functions in the re module now cache compiled
locale-dependent regular expressions taking into account the locale.
- Issue #8876: distutils now falls back to copying files when hard linking
doesn't work. This allows use with special filesystems such as VirtualBox
shared folders.
- Issue #9351: Defaults set with set_defaults on an argparse subparser
are no longer ignored when also set on the parent parser.
- Issue #20421: Add a .version() method to SSL sockets exposing the actual
protocol version in use.
- Issue #22435: Fix a file descriptor leak when SocketServer bind fails.
- Issue #13664: GzipFile now supports non-ascii Unicode filenames.
- Issue #13096: Fixed segfault in CTypes POINTER handling of large
values.
- Issue #11694: Raise ConversionError in xdrlib as documented. Patch
by Filip Gruszczyński and Claudiu Popa.
- Issue #1686: Fix string.Template when overriding the pattern attribute.
- Issue #11866: Eliminated race condition in the computation of names
for new threads.
- Issue #22219: The zipfile module CLI now adds entries for directories
(including empty directories) in ZIP file.
- Issue #22449: In the ssl.SSLContext.load_default_certs, consult the
enviromental variables SSL_CERT_DIR and SSL_CERT_FILE on Windows.
- Issue #8473: doctest.testfile now uses universal newline mode to read
the test file.
- Issue #20076: Added non derived UTF-8 aliases to locale aliases table.
- Issue #20079: Added locales supported in glibc 2.18 to locale alias table.
- Issue #22530: Allow the ``group()`` method of regular expression match objects
to take a ``long`` as an index.
- Issue #22517: When a io.BufferedRWPair object is deallocated, clear its
weakrefs.
- Issue #10510: distutils register and upload methods now use HTML standards
compliant CRLF line endings.
- Issue #9850: Fixed macpath.join() for empty first component. Patch by
Oleg Oshmyan.
- Issue #20912: Now directories added to ZIP file have correct Unix and MS-DOS
directory attributes.
- Issue #21866: ZipFile.close() no longer writes ZIP64 central directory
records if allowZip64 is false.
- Issue #22415: Fixed debugging output of the GROUPREF_EXISTS opcode in the re
module.
- Issue #22423: Unhandled exception in thread no longer causes unhandled
AttributeError when sys.stderr is None.
- Issue #22419: Limit the length of incoming HTTP request in wsgiref server to
65536 bytes and send a 414 error code for higher lengths. Patch contributed
by Devin Cook.
- Lax cookie parsing in http.cookies could be a security issue when combined
with non-standard cookie handling in some Web browsers. Reported by
Sergey Bobrov.
- Issue #21147: sqlite3 now raises an exception if the request contains a null
character instead of truncate it. Based on patch by Victor Stinner.
- Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command with
empty string or tuple argument.
- Issue #21951: Tkinter now most likely raises MemoryError instead of crash
if the memory allocation fails.
- Issue #22226: First letter no longer is stripped from the "status" key in
the result of Treeview.heading().
- Issue #22051: turtledemo no longer reloads examples to re-run them.
Initialization of variables and gui setup should be done in main(),
which is called each time a demo is run, but not on import.
- Issue #21597: The separator between the turtledemo text pane and the drawing
canvas can now be grabbed and dragged with a mouse. The code text pane can
be widened to easily view or copy the full width of the text. The canvas
can be widened on small screens. Original patches by Jan Kanis and Lita Cho.
- Issue #18132: Turtledemo buttons no longer disappear when the window is
shrunk. Original patches by Jan Kanis and Lita Cho.
- Issue #22312: Fix ntpath.splitdrive IndexError.
- Issue #22216: smtplib now resets its state more completely after a quit. The
most obvious consequence of the previous behavior was a STARTTLS failure
during a connect/starttls/quit/connect/starttls sequence.
- Issue #21305: os.urandom now caches a fd to /dev/urandom. This is a PEP 466
backport from Python 3.
- Issue #21307: As part of PEP 466, backport hashlib.algorithms_guaranteed and
hashlib.algorithms_available.
- Issue #22259: Fix segfault when attempting to fopen a file descriptor
corresponding to a directory.
- Issue #22236: Fixed Tkinter images copying operations in NoDefaultRoot mode.
- Issue #22191: Fixed warnings.__all__.
- Issue #21308: Backport numerous features from Python's ssl module. This is
part of PEP 466.
- Issue #15696: Add a __sizeof__ implementation for mmap objects on Windows.
- Issue #8797: Raise HTTPError on failed Basic Authentication immediately.
Initial patch by Sam Bull.
- Issue #22068: Avoided reference loops with Variables and Fonts in Tkinter.
- Issue #21448: Changed FeedParser feed() to avoid O(N**2) behavior when
parsing long line. Original patch by Raymond Hettinger.
- Issue #17923: glob() patterns ending with a slash no longer match non-dirs on
AIX. Based on patch by Delhallt.
- Issue #21975: Fixed crash when using uninitialized sqlite3.Row (in particular
when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in the
__new__() method.
- Issue #16037: HTTPMessage.readheaders() raises an HTTPException when more
than 100 headers are read. Patch by Jyrki Pulliainen and Daniel Eriksson.
- Issue #21580: Now Tkinter correctly handles binary "data" and "maskdata"
configure options of tkinter.PhotoImage.
- Issue #19612: subprocess.communicate() now also ignores EINVAL when using at
least two pipes.
- Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError
on closed socket.
- Issue #16133: The asynchat.async_chat.handle_read() method now ignores
socket.error() exceptions with blocking I/O errors: EAGAIN, EALREADY,
EINPROGRESS, or EWOULDBLOCK.
- Issue #21990: Clean-up unnecessary and slow inner class definition in
saxutils (Contributed by Alex Gaynor).
- Issue #1730136: Fix the comparison between a tkFont.Font and an object of
another kind.
- Issue #19884: readline: Disable the meta modifier key if stdout is not
a terminal to not write the ANSI sequence "\033[1034h" into stdout. This
sequence is used on some terminal (ex: TERM=xterm-256color") to enable
support of 8 bit characters.
- Issue #22017: Correct reference counting errror in the initialization of the
_warnings module.
- Issue #21868: Prevent turtle crash when undo buffer set to a value less
than one.
- Issue #21151: Fixed a segfault in the _winreg module when ``None`` is passed
as a ``REG_BINARY`` value to SetValueEx. Patch by John Ehresman.
- Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before,
it ignored I/O errors if at least the first C call read() succeed.
- Issue #19870: BaseCookie now parses 'secure' and 'httponly' flags.
Backport of issue #16611.
- Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler
due to possible uninitialized _config_vars.
- Issue #21323: Fix CGIHTTPServer to again handle scripts in CGI subdirectories,
broken by the fix for security issue #19435. Patch by Zach Byrne.
- Issue #22199: Make get_makefile_filename() available in Lib/sysconfig.py
for 2.7 to match other versions of sysconfig.
IDLE
----
- Issue #22221: IDLE now ignores the source encoding declaration on the second
line if the first line contains anything except a comment.
- Issue #17390: Adjust Editor window title; remove 'Python',
move version to end.
- Issue #14105: Idle debugger breakpoints no longer disappear
when inseting or deleting lines.
Extension Modules
-----------------
- Issue #22381: Update zlib to 1.2.8.
- Issue #22176: Update the ctypes module's libffi to v3.1. This release
adds support for the Linux AArch64 and POWERPC ELF ABIv2 little endian
architectures.
Tools/Demos
-----------
- Issue #10712: 2to3 has a new "asserts" fixer that replaces deprecated names
of unittest methods (e.g. failUnlessEqual -> assertEqual).
- Issue #22221: 2to3 and the findnocoding.py script now ignore the source
encoding declaration on the second line if the first line contains anything
except a comment.
- Issue #22201: Command-line interface of the zipfile module now correctly
extracts ZIP files with directory entries. Patch by Ryan Wilson.
Tests
-----
- Issue #22236: Tkinter tests now don't reuse default root window. New root
window is created for every test class.
- Issue #18004: test_overflow in test_list by mistake consumed 40 GiB of memory
on 64-bit systems.
- Issue #21976: Fix test_ssl to accept LibreSSL version strings. Thanks
to William Orr.
- Issue #22770: Prevent some Tk segfaults on OS X when running gui tests.
Build
-----
- Issue #20221: Removed conflicting (or circular) hypot definition when
compiled with VS 2010 or above. Initial patch by Tabrez Mohammed.
- Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
Jonathan Hosmer.
- The documentation Makefile no longer automatically downloads Sphinx. Users are
now required to have Sphinx already installed to build the documentation.
- Issue #21958: Define HAVE_ROUND when building with Visual Studio 2013 and
above. Patch by Zachary Turner.
- Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
now display special message when and only when there are failures.
- Issue #21166: Prevent possible segfaults and other random failures of
python --generate-posix-vars in pybuilddir.txt build target.
- Issue #18096: Fix library order returned by python-config.
- Issue #17219: Add library build dir for Python extension cross-builds.
- Issue #22877: PEP 477 - OS X installer now installs pip.
- Issue #22878: PEP 477 - "make install" and "make altinstall" can now install
or upgrade pip, using the bundled pip provided by the backported ensurepip
module. A configure option, --with-ensurepip[=upgrade|install|no], is
available to set the option for subsequent installs; the default for Python 2
in "no" (do not install or upgrade pip). The option can also be set with
"make [alt]install ENSUREPIP=[upgrade|install|no]".
Windows
-------
- Issue #17896: The Windows build scripts now expect external library sources
to be in ``PCbuild\..\externals`` rather than ``PCbuild\..\..``.
- Issue #17717: The Windows build scripts now use a copy of NASM pulled from
svn.python.org to build OpenSSL.
- Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j.
What's New in Python 2.7.8?
===========================
*Release date: 2014-06-29*
Core and Builtins
-----------------
- Issue #4346: In PyObject_CallMethod and PyObject_CallMethodObjArgs, don't
overwrite the error set in PyObject_GetAttr.
- Issue #21831: Avoid integer overflow when large sizes and offsets are given to
the buffer type. CVE-2014-7185.
- Issue #19656: Running Python with the -3 option now also warns about
non-ascii bytes literals.
- Issue #21642: If the conditional if-else expression, allow an integer written
with no space between itself and the ``else`` keyword (e.g. ``True if 42else
False``) to be valid syntax.
- Issue #21523: Fix over-pessimistic computation of the stack effect of
some opcodes in the compiler. This also fixes a quadratic compilation
time issue noticeable when compiling code with a large number of "and"
and "or" operators.
Library
-------
- Issue #21652: Prevent mimetypes.type_map from containing unicode keys on
Windows.
- Issue #21729: Used the "with" statement in the dbm.dumb module to ensure
files closing.
- Issue #21672: Fix the behavior of ntpath.join on UNC-style paths.
- Issue #19145: The times argument for itertools.repeat now handles
negative values the same way for keyword arguments as it does for
positional arguments.
- Issue #21832: Require named tuple inputs to be exact strings.
- Issue #8343: Named group error messages in the re module did not show
the name of the erroneous group.
- Issue #21491: SocketServer: Fix a race condition in child processes reaping.
- Issue #21635: The difflib SequenceMatcher.get_matching_blocks() method
cache didn't match the actual result. The former was a list of tuples
and the latter was a list of named tuples.
- Issue #21722: The distutils "upload" command now exits with a non-zero
return code when uploading fails. Patch by Martin Dengler.
- Issue #21766: Prevent a security hole in CGIHTTPServer by URL unquoting paths
before checking for a CGI script at that path.
- Issue #21310: Fixed possible resource leak in failed open().
- Issue #21304: Backport the key derivation function hashlib.pbkdf2_hmac from
Python 3 per PEP 466.
- Issue #11709: Fix the pydoc.help function to not fail when sys.stdin is not a
valid file.
- Issue #13223: Fix pydoc.writedoc so that the HTML documentation for methods
that use 'self' in the example code is generated correctly.
- Issue #21552: Fixed possible integer overflow of too long string lengths in
the tkinter module on 64-bit platforms.
- Issue #14315: The zipfile module now ignores extra fields in the central
directory that are too short to be parsed instead of letting a struct.unpack
error bubble up as this "bad data" appears in many real world zip files in
the wild and is ignored by other zip tools.
- Issue #21402: Tkinter.ttk now works when default root window is not set.
- Issue #10203: sqlite3.Row now truly supports sequence protocol. In particulr
it supports reverse() and negative indices. Original patch by Claudiu Popa.
- Issue #8743: Fix interoperability between set objects and the
collections.Set() abstract base class.
- Issue #21481: Argparse equality and inequality tests now return
NotImplemented when comparing to an unknown type.
IDLE
----
- Issue #21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav
Heblikar.
- Issue #18592: Add unittest for SearchDialogBase. Patch by Phil Webster.
- Issue #21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar.
- Issue #21686: add unittest for HyperParser. Original patch by Saimadhav
Heblikar.
- Issue #12387: Add missing upper(lower)case versions of default Windows key
bindings for Idle so Caps Lock does not disable them. Patch by Roger Serwy.
- Issue #21695: Closing a Find-in-files output window while the search is
still in progress no longer closes Idle.
- Issue #18910: Add unittest for textView. Patch by Phil Webster.
- Issue #18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar.
- Issue #18409: Add unittest for AutoComplete. Patch by Phil Webster.
Tests
-----
- Issue #20155: Changed HTTP method names in failing tests in test_httpservers
so that packet filtering software (specifically Windows Base Filtering Engine)
does not interfere with the transaction semantics expected by the tests.
- Issue #19493: Refactored the ctypes test package to skip tests explicitly
rather than silently.
- Issue #18492: All resources are now allowed when tests are not run by
regrtest.py.
- Issue #21605: Added tests for Tkinter images.
- Issue #21493: Added test for ntpath.expanduser(). Original patch by
Claudiu Popa.
- Issue #19925: Added tests for the spwd module. Original patch by Vajrasky Kok.
- Issue #13355: random.triangular() no longer fails with a ZeroDivisionError
when low equals high.
- Issue #21522: Added Tkinter tests for Listbox.itemconfigure(),
PanedWindow.paneconfigure(), and Menu.entryconfigure().
- Issue #20635: Added tests for Tk geometry managers.
Build
-----
- Issue #21811: Anticipated fixes to support OS X versions > 10.9.
Windows
-------
- Issue #21671, CVE-2014-0224: The bundled version of OpenSSL has been
updated to 1.0.1h.
What's New in Python 2.7.7
==========================
*Release date: 2014-05-31*
Build
-----
- Issue #21462: Build the Windows installers with OpenSSL 1.0.1g.
- Issue #19866: Include some test data in the Windows installers, so tests don't
fail.
What's New in Python 2.7.7 release candidate 1?
===============================================
*Release date: 2014-05-17*
Core and Builtins
-----------------
- Issue #21350: Fix file.writelines() to accept arbitrary buffer objects,
as advertised. Patch by Brian Kearns.
- Issue #20437: Fixed 43 potential bugs when deleting objects references.
- Issue #21134: Fix segfault when str is called on an uninitialized
UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object.
- Issue #20494: Ensure that free()d memory arenas are really released on POSIX
systems supporting anonymous memory mappings. Patch by Charles-François
Natali.
- Issue #17825: Cursor "^" is correctly positioned for SyntaxError and
IndentationError.
- Raise a better error when non-unicode codecs are used for a file's coding
cookie.
- Issue #17976: Fixed potential problem with file.write() not detecting IO error
by inspecting the return value of fwrite(). Based on patches by Jaakko Moisio
and Victor Stinner.
- Issue #14432: Generator now clears the borrowed reference to the thread
state. Fix a crash when a generator is created in a C thread that is
destroyed while the generator is still used. The issue was that a generator
contains a frame, and the frame kept a reference to the Python state of the
destroyed C thread. The crash occurs when a trace function is setup.
- Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes.
- Issue #19638: Fix possible crash / undefined behaviour from huge (more than 2
billion characters) input strings in _Py_dg_strtod.
- Issue #12546: Allow \x00 to be used as a fill character when using str, int,
float, and complex __format__ methods.
Library
-------
- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial
shape.
- Issue #7776: Backport Fix ``Host:'' header and reconnection when using
http.client.HTTPConnection.set_tunnel() from Python 3. Patch by Nikolaus
Rath.
- Issue #21306: Backport hmac.compare_digest from Python 3. This is part of PEP
466.
- Issue #21470: Do a better job seeding the random number generator by
using enough bytes to span the full state space of the Mersenne Twister.
- Issue #21469: Reduced the risk of false positives in robotparser by
checking to make sure that robots.txt has been read or does not exist
prior to returning True in can_fetch().
- Issue #21321: itertools.islice() now releases the reference to the source
iterator when the slice is exhausted. Patch by Anton Afanasyev.
- Issue #9291: Do not attempt to re-encode mimetype data read from registry in
ANSI mode. Initial patches by Dmitry Jemerov & Vladimir Iofik.
- Issue #21349: Passing a memoryview to _winreg.SetValueEx now correctly raises
a TypeError where it previously crashed the interpreter. Patch by Brian Kearns
- Fix arbitrary memory access in JSONDecoder.raw_decode with a negative second
parameter. Bug reported by Guido Vranken.
- Issue #21172: isinstance check relaxed from dict to collections.Mapping.
- Issue #21191: In os.fdopen, never close the file descriptor when an exception
happens.
- Issue #21149: Improved thread-safety in logging cleanup during interpreter
shutdown. Thanks to Devin Jeanpierre for the patch.
- Fix possible overflow bug in strop.expandtabs. You shouldn't be using this
module!
- Issue #20145: `assertRaisesRegex` now raises a TypeError if the second
argument is not a string or compiled regex.
- Issue #21058: Fix a leak of file descriptor in tempfile.NamedTemporaryFile(),
close the file descriptor if os.fdopen() fails
- Issue #20283: RE pattern methods now accept the string keyword parameters
as documented. The pattern and source keyword parameters are left as
deprecated aliases.
- Issue #11599: When an external command (e.g. compiler) fails, distutils now
prints out the whole command line (instead of just the command name) if the
environment variable DISTUTILS_DEBUG is set.
- Issue #4931: distutils should not produce unhelpful "error: None" messages
anymore. distutils.util.grok_environment_error is kept but doc-deprecated.
- Improve the random module's default seeding to use 256 bits of entropy
from os.urandom(). This was already done for Python 3, mildly improving
security with a bigger seed space.
- Issue #15618: Make turtle.py compatible with 'from __future__ import
unicode_literals'. Initial patch by Juancarlo Añez.
- Issue #20501: fileinput module no longer reads whole file into memory when using
fileinput.hook_encoded.
- Issue #6815: os.path.expandvars() now supports non-ASCII Unicode environment
variables names and values.
- Issue #20635: Fixed grid_columnconfigure() and grid_rowconfigure() methods of
Tkinter widgets to work in wantobjects=True mode.
- Issue #17671: Fixed a crash when use non-initialized io.BufferedRWPair.
Based on patch by Stephen Tu.
- Issue #8478: Untokenizer.compat processes first token from iterator input.
Patch based on lines from Georg Brandl, Eric Snow, and Gareth Rees.
- Issue #20594: Avoid name clash with the libc function posix_close.
- Issue #19856: shutil.move() failed to move a directory to other directory
on Windows if source name ends with os.altsep.
- Issue #14983: email.generator now always adds a line end after each MIME
boundary marker, instead of doing so only when there is an epilogue. This
fixes an RFC compliance bug and solves an issue with signed MIME parts.
- Issue #20013: Some imap servers disconnect if the current mailbox is
deleted, and imaplib did not handle that case gracefully. Now it
handles the 'bye' correctly.
- Issue #20426: When passing the re.DEBUG flag, re.compile() displays the
debug output every time it is called, regardless of the compilation cache.
- Issue #20368: The null character now correctly passed from Tcl to Python (in
unicode strings only). Improved error handling in variables-related commands.
- Issue #20435: Fix _pyio.StringIO.getvalue() to take into account newline
translation settings.
- Issue #20288: fix handling of invalid numeric charrefs in HTMLParser.
- Issue #19456: ntpath.join() now joins relative paths correctly when a drive
is present.
- Issue #8260: The read(), readline() and readlines() methods of
codecs.StreamReader returned incomplete data when were called after
readline() or read(size). Based on patch by Amaury Forgeot d'Arc.
- Issue #20374: Fix build with GNU readline >= 6.3.
- Issue #14548: Make multiprocessing finalizers check pid before
running to cope with possibility of gc running just after fork.
(Backport from 3.x.)
- Issue #20262: Warnings are raised now when duplicate names are added in the
ZIP file or too long ZIP file comment is truncated.
- Issue #20270: urllib and urlparse now support empty ports.
- Issue #20243: TarFile no longer raise ReadError when opened in write mode.
- Issue #20245: The open functions in the tarfile module now correctly handle
empty mode.
- Issue #20086: Restored the use of locale-independent mapping instead of
locale-dependent str.lower() in locale.normalize().
- Issue #20246: Fix buffer overflow in socket.recvfrom_into.
- Issue #19082: Working SimpleXMLRPCServer and xmlrpclib examples, both in
modules and documentation.
- Issue #13107: argparse and optparse no longer raises an exception when output
a help on environment with too small COLUMNS. Based on patch by
Elazar Gershuni.
- Issue #20207: Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly
asked for.
- Issue #20072: Fixed multiple errors in tkinter with wantobjects is False.
- Issue #1065986: pydoc can now handle unicode strings.
- Issue #16039: CVE-2013-1752: Change use of readline in imaplib module to
limit line length. Patch by Emil Lind.
- Issue #19422: Explicitly disallow non-SOCK_STREAM sockets in the ssl
module, rather than silently let them emit clear text data.
- Issue #20027: Fixed locale aliases for devanagari locales.
- Issue #20067: Tkinter variables now work when wantobjects is false.
- Issue #19020: Tkinter now uses splitlist() instead of split() in configure
methods.
- Issue #12226: HTTPS is now used by default when connecting to PyPI.
- Issue #20048: Fixed ZipExtFile.peek() when it is called on the boundary of
the uncompress buffer and read() goes through more than one readbuffer.
- Issue #20034: Updated alias mapping to most recent locale.alias file
from X.org distribution using makelocalealias.py.
- Issue #5815: Fixed support for locales with modifiers. Fixed support for
locale encodings with hyphens.
- Issue #20026: Fix the sqlite module to handle correctly invalid isolation
level (wrong type).
- Issue #18829: csv.Dialect() now checks type for delimiter, escapechar and
quotechar fields. Original patch by Vajrasky Kok.
- Issue #19855: uuid.getnode() on Unix now looks on the PATH for the
executables used to find the mac address, with /sbin and /usr/sbin as
fallbacks.
- Issue #20007: HTTPResponse.read(0) no more prematurely closes connection.
Original patch by Simon Sapin.
- Issue #19912: Fixed numerous bugs in ntpath.splitunc().
- Issue #19623: Fixed writing to unseekable files in the aifc module.
Fixed writing 'ulaw' (lower case) compressed AIFC files.
- Issue #17919: select.poll.register() again works with poll.POLLNVAL on AIX.
Fixed integer overflow in the eventmask parameter.
- Issue #17200: telnetlib's read_until and expect timeout was broken by the
fix to Issue #14635 in Python 2.7.4 to be interpreted as milliseconds
instead of seconds when the platform supports select.poll (ie: everywhere).
It is now treated as seconds once again.
- Issue #19099: The struct module now supports Unicode format strings.
- Issue #19878: Fix segfault in bz2 module after calling __init__ twice with
non-existent filename. Initial patch by Vajrasky Kok.
- Issue #16373: Prevent infinite recursion for ABC Set class comparisons.
- Issue #19138: doctest's IGNORE_EXCEPTION_DETAIL now allows a match when
no exception detail exists (no colon following the exception's name, or
a colon does follow but no text follows the colon).
- Issue #16231: Fixed pickle.Pickler to only fallback to its default pickling
behaviour when Pickler.persistent_id returns None, but not for any other
false values. This allows false values other than None to be used as
persistent IDs. This behaviour is consistent with cPickle.
- Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with
virtual interface. Original patch by Kent Frazier.
- Issue #11489: JSON decoder now accepts lone surrogates.
- Fix test.test_support.bind_port() to not cause an error when Python was
compiled on a system with SO_REUSEPORT defined in the headers but run on
a system with an OS kernel that does not support that new socket option.
- Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on
big-endian platforms.
- Issue #19449: in csv's writerow, handle non-string keys when generating the
error message that certain keys are not in the 'fieldnames' list.
- Issue #12853: Fix NameError in distutils.command.upload.
- Issue #19523: Closed FileHandler leak which occurred when delay was set.
- Issue #1575020: Fixed support of 24-bit wave files on big-endian platforms.
- Issue #19480: HTMLParser now accepts all valid start-tag names as defined
by the HTML5 standard.
- Issue #17827: Add the missing documentation for ``codecs.encode`` and
``codecs.decode``.
- Issue #6157: Fixed Tkinter.Text.debug(). Original patch by Guilherme Polo.
- Issue #6160: The bbox() method of tkinter.Spinbox now returns a tuple of
integers instead of a string. Based on patch by Guilherme Polo.
- Issue #19286: Directories in ``package_data`` are no longer added to
the filelist, preventing failure outlined in the ticket.
- Issue #6676: Ensure a meaningful exception is raised when attempting
to parse more than one XML document per pyexpat xmlparser instance.
(Original patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with
suggested wording by David Gutteridge)
- Issue #21311: Avoid exception in _osx_support with non-standard compiler
configurations. Patch by John Szakmeister.
Tools/Demos
-----------
- Issue #3561: The Windows installer now has an option, off by default, for
placing the Python installation into the system "Path" environment variable.
This was backported from Python 3.3.
- Add support for ``yield from`` to 2to3.
- Add support for the PEP 465 matrix multiplication operator to 2to3.
- Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them. Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.
IDLE
----
- Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin
consolidating and improving human-validated tests of Idle. Change other files
as needed to work with htest. Running the module as __main__ runs all tests.
- Issue #21139: Change default paragraph width to 72, the PEP 8 recommendation.
- Issue #21284: Paragraph reformat test passes after user changes reformat width.
- Issue #20406: Use Python application icons for Idle window title bars.
Patch mostly by Serhiy Storchaka.
- Issue #21029: Occurrences of "print" are now consistently colored as
being a keyword (the colorizer doesn't know if print functions are
enabled in the source).
- Issue #17721: Remove non-functional configuration dialog help button until we
make it actually gives some help when clicked. Patch by Guilherme Simões.
- Issue #17390: Add Python version to Idle editor window title bar.
Original patches by Edmond Burnett and Kent Johnson.
- Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
- Issue #19481: print() of unicode, str or bytearray subclass instance in IDLE
no more hangs.
- Issue #18270: Prevent possible IDLE AttributeError on OS X when no initial
shell window is present.
- Issue #17654: Ensure IDLE menus are customized properly on OS X for
non-framework builds and for all variants of Tk.
Tests
-----
- Issue #17752: Fix distutils tests when run from the installed location.
- Issue #18604: Consolidated checks for GUI availability. All platforms now
at least check whether Tk can be instantiated when the GUI resource is
requested.
- Issue #20946: Correct alignment assumptions of some ctypes tests.
- Issue #20743: Fix a reference leak in test_tcl.
- Issue #20510: Rewrote test_exit in test_sys to match existing comments,
use modern unittest features, and use helpers from test.script_helper
instead of using subprocess directly. Initial patch by Gareth Rees.
- Issue #20532: Tests which use _testcapi now are marked as CPython only.
- Issue #19920: Added tests for TarFile.list(). Based on patch by Vajrasky Kok.
- Issue #19990: Added tests for the imghdr module. Based on patch by
Claudiu Popa.
- Issue #19804: The test_find_mac test in test_uuid is now skipped if the
ifconfig executable is not available.
- Issue #19886: Use better estimated memory requirements for bigmem tests.
- Backported tests for Tkinter variables.
- Issue #19320: test_tcl no longer fails when wantobjects is false.
- Issue #19683: Removed empty tests from test_minidom. Initial patch by
Ajitesh Gupta.
- Issue #19928: Implemented a test for repr() of cell objects.
- Issue #19595, #19987: Re-enabled a long-disabled test in test_winsound.
- Issue #19588: Fixed tests in test_random that were silently skipped most
of the time. Patch by Julian Gindi.
- Issue #17883: Tweak test_tcl testLoadWithUNC to skip the test in the
event of a permission error on Windows and to properly report other
skip conditions.
- Issue #17883: Backported _is_gui_available() in test.test_support to
avoid hanging Windows buildbots on test_ttk_guionly.
- Issue #18702, #19572: All skipped tests now reported as skipped.
- Issue #19085: Added basic tests for all tkinter widget options.
- Issue #20605: Make test_socket getaddrinfo OS X segfault test more robust.
- Issue #20939: Avoid various network test failures due to new
redirect of http://www.python.org/ to https://www.python.org:
use http://www.example.com instead.
- Issue #21093: Prevent failures of ctypes test_macholib on OS X if a
copy of libz exists in $HOME/lib or /usr/local/lib.
Build
-----
- Issue #21285: Refactor and fix curses configure check to always search
in a ncursesw directory.
Documentation
-------------
- Issue #20255: Update the about and bugs pages.
- Issue #18840: Introduce the json module in the tutorial, and de-emphasize
the pickle module.
- Issue #19795: Improved markup of True/False constants.
Windows
-------
- Issue #21303, #20565: Updated the version of Tcl/Tk included in the
installer from 8.5.2 to 8.5.15.
Mac OS X
--------