5
What's New in Python 3.2.3 release candidate 1?
6
===============================================
8
*Release date: 24-Feb-2011*
13
- Issue #13703: oCERT-2011-003: add -R command-line option and PYTHONHASHSEED
14
environment variable, to provide an opt-in way to protect against denial of
15
service attacks due to hash collisions within the dict and set types. Patch
16
by David Malcolm, based on work by Victor Stinner.
18
- Issue #14084: Fix a file descriptor leak when importing a module with a
21
- Issue #13020: Fix a reference leak when allocating a structsequence object
22
fails. Patch by Suman Saha.
24
- Issue #13908: Ready types returned from PyType_FromSpec.
26
- Issue #11235: Fix OverflowError when trying to import a source file whose
27
modification time doesn't fit in a 32-bit timestamp.
29
- Fix the builtin module initialization code to store the init function for
30
future reinitialization.
32
- Issue #8052: The posix subprocess module would take a long time closing
33
all possible file descriptors in the child process rather than just open
34
file descriptors. It now closes only the open fds if possible for the
35
default close_fds=True behavior.
37
- Issue #13629: Renumber the tokens in token.h so that they match the indexes
38
into _PyParser_TokenNames.
40
- Fix the fix for issue #12149: it was incorrect, although it had the side
41
effect of appearing to resolve the issue. Thanks to Mark Shannon for
44
- Issue #13505: Pickle bytes objects in a way that is compatible with
45
Python 2 when using protocols <= 2.
47
- Issue #11147: Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER. (Fix
48
given by Campbell Barton).
50
- Issue #7111: Python can now be run without a stdin, stdout or stderr
51
stream. It was already the case with Python 2. However, the corresponding
52
sys module entries are now set to None (instead of an unusable file object).
54
- Issue #13436: Fix a bogus error message when an AST object was passed
55
an invalid integer value.
57
- Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER
58
to allow compiling extension modules with -Wswitch-enum on gcc.
59
Initial patch by Floris Bruynooghe.
61
- Issue #13333: The UTF-7 decoder now accepts lone surrogates (the encoder
62
already accepts them).
64
- Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode
65
error handler in interactive mode (when calling into PyOS_Readline()).
67
- Issue #13343: Fix a SystemError when a lambda expression uses a global
68
variable in the default value of a keyword-only argument:
69
(lambda *, arg=GLOBAL_NAME: None)
71
- Issue #10519: Avoid unnecessary recursive function calls in
74
- Issue #10363: Deallocate global locks in Py_Finalize().
76
- Issue #13018: Fix reference leaks in error paths in dictobject.c.
79
- Issue #1294232: In a few cases involving metaclass inheritance, the
80
interpreter would sometimes invoke the wrong metaclass when building a new
81
class object. These cases now behave correctly. Patch by Daniel Urban.
83
- Issue #12604: VTRACE macro expanded to no-op in _sre.c to avoid compiler
84
warnings. Patch by Josh Triplett and Petri Lehtinen.
86
- Issue #13188: When called without an explicit traceback argument,
87
generator.throw() now gets the traceback from the passed exception's
88
``__traceback__`` attribute. Patch by Petri Lehtinen.
90
- Issue #7833: Extension modules built using distutils on Windows will no
91
longer include a "manifest" to prevent them failing at import time in some
94
- Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
95
as "The pipe is being closed") is now mapped to POSIX errno EPIPE
98
- Issue #12911: Fix memory consumption when calculating the repr() of huge
101
- Issue #7732: Don't open a directory as a file anymore while importing a
102
module. Ignore the direcotry if its name matchs the module name (e.g.
103
"__init__.py") and raise a ImportError instead.
105
- Issue #13021: Missing decref on an error path. Thanks to Suman Saha for
106
finding the bug and providing a patch.
108
- Issue #12973: Fix overflow checks that relied on undefined behaviour in
109
list_repeat (listobject.c) and islice_next (itertoolsmodule.c). These bugs
110
caused test failures with recent versions of Clang.
112
- Issue #12802: the Windows error ERROR_DIRECTORY (numbered 267) is now
113
mapped to POSIX errno ENOTDIR (previously EINVAL).
115
- Issue #9200: The str.is* methods now work with strings that contain non-BMP
116
characters even in narrow Unicode builds.
118
- Issue #12791: Break reference cycles early when a generator exits with
121
- Issue #12266: Fix str.capitalize() to correctly uppercase/lowercase
122
titlecased and cased non-letter characters.
127
- Issue #8033: sqlite3: Fix 64-bit integer handling in user functions
128
on 32-bit architectures. Initial patch by Philippe Devalkeneer.
130
- HTMLParser is now able to handle slashes in the start tag.
132
- Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in
133
SimpleXMLRPCServer upon malformed POST request.
135
- Issue #2489: pty.spawn could consume 100% cpu when it encountered an EOF.
137
- Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert().
139
- Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
142
- Issue #1326113: distutils' build_ext command --libraries option now
143
correctly parses multiple values separated by whitespace or commas.
145
- Issue #10287: nntplib now queries the server's CAPABILITIES first before
146
sending MODE READER, and only sends it if not already in READER mode.
147
Patch by Hynek Schlawack.
149
- Issue #13979: A bug in ctypes.util.find_library that caused
150
the wrong library name to be returned has been fixed.
152
- Issue #13993: HTMLParser is now able to handle broken end tags when
155
- Issue #9750: Fix sqlite3.Connection.iterdump on tables and fields
156
with a name that is a keyword or contains quotes. Patch by Marko
159
- Issue #10287: nntplib now queries the server's CAPABILITIES again after
160
authenticating (since the result may change, according to RFC 4643).
161
Patch by Hynek Schlawack.
163
- Issue #13989: Document that GzipFile does not support text mode, and give a
164
more helpful error message when opened with an invalid mode string.
166
- Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building
167
Distutils-based packages with C extension modules may fail because
168
Apple has removed gcc-4.2, the version used to build python.org
169
64-bit/32-bit Pythons. If the user does not explicitly override
170
the default C compiler by setting the CC environment variable,
171
Distutils will now attempt to compile extension modules with clang
172
if gcc-4.2 is required but not found. Also as a convenience, if
173
the user does explicitly set CC, substitute its value as the default
174
compiler in the Distutils LDSHARED configuration variable for OS X.
175
(Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u
176
SDK, neither of which are available in Xcode 4. This change does not
177
attempt to override settings to support their use with Xcode 4.)
179
- Issue #13960: HTMLParser is now able to handle broken comments when
182
- Issue #9021: Add an introduction to the copy module documentation.
184
- Issue #6005: Examples in the socket library documentation use sendall, where
185
relevant, instead send method.
187
- Issue #10811: Fix recursive usage of cursors. Instead of crashing,
188
raise a ProgrammingError now.
190
- Issue #10881: Fix test_site failure with OS X framework builds.
192
- Issue #964437: Make IDLE help window non-modal.
193
Patch by Guilherme Polo and Roger Serwy.
195
- Issue #2945: Make the distutils upload command aware of bdist_rpm products.
197
- Issue #13933: IDLE auto-complete did not work with some imported
198
module, like hashlib. (Patch by Roger Serwy)
200
- Issue #13901: Prevent test_distutils failures on OS X with --enable-shared.
202
- Issue #13676: Handle strings with embedded zeros correctly in sqlite3.
204
- Issue #13506: Add '' to path for IDLE Shell when started and restarted with Restart Shell.
205
Original patches by Marco Scataglini and Roger Serwy.
207
- Issue #13848: open() and the FileIO constructor now check for NUL
208
characters in the file name. Patch by Hynek Schlawack.
210
- Issue #13806: The size check in audioop decompression functions was too
211
strict and could reject valid compressed data. Patch by Oleg Plakhotnyuk.
213
- Issue #13812: When a multiprocessing Process child raises an exception,
214
flush stderr after printing the exception traceback.
216
- Issue #13885: CVE-2011-3389: the _ssl module would always disable the CBC
217
IV attack countermeasure.
219
- Issue #13772: In os.symlink() under Windows, do not try to guess the link
220
target's type (file or directory). The detection was buggy and made the
221
call non-atomic (therefore prone to race conditions).
223
- Issue #6631: Disallow relative file paths in urllib urlopen methods.
225
- Issue #13722: Avoid silencing ImportErrors when initializing the codecs
228
- Issue #13781: Fix GzipFile bug that caused an exception to be raised when
229
opening for writing using a fileobj returned by os.fdopen().
231
- Issue #13803: Under Solaris, distutils doesn't include bitness
232
in the directory name.
234
- Issue #13589: Fix some serialization primitives in the aifc module.
235
Patch by Oleg Plakhotnyuk.
237
- Issue #13642: Unquote before b64encoding user:password during Basic
238
Authentication. Patch contributed by Joonas Kuorilehto.
240
- Issue #13726: Fix the ambiguous -S flag in regrtest. It is -o/--slow for slow
243
- Issue #12364: Fix a hang in concurrent.futures.ProcessPoolExecutor.
244
The hang would occur when retrieving the result of a scheduled future after
245
the executor had been shut down.
247
- Issue #13502: threading: Fix a race condition in Event.wait() that made it
248
return False when the event was set and cleared right after.
250
- Issue #12926: Fix a bug in tarfile's link extraction.
252
- Issue #13696: Fix the 302 Relative URL Redirection problem.
254
- Issue #13636: Weak ciphers are now disabled by default in the ssl module
255
(except when SSLv2 is explicitly asked for).
257
- Issue #12798: Updated the mimetypes documentation.
259
- Issue #11006: Don't issue low level warning in subprocess when pipe2() fails.
261
- Issue #11829: Fix code execution holes in inspect.getattr_static for
262
metaclasses with metaclasses. Patch by Andreas Stührk.
264
- Issue #1785: Fix inspect and pydoc with misbehaving descriptors.
266
- Issue #11813: Fix inspect.getattr_static for modules. Patch by Andreas
269
- Issue #7502: Fix equality comparison for DocTestCase instances. Patch by
272
- Issue #11870: threading: Properly reinitialize threads internal locks and
273
condition variables to avoid deadlocks in child processes.
275
- Issue #8035: urllib: Fix a bug where the client could remain stuck after a
276
redirection or an error.
278
- Issue #10350: Read and save errno before calling a function which might
279
overwrite it. Original patch by Hallvard B Furuseth.
281
- Issue #13591: A bug in importlib has been fixed that caused import_module
282
to load a module twice.
284
- Issue #4625: If IDLE cannot write to its recent file or breakpoint
285
files, display a message popup and continue rather than crash.
286
(original patch by Roger Serwy)
288
- Issue #5905: time.strftime() is now using the locale encoding, instead of
289
UTF-8, if the wcsftime() function is not available.
291
- Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
294
- tarfile.py: Correctly detect bzip2 compressed streams with blocksizes
297
- Issue #13439: Fix many errors in turtle docstrings.
299
- Issue #13487: Make inspect.getmodule robust against changes done to
300
sys.modules while it is iterating over it.
302
- Issue #12618: Fix a bug that prevented py_compile from creating byte
303
compiled files in the current directory. Initial patch by Sjoerd de Vries.
305
- Issue #13444: When stdout has been closed explicitly, we should not attempt
306
to flush it at shutdown and print an error.
308
- Issue #12856: Ensure child processes do not inherit the parent's random
309
seed for filename generation in the tempfile module. Patch by Brian
312
- Issue #13458: Fix a memory leak in the ssl module when decoding a
313
certificate with a subjectAltName. Patch by Robert Xiao.
315
- Issue #13415: os.unsetenv() doesn't ignore errors anymore.
317
- Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is
318
raised when the wrapped raw file is non-blocking and the write would block.
319
Previous code assumed that the raw write() would raise BlockingIOError, but
320
RawIOBase.write() is defined to returned None when the call would block.
323
- Issue #13358: HTMLParser now calls handle_data only once for each CDATA.
325
- Issue #4147: minidom's toprettyxml no longer adds whitespace around a text
326
node when it is the only child of an element. Initial patch by Dan
329
- Issues #1745761, #755670, #13357, #12629, #1200313: HTMLParser now correctly
330
handles non-valid attributes, including adjacent and unquoted attributes.
332
- Issue #13193: Fix distutils.filelist.FileList under Windows.
334
- Issue #13384: Remove unnecessary __future__ import in Lib/random.py
336
- Issue #13373: multiprocessing.Queue.get() could sometimes block indefinitely
337
when called with a timeout. Patch by Arnaud Ysmal.
339
- Issue #13254: Fix Maildir initialization so that maildir contents
342
- Issue #3067: locale.setlocale() now raises TypeError if the second
343
argument is an invalid iterable. Its documentation and docstring
344
were also updated. Initial patch by Jyrki Pulliainen.
346
- Issue #13140: Fix the daemon_threads attribute of ThreadingMixIn.
348
- Issue #13339: Fix compile error in posixmodule.c due to missing semicolon.
349
Thanks to Robert Xiao.
351
- Issue #10570: curses.putp() and curses.tparm() are now expecting a byte
352
string, instead of a Unicode string.
354
- Issue #2892: preserve iterparse events in case of SyntaxError.
356
- Issue #670664: Fix HTMLParser to correctly handle the content of
357
``<script>...</script>`` and ``<style>...</style>``.
359
- Issue #10817: Fix urlretrieve function to raise ContentTooShortError even
360
when reporthook is None. Patch by Jyrki Pulliainen.
362
- Issue #13296: Fix IDLE to clear compile __future__ flags on shell restart.
363
(Patch by Roger Serwy)
365
- Issue #13293: Better error message when trying to marshal bytes using
368
- Issue #13291: NameError in xmlrpc package.
370
- Issue #13258: Use callable() built-in in the standard library.
372
- Issue #13273: fix a bug that prevented HTMLParser to properly detect some
373
tags when strict=False.
375
- Issue #10332: multiprocessing: fix a race condition when a Pool is closed
376
before all tasks have completed.
378
- Issue #13255: wrong docstrings in array module.
380
- Issue #9168: now smtpd is able to bind privileged port.
382
- Issue #12529: fix cgi.parse_header issue on strings with double-quotes and
383
semicolons together. Patch by Ben Darnell and Petri Lehtinen.
385
- Issue #12448: smtplib now flushes stdout while running ``python -m smtplib``
386
in order to display the prompt correctly.
388
- Issue #6090: zipfile raises a ValueError when a document with a timestamp
389
earlier than 1980 is provided. Patch contributed by Petri Lehtinen.
391
- Issue #13194: zlib.compressobj().copy() and zlib.decompressobj().copy() are
392
now available on Windows.
394
- Issue #13158: Fix decoding and encoding of GNU tar specific base-256 number
397
- Issue #13177: Functools lru_cache() no longer calls the original function
398
inside an exception handler. This makes tracebacks easier to read because
399
chained exceptions are avoided.
401
- Issue #13025: mimetypes is now reading MIME types using the UTF-8 encoding,
402
instead of the locale encoding.
404
- Issue #10653: On Windows, use strftime() instead of wcsftime() because
405
wcsftime() doesn't format time zone correctly.
407
- Issue #11171: Fix distutils.sysconfig.get_makefile_filename when Python was
408
configured with different prefix and exec-prefix.
410
- Issue #11254: Teach distutils to compile .pyc and .pyo files in
411
PEP 3147-compliant __pycache__ directories.
413
- Issue #11250: Back port fix from 3.3 branch, so that 2to3 can handle files
414
with line feeds. This was ported from the sandbox to the 3.3 branch, but
415
didn't make it into 3.2.
417
- Issue #7367: Fix pkgutil.walk_paths to skip directories whose
418
contents cannot be read.
420
- Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale.
421
Reported and diagnosed by Thomas Kluyver.
423
- Issue #13087: BufferedReader.seek() now always raises UnsupportedOperation
424
if the underlying raw stream is unseekable, even if the seek could be
425
satisfied using the internal buffer. Patch by John O'Connor.
427
- Issue #7689: Allow pickling of dynamically created classes when their
428
metaclass is registered with copyreg. Patch by Nicolas M. Thiéry and Craig
431
- Issue #4147: minidom's toprettyxml no longer adds whitespace to text nodes.
433
- Issue #13034: When decoding some SSL certificates, the subjectAltName
434
extension could be unreported.
436
- Issue #9871: Prevent IDLE 3 crash when given byte stings
437
with invalid hex escape sequences, like b'\x0'.
438
(Original patch by Claudiu Popa.)
440
- Issue #8933: distutils' PKG-INFO files will now correctly report
441
Metadata-Version: 1.1 instead of 1.0 if a Classifier or Download-URL field is
444
- Issue #9561: distutils now reads and writes egg-info files using UTF-8,
445
instead of the locale encoding.
447
- Issue #12888: Fix a bug in HTMLParser.unescape that prevented it to escape
448
more than 128 entities. Patch by Peter Otten.
450
- Issue #12878: Expose a __dict__ attribute on io.IOBase and its subclasses.
452
- Issue #12636: IDLE reads the coding cookie when executing a Python script.
454
- Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments in
455
the C pickle implementation.
457
- Issue #11564: Avoid crashes when trying to pickle huge objects or containers
458
(more than 2**31 items). Instead, in most cases, an OverflowError is raised.
460
- Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
461
greater than FD_SETSIZE.
463
- Issue #11657: Fix sending file descriptors over 255 over a multiprocessing
466
- Issue #13007: whichdb should recognize gdbm 1.9 magic numbers.
468
- Issue #12213: Fix a buffering bug with interleaved reads and writes that
469
could appear on BufferedRandom streams.
471
- Issue #12650: Fix a race condition where a subprocess.Popen could leak
472
resources (FD/zombie) when killed at the wrong time.
474
- Issue #10860: http.client now correctly handles an empty port after port
480
- Issue #6807: Run msisupport.mak earlier.
482
- Issue #10580: Minor grammar change in Windows installer.
484
- Issue #13326: Clean __pycache__ directories correctly on OpenBSD.
489
- Issue #14053: patchcheck.py ("make patchcheck") now works with MQ patches.
490
Patch by Francisco Martín Brugué.
492
- Issue #13930: 2to3 is now able to write its converted output files to another
493
directory tree as well as copying unchanged files and altering the file
494
suffix. See its new -o, -W and --add-suffix options. This makes it more
495
useful in many automated code translation workflows.
497
- Issue #13628: python-gdb.py is now able to retrieve more frames in the Python
498
traceback if Python is optimized.
503
- Issue #11689: Fix a variable scoping error in an sqlite3 test
505
- Issue #13786: Remove unimplemented 'trace' long option from regrtest.py.
507
- Issue #13725: Fix regrtest to recognize the documented -d flag.
510
- Issue #13304: Skip test case if user site-packages disabled (-s or
511
PYTHONNOUSERSITE). (Patch by Carl Meyer)
513
- Issue #13218: Fix test_ssl failures on Debian/Ubuntu.
515
- Issue #12821: Fix test_fcntl failures on OpenBSD 5.
517
- Re-enable lib2to3's test_parser.py tests, though with an expected failure
523
- Issue #13840: The error message produced by ctypes.create_string_buffer
524
when given a Unicode string has been fixed.
526
- Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
529
- Issue #13159: FileIO and BZ2File now use a linear-time buffer growth
530
strategy instead of a quadratic-time one.
532
- Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycle
533
would be finalized after the reference to its underlying BufferedRWPair's
534
writer got cleared by the GC.
536
- Issue #12881: ctypes: Fix segfault with large structure field names.
538
- Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by
541
- Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype.
542
Thanks to Suman Saha for finding the bug and providing a patch.
544
- Issue #13022: Fix: _multiprocessing.recvfd() doesn't check that
545
file descriptor was actually received.
547
- Issue #12483: ctypes: Fix a crash when the destruction of a callback
548
object triggers the garbage collector.
550
- Issue #12950: Fix passing file descriptors in multiprocessing, under
556
- Issues #13491 and #13995: Fix many errors in sqlite3 documentation.
557
Initial patch for #13491 by Johannes Vogel.
559
- Issue #13402: Document absoluteness of sys.executable.
561
- Issue #13883: PYTHONCASEOK also used on OS X and OS/2.
563
- Issue #12949: Document the kwonlyargcount argument for the PyCode_New
566
- Issue #2134: The tokenize documentation has been clarified to explain why
567
all operator and delimiter tokens are treated as token.OP tokens.
569
- Issue #13513: Fix io.IOBase documentation to correctly link to the
570
io.IOBase.readline method instead of the readline module.
572
- Issue #13237: Reorganise subprocess documentation to emphasise convenience
573
functions and the most commonly needed arguments to Popen.
575
- Issue #13141: Demonstrate recommended style for socketserver examples.
5
578
What's New in Python 3.2.2?
6
579
===========================