-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteste.txt
9658 lines (6448 loc) · 357 KB
/
teste.txt
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
+++++++++++
Whats' New in Python 2.7.6?
===========================
*Release date: 2013-11-10*
Library
-------
- Issue #19435: Fix directory traversal attack on CGIHttpRequestHandler.
IDLE
----
- Issue #19426: Fixed the opening of Python source file with specified encoding.
Tests
-----
- Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are
loaded from .py[co] files.
Build
-----
- Issue #15663: Revert OS X installer built-in Tcl/Tk support for 2.7.6.
Some third-party projects, such as Matplotlib and PIL/Pillow,
depended on being able to build with Tcl and Tk frameworks in
/Library/Frameworks.
What's New in Python 2.7.6 release candidate 1?
===============================================
*Release date: 2013-10-26*
Core and Builtins
-----------------
- Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
Python executable and not removed by the linker's optimizer.
- Issue #19279: UTF-7 decoder no more produces illegal unicode strings.
- Issue #18739: Fix an inconsistency between math.log(n) and math.log(long(n));
the results could be off from one another by a ulp or two.
- Issue #13461: Fix a crash in the "replace" error handler on 64-bit platforms.
Patch by Yogesh Chaudhari.
- Issue #15866: The xmlcharrefreplace error handler no more produces two XML
entities for a non-BMP character on narrow build.
- Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
OverflowError when an argument of %c format is out of range.
- Issue #18137: Detect integer overflow on precision in float.__format__()
and complex.__format__().
- Issue #18038: SyntaxError raised during compilation sources with illegal
encoding now always contains an encoding name.
- Issue #18019: Fix crash in the repr of dictionaries containing their own
views.
- Issue #18427: str.replace could crash the interpreter with huge strings.
Library
-------
- Issue #19393: Fix symtable.symtable function to not be confused when there are
functions or classes named "top".
- Issue #19327: Fixed the working of regular expressions with too big charset.
- Issue #19350: Increasing the test coverage of macurl2path. Patch by Colin
Williams.
- Issue #19352: Fix unittest discovery when a module can be reached
through several paths (e.g. under Debian/Ubuntu with virtualenv).
- Issue #15207: Fix mimetypes to read from correct part of Windows registry
Original patch by Dave Chambers
- Issue #8964: fix platform._sys_version to handle IronPython 2.6+.
Patch by Martin Matusiak.
- Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by
limiting the call to readline(). Original patch by Michał
Jastrzębski and Giampaolo Rodola.
- Issue #19276: Fixed the wave module on 64-bit big-endian platforms.
- Issue #18458: Prevent crashes with newer versions of libedit. Its readline
emulation has changed from 0-based indexing to 1-based like gnu readline.
Original patch by Ronald Oussoren.
- Issue #18919: If the close() method of a writer in the sunau or wave module
failed, second invocation of close() and destructor no more raise an
exception. Second invocation of close() on sunau writer now has no effects.
The aifc module now accepts lower case of names of the 'ulaw' and 'alaw'
codecs.
- Issue #19131: The aifc module now correctly reads and writes sampwidth of
compressed streams.
- Issue #19158: a rare race in BoundedSemaphore could allow .release() too
often.
- Issue #18037: 2to3 now escapes '\u' and '\U' in native strings.
- Issue #19137: The pprint module now correctly formats empty set and frozenset
and instances of set and frozenset subclasses.
- Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to
prevent readline() calls from consuming too much memory. Patch by Jyrki
Pulliainen.
- Issue #12641: Avoid passing "-mno-cygwin" to the mingw32 compiler, except
when necessary. Patch by Oscar Benjamin.
- Properly initialize all fields of a SSL object after allocation.
- Issue #4366: Fix building extensions on all platforms when --enable-shared
is used.
- Issue #18950: Fix miscellaneous bugs in the sunau module.
Au_read.readframes() now updates current file position and reads correct
number of frames from multichannel stream. Au_write.writeframesraw() now
correctly updates current file position. Au_read and Au_write now correctly
work with file object if start file position is not a zero.
- Issue #18050: Fixed an incompatibility of the re module with Python 2.7.3
and older binaries.
- Issue #19037: The mailbox module now makes all changes to maildir files
before moving them into place, to avoid race conditions with other programs
that may be accessing the maildir directory.
- Issue #14984: On POSIX systems, when netrc is called without a filename
argument (and therefore is reading the user's $HOME/.netrc file), it now
enforces the same security rules as typical ftp clients: the .netrc file must
be owned by the user that owns the process and must not be readable by any
other user.
- Issue #17324: Fix http.server's request handling case on trailing '/'. Patch
contributed by Vajrasky Kok.
- Issue #19018: The heapq.merge() function no longer suppresses IndexError
in the underlying iterables.
- Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL,
if all necessary functions are already found in libuuid.
Patch by Evgeny Sologubov.
- Issue #14971: unittest test discovery no longer gets confused when a function
has a different __name__ than its name in the TestCase class dictionary.
- Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in
the _sre module.
- Issue #18830: inspect.getclasstree() no more produces duplicated entries even
when input list contains duplicates.
- Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast
64-bit pointer to long (32 bits).
- Issue #18876: The FileIO.mode attribute now better reflects the actual mode
under which the file was opened. Patch by Erik Bray.
- Issue #18851: Avoid a double close of subprocess pipes when the child
process fails starting.
- Issue #18418: After fork(), reinit all threads states, not only active ones.
Patch by A. Jesse Jiryu Davis.
- Issue #11973: Fix a problem in kevent. The flags and fflags fields are now
properly handled as unsigned.
- Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6.
- Issue #16809: Tkinter's splitlist() and split() methods now accept Tcl_Obj
argument.
- Issue #17119: Fixed integer overflows when processing large Unicode strings
and tuples in the tkinter module.
- Issue #15233: Python now guarantees that callables registered with the atexit
module will be called in a deterministic order.
- Issue #18747: Re-seed OpenSSL's pseudo-random number generator after fork.
A pthread_atfork() parent handler is used to seed the PRNG with pid, time
and some stack data.
- Issue #8865: Concurrent invocation of select.poll.poll() now raises a
RuntimeError exception. Patch by Christian Schubert.
- Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit
platforms. Patch by Yogesh Chaudhari.
- Issue #18777: The ssl module now uses the new CRYPTO_THREADID API of
OpenSSL 1.0.0+ instead of the deprecated CRYPTO id callback function.
- Issue #18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok.
- Issue #18178: Fix ctypes on BSD. dlmalloc.c was compiled twice which broke
malloc weak symbols.
- Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes
inside subjectAltName correctly. Formerly the module has used OpenSSL's
GENERAL_NAME_print() function to get the string represention of ASN.1
strings for ``rfc822Name`` (email), ``dNSName`` (DNS) and
``uniformResourceIdentifier`` (URI).
- Issue #18756: Improve error reporting in os.urandom() when the failure
is due to something else than /dev/urandom not existing (for example,
exhausting the file descriptor limit).
- Fix tkinter regression introduced by the security fix in issue #16248.
- Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get
docstrings and ValueError messages. Patch by Zhongyue Luo
- Issue #17998: Fix an internal error in regular expression engine.
- Issue #17557: Fix os.getgroups() to work with the modified behavior of
getgroups(2) on OS X 10.8. Original patch by Mateusz Lenik.
- Issue #18455: multiprocessing should not retry connect() with same socket.
- Issue #18513: Fix behaviour of cmath.rect w.r.t. signed zeros on OS X 10.8 +
gcc.
- Issue #18101: Tcl.split() now process Unicode strings nested in a tuple as it
do with byte strings.
- Issue #18347: ElementTree's html serializer now preserves the case of
closing tags.
- Issue #17261: Ensure multiprocessing's proxies use proper address.
- Issue #17097: Make multiprocessing ignore EINTR.
- Issue #18155: The csv module now correctly handles csv files that use
a delimiter character that has a special meaning in regexes, instead of
throwing an exception.
- Issue #18135: ssl.SSLSocket.write() now raises an OverflowError if the input
string in longer than 2 gigabytes. The ssl module does not support partial
write.
- Issue #18167: cgi.FieldStorage no longer fails to handle multipart/form-data
when \r\n appears at end of 65535 bytes without other newlines.
- Issue #17403: urllib.parse.robotparser normalizes the urls before adding to
ruleline. This helps in handling certain types invalid urls in a conservative
manner. Patch contributed by Mher Movsisyan.
- Implement inequality on weakref.WeakSet.
- Issue #17981: Closed socket on error in SysLogHandler.
- Issue #18015: Fix unpickling of 2.7.3 and 2.7.4 namedtuples.
- Issue #17754: Make ctypes.util.find_library() independent of the locale.
- Fix typos in the multiprocessing module.
- Issue #17269: Workaround for socket.getaddrinfo crash on MacOS X
with port None or "0" and flags AI_NUMERICSERV.
- Issue #18080: When building a C extension module on OS X, if the compiler
is overriden with the CC environment variable, use the new compiler as
the default for linking if LDSHARED is not also overriden. This restores
Distutils behavior introduced in 2.7.3 and inadvertently dropped in 2.7.4.
- Issue #18071: C extension module builds on OS X could fail with TypeError
if the Xcode command line tools were not installed.
- Issue #18113: Fixed a refcount leak in the curses.panel module's
set_userptr() method. Reported by Atsuo Ishimoto.
- Issue #18849: Fixed a Windows-specific tempfile bug where collision with an
existing directory caused mkstemp and related APIs to fail instead of
retrying. Report and fix by Vlad Shcherbina.
- Issue #19400: Prevent extension module build failures with Xcode 5 on OS X
10.8+ when using a universal Python that included a PPC architecture,
such as with a python.org 32-bit-only binary installer.
Tools/Demos
-----------
- Issue #18873: 2to3 and the findnocoding.py script now detect Python source
code encoding only in comment lines.
- Issue #18817: Fix a resource warning in Lib/aifc.py demo.
- Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
- Issue #18448: Fix a typo in Demo/newmetaclasses/Eiffel.py.
- Issue #12990: The "Python Launcher" on OSX could not launch python scripts
that have paths that include wide characters.
Build
-----
- Issue #16067: Add description into MSI file to replace installer's temporary name.
- Issue #18256: Compilation fix for recent AIX releases. Patch by
David Edelsohn.
- Issue #18098: The deprecated OS X Build Applet.app fails to build on
OS X 10.8 systems because the Apple-deprecated QuickDraw headers have
been removed from Xcode 4. Skip building it in this case.
- Issue #1584: Provide options to override default search paths for
Tcl and Tk when building _tkinter.
- Issue #15663: Tcl/Tk 8.5.15 is now included with the OS X 10.6+
64-bit/32-bit installer for 10.6+. It is no longer necessary
to install a third-party version of Tcl/Tk 8.5 to work around the
problems in the Apple-supplied Tcl/Tk 8.5 shipped in OS X 10.6
and later releases.
- Issue #19019: Change the OS X installer build script to use CFLAGS instead
of OPT for special build options. By setting OPT, some compiler-specific
options like -fwrapv were overridden and thus not used, which could result
in broken interpreters when building with clang.
IDLE
----
- Issue #18873: IDLE now detects Python source code encoding only in comment
lines.
- Issue #18988: The "Tab" key now works when a word is already autocompleted.
- Issue #18489: Add tests for SearchEngine. Original patch by Phil Webster.
- Issue #18429: Format / Format Paragraph, now works when comment blocks
are selected. As with text blocks, this works best when the selection
only includes complete lines.
- Issue #18226: Add docstrings and unittests for FormatParagraph.py.
Original patches by Todd Rovito and Phil Webster.
- Issue #18279: Format - Strip trailing whitespace no longer marks a file as
changed when it has not been changed. This fix followed the addition of a
test file originally written by Phil Webster (the issue's main goal).
- Issue #18539: Calltips now work for float default arguments.
- Issue #7136: In the Idle File menu, "New Window" is renamed "New File".
Patch by Tal Einat, Roget Serwy, and Todd Rovito.
- Issue #8515: Set __file__ when run file in IDLE.
Initial patch by Bruce Frederiksen.
- Issue #5492: Avoid traceback when exiting IDLE caused by a race condition.
- Issue #17511: Keep IDLE find dialog open after clicking "Find Next".
Original patch by Sarah K.
- Issue #15392: Create a unittest framework for IDLE.
Preliminary patch by Rajagopalasarma Jayakrishnan
See Lib/idlelib/idle_test/README.txt for how to run Idle tests.
- Issue #14146: Highlight source line while debugging on Windows.
- Issue #17532: Always include Options menu for IDLE on OS X.
Patch by Guilherme Simões.
Tests
-----
- Issue #18919: Added tests for the sunau module. Unified and extended tests
for audio modules: aifc, sunau and wave.
- Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as
possible, since "localhost" goes through a DNS lookup under recent Windows
versions.
- Issue #18357: add tests for dictview set difference.
Patch by Fraser Tweedale.
- Issue #11185: Fix test_wait4 under AIX. Patch by Sébastien Sablé.
- Issue #18094: test_uuid no more reports skipped tests as passed.
- Issue #11995: test_pydoc doesn't import all sys.path modules anymore.
Documentation
-------------
- Issue #18758: Fixed and improved cross-references.
- Issue #18718: datetime documentation contradictory on leap second support.
- Issue #17701: Improving strftime documentation.
- Issue #17844: Refactor a documentation of Python specific encodings.
Add links to encoders and decoders for binary-to-binary codecs.
What's New in Python 2.7.5?
===========================
*Release date: 2013-05-12*
Core and Builtins
-----------------
- Issue #15535: Fixed regression in the pickling of named tuples by
removing the __dict__ property introduced in 2.7.4.
- Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
such as was shipped with Centos 5 and Mac OS X 10.4.
- Issue #17703: Fix a regression where an illegal use of Py_DECREF() after
interpreter finalization can cause a crash.
- Issue #16447: Fixed potential segmentation fault when setting __name__ on a
class.
- Issue #17610: Don't rely on non-standard behavior of the C qsort() function.
Library
-------
- Issue #17979: Fixed the re module in build with --disable-unicode.
- Issue #17606: Fixed support of encoded byte strings in the XMLGenerator
.characters() and ignorableWhitespace() methods. Original patch by Sebastian
Ortiz Vasquez.
- Issue #16601: Restarting iteration over tarfile no more continues from where
it left off. Patch by Michael Birtwell.
- Issue 16584: in filecomp._cmp, catch IOError as well as os.error.
Patch by Till Maas.
- Issue #17926: Fix dbm.__contains__ on 64-bit big-endian machines.
- Issue #19267: Fix support of multibyte encoding (ex: UTF-16) in the logging
module.
- Issue #17918: When using SSLSocket.accept(), if the SSL handshake failed
on the new socket, the socket would linger indefinitely. Thanks to
Peter Saveliev for reporting.
- Issue #17289: The readline module now plays nicer with external modules
or applications changing the rl_completer_word_break_characters global
variable. Initial patch by Bradley Froehle.
- Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit
platforms. Patch by Federico Schwindt.
- Issue #14173: Avoid crashing when reading a signal handler during
interpreter shutdown.
- Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions.
- Issue #17192: Restore the patch for Issue #10309 which was ommitted
in 2.7.4 when updating the bundled version of libffi used by ctypes.
- Issue #17843: Removed test data file that was triggering false-positive virus
warnings with certain antivirus software.
- Issue #17353: Plistlib emitted empty data tags with deeply nested datastructures
- Issue #11714: Use 'with' statements to assure a Semaphore releases a
condition variable. Original patch by Thomas Rachel.
- Issue #17795: Reverted backwards-incompatible change in SysLogHandler with
Unix domain sockets.
- Issue #17555: Fix ForkAwareThreadLock so that size of after fork
registry does not grow exponentially with generation of process.
- Issue #17710: Fix cPickle raising a SystemError on bogus input.
- Issue #17341: Include the invalid name in the error messages from re about
invalid group names.
- Issue #17016: Get rid of possible pointer wraparounds and integer overflows
in the re module. Patch by Nickolai Zeldovich.
- Issue #17536: Add to webbrowser's browser list: xdg-open, gvfs-open,
www-browser, x-www-browser, chromium browsers, iceweasel, iceape.
- Issue #17656: Fix extraction of zip files with unicode member paths.
- Issue #17666: Fix reading gzip files with an extra field.
- Issue #13150, #17512: sysconfig no longer parses the Makefile and config.h
files when imported, instead doing it at build time. This makes importing
sysconfig faster and reduces Python startup time by 20%.
- Issue #13163: Rename operands in smtplib.SMTP._get_socket to correct names;
fixes otherwise misleading output in tracebacks and when when debug is on.
- Issue #17526: fix an IndexError raised while passing code without filename to
inspect.findsource(). Initial patch by Tyler Doyle.
Build
-----
- Issue #17547: In configure, explicitly pass -Wformat for the benefit for GCC
4.8.
- Issue #17682: Add the _io module to Modules/Setup.dist (commented out).
- Issue #17086: Search the include and library directories provided by the
compiler.
Tests
-----
- Issue #17928: Fix test_structmembers on 64-bit big-endian machines.
- Issue #17883: Fix buildbot testing of Tkinter on Windows.
Patch by Zachary Ware.
- Issue #7855: Add tests for ctypes/winreg for issues found in IronPython.
Initial patch by Dino Viehland.
- Issue #17712: Fix test_gdb failures on Ubuntu 13.04.
- Issue #17065: Use process-unique key for winreg tests to avoid failures if
test is run multiple times in parallel (eg: on a buildbot host).
IDLE
----
- Issue #17838: Allow sys.stdin to be reassigned.
- Issue #14735: Update IDLE docs to omit "Control-z on Windows".
- Issue #17585: Fixed IDLE regression. Now closes when using exit() or quit().
- Issue #17657: Show full Tk version in IDLE's about dialog.
Patch by Todd Rovito.
- Issue #17613: Prevent traceback when removing syntax colorizer in IDLE.
- Issue #1207589: Backwards-compatibility patch for right-click menu in IDLE.
- Issue #16887: IDLE now accepts Cancel in tabify/untabify dialog box.
- Issue #14254: IDLE now handles readline correctly across shell restarts.
- Issue #17614: IDLE no longer raises exception when quickly closing a file.
- Issue #6698: IDLE now opens just an editor window when configured to do so.
- Issue #8900: Using keyboard shortcuts in IDLE to open a file no longer
raises an exception.
- Issue #6649: Fixed missing exit status in IDLE. Patch by Guilherme Polo.
Documentation
-------------
- Issue #15940: Specify effect of locale on time functions.
- Issue #6696: add documentation for the Profile objects, and improve
profile/cProfile docs. Patch by Tom Pinckney.
What's New in Python 2.7.4?
===========================
*Release date: 2013-04-06*
Build
-----
- Issue #17550: Fix the --enable-profiling configure switch.
Core and Builtins
-----------------
- Issue #15801 (again): With string % formatting, relax the type check for a
mapping such that any type with a __getitem__ can be used on the right hand
side.
IDLE
----
- Issue #17625: In IDLE, close the replace dialog after it is used.
Tests
-----
- Issue #17835: Fix test_io when the default OS pipe buffer size is larger
than one million bytes.
- Issue #17531: Fix tests that thought group and user ids were always the int
type. Also, always allow -1 as a valid group and user id.
- Issue #17533: Fix test_xpickle with older versions of Python 2.5.
Documentation
-------------
- Issue 17538: Document XML vulnerabilties
What's New in Python 2.7.4 release candidate 1
==============================================
*Release date: 2013-03-23*
Core and Builtins
-----------------
- Issue #10211: Buffer objects expose the new buffer interface internally
- Issue #16445: Fixed potential segmentation fault when deleting an exception
message.
- Issue #17275: Corrected class name in init error messages of the C version of
BufferedWriter and BufferedRandom.
- Issue #7963: Fixed misleading error message that issued when object is
called without arguments.
- Issue #5308: Raise ValueError when marshalling too large object (a sequence
with size >= 2**31), instead of producing illegal marshal data.
- Issue #17043: The unicode-internal decoder no longer read past the end of
input buffer.
- Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.
- Issue #10156: In the interpreter's initialization phase, unicode globals
are now initialized dynamically as needed.
- Issue #16975: Fix error handling bug in the escape-decode decoder.
- Issue #14850: Now a charmap decoder treats U+FFFE as "undefined mapping"
in any mapping, not only in a Unicode string.
- Issue #11461: Fix the incremental UTF-16 decoder. Original patch by
Amaury Forgeot d'Arc.
- Issue #16367: Fix FileIO.readall() on Windows for files larger than 2 GB.
- Issue #15516: Fix a bug in PyString_FromFormat where it failed to properly
ignore errors from a __int__() method.
- Issue #16839: Fix a segfault when calling unicode() on a classic class early
in interpreter initialization.
- Issue #16761: Calling ``int()`` and ``long()`` with *base* argument only
now raises TypeError.
- Issue #16759: Support the full DWORD (unsigned long) range in Reg2Py
when retrieving a REG_DWORD value. This corrects functions like
winreg.QueryValueEx that may have been returning truncated values.
- Issue #14420: Support the full DWORD (unsigned long) range in Py2Reg
when passed a REG_DWORD value. Fixes ValueError in winreg.SetValueEx when
given a long.
- Issue #13863: Work around buggy 'fstat' implementation on Windows / NTFS that
lead to incorrect timestamps (off by one hour) being stored in .pyc files on
some systems.
- Issue #16602: When a weakref's target was part of a long deallocation
chain, the object could remain reachable through its weakref even though
its refcount had dropped to zero.
- Issue #9011: Fix hacky AST code that modified the CST when compiling
a negated numeric literal.
- Issue #16306: Fix multiple error messages when unknown command line
parameters where passed to the interpreter. Patch by Hieu Nguyen.
- Issue #15379: Fix passing of non-BMP characters as integers for the charmap
decoder (already working as unicode strings). Patch by Serhiy Storchaka.
- Issue #16453: Fix equality testing of dead weakref objects.
- Issue #9535: Fix pending signals that have been received but not yet
handled by Python to not persist after os.fork() in the child process.
- Issue #15001: fix segfault on "del sys.modules['__main__']". Patch by Victor
Stinner.
- Issue #5057: the peepholer no longer optimizes subscription on unicode
literals (e.g. u'foo'[0]) in order to produce compatible pyc files between
narrow and wide builds.
- Issue #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now
raises an error.
- Issue #14700: Fix buggy overflow checks for large width and precision
in string formatting operations.
- Issue #16345: Fix an infinite loop when ``fromkeys`` on a dict subclass
received a nonempty dict from the constructor.
- Issue #6074: Ensure cached bytecode files can always be updated by the
user that created them, even when the source file is read-only.
- Issue #14783: Improve int() and long() docstrings and switch docstrings for
unicode(), slice(), range(), and xrange() to use multi-line signatures.
- Issue #16030: Fix overflow bug in computing the `repr` of an xrange object
with large start, step or length.
- Issue #16029: Fix overflow bug occurring when pickling xranges with large
start, step or length.
- Issue #16037: Limit httplib's _read_status() function to work around broken
HTTP servers and reduce memory usage. It's actually a backport of a Python
3.2 fix. Thanks to Adrien Kunysz.
- Issue #16588: Silence unused-but-set warnings in Python/thread_pthread
- Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.
- Issue #15801: Make sure mappings passed to '%' formatting are actually
subscriptable.
- Issue #15604: Update uses of PyObject_IsTrue() to check for and handle
errors correctly. Patch by Serhiy Storchaka.
- Issue #14579: Fix error handling bug in the utf-16 decoder. Patch by
Serhiy Storchaka.
- Issue #15368: An issue that caused bytecode generation to be
non-deterministic when using randomized hashing (-R) has been fixed.
- Issue #15897: zipimport.c doesn't check return value of fseek().
Patch by Felipe Cruz.
- Issue #16369: Global PyTypeObjects not initialized with PyType_Ready(...).
- Issue #15033: Fix the exit status bug when modules invoked using -m switch,
return the proper failure return value (1). Patch contributed by Jeff Knupp.
- Issue #12268: File readline, readlines and read() methods no longer lose
data when an underlying read system call is interrupted. IOError is no
longer raised due to a read system call returning EINTR from within these
methods.
- Issue #13512: Create ~/.pypirc securely (CVE-2011-4944). Initial patch by
Philip Jenvey, tested by Mageia and Debian.
- Issue #7719: Make distutils ignore ``.nfs*`` files instead of choking later
on. Initial patch by SilentGhost and Jeff Ramnani.
- Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on
the work by Hirokazu Yamamoto.
- Issue #14775: Fix a potential quadratic dict build-up due to the garbage
collector repeatedly trying to untrack dicts.
- Issue #14494: Fix __future__.py and its documentation to note that
absolute imports are the default behavior in 3.0 instead of 2.7.
Patch by Sven Marnach.
- Issue #14761: Fix potential leak on an error case in the import machinery.
- Issue #14699: Fix calling the classmethod descriptor directly.
- Issue #11603 (again): Setting __repr__ to __str__ now raises a RuntimeError
when repr() or str() is called on such an object.
- Issue #14658: Fix binding a special method to a builtin implementation of a
special method with a different name.
- Issue #14612: Fix jumping around with blocks by setting f_lineno.
- Issue #13889: Check and (if necessary) set FPU control word before calling
any of the dtoa.c string <-> float conversion functions, on MSVC builds of
Python. This fixes issues when embedding Python in a Delphi app.
- Issue #14505: Fix file descriptor leak when deallocating file objects
created with PyFile_FromString().
- Issue #14474: Save and restore exception state in thread.start_new_thread()
while writing error message if the thread leaves a unhandled exception.
- Issue #13019: Fix potential reference leaks in bytearray.extend(). Patch
by Suman Saha.
- Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as
the module name that was not interned.
- Issue #14331: Use significantly less stack space when importing modules by
allocating path buffers on the heap instead of the stack.
- Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not
passed strings. Also fix segfaults in the __getattribute__ and __setattr__
methods of old-style classes.
- Issue #14161: fix the __repr__ of file objects to escape the file name.
- Issue #1469629: Allow cycles through an object's __dict__ slot to be
collected. (For example if ``x.__dict__ is x``).
- Issue #13521: dict.setdefault() now does only one lookup for the given key,
making it "atomic" for many purposes. Patch by Filip Gruszczyński.
- Issue #1602133: on Mac OS X a shared library build (``--enable-shared``)
now fills the ``os.environ`` variable correctly.
- Issue #10538: When using the "s*" code with PyArg_ParseTuple() to fill a
Py_buffer structure with data from an object supporting only the old
PyBuffer interface, a reference to the source objects is now properly added
to the Py_buffer.obj member.
Library
-------
- Issue #12718: Fix interaction with winpdb overriding __import__ by setting
importer attribute on BaseConfigurator instance.
- Issue #17521: Corrected non-enabling of logger following two calls to
fileConfig().
- Issue #17508: Corrected MemoryHandler configuration in dictConfig() where
the target handler wasn't configured first.
- Issue #10212: cStringIO and struct.unpack support new buffer objects.
- Issue #12098: multiprocessing on Windows now starts child processes
using the same sys.flags as the current process. Initial patch by
Sergey Mezentsev.
- Issue #8862: Fixed curses cleanup when getkey is interrputed by a signal.
- Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
retry the select() loop instead of bailing out. This is because select()
can incorrectly report a socket as ready for reading (for example, if it
received some data with an invalid checksum).
- Issue #1285086: Get rid of the refcounting hack and speed up urllib.unquote().
- Issue #17368: Fix an off-by-one error in the Python JSON decoder that caused
a failure while decoding empty object literals when object_pairs_hook was
specified.
- Issue #17278: Fix a crash in heapq.heappush() and heapq.heappop() when
the list is being resized concurrently.
- Issue #17018: Make Process.join() retry if os.waitpid() fails with EINTR.
- Issue #14720: sqlite3: Convert datetime microseconds correctly.
Patch by Lowe Thiderman.
- Issue #17225: JSON decoder now counts columns in the first line starting
with 1, as in other lines.
- Issue #7842: backported fix for py_compile.compile() syntax error handling.
- Issue #13153: Tkinter functions now raise TclError instead of ValueError when
a unicode argument contains non-BMP character.
- Issue #9669: Protect re against infinite loops on zero-width matching in
non-greedy repeat. Patch by Matthew Barnett.
- Issue #13169: The maximal repetition number in a regular expression has been
increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on
64-bit).
- Issue #16743: Fix mmap overflow check on 32 bit Windows.
- Issue #11311: StringIO.readline(0) now returns an empty string as all other
file-like objects.
- Issue #16800: tempfile.gettempdir() no longer left temporary files when
the disk is full. Original patch by Amir Szekely.
- Issue #13555: cPickle now supports files larger than 2 GiB.
- Issue #17052: unittest discovery should use self.testLoader.
- Issue #4591: Uid and gid values larger than 2**31 are supported now.
- Issue #17141: random.vonmisesvariate() no more hangs for large kappas.
- Issue #17149: Fix random.vonmisesvariate to always return results in
the range [0, 2*math.pi].
- Issue #1470548: XMLGenerator now works with UTF-16 and UTF-32 encodings.
- Issue #6975: os.path.realpath() now correctly resolves multiple nested
symlinks on POSIX platforms.
- Issue #7358: cStringIO.StringIO now supports writing to and reading from
a stream larger than 2 GiB on 64-bit systems.
- Issue #10355: In SpooledTemporaryFile class mode and name properties and
xreadlines method now work for unrolled files. encoding and newlines
properties now removed as they have no sense and always produced
AttributeError.
- Issue #16686: Fixed a lot of bugs in audioop module. Fixed crashes in
avgpp(), maxpp() and ratecv(). Fixed an integer overflow in add(), bias(),
and ratecv(). reverse(), lin2lin() and ratecv() no more lose precision for
32-bit samples. max() and rms() no more returns a negative result and
various other functions now work correctly with 32-bit sample -0x80000000.
- Issue #17073: Fix some integer overflows in sqlite3 module.
- Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple
parses nested mutating sequence.
- Issue #5289: Fix ctypes.util.find_library on Solaris.
- Issue #17106: Fix a segmentation fault in io.TextIOWrapper when an underlying
stream or a decoder produces data of an unexpected type (i.e. when
io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec).
- Issue #13994: Add compatibility alias in distutils.ccompiler for
distutils.sysconfig.customize_compiler.
- Issue #15633: httplib.HTTPResponse is now mark closed when the server
sends less than the advertised Content-Length.
- Issue #15881: Fixed atexit hook in multiprocessing.
- Issue #14340: Upgrade the embedded expat library to version 2.1.0.
- Issue #11159: SAX parser now supports unicode file names.
- Issue #6972: The zipfile module no longer overwrites files outside of
its destination path when extracting malicious zip files.
- Issue #17049: Localized calendar methods now return unicode if a locale
includes an encoding and the result string contains month or weekday (was
regression from Python 2.6).
- Issue #4844: ZipFile now raises BadZipfile when opens a ZIP file with an
incomplete "End of Central Directory" record. Original patch by Guilherme
Polo and Alan McIntyre.
- Issue #15505: `unittest.installHandler` no longer assumes SIGINT handler is
set to a callable object.
- Issue #17051: Fix a memory leak in os.path.isdir() on Windows. Patch by
Robert Xiao.
- Issue #13454: Fix a crash when deleting an iterator created by itertools.tee()
if all other iterators were very advanced before.
- Issue #16992: On Windows in signal.set_wakeup_fd, validate the file
descriptor argument.
- Issue #15861: tkinter now correctly works with lists and tuples containing
strings with whitespaces, backslashes or unbalanced braces.
- Issue #10527: Use poll() instead of select() for multiprocessing pipes.
- Issue #9720: zipfile now writes correct local headers for files larger than
4 GiB.
- Issue #13899: \A, \Z, and \B now correctly match the A, Z, and B literals
when used inside character classes (e.g. '[\A]'). Patch by Matthew Barnett.
- Issue #16398: Optimize deque.rotate() so that it only moves pointers
and doesn't touch the underlying data with increfs and decrefs.
- Issue #15109: Fix regression in sqlite3's iterdump method where it would
die with an encoding error if the database contained string values
containing non-ASCII. (Regression was introduced by fix for 9750).
- Issue #15545: Fix regression in sqlite3's iterdump method where it was
failing if the connection used a row factory (such as sqlite3.Row) that
produced unsortable objects. (Regression was introduced by fix for 9750).
- Issue #16828: Fix error incorrectly raised by bz2.compress(''). Patch by
Martin Packman.
- Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy.
- Issue #10527: make multiprocessing use poll() instead of select() if available.
- Issue #16485: Now file descriptors are closed if file header patching failed
on closing an aifc file.
- Issue #12065: connect_ex() on an SSL socket now returns the original errno
when the socket's timeout expires (it used to return None).
- Issue #16713: Fix the parsing of tel url with params using urlparse module.
- Issue #16443: Add docstrings to regular expression match objects.
Patch by Anton Kasyanov.