forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NEWS
6082 lines (4039 loc) · 232 KB
/
NEWS
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 3.5 alpha 1?
=================================
Release date: TBA
Core and Builtins
-----------------
- Issue #22735: Fix many edge cases (including crashes) involving custom mro()
implementations.
- Issue #22896: Avoid using PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
and PyObject_AsWriteBuffer().
- Issue #21295: Revert some changes (issue #16795) to AST line numbers and
column offsets that constituted a regression.
- Issue #22986: Allow changing an object's __class__ between a dynamic type and
static type in some cases.
- Issue #15859: PyUnicode_EncodeFSDefault(), PyUnicode_EncodeMBCS() and
PyUnicode_EncodeCodePage() now raise an exception if the object is not an
Unicode object. For PyUnicode_EncodeFSDefault(), it was already the case on
platforms other than Windows. Patch written by Campbell Barton.
- Issue #21408: The default __ne__() now returns NotImplemented if __eq__()
returned NotImplemented. Original patch by Martin Panter.
- Issue #23321: Fixed a crash in str.decode() when error handler returned
replacment string longer than mailformed input data.
- Issue #22286: The "backslashreplace" error handlers now works with
decoding and translating.
- Issue #23253: Delay-load ShellExecute[AW] in os.startfile for reduced
startup overhead on Windows.
- Issue #22038: pyatomic.h now uses stdatomic.h or GCC built-in functions for
atomic memory access if available. Patch written by Vitor de Lima and Gustavo
Temple.
- Issue #20284: %-interpolation (aka printf) formatting added for bytes and
bytearray.
- Issue #23048: Fix jumping out of an infinite while loop in the pdb.
- Issue #20335: bytes constructor now raises TypeError when encoding or errors
is specified with non-string argument. Based on patch by Renaud Blanch.
- Issue #22834: If the current working directory ends up being set to a
non-existent directory then import will no longer raise FileNotFoundError.
- Issue #22869: Move the interpreter startup & shutdown code to a new
dedicated pylifecycle.c module
- Issue #22847: Improve method cache efficiency.
- Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff
bytes on a 32-bit platform.
- Issue #22653: Fix an assertion failure in debug mode when doing a reentrant
dict insertion in debug mode.
- Issue #22643: Fix integer overflow in Unicode case operations (upper, lower,
title, swapcase, casefold).
- Issue #17636: Circular imports involving relative imports are now
supported.
- Issue #22604: Fix assertion error in debug mode when dividing a complex
number by (nan+0j).
- Issue #21052: Do not raise ImportWarning when sys.path_hooks or sys.meta_path
are set to None.
- Issue #16518: Use 'bytes-like object required' in error messages that
previously used the far more cryptic "'x' does not support the buffer
protocol.
- Issue #22470: Fixed integer overflow issues in "backslashreplace",
"xmlcharrefreplace", and "surrogatepass" error handlers.
- Issue #22540: speed up `PyObject_IsInstance` and `PyObject_IsSubclass` in the
common case that the second argument has metaclass `type`.
- Issue #18711: Add a new `PyErr_FormatV` function, similar to `PyErr_Format`
but accepting a `va_list` argument.
- Issue #22520: Fix overflow checking when generating the repr of a unicode
object.
- Issue #22519: Fix overflow checking in PyBytes_Repr.
- Issue #22518: Fix integer overflow issues in latin-1 encoding.
- Issue #16324: _charset parameter of MIMEText now also accepts
email.charset.Charset instances. Initial patch by Claude Paroz.
- Issue #1764286: Fix inspect.getsource() to support decorated functions.
Patch by Claudiu Popa.
- Issue #18554: os.__all__ includes posix functions.
- Issue #21391: Use os.path.abspath in the shutil module.
- Issue #11471: avoid generating a JUMP_FORWARD instruction at the end of
an if-block if there is no else-clause. Original patch by Eugene Toder.
- Issue #22215: Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
- Issue #22258: Fix the internal function set_inheritable() on Illumos.
This platform exposes the function ``ioctl(FIOCLEX)``, but calling it fails
with errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable()
now falls back to the slower ``fcntl()`` (``F_GETFD`` and then ``F_SETFD``).
- Issue #21389: Displaying the __qualname__ of the underlying function in the
repr of a bound method.
- Issue #22206: Using pthread, PyThread_create_key() now sets errno to ENOMEM
and returns -1 (error) on integer overflow.
- Issue #20184: Argument Clinic based signature introspection added for
30 of the builtin functions.
- Issue #22116: C functions and methods (of the 'builtin_function_or_method'
type) can now be weakref'ed. Patch by Wei Wu.
- Issue #22077: Improve index error messages for bytearrays, bytes, lists,
and tuples by adding 'or slices'. Added ', not <typename' for bytearrays.
Original patch by Claudiu Popa.
- Issue #20179: Apply Argument Clinic to bytes and bytearray.
Patch by Tal Einat.
- Issue #22082: Clear interned strings in slotdefs.
- Upgrade Unicode database to Unicode 7.0.0.
- Issue #21897: Fix a crash with the f_locals attribute with closure
variables when frame.clear() has been called.
- Issue #21205: Add a new ``__qualname__`` attribute to generator, the
qualified name, and use it in the representation of a generator
(``repr(gen)``). The default name of the generator (``__name__`` attribute)
is now get from the function instead of the code. Use ``gen.gi_code.co_name``
to get the name of the code.
- Issue #21669: With the aid of heuristics in SyntaxError.__init__, the
parser now attempts to generate more meaningful (or at least more search
engine friendly) error messages when "exec" and "print" are used as
statements.
- 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.
- Issue #21418: Fix a crash in the builtin function super() when called without
argument and without current frame (ex: embedded Python).
- Issue #21425: Fix flushing of standard streams in the interactive
interpreter.
- Issue #21435: In rare cases, when running finalizers on objects in cyclic
trash a bad pointer dereference could occur due to a subtle flaw in
internal iteration logic.
- Issue #21377: PyBytes_Concat() now tries to concatenate in-place when the
first argument has a reference count of 1. Patch by Nikolaus Rath.
- Issue #20355: -W command line options now have higher priority than the
PYTHONWARNINGS environment variable. Patch by Arfrever.
- Issue #21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c.
- Issue #20904: Support setting FPU precision on m68k.
- Issue #21209: Fix sending tuples to custom generator objects with the yield
from syntax.
- Issue #21193: pow(a, b, c) now raises ValueError rather than TypeError when b
is negative. Patch by Josh Rosenberg.
- PEP 465 and Issue #21176: Add the '@' operator for matrix multiplication.
- Issue #21134: Fix segfault when str is called on an uninitialized
UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object.
- Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by
Andreas Schwab.
- Issue #20929: Add a type cast to avoid shifting a negative number.
- Issue #20731: Properly position in source code files even if they
are opened in text mode. Patch by Serhiy Storchaka.
- Issue #20637: Key-sharing now also works for instance dictionaries of
subclasses. Patch by Peter Ingebretson.
- Issue #8297: Attributes missing from modules now include the module name
in the error text. Original patch by ysj.ray.
- Issue #19995: %c, %o, %x, and %X now raise TypeError on non-integer input.
- Issue #19655: The ASDL parser - used by the build process to generate code for
managing the Python AST in C - was rewritten. The new parser is self contained
and does not require to carry long the spark.py parser-generator library;
spark.py was removed from the source base.
- Issue #12546: Allow \x00 to be used as a fill character when using str, int,
float, and complex __format__ methods.
- Issue #20480: Add ipaddress.reverse_pointer. Patch by Leon Weber.
- Issue #13598: Modify string.Formatter to support auto-numbering of
replacement fields. It now matches the behavior of str.format() in
this regard. Patches by Phil Elson and Ramchandra Apte.
- Issue #8931: Make alternate formatting ('#') for type 'c' raise an
exception. In versions prior to 3.5, '#' with 'c' had no effect. Now
specifying it is an error. Patch by Torsten Landschoff.
- Issue #23165: Perform overflow checks before allocating memory in the
_Py_char2wchar function.
Library
-------
- Issue #13128: Print response headers for CONNECT requests when debuglevel
> 0. Patch by Demian Brecht.
- Issue #15381: Optimized io.BytesIO to make less allocations and copyings.
- Issue #22818: Splitting on a pattern that could match an empty string now
raises a warning. Patterns that can only match empty strings are now
rejected.
- Issue #23099: Closing io.BytesIO with exported buffer is rejected now to
prevent corrupting exported buffer.
- Issue #23326: Removed __ne__ implementations. Since fixing default __ne__
implementation in issue #21408 they are redundant.
- Issue #23363: Fix possible overflow in itertools.permutations.
- Issue #23364: Fix possible overflow in itertools.product.
- Issue #23366: Fixed possible integer overflow in itertools.combinations.
- Issue #23366: Fixed possible integer overflow in itertools.combinations.
- Issue #23369: Fixed possible integer overflow in
_json.encode_basestring_ascii.
- Issue #23353: Fix the exception handling of generators in
PyEval_EvalFrameEx(). At entry, save or swap the exception state even if
PyEval_EvalFrameEx() is called with throwflag=0. At exit, the exception state
is now always restored or swapped, not only if why is WHY_YIELD or
WHY_RETURN. Patch co-written with Antoine Pitrou.
- Issue #14099: Restored support of writing ZIP files to tellable but
non-seekable streams.
- Issue #14099: Writing to ZipFile and reading multiple ZipExtFiles is
threadsafe now.
- Issue #19361: JSON decoder now raises JSONDecodeError instead of ValueError.
- Issue #18518: timeit now rejects statements which can't be compiled outside
a function or a loop (e.g. "return" or "break").
- Issue #23094: Fixed readline with frames in Python implementation of pickle.
- Issue #23268: Fixed bugs in the comparison of ipaddress classes.
- Issue #21408: Removed incorrect implementations of __ne__() which didn't
returned NotImplemented if __eq__() returned NotImplemented. The default
__ne__() now works correctly.
- Issue #19996: :class:`email.feedparser.FeedParser` now handles (malformed)
headers with no key rather than amusing the body has started.
- Issue #20188: Support Application-Layer Protocol Negotiation (ALPN) in the ssl
module.
- Issue #23133: Pickling of ipaddress objects now produces more compact and
portable representation.
- Issue #23248: Update ssl error codes from latest OpenSSL git master.
- Issue #23266: Much faster implementation of ipaddress.collapse_addresses()
when there are many non-consecutive addresses.
- Issue #23098: 64-bit dev_t is now supported in the os module.
- Issue #21817: When an exception is raised in a task submitted to a
ProcessPoolExecutor, the remote traceback is now displayed in the
parent process. Patch by Claudiu Popa.
- Issue #15955: Add an option to limit output size when decompressing LZMA
data. Patch by Nikolaus Rath and Martin Panter.
- Issue #23250: In the http.cookies module, capitalize "HttpOnly" and "Secure"
as they are written in the standard.
- Issue #23063: In the disutils' check command, fix parsing of reST with code or
code-block directives.
- Issue #23209, #23225: selectors.BaseSelector.get_key() now raises a
RuntimeError if the selector is closed. And selectors.BaseSelector.close()
now clears its internal reference to the selector mapping to break a
reference cycle. Initial patch written by Martin Richard.
- Issue #19777: Provide a home() classmethod on Path objects. Contributed
by Victor Salgado and Mayank Tripathi.
- Issue #23206: Make ``json.dumps(..., ensure_ascii=False)`` as fast as the
default case of ``ensure_ascii=True``. Patch by Naoki Inada.
- Issue #23185: Add math.inf and math.nan constants.
- Issue #23186: Add ssl.SSLObject.shared_ciphers() and
ssl.SSLSocket.shared_ciphers() to fetch the client's list ciphers sent at
handshake.
- Issue #23143: Remove compatibility with OpenSSLs older than 0.9.8.
- Issue #23132: Improve performance and introspection support of comparison
methods created by functool.total_ordering.
- Issue #19776: Add a expanduser() method on Path objects.
- Issue #23112: Fix SimpleHTTPServer to correctly carry the query string and
fragment when it redirects to add a trailing slash.
- Issue #21793: Added http.HTTPStatus enums (i.e. HTTPStatus.OK,
HTTPStatus.NOT_FOUND). Patch by Demian Brecht.
- Issue #23093: In the io, module allow more operations to work on detached
streams.
- Issue #23111: In the ftplib, make ssl.PROTOCOL_SSLv23 the default protocol
version.
- Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
instead of reading /dev/urandom, to get pseudo-random bytes.
- Issue #19104: pprint now produces evaluable output for wrapped strings.
- Issue #23071: Added missing names to codecs.__all__. Patch by Martin Panter.
- Issue #22783: Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX
opcode if possible.
- Issue #15513: Added a __sizeof__ implementation for pickle classes.
- Issue #19858: pickletools.optimize() now aware of the MEMOIZE opcode, can
produce more compact result and no longer produces invalid output if input
data contains MEMOIZE opcodes together with PUT or BINPUT opcodes.
- Issue #22095: Fixed HTTPConnection.set_tunnel with default port. The port
value in the host header was set to "None". Patch by Demian Brecht.
- Issue #23016: A warning no longer produces an AttributeError when the program
is run with pythonw.exe.
- Issue #21775: shutil.copytree(): fix crash when copying to VFAT. An exception
handler assumed that that OSError objects always have a 'winerror' attribute.
That is not the case, so the exception handler itself raised AttributeError
when run on Linux (and, presumably, any other non-Windows OS).
Patch by Greg Ward.
- Issue #1218234: Fix inspect.getsource() to load updated source of
reloaded module. Initial patch by Berker Peksag.
- Issue #21740: Support wrapped callables in doctest. Patch by Claudiu Popa.
- Issue #23009: Make sure selectors.EpollSelecrtor.select() works when no
FD is registered.
- Issue #22959: In the constructor of http.client.HTTPSConnection, prefer the
context's check_hostname attribute over the *check_hostname* parameter.
- Issue #22696: Add function :func:`sys.is_finalizing` to know about
interpreter shutdown.
- Issue #16043: Add a default limit for the amount of data xmlrpclib.gzip_decode
will return. This resolves CVE-2013-1753.
- Issue #14099: ZipFile.open() no longer reopen the underlying file. Objects
returned by ZipFile.open() can now operate independently of the ZipFile even
if the ZipFile was created by passing in a file-like object as the first
argument to the constructor.
- Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile is
asked to compile a source file containing multiple dots in the source file
name.
- Issue #21971: Update turtledemo doc and add module to the index.
- Issue #21032. Fixed socket leak if HTTPConnection.getresponse() fails.
Original patch by Martin Panter.
- Issue #22407: Deprecated the use of re.LOCALE flag with str patterns or
re.ASCII. It was newer worked.
- Issue #22902: The "ip" command is now used on Linux to determine MAC address
in uuid.getnode(). Pach by Bruno Cauet.
- Issue #22960: Add a context argument to xmlrpclib.ServerProxy constructor.
- Issue #22389: Add contextlib.redirect_stderr().
- Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
availability of the function is checked during the compilation. Patch written
by Bernard Spil.
- Issue #22915: SAX parser now supports files opened with file descriptor or
bytes path.
- Issue #22609: Constructors and update methods of mapping classes in the
collections module now accept the self keyword argument.
- Issue #22940: Add readline.append_history_file.
- Issue #19676: Added the "namereplace" error handler.
- Issue #22788: Add *context* parameter to logging.handlers.HTTPHandler.
- Issue #22921: Allow SSLContext to take the *hostname* parameter even if
OpenSSL doesn't support SNI.
- Issue #22894: TestCase.subTest() would cause the test suite to be stopped
when in failfast mode, even in the absence of failures.
- Issue #22796: HTTP cookie parsing is now stricter, in order to protect
against potential injection attacks.
- Issue #22370: Windows detection in pathlib is now more robust.
- Issue #22841: Reject coroutines in asyncio add_signal_handler().
Patch by Ludovic.Gasc.
- Issue #19494: Added urllib.request.HTTPBasicPriorAuthHandler. Patch by
Matej Cepl.
- Issue #22578: Added attributes to the re.error class.
- Issue #22849: Fix possible double free in the io.TextIOWrapper constructor.
- 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 #21650: Add an `--sort-keys` option to json.tool CLI.
- Issue #22824: Updated reprlib output format for sets to use set literals.
Patch contributed by Berker Peksag.
- Issue #22824: Updated reprlib output format for arrays to display empty
arrays without an unnecessary empty list. Suggested by Serhiy Storchaka.
- Issue #22406: Fixed the uu_codec codec incorrectly ported to 3.x.
Based on patch by Martin Panter.
- 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 #22417: Verify certificates by default in httplib (PEP 476).
- Issue #22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2
and above. Patch by Tim Graham.
- Issue #22776: Brought excluded code into the scope of a try block in
SysLogHandler.emit().
- Issue #22665: Add missing get_terminal_size and SameFileError to
shutil.__all__.
- Issue #6623: Remove deprecated Netrc class in the ftplib module. Patch by
Matt Chaput.
- Issue #17381: Fixed handling of case-insensitive ranges 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 #22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.)
now return False when the underlying stat call raises NotADirectoryError.
- 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 #22217: Implemented reprs of classes in the zipfile module.
- Issue #22457: Honour load_tests in the start_dir of discovery.
- Issue #18216: gettext now raises an error when a .mo file has an
unsupported major version number. Patch by Aaron Hill.
- Issue #13918: Provide a locale.delocalize() function which can remove
locale-specific number formatting from a string representing a number,
without then converting it to a specific type. Patch by Cédric Krier.
- Issue #22676: Make the pickling of global objects which don't have a
__module__ attribute less slow.
- Issue #18853: Fixed ResourceWarning in shlex.__nain__.
- Issue #9351: Defaults set with set_defaults on an argparse subparser
are no longer ignored when also set on the parent parser.
- Issue #7559: unittest test loading ImportErrors are reported as import errors
with their import exception rather than as attribute errors after the import
has already failed.
- Issue #19746: Make it possible to examine the errors from unittest
discovery without executing the test suite. The new `errors` attribute
on TestLoader exposes these non-fatal errors encountered during discovery.
- Issue #21991: Make email.headerregistry's header 'params' attributes
be read-only (MappingProxyType). Previously the dictionary was modifiable
but a new one was created on each access of the attribute.
- Issue #22638: SSLv3 is now disabled throughout the standard library.
It can still be enabled by instantiating a SSLContext manually.
- Issue #22641: In asyncio, the default SSL context for client connections
is now created using ssl.create_default_context(), for stronger security.
- Issue #17401: Include closefd in io.FileIO repr.
- Issue #21338: Add silent mode for compileall. quiet parameters of
compile_{dir, file, path} functions now have a multilevel value. Also,
-q option of the CLI now have a multilevel value. Patch by Thomas Kluyver.
- Issue #20152: Convert the array and cmath modules to Argument Clinic.
- Issue #18643: Add socket.socketpair() on Windows.
- Issue #22435: Fix a file descriptor leak when SocketServer bind fails.
- 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 #19380: Optimized parsing of regular expressions.
- Issue #1519638: Now unmatched groups are replaced with empty strings in re.sub()
and re.subn().
- Issue #18615: sndhdr.what/whathdr now return a namedtuple.
- Issue #22462: Fix pyexpat's creation of a dummy frame to make it
appear in exception tracebacks.
- Issue #21965: Add support for in-memory SSL to the ssl module. Patch
by Geert Jansen.
- Issue #21173: Fix len() on a WeakKeyDictionary when .clear() was called
with an iterator alive.
- Issue #11866: Eliminated race condition in the computation of names
for new threads.
- Issue #21905: Avoid RuntimeError in pickle.whichmodule() when sys.modules
is mutated while iterating. Patch by Olivier Grisel.
- Issue #11271: concurrent.futures.Executor.map() now takes a *chunksize*
argument to allow batching of tasks in child processes and improve
performance of ProcessPoolExecutor. Patch by Dan O'Reilly.
- Issue #21883: os.path.join() and os.path.relpath() now raise a TypeError with
more helpful error message for unsupported or mismatched types of arguments.
- 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 #22508: The email.__version__ variable has been removed; the email
code is no longer shipped separately from the stdlib, and __version__
hasn't been updated in several releases.
- 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 #20218: Added convenience methods read_text/write_text and read_bytes/
write_bytes to pathlib.Path objects.
- Issue #22437: Number of capturing groups in regular expression is no longer
limited by 100.
- Issue #17442: InteractiveInterpreter now displays the full chained traceback
in its showtraceback method, to match the built in interactive interpreter.
- 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 #5309: distutils' build and build_ext commands now accept a ``-j``
option to enable parallel building of extension modules.
- Issue #22448: Improve canceled timer handles cleanup to prevent
unbound memory usage. Patch by Joshua Moore-Oliva.
- Issue #22427: TemporaryDirectory no longer attempts to clean up twice when
used in the with statement in generator.
- Issue #22362: Forbidden ambiguous octal escapes out of range 0-0o377 in
regular expressions.
- 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 #22278: Fix urljoin problem with relative urls, a regression observed
after changes to issue22118 were submitted.
- Issue #22415: Fixed debugging output of the GROUPREF_EXISTS opcode in the re
module. Removed trailing spaces in debugging output.
- Issue #22423: Unhandled exception in thread no longer causes unhandled
AttributeError when sys.stderr is None.
- Issue #21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects
line buffering, rather than block buffering. Patch by Akira Li.
- Issue #21091: Fix API bug: email.message.EmailMessage.is_attachment is now
a method.
- Issue #21079: Fix email.message.EmailMessage.is_attachment to return the
correct result when the header has parameters as well as a value.
- Issue #22247: Add NNTPError to nntplib.__all__.
- Issue #22366: urllib.request.urlopen will accept a context object
(SSLContext) as an argument which will then used be for HTTPS connection.
Patch by Alex Gaynor.
- Issue #4180: The warnings registries are now reset when the filters
are modified.
- 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 #20537: logging methods now accept an exception instance as well as a
Boolean value or exception tuple. Thanks to Yury Selivanov for the patch.
- Issue #22384: An exception in Tkinter callback no longer crashes the program
when it is run with pythonw.exe.
- Issue #22168: Prevent turtle AttributeError with non-default Canvas on OS X.
- 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 #13968: The glob module now supports recursive search in
subdirectories using the "**" pattern.
- 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 #22338: Fix a crash in the json module on memory allocation failure.
- Issue #12410: imaplib.IMAP4 now supports the context management protocol.
Original patch by Tarek Ziadé.
- Issue #21270: We now override tuple methods in mock.call objects so that
they can be used as normal call attributes.
- Issue #16662: load_tests() is now unconditionally run when it is present in
a package's __init__.py. TestLoader.loadTestsFromModule() still accepts
use_load_tests, but it is deprecated and ignored. A new keyword-only
attribute `pattern` is added and documented. Patch given by Robert Collins,
tweaked by Barry Warsaw.
- Issue #22226: First letter no longer is stripped from the "status" key in
the result of Treeview.heading().
- Issue #19524: Fixed resource leak in the HTTP connection when an invalid
response is received. Patch by Martin Panter.
- Issue #20421: Add a .version() method to SSL sockets exposing the actual
protocol version in use.
- Issue #19546: configparser exceptions no longer expose implementation details.
Chained KeyErrors are removed, which leads to cleaner tracebacks. Patch by
Claudiu Popa.
- 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 #21933: Turtledemo users can change the code font size with a menu
selection or control(command) '-' or '+' or control-mousewheel.
Original patch by Lita Cho.
- 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 #22043: time.monotonic() is now always available.
``threading.Lock.acquire()``, ``threading.RLock.acquire()`` and socket
operations now use a monotonic clock, instead of the system clock, when a
timeout is used.
- Issue #21527: Add a default number of workers to ThreadPoolExecutor equal
to 5 times the number of CPUs. Patch by Claudiu Popa.
- 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 #22098: ctypes' BigEndianStructure and LittleEndianStructure now
define an empty __slots__ so that subclasses don't always get an instance
dict. Patch by Claudiu Popa.
- Issue #22185: Fix an occasional RuntimeError in threading.Condition.wait()
caused by mutation of the waiters queue without holding the lock. Patch
by Doug Zongker.
- Issue #22287: On UNIX, _PyTime_gettimeofday() now uses
clock_gettime(CLOCK_REALTIME) if available. As a side effect, Python now
depends on the librt library on Solaris and on Linux (only with glibc older
than 2.17).
- Issue #22182: Use e.args to unpack exceptions correctly in
distutils.file_util.move_file. Patch by Claudiu Popa.
- The webbrowser module now uses subprocess's start_new_session=True rather
than a potentially risky preexec_fn=os.setsid call.
- Issue #22042: signal.set_wakeup_fd(fd) now raises an exception if the file
descriptor is in blocking mode.
- Issue #16808: inspect.stack() now returns a named tuple instead of a tuple.
Patch by Daniel Shahaf.
- Issue #22236: Fixed Tkinter images copying operations in NoDefaultRoot mode.
- Issue #2527: Add a *globals* argument to timeit functions, in order to
override the globals namespace in which the timed code is executed.
Patch by Ben Roberts.
- Issue #22118: Switch urllib.parse to use RFC 3986 semantics for the
resolution of relative URLs, rather than RFCs 1808 and 2396.
Patch by Demian Brecht.
- Issue #21549: Added the "members" parameter to TarFile.list().
- Issue #19628: Allow compileall recursion depth to be specified with a -r
option.
- Issue #15696: Add a __sizeof__ implementation for mmap objects on Windows.
- Issue #22068: Avoided reference loops with Variables and Fonts in Tkinter.
- Issue #22165: SimpleHTTPRequestHandler now supports undecodable file names.
- Issue #15381: Optimized line reading in io.BytesIO.
- Issue #8797: Raise HTTPError on failed Basic Authentication immediately.
Initial patch by Sam Bull.
- Issue #20729: Restored the use of lazy iterkeys()/itervalues()/iteritems()
in the mailbox module.
- Issue #21448: Changed FeedParser feed() to avoid O(N**2) behavior when
parsing long line. Original patch by Raymond Hettinger.
- Issue #22184: The functools LRU Cache decorator factory now gives an earlier
and clearer error message when the user forgets the required parameters.
- Issue #17923: glob() patterns ending with a slash no longer match non-dirs on
AIX. Based on patch by Delhallt.
- Issue #21725: Added support for RFC 6531 (SMTPUTF8) in smtpd.
- 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.
- Issue #5411: Added support for the "xztar" format in the shutil module.
- Issue #21121: Don't force 3rd party C extensions to be built with
-Werror=declaration-after-statement.
- 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 #20170: Convert posixmodule to use Argument Clinic.
- Issue #21539: Add a *exists_ok* argument to `Pathlib.mkdir()` to mimic
`mkdir -p` and `os.makedirs()` functionality. When true, ignore
FileExistsErrors. Patch by Berker Peksag.
- Issue #22127: Bypass IDNA for pure-ASCII host names in the socket module
(in particular for numeric IPs).
- Issue #21047: set the default value for the *convert_charrefs* argument
of HTMLParser to True. Patch by Berker Peksag.
- Add an __all__ to html.entities.
- Issue #15114: the strict mode and argument of HTMLParser, HTMLParser.error,
and the HTMLParserError exception have been removed.
- Issue #22085: Dropped support of Tk 8.3 in Tkinter.
- Issue #21580: Now Tkinter correctly handles bytes arguments passed to Tk.
In particular this allows to initialize images from binary data.
- Issue #22003: When initialized from a bytes object, io.BytesIO() now
defers making a copy until it is mutated, improving performance and
memory use on some use cases. Patch by David Wilson.
- Issue #22018: On Windows, signal.set_wakeup_fd() now also supports sockets.
A side effect is that Python depends to the WinSock library.
- Issue #22054: Add os.get_blocking() and os.set_blocking() functions to get
and set the blocking mode of a file descriptor (False if the O_NONBLOCK flag
is set, True otherwise). These functions are not available on Windows.
- Issue #17172: Make turtledemo start as active on OS X even when run with
subprocess. Patch by Lita Cho.
- Issue #21704: Fix build error for _multiprocessing when semaphores
are not available. Patch by Arfrever Frehtes Taifersar Arahesis.
- Issue #20173: Convert sha1, sha256, sha512 and md5 to ArgumentClinic.
Patch by Vajrasky Kok.
- Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError
on closed socket. repr(socket.socket) already works fine.
- Issue #22033: Reprs of most Python implemened classes now contain actual
class name instead of hardcoded one.
- Issue #21947: The dis module can now disassemble generator-iterator
objects based on their gi_code attribute. Patch by Clement Rouault.
- Issue #16133: The asynchat.async_chat.handle_read() method now ignores
BlockingIOError exceptions.
- Issue #22044: Fixed premature DECREF in call_tzinfo_method.
Patch by Tom Flanagan.
- 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 #4350: Removed a number of out-of-dated and non-working for a long time
Tkinter methods.
- Issue #6167: Scrollbar.activate() now returns the name of active element if
the argument is not specified. Scrollbar.set() now always accepts only 2
arguments.
- Issue #15275: Clean up and speed up the ntpath module.
- Issue #21888: plistlib's load() and loads() now work if the fmt parameter is
specified.
- Issue #22032: __qualname__ instead of __name__ is now always used to format
fully qualified class names of Python implemented classes.
- Issue #22031: Reprs now always use hexadecimal format with the "0x" prefix
when contain an id in form " at 0x...".
- Issue #22018: signal.set_wakeup_fd() now raises an OSError instead of a
ValueError on ``fstat()`` failure.
- Issue #21044: tarfile.open() now handles fileobj with an integer 'name'
attribute. Based on patch by Antoine Pietri.
- Issue #21966: Respect -q command-line option when code module is ran.
- Issue #19076: Don't pass the redundant 'file' argument to self.error().
- Issue #16382: Improve exception message of warnings.warn() for bad
category. Initial patch by Phil Elson.
- Issue #21932: os.read() now uses a :c:func:`Py_ssize_t` type instead of
:c:type:`int` for the size to support reading more than 2 GB at once. On
Windows, the size is truncted to INT_MAX. As any call to os.read(), the OS
may read less bytes than the number of requested bytes.
- Issue #21942: Fixed source file viewing in pydoc's server mode on Windows.
- Issue #11259: asynchat.async_chat().set_terminator() now raises a ValueError
if the number of received bytes is negative.
- Issue #12523: asynchat.async_chat.push() now raises a TypeError if it doesn't
get a bytes string
- Issue #21707: Add missing kwonlyargcount argument to
ModuleFinder.replace_paths_in_code().
- Issue #20639: calling Path.with_suffix('') allows removing the suffix
again. Patch by July Tikhonov.
- Issue #21714: Disallow the construction of invalid paths using
Path.with_name(). Original patch by Antony Lee.
- Issue #15014: Added 'auth' method to smtplib to make implementing auth
mechanisms simpler, and used it internally in the login method.
- 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 #5800: headers parameter of wsgiref.headers.Headers is now optional.
Initial patch by Pablo Torres Navarrete and SilentGhost.
- Issue #21781: ssl.RAND_add() now supports strings longer than 2 GB.
- Issue #21679: Prevent extraneous fstat() calls during open(). Patch by
Bohuslav Kabrda.
- Issue #21863: cProfile now displays the module name of C extension functions,
in addition to their own name.
- Issue #11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper
object is destroyed. The destructor now closes the file if needed. The
close() method can now be called twice: the second call does nothing.
- Issue #21858: Better handling of Python exceptions in the sqlite3 module.
- Issue #21476: Make sure the email.parser.BytesParser TextIOWrapper is
discarded after parsing, so the input file isn't unexpectedly closed.
- Issue #20295: imghdr now recognizes OpenEXR format images.
- Issue #21729: Used the "with" statement in the dbm.dumb module to ensure
files closing. Patch by Claudiu Popa.
- Issue #21491: socketserver: Fix a race condition in child processes reaping.
- Issue #21719: Added the ``st_file_attributes`` field to os.stat_result on
Windows.
- Issue #21832: Require named tuple inputs to be exact strings.
- Issue #21722: The distutils "upload" command now exits with a non-zero
return code when uploading fails. Patch by Martin Dengler.
- Issue #21723: asyncio.Queue: support any type of number (ex: float) for the
maximum size. Patch written by Vajrasky Kok.
- Issue #21711: support for "site-python" directories has now been removed
from the site module (it was deprecated in 3.4).
- Issue #17552: new socket.sendfile() method allowing to send a file over a
socket by using high-performance os.sendfile() on UNIX.
Patch by Giampaolo Rodola'.
- Issue #18039: dbm.dump.open() now always creates a new database when the
flag has the value 'n'. Patch by Claudiu Popa.
- Issue #21326: Add a new is_closed() method to asyncio.BaseEventLoop.