Repository navigation
Expand file tree
/
Copy pathNEWS
More file actions
3283 lines (2197 loc) · 115 KB
/
Copy pathNEWS
File metadata and controls
3283 lines (2197 loc) · 115 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.6.1
==========================
*Release date: 04-Dec-2008*
Core and Builtins
-----------------
- Issue #3996: On Windows, the PyOS_CheckStack function would cause the
interpreter to abort ("Fatal Python error: Could not reset the stack!")
instead of throwing a MemoryError.
- Issue #4367: Python would segfault during compiling when the unicodedata
module couldn't be imported and \N escapes were present.
- Issue #4348: Some bytearray methods returned that didn't cause any change to
the bytearray, returned the same bytearray instead of a copy.
- Issue #4317: Fixed a crash in the imageop.rgb2rgb8() function.
- Issue #4230: If ``__getattr__`` is a descriptor, it now functions correctly.
- Issue #4048: The parser module now correctly validates relative imports.
- Issue #4225: ``from __future__ import unicode_literals`` didn't work in an
exec statement.
- Issue #4176: Fixed a crash when pickling an object which ``__reduce__``
method does not return iterators for the 4th and 5th items.
- Issue #4209: Enabling unicode_literals and the print_function in the same
__future__ import didn't work.
- On windows, os.chdir given unicode was not working if GetCurrentDirectoryW
returned a path longer than MAX_PATH. (But It's doubtful this code path is
really executed because I cannot move to such directory on win2k)
- Issue #4069: When set.remove(element) is used with a set element, the element
is temporarily replaced with an equivalent frozenset. But the eventual
KeyError would always report the empty frozenset([]) as the missing key. Now
it correctly refers to the initial element.
- Fixed C99 style comments in several files. Python is now C89 compatible
again.
Library
-------
- Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an
exception.
- Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if
the ctypes module is not present.
- Issue #4116: Resolve member name conflict in ScrolledCanvas.__init__.
- Issue #3774: Fixed an error when create a Tkinter menu item without command
and then remove it.
- Fixed a modulefinder crash on certain relative imports.
- Issue #4150: Pdb's "up" command now works for generator frames in post-mortem
debugging.
- Issue #4092: Return ArgInfo as promised in the documentation from
inspect.getargvalues.
- Issue #3935: Properly support list subclasses in bisect's C implementation.
- Issue #4014: Don't claim that Python has an Alpha release status, in addition
to claiming it is Mature.
Build
-----
- Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs".
- Issue #4289: Remove Cancel button from AdvancedDlg.
- Issue #1656675: Register a drop handler for .py* files on Windows.
- Issue #4120: Exclude manifest from extension modules in VS2008.
- Issue #4091: Install pythonxy.dll in system32 again.
- Issue #4018: Disable "for me" installations on Vista.
- Issue #3758: Add ``patchcheck`` build target to .PHONY.
- Issue #4204: Fixed module build errors on FreeBSD 4.
C-API
-----
- Issue #4122: On Windows, fix a compilation error when using the
Py_UNICODE_ISSPACE macro in an extension module.
Extension Modules
-----------------
- Issue #4365: Add crtassem.h constants to the msvcrt module.
- Issue #4396: The parser module now correctly validates the with statement.
What's New in Python 2.6 final
==============================
*Release date: 01-Oct-2008*
Core and Builtins
-----------------
- Issue #3967: Fixed a crash in the count() and find() methods of string-like
objects, when the "start" parameter is a huge value.
- Issue #3965: Fixed a crash on Windows when open() is given an invalid
filename or mode, and the filename is a unicode string.
- Bug #3951: Py_USING_MEMORY_DEBUGGER should not be enabled by default.
Library
-------
- Issue #3965: Allow repeated calls to turtle.Screen, by making it a
true singleton object.
- Issue #3895: It was possible to crash the interpreter when an external timer
was used with cProfile that returned an object that could not be converted
into a float.
- Issue #3950: Made turtle respect scale factors.
- Issue #3547: Fixed ctypes structures bitfields of varying integer
sizes.
- Issue #3879: A regression in urllib.getproxies_enviroment was fixed.
- Issue #3863: Disabled a unit test of fork being called from a thread
when running on platforms known to exhibit OS bugs when attempting that.
Build
-----
- Bug #3989: Package the 2to3 script (as 2to3.py) in the Windows
installer.
- Bug #3887: Package x64 version of CRT for AMD64 Windows binaries.
What's New in Python 2.6 release candidate 2?
=============================================
*Release date: 17-Sep-2008*
Core and Builtins
-----------------
Extension Modules
-----------------
- Security Issue #2: imageop did not validate arguments correctly and could
segfault as a result.
- Issue #3886: Possible integer overflows in the _hashopenssl module were
closed.
Tools/Demos
-----------
- Issue #3850: recursion tests in Misc/find_recursion_limit.py can raise
AttributeError instead of RuntimeError, depending in which C API call
exactly the recursion limit is exceeded. Consequently, both exception types
are caught and silenced.
Build
-----
- Issue #3617: Include a licensing statement regarding the Microsoft
C runtime in the Windows installer.
What's New in Python 2.6 release candidate 1?
=============================================
*Release date: 12-Sep-2008*
Core and Builtins
-----------------
- Issue #3642: Suppress warning in obmalloc when size_t is larger than uint.
- Issue #3743: In a few places, PY_FORMAT_SIZE_T was incorrectly used with
PyString_FromFormat or PyErr_Format to display size_t values. The macro
PY_FORMAT_SIZE_T is designed to select the correct format for the OS
``printf`` function, whereas PyString_FromFormat has an independent
implementation and uses "%zd" on all platforms for size_t values.
This makes a difference on win64, where ``printf`` needs "%Id" to display
64bit values.
- Issue #3634: _weakref.ref(Exception).__init__() gave invalid return value on
error.
- Issue #3777: long() applied to a float object now always return a long
object; previously an int would be returned for small values. the __long__
method is allowed to return either an int or a long, but the behaviour of
float objects should not change to respect backward compatibility.
- Issue #3751: str.rpartition would perform a left-partition when called with
a unicode argument.
- Issue #3683: Fix compilation when --without-threads is given.
- Issue #3668: Fix a memory leak with the "s*" argument parser in
PyArg_ParseTuple and friends, which occurred when the argument for "s*"
was correctly parsed but parsing of subsequent arguments failed.
- Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to
match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__
mechanism. In the process, fix a bug where isinstance() and issubclass(),
when given a tuple of classes as second argument, were looking up
__instancecheck__ / __subclasscheck__ on the tuple rather than on each
type object.
- Fix crashes on memory allocation failure found with failmalloc.
- Fix memory leaks found with valgrind and update suppressions file.
- Fix compiler warnings in opt mode which would lead to invalid memory reads.
- Fix problem using wrong name in decimal module reported by pychecker.
- Silenced another compiler warning about a used but not defined
function 'stringlib_contains_obj'.
- Added warnings on the use of ``__getslice__``, ``__setslice__``, or
``__delslice__``.
- Issue #3678: Correctly pass LDFLAGS and LDLAST to the linker on shared
library targets in the Makefile.
- Issue #1204: The configure script now tests for additional libraries
that may be required when linking against readline. This fixes issues
with x86_64 builds on some platforms (a few Linux flavors and OpenBSD).
C-API
-----
- Aliased PyObject_Bytes to PyObject_Str.
Library
-------
- Issue #3640: Pickling a list or a dict uses less local variables, to reduce
stack usage in the case of deeply nested objects.
- Issue #3629: Fix sre "bytecode" validator for an end case.
- Issue #3811: The Unicode database was updated to 5.1.
- Issue #3781: Further warnings.catch_warnings() cleanup to prevent
silent misbehaviour when a single instance is nested in multiple
with statements, or when the methods are invoked in the wrong order.
- Issue #3809: Fixed spurious 'test.blah' file left behind by test_logging.
- Issue #3781: Clean up the API for warnings.catch_warnings() by having it
return a list or None rather than a custom object.
- Issue #1638033: Cookie.Morsel gained the httponly attribute.
- Issue #3535: zipfile couldn't read some zip files larger than 2GB.
- Issue #3776: Deprecate the bsddb package for removal in 3.0.
- Issue #3762: platform.architecture() fails if python is lanched via
its symbolic link.
- Issue #3772: Fixed regression problem in StreamHandler.emit().
- Issue 600362: Relocated parse_qs() and parse_qsl(), from the cgi module
to the urlparse one. Added a PendingDeprecationWarning in the old
module, it will be deprecated in the future.
- Issue #2562: Fix distutils PKG-INFO writing logic to allow having
non-ascii characters and Unicode in setup.py meta-data.
- Issue #3726: Allow spaces in separators in logging configuration files.
- Issue #3719: platform.architecture() fails if there are spaces in the
path to the Python binary.
- Issue 3602: Moved test.test_support.catch_warning() to
warnings.catch_warnings() along with some API cleanup. Expanding the tests
for catch_warnings() also led to an improvement in the raising of a
DeprecationWarning related to warnings.warn_explicit().
- The deprecation warnings for the old camelCase threading API were removed.
- logging: fixed lack of use of encoding attribute specified on a stream.
- Silenced a trivial compiler warning in the sqlite module.
- Fixed two format strings in the _collections module.
- Issue #3703: _fileio.FileIO gave unhelpful error message when trying to open a
directory.
- Issue #3708: os.urandom no longer goes into an infinite loop when passed a
non-integer floating point number.
- Issue #3110: multiprocessing fails to compiel on solaris 10 due to missing
SEM_VALUE_MAX.
Extension Modules
-----------------
- Issue #2975: When compiling several extension modules with Visual Studio 2008
from the same python interpreter, some environment variables would grow
without limit.
- Issue #3643: Added a few more checks to _testcapi to prevent segfaults by
exploitation of poor argument checking.
- sqlite3: Changed docstring of iterdump() to mark method as "Non-standard".
- Issue #3103: Reduced globals symbols used by sqlite3 module and made sure all
remaining ones have "pysqlite_" prefix.
- Issue #3846: Release the GIL during sqlite3_prepare calls. This improves
concurrent access to the same SQLite database from multiple
threads/processes.
Tests
-----
- Issue #3781: Add test.test_support.check_warnings() as a convenience
wrapper for warnings.catch_warnings() that makes it easier to check
that expected warning messages are being reported.
- Issue #3796: Some tests functions were not enabled in test_float.
- Issue #3768: Move test_py3kwarn over to the new API for catch_warnings().
Build
-----
- Issue #3833: Use a different upgrade code for Win64 installers.
- Issue #2271: Set SecureCustomProperties so that installation will properly
use the TARGETDIR even for unprivileged users.
- Allow passing the MSI file name to merge.py.
- Issue #3758: Rename the 'check' target to 'patchcheck' so as to not clash
with GNU build target guidelines.
What's New in Python 2.6 beta 3?
================================
*Release date: 20-Aug-2008*
Core and Builtins
-----------------
- Issue #1878: Remove Py_TPFLAGS_HAVE_VERSION_TAG from
Py_TPFLAGS_DEFAULT when not building the core. This means 3rd party
extensions do not automatically benefit from the class attribute
cache; they will have to explicitly add Py_TPFLAGS_HAVE_VERSION_TAG
to their tp_flags field if they care. This is a backwards
compatibility feature; in 3.0, all types will use the cache by
default.
- Keyword arguments can now follow starred arguments. (``f(a, *args,
keyword=23)`` is now valid syntax.)
- ctypes function pointers that are COM methods have a boolean True
value again.
- Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple,
by denying s# to parse objects that have a releasebuffer procedure,
and introducing s*.
- Issue #3537: Fix an assertion failure when an empty but presized dict
object was stored in the freelist.
- Issue #1481296: Make long(float('nan')) and int(float('nan')) raise
ValueError consistently across platforms.
- Issue #3479: On platforms where sizeof(int) is smaller than sizeof(long)
(64bit Unix, for example), unichr() would truncate its argument and return
u'\x00' for unichr(2**32). Now it properly raises an OverflowError.
- Apply security patches from Apple.
- Issue #2542: Now that issubclass() may call arbitrary code, ensure that
PyErr_ExceptionMatches returns 0 when an exception occurs there.
- Issue #1819: function calls with several named parameters are now on
average 35% faster (as measured by pybench).
- Issue #2378: An unexpected UnboundLocalError or NameError could appear when
the python debugger steps into a class statement: the free variables (local
variables defined in an outer scope) would be deleted from the outer scope.
- Issue #2620: Overflow checking when allocating or reallocating memory
was not always being done properly in some python types and extension
modules. PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have
all been updated to perform better checks and places in the code that
would previously leak memory on the error path when such an allocation
failed have been fixed.
Library
-------
- Issue #3612: Added some missing basic types in ctypes.wintypes.
- The methods ``is_in_tuple()``, ``is_vararg()``, and ``is_keywordarg()`` of
symtable.Symbol have been deprecated for removal in 3.0 and the next release.
- Issue #2234: distutils failed for some versions of the cygwin compiler. The
version reported by these tools does not necessarily follow the python
version numbering scheme, so the module is less strict when parsing it.
- Issue #2235: Added Py3k warnings for types which will become unhashable
under the stricter __hash__ inheritance rules in 3.0. Several types
which did not meet the rules for hash invariants and were already
unhashable in 3.0 have now been explicitly flagged as unhashable in
2.6 as well (collections.Mapping, collections.Set, unittest.TestSuite,
xml.dom.minidom.NamedNodeMap, numbers.Number, UserList.UserList)
- Update __all__ for cookielib, csv, os, urllib2, and weakref to include things
imported into the module but exposed as part of the module's API.
- Remove an unneeded import of abc.ABCMeta from 'inspect'.
- Remove unneeded imports of 'sys' and 'warnings' from 'io'.
- Remove unneeded imports of 'warnings' from shelve, filecmp, and dummy_thread.
- Issue #3575: Incremental decoder's decode function now takes bytearray
by using 's*' instead of 't#'.
- Issue #2222: Fixed reference leak when occured os.rename()
fails unicode conversion on 2nd parameter. (windows only)
- Issue 2464. urllib2 now supports a malformation in the URL received
in a redirect.
- Silence the DeprecationWarning raised when importing mimetools in
BaseHTTPServer, cgi (and rfc822), httplib.
- Issue #2776: fixed small issue when handling an URL with double slash
after a 302 response in the case of not going through a proxy.
- Issue #2676: in the email package, content-type parsing was hanging on
pathological input because of quadratic or exponential behaviour of a
regular expression.
- Issue #3476: binary buffered reading through the new "io" library is now
thread-safe.
- Silence the DeprecationWarning of rfc822 when it is imported by mimetools
since mimetools itself is deprecated. Because modules are cached, all
subsequent imports of rfc822 will not raise a visible DeprecationWarning.
- Issue #3134: shutil referenced undefined WindowsError symbol.
- Issue #1342811: Fix leak in Tkinter.Menu.delete. Commands associated to
menu entries were not deleted.
- Copied the implementation of reduce() to _functools.reduce() to have a
version that did not raise a DeprecationWarning under -3.
- Issue #3205: When iterating over a BZ2File fails allocating memory, raise
a MemoryError rather than silently stop the iteration.
- Issue #3487: sre "bytecode" validator. Passing invalid "re-bytecode"
to _sre.compile() will now be rejected. This should not affect anybody
since the re.compile() function never generates invalid re-bytecode.
- Issue #3436: Make csv.DictReader's fieldnames attribute a property so that
upon first access it can be automatically initialized from the csv file if
it wasn't initialized during instantiation.
- Issue #2338: Create imp.reload() to help with transitioning to Python 3.0 as
the reload() built-in has been removed.
- Changed code in the following modules/packages to remove warnings raised
while running under the ``-3`` flag: aifc, asynchat, asyncore, bdb, bsddb,
ConfigParser, cookielib, csv, difflib, distutils, DocXMLRPCServer, email,
filecmp, fileinput, inspect, logging, modulefinder, pdb, pickle, profile,
pstats, pydoc, re, rlcompleter, SimpleXMLRPCServer, shelve, socket,
subprocess, sqlite3, tarfile, Tkinter, test.test_support, textwrap,
threading, tokenize, traceback, urlparse, wsgiref, xml, xmlrpclib.
- Issue #3039: Fix tarfile.TarFileCompat.writestr() which always
raised an AttributeError.
- Issue #2523: Fix quadratic behaviour when read()ing a binary file without
asking for a specific length. This problem only affected files opened
using the new "io" module, not the built-in open() function.
- Issue #3449: Update decimal module to use most recent specification
(v. 1.68) and tests (v. 2.58) from IBM.
- Issue 3437: Bug fix in robotparser parsing of Allow: lines.
- Issue 1592: Improve error reporting when operations are attempted
on a closed shelf.
- Deprecate the "ast" parser function aliases.
- Issue #3120: On 64-bit Windows the subprocess module was truncating handles.
- Issue #3303: Fix a crash in locale.strcoll() when calling it with
invalid arguments.
- Issue #3302: Fix several crashes when calling locale's gettext functions
with None arguments.
- Issue #3389: Allow resolving dotted names for handlers in logging
configuration files.
- Deprecate the sunaudio module for removal in Python 3.0.
- Issue #3394: zipfile.writestr sets external attributes when passed a
file name rather than a ZipInfo instance, so files are extracted with
mode 0600 rather than 000 under Unix.
- Issue #1857: subprocess.Popen.poll gained an additional _deadstate keyword
argument in python 2.5, this broke code that subclassed Popen to include its
own poll method. Fixed my moving _deadstate to an _internal_poll method.
Build
-----
- Generate the PatternGrammar pickle during "make install".
Documentation
-------------
- Issue #2235: the C API function PyObject_HashNotImplemented and its
interaction with the tp_hash slot (added in 2.6b2) are now documented
- Issue #643841: The language reference now provides more detailed
coverage of the lookup process for special methods. The disclaimers
regarding lack of coverage of new-style classes have also been
removed, since the coverage is now fairly reasonable.
What's New in Python 2.6 beta 2?
================================
*Release date: 17-Jul-2008*
Core and Builtins
-----------------
- Issue #3156: Fix inconsistent behavior of the bytearray type: all
its methods now allow for items objects that can be converted to
an integer using operator.index().
- Issue #3360: Fix incorrect parsing of '020000000000.0', which
produced a ValueError instead of giving the correct float.
- Issue #3083: Add alternate (#) formatting for bin, oct, hex output
for str.format(). This adds the prefix 0b, 0o, or 0x, respectively.
- Issue #3008: the float type has a new instance method 'float.hex'
and a new class method 'float.fromhex' to convert floating-point
numbers to and from hexadecimal strings, respectively.
- Issue #2235: __hash__ is once again inherited by default. To allow
collections.Hashable to remain meaningful in the presence of the
default hash implementation (object.__hash__), it is now possible
to explicit block inheritance of hash by setting __hash__=None at
the Python level, or tp_hash=PyObject_HashNotImplemented at the C
level.
- Issue #3221: Issue a RuntimeWarning instead of raising SystemError if
the parent module cannot be found while performing an absolute import.
This means that an incorrectly defined __package__ attribute will
now only prevent relative imports in that module rather than causing
all imports from that module to fail.
- Issue #2517: Allow unicode messages in Exceptions again by correctly
bypassing the instance dictionary when looking up __unicode__ on
new-style classes.
- Issue #3242: Fix a crash inside the print statement, if sys.stdout is
set to a custom object whose write() method happens to install
another file in sys.stdout.
- Issue #3088: Corrected a race condition in classes derived from
threading.local: the first member set by a thread could be saved in
another thread's dictionary.
- Issue #3004: Minor change to slice.indices(): the start and stop
arguments are now treated identically, making the behaviour easier
to describe and understand. For example, slice(None, -10,
1).indices(9) now returns (0, 0, 1) instead of (0, -1, 1), and
slice(None, 10, -1).indices(10) returns (9, 9, -1) instead of (9,
10, -1).
- Issue #3219: Calling a function with repeated keyword arguments,
f(a=2, a=23), would not cause a syntax error. This was a regression
from 2.4 caused by the switch to the new compiler.
- Issue #2862: Make int and float freelist management consistent with
other freelists. Changes their CompactFreeList apis into
ClearFreeList apis and calls them via gc.collect().
Library
-------
- Issue #3554: ctypes.string_at and ctypes.wstring_at did call Python
api functions without holding the GIL, which could lead to a fatal
error when they failed.
- Issue #799428: Fix Tkinter.Misc._nametowidget to unwrap Tcl command objects.
- Issue #3395: fix reference in test_multiprocessing to old debugInfo method
- Issue #3312: Fix two crashes in sqlite3.
- Issue #1608818: Fix misbehavior in os.listdir() if readdir() fails.
- Issue #3125: Remove copy_reg in multiprocessing and replace it with
ForkingPickler.register() to resolve conflict with ctypes.
- Issue #3090: Fixed ARCHFLAGS parsing on OS/X
- Issue #3313: Fixed a crash when a failed dlopen() call does not set
a valid dlerror() message.
- Issue #3258: Fixed a crash when a ctypes POINTER type to an
incomplete structure was created.
- Issue #3339: dummy_thread.acquire() should not return None.
- Issue #3285: Fractions from_float() and from_decimal() accept Integral arguments.
- Issue #3301: Bisect module behaved badly when lo was negative.
- Issue #839496: SimpleHTTPServer used to open text files in text mode. This is
both unnecessary (HTTP allows text content to be sent in several forms) and
wrong because the actual transmitted size could differ from the
content-length. The problem had been corrected in the 2.4 branch, but never
merged into trunk.
- Issue #2663: add filtering capability to shutil.copytree().
- Issue #1622: Correct interpretation of various ZIP header fields.
- Issue #1526: Allow more than 64k files to be added to Zip64 file.
- Issue #1746: Correct handling of zipfile archive comments (previously
archives with comments over 4k were flagged as invalid). Allow writing
Zip files with archives by setting the 'comment' attribute of a ZipFile.
- Issue #449227: The rlcompleter module now adds "(" to callable objects
when completed.
- Issue #3190: Pydoc now hides the automatic module attribute __package__ (the
handling is now the same as that of other special attributes like __name__).
- Issue #2885 (partial): The urllib.urlopen() function has been deprecated for
removal in Python 3.0 in favor of urllib2.urlopen().
- Issue #2113: Fix error in subprocess.Popen if the select system call is
interrupted by a signal.
- Issue #3309: Fix bz2.BZFile iterator to release its internal lock
properly when raising an exception due to the bz2file being closed.
Prevents a deadlock.
- Issue #3094: httplib.HTTPSConnection Host: headers no longer include the
redundant ":443" port number designation when the connection is using the
default https port (443).
- Issue #874900: after an os.fork() call the threading module state is cleaned
up in the child process to prevent deadlock and report proper thread counts
if the new process uses the threading module.
Tests
-----
- test.test_support.catch_warning now keeps track of all warnings it sees
and is now better documented. Explicit unit tests for this context manager
have been added to test_warnings.
Build
-----
- Issue #3215: Build sqlite3 as sqlite3.dll, not sqlite3.pyd.
Documentation
-------------
- Document that robotparser has been renamed to urllib.robotparser in
Python 3.0.
- Document that urlparse has been renamed to urllib.parse in Python 3.0.
- Document that urllib2 is split across multiple modules and renamed in
Python 3.0.
- Document that urllib is split across multiple modules and renamed in
Python 3.0.
What's New in Python 2.6 beta 1?
================================
*Release date: 18-June-2008*
Core and Builtins
-----------------
- Issue #3211: warnings.warn_explicit() did not guard against its 'registry'
argument being anything other than a dict or None. Also fixed a bug in error
handling when 'message' and 'category' were both set to None, triggering a
bus error.
- Issue #3100: Corrected a crash on deallocation of a subclassed weakref which
holds the last (strong) reference to its referent.
- Add future_builtins.ascii().
- Several set methods now accept multiple arguments: update(), union(),
intersection(), intersection_update(), difference(), and difference_update().
- Issue #2898: Added sys.getsizeof() to retrieve size of objects in bytes.
- New environment variable PYTHONIOENCODING.
- Patch #2488: Add sys.maxsize.
- Issue #2353: file.xreadlines() now emits a Py3k warning.
- Issue #2863: generators now have a ``gen.__name__`` attribute that
equals ``gen.gi_code.co_name``, like ``func.__name___`` that equals
``func.func_code.co_name``. The repr() of a generator now also
contains this name.
- Issue #2831: enumerate() now has a ``start`` argument.
- Issue #2801: fix bug in the float.is_integer method where a
ValueError was sometimes incorrectly raised.
- Issue #2790: sys.flags was not properly exposing its bytes_warning
attribute.
- Issue #2196: hasattr() now lets exceptions which do not inherit
Exception (KeyboardInterrupt, and SystemExit) propagate instead of
ignoring them.
- Added checks for integer overflows, contributed by Google. Some are
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
Extension Modules
-----------------
- Issue #1179: [CVE-2007-4965] Integer overflow in imageop module.
- Issue #3116: marshal.dumps() had quadratic behavior for strings > 32Mb.
- Issue #2138: Add factorial() to the math module.
- The heapq module does comparisons using LT instead of LE. This
makes its implementation match that used by list.sort().
- Issue #2819: add full-precision summation function to math module,
based on Hettinger's ASPN Python Cookbook recipe.
- Issue #2592: delegate nb_index and the floor/truediv slots in
weakref.proxy.
- Support os.O_ASYNC and fcntl.FASYNC if the constants exist on the
platform.
- Support for Windows 9x has been removed from the winsound module.
- bsddb module updated to version 4.7.3.
http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.7.3. This
code should be compatible with Python 3.0.
- Issue #2858: Fix potential memory corruption when
bsddb.db.DBEnv.lock_get and other bsddb.db object constructors
raised an exception.
- Issue #2669: bsddb/__init__.py iteration no longer silently fails when
the database has changed size during iteration. It now raises a
RuntimeError in the same manner as a dictionary.
- Issue #2870: cmathmodule.c compile error.
- Added a threading.Thread.ident property.
Library
-------
- logging.config: Removed out-of-date comment in _install_handlers and
used issubclass in place of equality comparison of classes.
- Issue #2722: Now the os.getcwd() supports very long path names.
- Issue #2888: Fixed the behaviour of pprint when working with nested
structures, to match the behaviour of 2.5 and 3.0 (now follows the common
sense).
- Issue #1817: cgi now correctly handles the querystring on POST requests
- Issue #3136: fileConfig()'s disabling of old loggers is now conditional via
an optional disable_existing_loggers parameter, but the default value is
such that the old behaviour is preserved. Thanks to Leandro Lucarella for
the patch.
- Issue #3126: StreamHandler and FileHandler check before calling "flush" and
"close" that the stream object has these, using hasattr (thanks to bobf for
the patch).
- Issue #2912: platform.uname now tries to determine unknown information even if
os.uname exists.
- The rfc822 module has been deprecated for removal in 3.0.
- The mimetools module has been deprecated for removal in 3.0.
- The ctypes.byref function now takes an optional second parameter
which allows to specify an offset in bytes for the constructed
pointer-like object.
- Added the ast module.
- Added the multiprocessing module, PEP 371.
- Factored out the indentation cleaning from inspect.getdoc() into
inspect.cleandoc() to ease standalone use.
- Issue #1798: Add ctypes calling convention that allows safe access
to errno.
- Issue #2404: ctypes objects support the new pep3118 buffer interface.
- Patch #2125: Add GetInteger and GetString methods for
msilib.Record objects.
- Issue #2782: The datetime module's strftime methods now accept
unicode format strings just as time.strftime always has.
- The sgmllib and htmllib modules have been deprecated for removal
in Python 3.0.
- Issue #3011: locale module alias table was updated to the latest
version from the X.org locale.alias file.
- Issue #1797 (partial fix): ctypes NULL function pointers have a
False boolean value now.
- Issue #2985: Allow 64-bit integer responses (``<i8>``) in XMLRPC
transfers.
- Issue #2877: The UserString.MutableString class has been removed in
Python 3.0.
- Do not close external file objects passed to tarfile.open(mode='w:bz2')
when the TarFile is closed.
- Issue #2959: For consistency with other file-like objects, gzip's
GzipFile.close() can now be called multiple times without raising
an exception.
- Issue #1390: Raise ValueError in toxml when an invalid comment would
otherwise be produced.
- Issue #2914: TimedRotatingFileHandler now takes an optional keyword
argument "utc" to use UTC time rather than local time.
- Issue #2929: TimedRotatingFileHandler was using the wrong path when
deleting old log files (filename only instead of full path).
- Issue #1775025: You can now specify zipfile members to open(),
read() or extract() via a ZipInfo instance. This allows handling
duplicate filenames in zipfiles.
- Issue #961805: Fix Text.edit_modified() in Tkinter.
- Issue #1793: Function ctypes.util.find_msvcrt() added that returns
the name of the C runtime library that Python uses.
ctypes.util.find_library(name) now call this function when name is
'm' or 'c'.
- The statvfs module has been deprecated for removal in Python 3.0.
- The sunaudiodev and SUNAUDIODEV modules have been deprecated for
removal in Python 3.0.
- The WAIT module from IRIX has been deprecated for removal in Python
3.0.
- The torgb module from IRIX has been deprecated for removal in Python
3.0.
- The SV module from IRIX has been deprecated for removal in Python
3.0.
- The readcd module from IRIX has been deprecated for removal in
Python 3.0.
- The panelparser module from IRIX has been deprecated for removal in
Python 3.0.
- The panel module from IRIX has been deprecated for removal in Python
3.0.
- The jpeg module from IRIX has been deprecated for removal in Python
3.0.
- The IOCTL module from IRIX has been deprecated for removal in Python
3.0.
- The IN module from IRIX has been deprecated for removal in Python
3.0.
- The imgfile module from IRIX has been deprecated for removal in
Python 3.0.
- The GLWS module from IRIX has been deprecated for removal in Python
3.0.
- The GET module from IRIX has been deprecated for removal in Python
3.0.
- The fm module from IRIX has been deprecated for removal in Python
3.0.
- The FL, flp, and fl modules from IRIX have been deprecated for
removal in Python 3.0.
- The FILE module on IRIX has been deprecated for removal in Python
3.0.
- The ERRNO module on IRIX has been deprecated for removal in Python
3.0.
- The DEVICE, GL, gl, and cgen modules (which indirectly includes
cgensupport) have been deprecated for removal in Python 3.0.
- The CL, CL_old, and cl modules for IRIX have been deprecated for
removal in Python 3.0.
- The cdplayer module for IRIX has been deprecated for removal in
Python 3.0.
- The cddb module for IRIX has been deprecated for removal in Python
3.0.
- The cd and CD modules for IRIX have been deprecated for removal in
Python 3.0.
- The al and AL modules for IRIX have been deprecated for removal in
Python 3.0.
- Issue #1713041: fix pprint's handling of maximum depth.
- The timing module has been deprecated for removal in Python 3.0.
- The sv module has been deprecated for removal in Python 3.0.
- The multifile module has been deprecated as per PEP 4.
- The imageop module has been deprecated for removal in Python 3.0.
- Issue #2250: Exceptions raised during evaluation of names in
rlcompleter's ``Completer.complete()`` method are now caught and
ignored.
- Issue #2659: Added ``break_on_hyphens`` option to textwrap
TextWrapper class.
- The mhlib module has been deprecated for removal in Python 3.0.
- The linuxaudiodev module has been deprecated for removal in Python
3.0.
- The ihooks module has been deprecated for removal in Python 3.0.
- The fpformat module has been deprecated for removal in Python 3.0.