Repository navigation
Expand file tree
/
Copy pathNEWS
More file actions
6184 lines (4140 loc) · 228 KB
/
Copy pathNEWS
File metadata and controls
6184 lines (4140 loc) · 228 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
+++++++++++
(editors: check NEWS.help for information about editing NEWS using ReST.)
What's New in Python 2.7?
=========================
*Release date: 2010-07-03*
Core and Builtins
-----------------
- Prevent assignment to set literals.
Library
-------
- Issue #9125: Add recognition of 'except ... as ...' syntax to parser module.
Extension Modules
-----------------
- Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module,
ensure that the input string length is a multiple of the frame size.
- Issue #9075: In the ssl module, remove the setting of a ``debug`` flag
on an OpenSSL structure.
What's New in Python 2.7 release candidate 2?
=============================================
*Release date: 2010-06-20*
Core and Builtins
-----------------
- Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError.
- Issue #8202: Previous change to ``sys.argv[0]`` handling for -m command line
option reverted due to unintended side effects on handling of ``sys.path``.
See tracker issue for details.
- Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash
the interpreter with characters outside the Basic Multilingual Plane
(higher than 0x10000).
- In the unicode/str.format(), raise a ValueError when indexes to arguments are
too large.
Build
-----
- Issue #8854: Fix finding Visual Studio 2008 on Windows x64.
Library
-------
- Issue #6589: cleanup asyncore.socket_map in case smtpd.SMTPServer constructor
raises an exception.
- Issue #8959: fix regression caused by using unmodified libffi
library on Windows. ctypes does now again check the stack before
and after calling foreign functions.
- Issue #8720: fix regression caused by fix for #4050 by making getsourcefile
smart enough to find source files in the linecache.
- Issue #8986: math.erfc was incorrectly raising OverflowError for
values between -27.3 and -30.0 on some platforms.
- Issue #8924: logging: Improved error handling for Unicode in exception text.
- Issue #8948: cleanup functions and class / module setups and teardowns are
now honored in unittest debug methods.
Documentation
-------------
- Issues #8909: Added the size of the bitmap used in the installer created by
distutils' bdist_wininst. Patch by Anatoly Techtonik.
Misc
----
- Issue #8362: Add maintainers.rst: list of module maintainers
What's New in Python 2.7 Release Candidate 1?
=============================================
*Release date: 2010-06-05*
Core and Builtins
-----------------
- Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the
start byte and the continuation byte(s) are now considered invalid, instead
of the number of bytes specified by the start byte.
E.g.: '\xf1\x80AB'.decode('utf-8', 'replace') now returns u'\ufffdAB' and
replaces with U+FFFD only the start byte ('\xf1') and the continuation byte
('\x80') even if '\xf1' is the start byte of a 4-bytes sequence.
Previous versions returned a single u'\ufffd'.
- Issue #8627: Remove bogus "Overriding __cmp__ blocks inheritance of
__hash__ in 3.x" warning. Also fix "XXX undetected error" that
arises from the "Overriding __eq__ blocks inheritance ..." warning
when turned into an exception: in this case the exception simply
gets ignored.
- Issue #8748: Fix two issues with comparisons between complex and integer
objects. (1) The comparison could incorrectly return True in some cases
(2**53+1 == complex(2**53) == 2**53), breaking transivity of equality.
(2) The comparison raised an OverflowError for large integers, leading
to unpredictable exceptions when combining integers and complex objects
in sets or dicts.
- Issue #5211: Implicit coercion for the complex type is now completely
removed. (Coercion for arithmetic operations was already removed in 2.7
alpha 4, but coercion for rich comparisons was accidentally left in.)
- Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding
and error handler, instead of writing to the C stderr file in utf-8
- Issue #7902: When using explicit relative import syntax, don't try implicit
relative import semantics.
- Issue #7079: Fix a possible crash when closing a file object while using it
from another thread. Patch by Daniel Stutzbach.
- Issue #8868: Fix that ensures that python scripts have access to the
Window Server again in a framework build on MacOSX 10.5 or earlier.
C-API
-----
- Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows embedders
of the interpreter to set sys.argv without also modifying sys.path. This
helps fix `CVE-2008-5983
<http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
Library
-------
- Issue #8302: SkipTest in unittest.TestCase.setUpClass or setUpModule is now
reported as a skip rather than an error.
- Issue #8351: Excessively large diffs due to
unittest.TestCase.assertSequenceEqual are no longer included in failure
reports.
- Issue #8899: time.struct_time now has class and atribute docstrings.
- Issue #4487: email now accepts as charset aliases all codec aliases
accepted by the codecs module.
- Issue #6470: Drop UNC prefix in FixTk.
- Issue #5610: feedparser no longer eats extra characters at the end of
a body part if the body part ends with a \r\n.
- Issue #8833: tarfile created hard link entries with a size field != 0 by
mistake.
- Issue #1368247: set_charset (and therefore MIMEText) now automatically
encodes a unicode _payload to the output_charset.
- Issue #7150: Raise OverflowError if the result of adding or subtracting
timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range.
- Issue #6662: Fix parsing of malformatted charref (&#bad;), patch written by
Fredrik Håård
- Issue #8016: Add the CP858 codec.
- Issue #3924: Ignore cookies with invalid "version" field in cookielib.
- Issue #6268: Fix seek() method of codecs.open(), don't read or write the BOM
twice after seek(0). Fix also reset() method of codecs, UTF-16, UTF-32 and
StreamWriter classes.
- Issue #5640: Fix Shift-JIS incremental encoder for error handlers different
than 'strict'.
- Issue #8782: Add a trailing newline in linecache.updatecache to the last line
of files without one.
- Issue #8729: Return NotImplemented from ``collections.Mapping.__eq__()`` when
comparing to a non-mapping.
- Issue #8759: Fix user paths in sysconfig for posix and os2 schemes.
- Issue #1285086: Speed up ``urllib.quote()`` and urllib.unquote for simple
cases.
- Issue #8688: Distutils now recalculates MANIFEST everytime.
- Issue #5099: The ``__del__()`` method of ``subprocess.Popen`` (and the methods
it calls) referenced global objects, causing errors to pop up during
interpreter shutdown.
Extension Modules
-----------------
- Issue #7384: If the system readline library is linked against ncurses,
the curses module must be linked against ncurses as well. Otherwise it
is not safe to load both the readline and curses modules in an application.
- Issue #2810: Fix cases where the Windows registry API returns
ERROR_MORE_DATA, requiring a re-try in order to get the complete result.
- Issue #8674: Fixed a number of incorrect or undefined-behaviour-inducing
overflow checks in the ``audioop`` module.
Tests
-----
- Issue #8889: test_support.transient_internet rewritten so that the new
checks also work on FreeBSD, which lacks EAI_NODATA.
- Issue #8835: test_support.transient_internet() catches gaierror(EAI_NONAME)
and gaierror(EAI_NODATA)
- Issue #7449: Skip test_socketserver if threading support is disabled
- On darwin, ``test_site`` assumed that a framework build was being used,
leading to a failure where four directories were expected for site-packages
instead of two in a non-framework build.
Build
-----
- Display installer warning that Windows 2000 won't be supported in future
releases.
- Issues #1759169, #8864: Drop _XOPEN_SOURCE on Solaris, define it for
multiprocessing only.
Tools/Demos
-----------
- Issue #5464: Implement plural forms in msgfmt.py.
What's New in Python 2.7 beta 2?
================================
*Release date: 2010-05-08*
Core and Builtins
-----------------
- Run Clang 2.7's static analyzer for ``Objects/`` and ``Python/``.
- Issue #1533: Fix inconsistency in range function argument processing: any
non-float non-integer argument is now converted to an integer (if possible)
using its __int__ method. Previously, only small arguments were treated this
way; larger arguments (those whose __int__ was outside the range of a C long)
would produce a TypeError.
- Issue #8202: ``sys.argv[0]`` is now set to '-m' instead of '-c' when searching
for the module file to be executed with the -m command line option.
- Issue #7319: When -Q is used, do not silence DeprecationWarning.
- Issue #7332: Remove the 16KB stack-based buffer in
``PyMarshal_ReadLastObjectFromFile``, which doesn't bring any noticeable
benefit compared to the dynamic memory allocation fallback. Patch by
Charles-François Natali.
- Issue #8417: Raise an OverflowError when an integer larger than sys.maxsize is
passed to bytearray.
- Issue #7072: ``isspace(0xa0)`` is true on Mac OS X.
- Issue #8404: Fix set operations on dictionary views.
- Issue #8084: PEP 370 now conforms to system conventions for framework builds
on MacOS X. That is, ``python setup.py install --user`` will install into
``~/Library/Python/2.7`` instead of ``~/.local``.
Library
-------
- Issue #8681: Make the zlib module's error messages more informative when the
zlib itself doesn't give any detailed explanation.
- Issue #8571: Fix an internal error when compressing or decompressing a chunk
larger than 1GB with the zlib module's compressor and decompressor objects.
- Issue #8573: asyncore ``_strerror()`` function might throw ValueError.
- Issue #8483: asyncore.dispatcher's __getattr__ method produced confusing error
messages when accessing undefined class attributes because of the cheap
inheritance with the underlying socket object. The cheap inheritance has been
deprecated.
- Issue #4265: ``shutil.copyfile()`` was leaking file descriptors when disk
fills. Patch by Tres Seaver.
- Issue #7755: Use an unencumbered audio file for tests.
- Issue #8621: ``uuid.uuid4()`` returned the same sequence of values in the
parent and any children created using ``os.fork`` on Mac OS X 10.6.
- Issue #8313: ``traceback.format_exception_only()`` encodes unicode message to
ASCII with backslashreplace error handler if ``str(value)`` failed.
- Issue #8567: Fix precedence of signals in Decimal module: when a Decimal
operation raises multiple signals and more than one of those signals is
trapped, the specification determines the order in which the signals should be
handled. In many cases this order wasn't being followed, leading to the wrong
Python exception being raised.
- Issue #7865: The close() method of :mod:`io` objects should not swallow
exceptions raised by the implicit flush(). Also ensure that calling close()
several times is supported. Patch by Pascal Chambon.
- Issue #8576: logging updated to remove usage of find_unused_port().
- Issue #4687: Fix accuracy of garbage collection runtimes displayed with
gc.DEBUG_STATS.
- Issue #8354: The siginterrupt setting is now preserved for all signals, not
just SIGCHLD.
- Issue #7192: ``webbrowser.get("firefox")`` now works on Mac OS X, as does
``webbrowser.get("safari")``.
- Issue #8577: ``distutils.sysconfig.get_python_inc()`` now makes a difference
between the build dir and the source dir when looking for "python.h" or
"Include".
- Issue #8464: tarfile no longer creates files with execute permissions set when
mode="w|" is used.
- Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions of
the Linux kernel. Patch by Yaniv Aknin.
- Issue #6312: Fix http HEAD request when the transfer encoding is chunked. It
should correctly return an empty response now.
- Issue #7490: To facilitate sharing of doctests between 2.x and 3.x test
suites, the ``IGNORE_EXCEPTION_DETAIL`` directive now also ignores the module
location of the raised exception. Based on initial patch by Lennart Regebro.
- Issue #8086: In :func:`ssl.DER_cert_to_PEM_cert()`, fix missing newline before
the certificate footer. Patch by Kyle VanderBeek.
- Issue #8546: Reject None given as the buffering argument to ``_pyio.open()``.
- Issue #8549: Fix compiling the _ssl extension under AIX. Patch by Sridhar
Ratnakumar.
- Issue #6656: Fix locale.format_string to handle escaped percents and mappings.
- Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown, where
the method could block indefinitely if called just before the event loop
started running. This also fixes the occasional freezes witnessed in
test_httpservers.
- Issue #5103: SSL handshake would ignore the socket timeout and block
indefinitely if the other end didn't respond.
- The do_handshake() method of SSL objects now adjusts the blocking mode of the
SSL structure if necessary (as other methods already do).
- Issue #7507: Quote "!" in pipes.quote(); it is special to some shells.
- Issue #5238: Calling makefile() on an SSL object would prevent the underlying
socket from being closed until all objects get truely destroyed.
- Issue #7943: Fix circular reference created when instantiating an SSL socket.
Initial patch by Péter Szabó.
- Issue #8451: Syslog module now uses basename(sys.argv[0]) instead of the
string "python" as the *ident*. openlog() arguments are all optional and
keywords.
- Issue #8108: Fix the unwrap() method of SSL objects when the socket has a
non-infinite timeout. Also make that method friendlier with applications
wanting to continue using the socket in clear-text mode, by disabling
OpenSSL's internal readahead. Thanks to Darryl Miles for guidance.
- Issue #8484: Load all ciphers and digest algorithms when initializing the _ssl
extension, such that verification of some SSL certificates doesn't fail
because of an "unknown algorithm".
- Issue #8437: Fix test_gdb failures, patch written by Dave Malcolm
- Issue #4814: The timeout parameter is now applied also for connections
resulting from PORT/EPRT commands.
- Issue #8463: Add missing reference to bztar in shutil's documentation.
- Issue #8438: Remove reference to the missing "surrogateescape" encoding error
handler from the new IO library.
- Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response code
as stated in RFC-959 at chapter 5.4.
- Issue #8279: Fix test_gdb failures.
- Issue #8322: Add a *ciphers* argument to SSL sockets, so as to change the
available cipher list. Helps fix test_ssl with OpenSSL 1.0.0.
- Issue #2987: RFC 2732 support for urlparse (IPv6 addresses). Patch by Tony
Locke and Hans Ulrich Niedermann.
- Issue #7585: difflib context and unified diffs now place a tab between
filename and date, conforming to the 'standards' they were originally designed
to follow. This improves compatibility with patch tools.
- Issue #7472: Fixed typo in email.encoders module; messages using ISO-2022
character sets will now consistently use a Content-Transfer-Encoding of 7bit
rather than sometimes being marked as 8bit.
- Issue #8330: Fix expected output in test_gdb.
- Issue #8374: Update the internal alias table in the :mod:`locale` module to
cover recent locale changes and additions.
Extension Modules
-----------------
- Issue #8644: Improved accuracy of ``timedelta.total_seconds()``.
- Use Clang 2.7's static analyzer to find places to clean up some code.
- Build the ossaudio extension on GNU/kFreeBSD.
- On Windows, ctypes does no longer check the stack before and after calling a
foreign function. This allows to use the unmodified libffi library.
Tests
-----
- Issue #8672: Add a zlib test ensuring that an incomplete stream can be handled
by a decompressor object without errors (it returns incomplete uncompressed
data).
- Issue #8490: asyncore now has a more solid test suite which actually tests its
API.
- Issue #8576: Remove use of find_unused_port() in test_smtplib and
test_multiprocessing. Patch by Paul Moore.
- Issue #7449: Fix many tests to support Python compiled without thread support.
Patches written by Jerry Seutter.
- Issue #8108: test_ftplib's non-blocking SSL server now has proper handling of
SSL shutdowns.
Build
-----
- Issue #8625: Turn off optimization in ``--with-pydebug`` builds with gcc.
(Optimization was unintentionally turned on in gcc --with-pydebug builds in
2.7 beta1 as a result of the issue #1628484 fix, combined with autoconf's
strange choice of default CFLAGS produced by AC_PROG_CC for gcc.)
- Issue #8509: Fix quoting in help strings and code snippets in configure.in.
- Issue #3646: It is now easily possible to install a Python framework into your
home directory on Mac OS X, see Mac/README for more information.
- Issue #8510: Update to autoconf 2.65.
Misc
----
- Update the Vim syntax highlight file.
What's New in Python 2.7 beta 1?
================================
*Release date: 2010-04-10*
Core and Builtins
-----------------
- Issue #7301: Add environment variable $PYTHONWARNINGS.
- Issue #8329: Don't return the same lists from select.select when no fds are
changed.
- Issue #8259: ``1L << (2**31)`` no longer produces an 'outrageous shift error'
on 64-bit machines. The shift count for either left or right shift is
permitted to be up to sys.maxsize.
- Ensure that tokenization of identifiers is not affected by locale.
- Issue #1222585: Added LDCXXSHARED for C++ support. Patch by Arfrever.
- Raise a TypeError when trying to delete a T_STRING_INPLACE struct member.
- Issue #7994: Issue a PendingDeprecationWarning if object.__format__ is called
with a non-empty format string. This is an effort to future-proof user
code. If a derived class does not currently implement __format__ but later
adds its own __format__, it would most likely break user code that had
supplied a format string. This will be changed to a DeprecationWaring in
Python 3.3 and it will be an error in Python 3.4.
- Issue #8268: Old-style classes (not just instances) now support weak
references.
- Issue #8211: Save/restore CFLAGS around AC_PROG_CC in configure.in, in case it
is set.
- Issue #1583863: An unicode subclass can now override the __unicode__ method
- Issue #6474: Make error message from passing an inadequate number of keyword
arguments to a function correct.
- Issue #8164: Don't allow lambda functions to have a docstring.
- Issue #3137: Don't ignore errors at startup, especially a keyboard interrupt
(SIGINT). If an error occurs while importing the site module, the error is
printed and Python exits. Initialize the GIL before importing the site
module.
- Code objects now support weak references.
Library
-------
- Issue #5277: Fix quote counting when parsing RFC 2231 encoded parameters.
- Issue #8321: Give access to OpenSSL version numbers from the `ssl` module,
using the new attributes `ssl.OPENSSL_VERSION`, `ssl.OPENSSL_VERSION_INFO` and
`ssl.OPENSSL_VERSION_NUMBER`.
- Issue #8310: Allow dis to examine new style classes.
- Issue #8257: The Decimal construct now accepts a float instance directly,
converting that float to a Decimal of equal value:
>>> Decimal(1.1)
Decimal('1.100000000000000088817841970012523233890533447265625')
- collections.Counter() now supports a subtract() method.
- The functools module now has a total_ordering() class decorator to simplify
the specification of rich comparisons.
- The functools module also adds cmp_to_key() as a tool to transition old-style
comparison functions to new-style key-functions.
- Issue #8294: The Fraction constructor now accepts Decimal and float instances
directly.
- Issue #7279: Comparisons involving a Decimal signaling NaN now signal
InvalidOperation instead of returning False. (Comparisons involving a quiet
NaN are unchanged.) Also, Decimal quiet NaNs are now hashable; Decimal
signaling NaNs remain unhashable.
- Issue #2531: Comparison operations between floats and Decimal instances now
return a result based on the numeric values of the operands; previously they
returned an arbitrary result based on the relative ordering of id(float) and
id(Decimal).
- Issue #8233: When run as a script, py_compile.py optionally takes a single
argument `-` which tells it to read files to compile from stdin. Each line is
read on demand and the named file is compiled immediately. (Original patch by
Piotr Ożarowski).
- Issue #3135: Add ``inspect.getcallargs()``, which binds arguments to a
function like a normal call.
- Backwards incompatible change: Unicode codepoints line tabulation (0x0B) and
form feed (0x0C) are now considered linebreaks, as specified in Unicode
Standard Annex #14. See issue #7643. http://www.unicode.org/reports/tr14/
- Comparisons using one of <, <=, >, >= between a complex instance and a
Fractions instance now raise TypeError instead of returning True/False. This
makes Fraction <=> complex comparisons consistent with int <=> complex, float
<=> complex, and complex <=> complex comparisons.
- Addition of ``WeakSet`` to the ``weakref`` module.
- logging: Added LOG_FTP to SysLogHandler and updated documentation.
- Issue #8205: Remove the "Modules" directory from sys.path when Python is
running from the build directory (POSIX only).
- Issue #7667: Fix doctest failures with non-ASCII paths.
- Issue #7512: shutil.copystat() could raise an OSError when the filesystem
didn't support chflags() (for example ZFS under FreeBSD). The error is now
silenced.
- Issue #7703: ctypes supports both buffer() and memoryview(). The former is
deprecated.
- Issue #7860: platform.uname now reports the correct 'machine' type when Python
is running in WOW64 mode on 64 bit Windows.
- logging: Added getChild utility method to Logger and added isEnabledFor method
to LoggerAdapter.
- Issue #8201: logging: Handle situation of non-ASCII and Unicode logger names
existing at the same time, causing a Unicode error when configuration code
attempted to sort the existing loggers.
- Issue #8200: logging: Handle errors when multiprocessing is not fully loaded
when logging occurs.
- Issue #3890, #8222: Fix recv() and recv_into() on non-blocking SSL sockets.
Also, enable the SSL_MODE_AUTO_RETRY flag on SSL sockets, so that blocking
reads and writes are always retried by OpenSSL itself.
- Issue #8179: Fix macpath.realpath() on a non-existing path.
- Issue #8024: Update the Unicode database to 5.2.
- Issue #8104: socket.recv_into() and socket.recvfrom_into() now support writing
into objects supporting the new buffer API, for example bytearrays or
memoryviews.
- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox
with Tcl/Tk-8.5.
- Issue #8140: Extend compileall to compile single files. Add -i option.
- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of the
locale.
- Issue #7774: Set sys.executable to an empty string if ``argv[0]`` has been set
to an non existent program name and Python is unable to retrieve the real
program name.
- Issue #8117: logging: Improved algorithm for computing initial rollover time
for ``TimedRotatingFileHandler`` by using the modification time of an existing
log file to compute the next rollover time. If the log file does not exist,
the current time is used as the basis for the computation.
- Issue #6472: The ``xml.etree`` package is updated to ElementTree 1.3. The
cElementTree module is updated too.
- Issue #7880: Fix sysconfig when the python executable is a symbolic link.
- Issue #7624: Fix ``isinstance(foo(), collections.Callable)`` for old-style
classes.
- Issue #7143: email: ``get_payload()`` used to strip any trailing newline from
a base64 transfer-encoded payload *after* decoding it; it no longer does.
This is a behavior change, so email's minor version number is now bumped, to
version 4.0.2, for the 2.7 release.
- Issue #8235: _socket: Add the constant ``SO_SETFIB``. SO_SETFIB is
a socket option available on FreeBSD 7.1 and newer.
- Issue #8038: unittest.TestCase.assertNotRegexpMatches
- Addition of -b command line option to unittest for buffering stdout / stderr
during test runs.
- Issue #1220212: Added os.kill support for Windows, including support for
sending CTRL+C and CTRL+BREAK events to console subprocesses.
Extension Modules
-----------------
- Issue #8314: Fix unsigned long long bug in libffi on Sparc v8.
- Issue #1039, #8154: Fix os.execlp() crash with missing 2nd argument.
- Issue #8156: bsddb module updated to version 4.8.4.
http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.8.4. This update drops
support for Berkeley DB 4.0, and adds support for 4.8.
- Issue #3928: os.mknod() now available in Solaris, also.
- Issue #8142: Update libffi to the 3.0.9 release.
- Issue #8300: When passing a non-integer argument to struct.pack with any
integer format code, struct.pack first attempts to convert the non-integer
using its __index__ method. If that method is non-existent or raises
TypeError it goes on to try the __int__ method, as described below.
- Issue #1530559: When passing a non-integer argument to struct.pack with *any*
integer format code (one of 'bBhHiIlLqQ'), struct.pack attempts to use the
argument's __int__ method to convert to an integer before packing. It also
produces a DeprecationWarning in this case. (In Python 2.6, the behaviour was
inconsistent: __int__ was used for some integer codes but not for others, and
the set of integer codes for which it was used differed between native packing
and standard packing.)
- Issue #7347: _winreg: Add CreateKeyEx and DeleteKeyEx, as well as fix a bug in
the return value of QueryReflectionKey.
Tools/Demos
-----------
- Issue #7993: Add a test of IO packet processing bandwidth to ccbench. It
measures the number of UDP packets processed per second depending on the
number of background CPU-bound Python threads.
- python-config now supports multiple options on the same command line.
Build
-----
- Issue #8032: For gdb7, a python-gdb.py file is added to the build, allowing to
use advanced gdb features when debugging Python.
- Issue #1628484: The Makefile doesn't ignore the CFLAGS environment variable
anymore. It also forwards the LDFLAGS settings to the linker when building a
shared library.
- Issue #6716: Quote -x arguments of compileall in MSI installer.
- Issue #7705: Fix linking on FreeBSD.
- Make sure that the FreeBSD build of the included libffi uses the proper
assembly file.
C-API
-----
- Issue #8276: PyEval_CallObject() is now only available in macro form. The
function declaration, which was kept for backwards compatibility reasons, is
now removed (the macro was introduced in 1997!).
- Issue #7992: A replacement PyCObject API, PyCapsule, has been backported from
Python 3.1. All existing Python CObjects in the main distribution have been
converted to capsules. To address backwards-compatibility concerns,
PyCObject_AsVoidPtr() was changed to understand capsules.
Tests
-----
- Issue #3864: Skip three test_signal tests on freebsd6 because they fail if any
thread was previously started, most likely due to a platform bug.
- Issue #8348: Fix test ftp url in test_urllib2net.
- Issue #8204: Fix test_ttk notebook test by forcing focus.
- Issue #8344: Fix test_ttk bug on FreeBSD.
- Issue #8193: Fix test_zlib failure with zlib 1.2.4.
- Issue #8248: Add some tests for the bool type. Patch by Gregory Nofi.
- Issue #8263: Now regrtest.py will report a failure if it receives a
KeyboardInterrupt (SIGINT).
- Issue #8180 and #8207: Fix test_pep277 on OS X and add more tests for special
Unicode normalization cases.
- Issue #7783: test.test_support.open_urlresource invalidates the outdated files
from the local cache.
What's New in Python 2.7 alpha 4?
=================================
*Release date: 2010-03-06*
Core and Builtins
-----------------
- Issue #7544: Preallocate thread memory before creating the thread to avoid a
fatal error in low memory condition.
- Issue #7820: The parser tokenizer restores all bytes in the right if the BOM
check fails.
- Issue #7309: Fix unchecked attribute access when converting
UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings.
- Issue #7649: "u'%c' % char" now behaves like "u'%s' % char" and raises a
UnicodeDecodeError if 'char' is a byte string that can't be decoded using the
default encoding.
- Issue #6902: Fix problem with built-in types format incorrectly with 0
padding.
- Issue #2560: Remove an unnecessary 'for' loop from ``my_fgets()`` in
Parser/myreadline.c.
- Issue #7988: Fix default alignment to be right aligned for
``complex.__format__``. Now it matches other numeric types.
- Issue #5211: The complex type no longer uses implicit coercion in mixed-type
binary arithmetic operations.
Library
-------
- Issue #6906: Tk should not set Unicode environment variables on Windows.
- Issue #1054943: Fix ``unicodedata.normalize('NFC', text)`` for the Public
Review Issue #29 (http://unicode.org/review/pr-29.html).
- Issue #7494: Fix a crash in ``_lsprof`` (cProfile) after clearing the profiler,
reset also the pointer to the current pointer context.
- Issue #7232: Add support for the context manager protocol to the
``tarfile.TarFile`` class.
- Issue #7250: Fix info leak of os.environ across multi-run uses of
``wsgiref.handlers.CGIHandler``.
- Issue #1729305: Fix doctest to handle encode error with "backslashreplace".
- Issue #691291: ``codecs.open()`` should not convert end of lines on reading
and writing.
- Issue #7975: Correct regression in dict methods supported by bsddb.dbshelve.
- Issue #7959: ctypes callback functions are now registered correctly with the
cycle garbage collector.
- Issue #7970: ``email.Generator.flatten`` now correctly flattens
message/rfc822 messages parsed by ``email.Parser.HeaderParser``.
- Issue #3426: ``os.path.abspath`` now returns unicode when its arg is unicode.
- Issue #7633: In the decimal module, ``Context`` class methods (with the
exception of canonical and is_canonical) now accept instances of int and long
wherever a Decimal instance is accepted, and implicitly convert that argument
to Decimal. Previously only some arguments were converted.
- Issue #6003: Add an argument to ``zipfile.Zipfile.writestr`` to specify the
compression type.
- Issue #7893: ``unittest.TextTestResult`` is made public and a ``resultclass``
argument added to the TextTestRunner constructor allowing a different result
class to be used without having to subclass.
- Issue #7588: ``unittest.TextTestResult.getDescription`` now includes the test
name in failure reports even if the test has a docstring.
- Issue #5801: Remove spurious empty lines in wsgiref.
- Issue #1537721: Add a ``writeheader()`` method to ``csv.DictWriter``.
- Issue #7427: Improve the representation of httplib.BadStatusLine exceptions.
- Issue #7481: When a ``threading.Thread`` failed to start it would leave the
instance stuck in initial state and present in ``threading.enumerate()``.
- Issue #1068268: The subprocess module now handles EINTR in internal
``os.waitpid()`` and ``os.read()`` system calls where appropriate.
- Issue #6729: Add ``ctypes.c_ssize_t`` to represent ssize_t.
- Issue #6247: The argparse module has been added to the standard library.
Extension Modules
-----------------
- The sqlite3 module was updated to pysqlite 2.6.0. This fixes several obscure
bugs and allows loading SQLite extensions from shared libraries.
- Issue #7808: Fix reference leaks in _bsddb and related tests.
- Issue #6544: Fix a reference leak in the kqueue implementation's error
handling.
- Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as
msvcr100.dll is not a platform assembly anymore.
- Issue #7242: On Solaris 9 and earlier calling ``os.fork()`` from within a
thread could raise an incorrect RuntimeError about not holding the import
lock. The import lock is now reinitialized after fork.
- Issue #7999: ``os.setreuid()`` and ``os.setregid()`` would refuse to accept a
-1 parameter on some platforms such as OS X.
Tests
-----
- Issue #7849: The utility ``test.test_support.check_warnings()`` verifies if
warnings are effectively raised. A new utility ``check_py3k_warnings()`` is
available.
- The four path modules (genericpath, macpath, ntpath, posixpath) share a
common TestCase for some tests: test_genericpath.CommonTest.
- Print platform information when running the whole test suite, or using the
``--verbose`` flag.
- Issue #767675: Enable test_pep277 on POSIX platforms with Unicode-friendly
filesystem encoding.
- Issue #6292: For the moment at least, the test suite runs cleanly if python
is run with the -OO flag. Tests requiring docstrings are skipped.
- Issue #7712: test_support gained a new ``temp_cwd`` context manager which is
now also used by regrtest to run all the tests in a temporary directory. The
original CWD is saved in ``test.test_support.SAVEDCWD``. Thanks to Florent
Xicluna who helped with the patch.
Build
-----
- Issue #3920, #7903: Define _BSD_SOURCE on OpenBSD 4.4 through 4.9.
What's New in Python 2.7 alpha 3?
=================================
*Release date: 2010-02-06*
Core and Builtins
-----------------
- Issue #5677: Explicitly forbid write operations on read-only file objects,
and read operations on write-only file objects. On Windows, the system C
library would return a bogus result; on Solaris, it was possible to crash the
interpreter. Patch by Stefan Krah.
- Issue #7853: Normalize exceptions before they are passed to a context
manager's ``__exit__()`` method.
- Issue #7385: Fix a crash in ``PyMemoryView_FromObject()`` when
``PyObject_GetBuffer()`` fails. Patch by Florent Xicluna.
- Issue #7819: Check ``sys.call_tracing()`` arguments types.
- Issue #7788: Fix an interpreter crash produced by deleting a list slice with
very large step value.
- Issue #7766: Change ``sys.getwindowsversion()`` return value to a named tuple
and add the additional members returned in an OSVERSIONINFOEX structure. The
new members are service_pack_major, service_pack_minor, suite_mask, and
product_type.
- Issue #7561: Operations on empty bytearrays (such as ``int(bytearray())``)
could crash in many places because of the ``PyByteArray_AS_STRING()`` macro
returning NULL. The macro now returns a statically allocated empty string
instead.
- Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
methods of bytes, bytearray and unicode objects by using a common
implementation based on stringlib's fast search. Patch by Florent Xicluna.
- Issue #7632: Fix various str -> float conversion bugs present in 2.7 alpha 2,
including:
(1) a serious 'wrong output' bug that could occur for long (> 40 digit) input
strings,
(2) a crash in dtoa.c that occurred in debug builds when parsing certain long
numeric strings corresponding to subnormal values,
(3) a memory leak for some values large enough to cause overflow, and
(4) a number of flaws that could lead to incorrectly rounded results.
- Issue #7319, #7770: Silence ``DeprecationWarning`` by default when the -3
option is not used.
- Issue #2335: Backport set literals syntax from Python 3.x.
- Issue #2333: Backport set and dict comprehensions syntax from Python 3.x.
- Issue #1967: Backport dictionary views from Python 3.x.
Library
-------
- Issue #7835: shelve should no longer produce mysterious warnings during
interpreter shutdown.
- Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">") in
XML processing instructions and comments. These raw characters are allowed
by the XML specification, and are necessary when outputting e.g. PHP code in
a processing instruction. Patch by Neil Muller.
- Issue #7869: logging: Improved diagnostic for format-time errors.
- Issue #7868: logging: Added loggerClass attribute to Manager.
- Issue #7851: logging: Clarification on logging configuration files.
- Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is
specified, rather than fall through to AF_PACKET (in the ``socket`` module).
Also, raise ValueError rather than TypeError when an unknown TIPC address
type is specified. Patch by Brian Curtin.
- logging: Implemented PEP 391.
- Issue #6939: Fix file I/O objects in the `io` module to keep the original
file position when calling `truncate()`. It would previously change the file
position to the given argument, which goes against the tradition of
ftruncate() and other truncation APIs. Patch by Pascal Chambon.
- Issue #7610: Reworked implementation of the internal ``zipfile.ZipExtFile``
class used to represent files stored inside an archive. The new
implementation is significantly faster and can be wrapped in a
``io.BufferedReader`` object for more speedups. It also solves an issue
where interleaved calls to ``read()`` and ``readline()`` give wrong results.
Patch by Nir Aides.
- Issue #7792: Registering non-classes to ABCs raised an obscure error.