Repository navigation
Expand file tree
/
Copy pathNEWS
More file actions
2782 lines (1858 loc) · 101 KB
/
Copy pathNEWS
File metadata and controls
2782 lines (1858 loc) · 101 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.5.1?
=============================
*Release date: 18-APR-2007*
Core and builtins
-----------------
- Revert SF #1615701: dict.update() does *not* call __getitem__() or keys()
if subclassed. This is to remain consistent with 2.5.
Also revert revision 53667 with made a similar change to set.update().
What's New in Python 2.5.1c1?
=============================
*Release date: 05-APR-2007*
Core and builtins
-----------------
- Patch #1682205: a TypeError while unpacking an iterable is no longer
masked by a generic one with the message "unpack non-sequence".
- Patch #1642547: Fix an error/crash when encountering syntax errors in
complex if statements.
- Patch #1462488: Python no longer segfaults when ``object.__reduce_ex__()``
is called with an object that is faking its type.
- Patch #1680015: Don't modify __slots__ tuple if it contains an unicode
name.
- Patch #922167: Python no longer segfaults when faced with infinitely
self-recursive reload() calls (as reported by bug #742342).
- Patch #1675981: remove unreachable code from ``type.__new__()`` method.
- Patch #1638879: don't accept strings with embedded NUL bytes in long().
- Bug #1674503: close the file opened by execfile() in an error condition.
- Patch #1674228: when assigning a slice (old-style), check for the
sq_ass_slice instead of the sq_slice slot.
- Bug #1669182: prevent crash when trying to print an unraisable error
from a string exception.
- The peephole optimizer left None as a global in functions with a docstring
and an explicit return value.
- Bug #1653736: Properly discard third argument to slot_nb_inplace_power.
- SF #151204: enumerate() now raises an Overflow error at sys.maxint items.
- Bug #1377858: Fix the segfaulting of the interpreter when an object created
a weakref on itself during a __del__ call for new-style classes (classic
classes still have the bug).
- Bug #1648179: set.update() did not recognize an overridden __iter__
method in subclasses of dict.
- Bug #1579370: Make PyTraceBack_Here use the current thread, not the
frame's thread state.
- patch #1630975: Fix crash when replacing sys.stdout in sitecustomize.py
- Bug #1637022: Prefix AST symbols with _Py_.
- Prevent seg fault on shutdown which could occur if an object
raised a warning.
- Bug #1566280: Explicitly invoke threading._shutdown from Py_Main,
to avoid relying on atexit.
- Bug #1590891: random.randrange don't return correct value for big number
- Bug #1456209: In some obscure cases it was possible for a class with a
custom ``__eq__()`` method to confuse set internals when class instances
were used as a set's elements and the ``__eq__()`` method mutated the set.
- The repr for self-referential sets and fronzensets now shows "..." instead
of falling into infinite recursion.
- Eliminated unnecessary repeated calls to hash() by set.intersection() and
set.symmetric_difference_update().
- Bug #1591996: Correctly forward exception in instance_contains().
- Bug #1588287: fix invalid assertion for `1,2` in debug builds.
- Bug #1576657: when setting a KeyError for a tuple key, make sure that
the tuple isn't used as the "exception arguments tuple". Applied to
both sets and dictionaries.
- Bug #1565514, SystemError not raised on too many nested blocks.
- Bug #1576174: WindowsError now displays the windows error code
again, no longer the posix error code.
- Patch #1549049: Support long values in structmember.
- Bug #1542016: make sys.callstats() match its docstring and return an
11-tuple (only relevant when Python is compiled with -DCALL_PROFILE).
- Bug #1545497: when given an explicit base, int() did ignore NULs
embedded in the string to convert.
- Bug #1569998: break inside a try statement (outside a loop) is now
recognized and rejected.
- Patch #1542451: disallow continue anywhere under a finally.
- list.pop(x) accepts any object x following the __index__ protocol.
- Fix some leftovers from the conversion from int to Py_ssize_t
(relevant to strings and sequences of more than 2**31 items).
- A number of places, including integer negation and absolute value,
were fixed to not rely on undefined behaviour of the C compiler
anymore.
- Bug #1566800: make sure that EnvironmentError can be called with any
number of arguments, as was the case in Python 2.4.
- Patch #1567691: super() and new.instancemethod() now don't accept
keyword arguments any more (previously they accepted them, but didn't
use them).
- Fix a bug in the parser's future statement handling that led to "with"
not being recognized as a keyword after, e.g., this statement:
from __future__ import division, with_statement
- Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)).
- Fix %zd string formatting on Mac OS X so it prints negative numbers.
- Allow exception instances to be directly sliced again.
Extension Modules
-----------------
- Bug #1563759: struct.unpack doens't support buffer protocol objects
- Bug #1686475: Support stat'ing open files on Windows again.
- Bug #1647541: Array module's buffer interface can now handle empty arrays.
- Bug #1693079: The array module can now successfully pickle empty arrays.
- Bug #1688393: Prevent crash in socket.recvfrom if length is negative.
- Bug #1622896: fix a rare corner case where the bz2 module raised an
error in spite of a succesful compression.
- Patch #1654417: make operator.{get,set,del}slice use the full range
of Py_ssize_t.
- Patch #1646728: datetime.fromtimestamp fails with negative
fractional times. With unittest.
- Patch #1494140: Add documentation for the new struct.Struct object.
- Patch #1657276: Make NETLINK_DNRTMSG conditional.
- Bug #1653736: Fix signature of time_isoformat.
- operator.count() now raises an OverflowError when the count reaches sys.maxint.
- Bug #1575169: operator.isSequenceType() now returns False for subclasses of dict.
- collections.defaultdict() now verifies that the factory function is callable.
- Bug #1486663: don't reject keyword arguments for subclasses of builtin
types.
- The version number of the ctypes package was changed to "1.0.2".
- Bug #1664966: Fix crash in exec if Unicode filename can't be decoded.
- Patch #1544279: Improve thread-safety of the socket module by moving
the sock_addr_t storage out of the socket object.
- Patch #1615868: make bz2.BZFile.seek() work for offsets >2GiB.
- Bug #1563807: _ctypes built on AIX fails with ld ffi error.
- Bug #1598620: A ctypes Structure cannot contain itself.
- Bug #1588217: don't parse "= " as a soft line break in binascii's
a2b_qp() function, instead leave it in the string as quopri.decode()
does.
- Patch #838546: Make terminal become controlling in pty.fork()
- Patch #1560695: Add .note.GNU-stack to ctypes' sysv.S so that
ctypes isn't considered as requiring executable stacks.
- Bug #1567666: Emulate GetFileAttributesExA for Win95.
- Bug #1548891: The cStringIO.StringIO() constructor now encodes unicode
arguments with the system default encoding just like the write()
method does, instead of converting it to a raw buffer.
- Bug #1565150: Fix subsecond processing for os.utime on Windows.
- Patch #1572724: fix typo ('=' instead of '==') in _msi.c.
- Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault
when encoding non-BMP unicode characters.
- Bug #1556784: allow format strings longer than 127 characters in
datetime's strftime function.
- Fix itertools.count(n) to work with negative numbers again.
- Make regex engine raise MemoryError if allocating memory fails.
- fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments
were transposed.
- Added support for linking the bsddb module against BerkeleyDB 4.5.x.
- Modifying an empty deque during iteration now raises RuntimeError
instead of StopIteration.
- Bug #1552726: fix polling at the interpreter prompt when certain
versions of the readline library are in use.
- Bug #1633621: if curses.resizeterm() or curses.resize_term() is called,
update _curses.LINES, _curses.COLS, curses.LINES and curses.COLS.
- Fix an off-by-one bug in locale.strxfrm().
Library
-------
- Patch #1685563: remove (don't add) duplicate paths in distutils.MSVCCompiler.
- Bug #978833: Revert r50844, as it broke _socketobject.dup.
- Bug #1675967: re patterns pickled with Python 2.4 and earlier can
now be unpickled with Python 2.5.
- Bug #1684254: webbrowser now uses shlex to split any command lines
given to get(). It also detects when you use '&' as the last argument
and creates a BackgroundBrowser then.
- Patch #1681153: the wave module now closes a file object it opened if
initialization failed.
- Bug #767111: fix long-standing bug in urllib which caused an
AttributeError instead of an IOError when the server's response didn't
contain a valid HTTP status line.
- Bug #1629369: Correctly parse multiline comment in address field.
- Bug #1582282: Fix email.header.decode_header() to properly treat encoded
words with no delimiting whitespace as a single word.
- Patch #1449244: Support Unicode strings in
email.message.Message.{set_charset,get_content_charset}.
- Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
pydoc's help keywords.
- Patch #1192590: Fix pdb's "ignore" and "condition" commands so they trap
the IndexError caused by passing in an invalid breakpoint number.
- Bug #1531963: Make SocketServer.TCPServer's server_address always
be equal to calling getsockname() on the server's socket. Fixed by patch
#1545011.
- Bug #1651235: When a tuple was passed to a ctypes function call,
Python would crash instead of raising an error.
- Fix bug #1646630: ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0)
returned string up to the first NUL character.
- Bug #1637850: make_table in difflib did not work with unicode
- Bugs #1676321: the empty() function in sched.py returned the wrong result
- unittest now verifies more of its assumptions. In particular, TestCase
and TestSuite subclasses (not instances) are no longer accepted in
TestSuite.addTest(). This should cause no incompatibility since it
never made sense with ordinary subclasses -- the failure just occurred
later, with a more cumbersome exception.
- Patch #685268: Consider a package's __path__ in imputil.
- Patch 1463026: Support default namespace in XMLGenerator.
- Patch 1571379: Make trace's --ignore-dir facility work in the face of
relative directory names.
- Bug #1600860: Search for shared python library in LIBDIR, not lib/python/config,
on "linux" and "gnu" systems.
- Bug #1124861: Automatically create pipes if GetStdHandle fails in
subprocess.
- Patch #783050: the pty.fork() function now closes the slave fd
correctly.
- Patch #1638243: the compiler package is now able to correctly compile
a with statement; previously, executing code containing a with statement
compiled by the compiler package crashed the interpreter.
- Bug #1643943: Fix %U handling for time.strptime.
- Bug #1598181: Avoid O(N**2) bottleneck in subprocess communicate().
- Patch #1627441: close sockets properly in urllib2.
- Bug #1610795: ctypes.util.find_library works now on BSD systems.
- Fix sort stability in heapq.nlargest() and nsmallest().
- Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj argument.
- Patch #1262036: Prevent TarFiles from being added to themselves under
certain conditions.
- Patch #1230446: tarfile.py: fix ExFileObject so that read() and tell()
work correctly together with readline().
- Bug #737202: Make CGIHTTPServer work for scripts in subdirectories.
Fix by Titus Brown.
- Patch #827559: Make SimpleHTTPServer redirect when a directory URL
is missing the trailing slash, so that relative links work correctly.
Patch by Chris Gonnerman.
- Patch #1608267: fix a race condition in os.makedirs() is the directory
to be created is already there.
- Patch #1610437: fix a tarfile bug with long filename headers.
- Patch #1472877: Fix Tix subwidget name resolution.
- Patch #1594554: Always close a tkSimpleDialog on ok(), even
if an exception occurs.
- Patch #1538878: Don't make tkSimpleDialog dialogs transient if
the parent window is withdrawn.
- Patch #1360200: Use unmangled_version RPM spec field to deal with
file name mangling.
- Patch #1359217: Process 2xx response in an ftplib transfer
that precedes an 1xx response.
- Patch #1060577: Extract list of RPM files from spec file in
bdist_rpm
- Bug #1586613: fix zlib and bz2 codecs' incremental en/decoders.
- Patch #1583880: fix tarfile's problems with long names and posix/
GNU modes.
- Fix codecs.EncodedFile which did not use file_encoding in 2.5.0, and
fix all codecs file wrappers to work correctly with the "with"
statement (bug #1586513).
- ctypes callback functions only support 'fundamental' data types as
result type. Raise an error when something else is used. This is a
partial fix for Bug #1574584.
- Bug #813342: Start the IDLE subprocess with -Qnew if the parent
is started with that option.
- Bug #1446043: correctly raise a LookupError if an encoding name given
to encodings.search_function() contains a dot.
- Bug #1545341: The 'classifier' keyword argument to the Distutils setup()
function now accepts tuples as well as lists.
- Bug #1560617: in pyclbr, return full module name not only for classes,
but also for functions.
- Bug #1566602: correct failure of posixpath unittest when $HOME ends
with a slash.
- Bug #1565661: in webbrowser, split() the command for the default
GNOME browser in case it is a command with args.
- Bug #1569790: mailbox.py: Maildir.get_folder() and MH.get_folder()
weren't passing the message factory on to newly created Maildir/MH
objects.
- Bug #1575506: mailbox.py: Single-file mailboxes didn't re-lock
properly in their flush() method.
- Patch #1514543: mailbox.py: In the Maildir class, report errors if there's
a filename clash instead of possibly losing a message. (Patch by David
Watson.)
- Patch #1514544: mailbox.py: Try to ensure that messages/indexes have
been physically written to disk after calling .flush() or
.close(). (Patch by David Watson.)
- mailbox.py: Change MH.pack() to not lock individual message files; this
wasn't consistent with existing implementations of message packing, and
was buggy on some platforms.
- Bug #1633678: change old mailbox.UnixMailbox class to parse
'From' lines less strictly.
- Bug #1576241: fix functools.wraps() to work on built-in functions.
- Patch #1574068: fix urllib/urllib2 to not insert line breaks when
HTTP authentication data was very long.
- Patch #1617413: fix urllib's support for HTTP Basic authentication via HTTPS
(patch by Dug Song).
- Fix a bug in traceback.format_exception_only() that led to an error
being raised when print_exc() was called without an exception set.
In version 2.4, this printed "None", restored that behavior.
- Make webbrowser.BackgroundBrowser usable in Windows (it wasn't because
the close_fds arg to subprocess.Popen is not supported).
Tools/Demos
-----------
- Patch #1552024: add decorator support to unparse.py demo script.
- idle: Honor the "Cancel" action in the save dialog (Debian bug #299092).
Tests
-----
- Cause test.test_socket_ssl:test_basic to raise
test.test_support.ResourceDenied when an HTTPS connection times out.
- Remove passwd.adjunct.byname from list of maps
for test_nis.
Build
-----
- Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
returned by python-config if Python was built with --enable-shared
because that prevented the shared library from being used.
- Patch #1569798: fix a bug in distutils when building Python from a
directory within sys.exec_prefix.
- Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86.
- Disable _XOPEN_SOURCE on NetBSD 1.x.
- Bug #1578513: Cross compilation was broken by a change to configure.
Repair so that it's back to how it was in 2.4.3.
- Patch #1576954: Update VC6 build directory; remove redundant
files in VC7.
- Fix build failure on kfreebsd and on the hurd.
- Fix the build of the library reference in info format.
Windows
-------
- Conditionalize definition of _CRT_SECURE_NO_DEPRECATE
and _CRT_NONSTDC_NO_DEPRECATE.
Documentation
-------------
- Patch #1489771: the syntax rules in Python Reference Manual were
updated to reflect the current Python syntax.
- Patch #1686451: Fix return type for
PySequence_{Count,Index,Fast_GET_SIZE}.
What's New in Python 2.5 (final)
================================
*Release date: 19-SEP-2006*
No changes since release candidate 2.
What's New in Python 2.5 release candidate 2?
=============================================
*Release date: 12-SEP-2006*
Core and builtins
-----------------
- Make _PyGILState_NoteThreadState() static, it was not used anywhere
outside of pystate.c and should not be necessary.
- Bug #1551432: Exceptions do not define an explicit __unicode__ method. This
allows calling unicode() on exceptions classes directly to succeed.
- Bug #1542051: Exceptions now correctly call PyObject_GC_UnTrack.
Also make sure that every exception class has __module__ set to
'exceptions'.
- Bug #1550983: emit better error messages for erroneous relative
imports (if not in package and if beyond toplevel package).
- Overflow checking code in integer division ran afoul of new gcc
optimizations. Changed to be more standard-conforming.
- Patch #1541585: fix buffer overrun when performing repr() on
a unicode string in a build with wide unicode (UCS-4) support.
- Patch #1546288: fix seg fault in dict_equal due to ref counting bug.
- The return tuple from str.rpartition(sep) is (tail, sep, head) where
head is the original string if sep was not found.
- Bug #1520864: unpacking singleton tuples in list comprehensions and
generator expressions (x for x, in ... ) works again. Fixing this problem
required changing the .pyc magic number. This means that .pyc files
generated before 2.5c2 will be regenerated.
Library
-------
- Reverted patch #1504333 because it introduced an infinite loop.
- Patch #1553314: Fix the inspect.py slowdown that was hurting IPython & SAGE
by adding smarter caching in inspect.getmodule().
- Fix missing import of the types module in logging.config.
- Patch #1550886: Fix decimal module context management implementation
to match the localcontext() example from PEP 343.
- Bug #1541863: uuid.uuid1 failed to generate unique identifiers
on systems with low clock resolution.
- Bug #1543303, patch #1543897: remove NUL padding from tarfiles.
- Bug #1531862: Do not close standard file descriptors in subprocess.
Extension Modules
-----------------
- Bug #1599782: fix segfault on bsddb.db.DB().type().
- Fix bugs in ctypes:
- anonymous structure fields that have a bit-width specified did not work
- cast function did not accept c_char_p or c_wchar_p instances as first arg
- Bug #1551427: fix a wrong NULL pointer check in the win32 version
of os.urandom().
- Bug #1548092: fix curses.tparm seg fault on invalid input.
- Bug #1550714: fix SystemError from itertools.tee on negative value for n.
- Fixed a few bugs on cjkcodecs:
- gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly.
- iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
codepoints to conform the standard.
- iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 0213:2
codepoints now.
Tests
-----
- Patch #1559413: Fix test_cmd_line if sys.executable contains a space.
- Fix bsddb test_basics.test06_Transactions to check the version
number properly.
Documentation
-------------
- Patch #1679379: add documentation for fnmatch.translate().
- Patch #1671450: add a section about subclassing builtin types to the
"extending and embedding" tutorial.
- Bug #1629125: fix wrong data type (int -> Py_ssize_t) in PyDict_Next
docs.
- Bug #1565919: document set types in the Language Reference.
- Bug #1546052: clarify that PyString_FromString(AndSize) copies the
string pointed to by its parameter.
- Bug #1566663: remove obsolete example from datetime docs.
- Bug #1541682: Fix example in the "Refcount details" API docs.
Additionally, remove a faulty example showing PySequence_SetItem applied
to a newly created list object and add notes that this isn't a good idea.
Tools
-----
- Bug #1546372: Fixed small bugglet in pybench that caused a missing
file not to get reported properly.
Build
-----
- Bug #1568842: Fix test for uintptr_t.
- Patch #1540470, for OpenBSD 4.0.
- Patch #1545507: Exclude ctypes package in Win64 MSI file.
- Fix OpenSSL debug build process.
C API
-----
- Bug #1542693: remove semi-colon at end of PyImport_ImportModuleEx macro
so it can be used as an expression.
What's New in Python 2.5 release candidate 1?
=============================================
*Release date: 17-AUG-2006*
Core and builtins
-----------------
- Fix infinite recursion when subclassing long and overriding __hash__.
- Fix concatenation (+=) of long strings.
- Unicode objects will no longer raise an exception when being
compared equal or unequal to a string and a UnicodeDecodeError
exception occurs, e.g. as result of a decoding failure.
Instead, the equal (==) and unequal (!=) comparison operators will
now issue a UnicodeWarning and interpret the two objects as
unequal. The UnicodeWarning can be filtered as desired using
the warning framework, e.g. silenced completely, turned into an
exception, logged, etc.
Note that compare operators other than equal and unequal will still
raise UnicodeDecodeError exceptions as they've always done.
- Fix segfault when doing string formatting on subclasses of long.
- Fix bug related to __len__ functions using values > 2**32 on 64-bit machines
with new-style classes.
- Fix bug related to __len__ functions returning negative values with
classic classes.
- Patch #1538606, Fix __index__() clipping. There were some problems
discovered with the API and how integers that didn't fit into Py_ssize_t
were handled. This patch attempts to provide enough alternatives
to effectively use __index__.
- Bug #1536021: __hash__ may now return long int; the final hash
value is obtained by invoking hash on the long int.
- Bug #1536786: buffer comparison could emit a RuntimeWarning.
- Bug #1535165: fixed a segfault in input() and raw_input() when
sys.stdin is closed.
- On Windows, the PyErr_Warn function is now exported from
the Python dll again.
- Bug #1191458: tracing over for loops now produces a line event
on each iteration. Fixing this problem required changing the .pyc
magic number. This means that .pyc files generated before 2.5c1
will be regenerated.
- Bug #1333982: string/number constants were inappropriately stored
in the byte code and co_consts even if they were not used, ie
immediately popped off the stack.
- Fixed a reference-counting problem in property().
Library
-------
- Fix a bug in the ``compiler`` package that caused invalid code to be
generated for generator expressions.
- The distutils version has been changed to 2.5.0. The change to
keep it programmatically in sync with the Python version running
the code (introduced in 2.5b3) has been reverted. It will continue
to be maintained manually as static string literal.
- If the Python part of a ctypes callback function returns None,
and this cannot be converted to the required C type, an exception is
printed with PyErr_WriteUnraisable. Before this change, the C
callback returned arbitrary values to the calling code.
- The __repr__ method of a NULL ctypes.py_object() no longer raises
an exception.
- uuid.UUID now has a bytes_le attribute. This returns the UUID in
little-endian byte order for Windows. In addition, uuid.py gained some
workarounds for clocks with low resolution, to stop the code yielding
duplicate UUIDs.
- Patch #1540892: site.py Quitter() class attempts to close sys.stdin
before raising SystemExit, allowing IDLE to honor quit() and exit().
- Bug #1224621: make tabnanny recognize IndentationErrors raised by tokenize.
- Patch #1536071: trace.py should now find the full module name of a
file correctly even on Windows.
- logging's atexit hook now runs even if the rest of the module has
already been cleaned up.
- Bug #1112549, fix DoS attack on cgi.FieldStorage.
- Bug #1531405, format_exception no longer raises an exception if
str(exception) raised an exception.
- Fix a bug in the ``compiler`` package that caused invalid code to be
generated for nested functions.
Extension Modules
-----------------
- Ignore data that arrives before the opening start tag in C etree.
- Patch #1511317: don't crash on invalid hostname (alias) info.
- Patch #1535500: fix segfault in BZ2File.writelines and make sure it
raises the correct exceptions.
- Patch # 1536908: enable building ctypes on OpenBSD/AMD64. The
'-no-stack-protector' compiler flag for OpenBSD has been removed.
- Patch #1532975 was applied, which fixes Bug #1533481: ctypes now
uses the _as_parameter_ attribute when objects are passed to foreign
function calls. The ctypes version number was changed to 1.0.1.
- Bug #1530559, struct.pack raises TypeError where it used to convert.
Passing float arguments to struct.pack when integers are expected
now triggers a DeprecationWarning.
Tests
-----
- test_socketserver should now work on cygwin and not fail sporadically
on other platforms.
- test_mailbox should now work on cygwin versions 2006-08-10 and later.
- Bug #1535182: really test the xreadlines() method of bz2 objects.
- test_threading now skips testing alternate thread stack sizes on
platforms that don't support changing thread stack size.
Documentation
-------------
- Patch #1534922: unittest docs were corrected and enhanced.
Build
-----
- Bug #1535502, build _hashlib on Windows, and use masm assembler
code in OpenSSL.
- Bug #1534738, win32 debug version of _msi should be _msi_d.pyd.
- Bug #1530448, ctypes build failure on Solaris 10 was fixed.
C API
-----
- New API for Unicode rich comparisons: PyUnicode_RichCompare()
- Bug #1069160. Internal correctness changes were made to
``PyThreadState_SetAsyncExc()``. A test case was added, and
the documentation was changed to state that the return value
is always 1 (normal) or 0 (if the specified thread wasn't found).
What's New in Python 2.5 beta 3?
================================
*Release date: 03-AUG-2006*
Core and builtins
-----------------
- _PyWeakref_GetWeakrefCount() now returns a Py_ssize_t; it previously
returned a long (see PEP 353).
- Bug #1515471: string.replace() accepts character buffers again.
- Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn().
This provides the proper warning for struct.pack().
PyErr_Warn() is now deprecated in favor of PyErr_WarnEx().
- Patch #1531113: Fix augmented assignment with yield expressions.
Also fix a SystemError when trying to assign to yield expressions.
- Bug #1529871: The speed enhancement patch #921466 broke Python's compliance
with PEP 302. This was fixed by adding an ``imp.NullImporter`` type that is
used in ``sys.path_importer_cache`` to cache non-directory paths and avoid
excessive filesystem operations during imports.
- Bug #1521947: When checking for overflow, ``PyOS_strtol()`` used some
operations on signed longs that are formally undefined by C.
Unfortunately, at least one compiler now cares about that, so complicated
the code to make that compiler happy again.
- Bug #1524310: Properly report errors from FindNextFile in os.listdir.
- Patch #1232023: Stop including current directory in search
path on Windows.
- Fix some potential crashes found with failmalloc.
- Fix warnings reported by Klocwork's static analysis tool.
- Bug #1512814, Fix incorrect lineno's when code within a function
had more than 255 blank lines.
- Patch #1521179: Python now accepts the standard options ``--help`` and
``--version`` as well as ``/?`` on Windows.
- Bug #1520864: unpacking singleton tuples in a 'for' loop (for x, in) works
again. Fixing this problem required changing the .pyc magic number.
This means that .pyc files generated before 2.5b3 will be regenerated.
- Bug #1524317: Compiling Python ``--without-threads`` failed.
The Python core compiles again, and, in a build without threads, the
new ``sys._current_frames()`` returns a dictionary with one entry,
mapping the faux "thread id" 0 to the current frame.
- Bug #1525447: build on MacOS X on a case-sensitive filesystem.
Library
-------
- Correction of patch #1455898: In the mbcs decoder, set final=False
for stream decoder, but final=True for the decode function.
- os.urandom no longer masks unrelated exceptions like SystemExit or
KeyboardInterrupt.
- Bug #1525866: Don't copy directory stat times in
shutil.copytree on Windows
- Bug #1002398: The documentation for os.path.sameopenfile now correctly
refers to file descriptors, not file objects.
- The renaming of the xml package to xmlcore, and the import hackery done
to make it appear at both names, has been removed. Bug #1511497,
#1513611, and probably others.
- Bug #1441397: The compiler module now recognizes module and function
docstrings correctly as it did in Python 2.4.
- Bug #1529297: The rewrite of doctest for Python 2.4 unintentionally
lost that tests are sorted by name before being run. This rarely
matters for well-written tests, but can create baffling symptoms if
side effects from one test to the next affect outcomes. ``DocTestFinder``
has been changed to sort the list of tests it returns.
- The distutils version has been changed to 2.5.0, and is now kept
in sync with sys.version_info[:3].
- Bug #978833: Really close underlying socket in _socketobject.close.
- Bug #1459963: urllib and urllib2 now normalize HTTP header names with
title().
- Patch #1525766: In pkgutil.walk_packages, correctly pass the onerror callback
to recursive calls and call it with the failing package name.
- Bug #1525817: Don't truncate short lines in IDLE's tool tips.
- Patch #1515343: Fix printing of deprecated string exceptions with a
value in the traceback module.
- Resync optparse with Optik 1.5.3: minor tweaks for/to tests.
- Patch #1524429: Use repr() instead of backticks in Tkinter again.
- Bug #1520914: Change time.strftime() to accept a zero for any position in its
argument tuple. For arguments where zero is illegal, the value is forced to
the minimum value that is correct. This is to support an undocumented but
common way people used to fill in inconsequential information in the time
tuple pre-2.4.
- Patch #1220874: Update the binhex module for Mach-O.
- The email package has improved RFC 2231 support, specifically for
recognizing the difference between encoded (name*0*=<blah>) and non-encoded
(name*0=<blah>) parameter continuations. This may change the types of
values returned from email.message.Message.get_param() and friends.
Specifically in some cases where non-encoded continuations were used,
get_param() used to return a 3-tuple of (None, None, string) whereas now it
will just return the string (since non-encoded continuations don't have
charset and language parts).
Also, whereas % values were decoded in all parameter continuations, they are
now only decoded in encoded parameter parts.
- Bug #1517990: IDLE keybindings on MacOS X now work correctly
- Bug #1517996: IDLE now longer shows the default Tk menu when a
path browser, class browser or debugger is the frontmost window on MacOS X
- Patch #1520294: Support for getset and member descriptors in types.py,
inspect.py, and pydoc.py. Specifically, this allows for querying the type
of an object against these built-in types and more importantly, for getting
their docstrings printed in the interactive interpreter's help() function.
Extension Modules
-----------------
- Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs during
a socket operation on a socket with a timeout, the exception will be
caught correctly. Previously, the exception was not caught.
- Patch #1529514: The _ctypes extension is now compiled on more
openbsd target platforms.
- The ``__reduce__()`` method of the new ``collections.defaultdict`` had
a memory leak, affecting pickles and deep copies.
- Bug #1471938: Fix curses module build problem on Solaris 8; patch by
Paul Eggert.
- Patch #1448199: Release interpreter lock in _winreg.ConnectRegistry.
- Patch #1521817: Index range checking on ctypes arrays containing
exactly one element enabled again. This allows iterating over these
arrays, without the need to check the array size before.
- Bug #1521375: When the code in ctypes.util.find_library was
run with root privileges, it could overwrite or delete
/dev/null in certain cases; this is now fixed.
- Bug #1467450: On Mac OS X 10.3, RTLD_GLOBAL is now used as the
default mode for loading shared libraries in ctypes.
- Because of a misspelled preprocessor symbol, ctypes was always
compiled without thread support; this is now fixed.
- pybsddb Bug #1527939: bsddb module DBEnv dbremove and dbrename
methods now allow their database parameter to be None as the
sleepycat API allows.
- Bug #1526460: Fix socketmodule compile on NetBSD as it has a different
bluetooth API compared with Linux and FreeBSD.
Tests
-----
- Bug #1501330: Change test_ossaudiodev to be much more tolerant in terms of
how long the test file should take to play. Now accepts taking 2.93 secs
(exact time) +/- 10% instead of the hard-coded 3.1 sec.
- Patch #1529686: The standard tests ``test_defaultdict``, ``test_iterlen``,
``test_uuid`` and ``test_email_codecs`` didn't actually run any tests when
run via ``regrtest.py``. Now they do.
Build
-----
- Bug #1439538: Drop usage of test -e in configure as it is not portable.