1Python History
2--------------
3
4This file contains the release messages for previous Python releases.
5As you read on you go back to the dark ages of Python's history.
6
7
8======================================================================
9
10What's New in Python 3.4.6?
11===========================
12
13Release date: 2017-01-17
14
15There were no changes between 3.4.6rc1 and 3.4.6 final.
16
17
18What's New in Python 3.4.6rc1?
19==============================
20
21Release date: 2017-01-02
22
23Core and Builtins
24-----------------
25
26- Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
27  when decode astral characters.  Patch by Xiang Zhang.
28
29- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
30  build.
31
32Library
33-------
34
35- Issue #28563: Fixed possible DoS and arbitrary code execution when handle
36  plural form selections in the gettext module.  The expression parser now
37  supports exact syntax supported by GNU gettext.
38
39- In the curses module, raise an error if window.getstr() or window.instr() is
40  passed a negative value.
41
42- Issue #27783: Fix possible usage of uninitialized memory in operator.methodcaller.
43
44- Issue #27774: Fix possible Py_DECREF on unowned object in _sre.
45
46- Issue #27760: Fix possible integer overflow in binascii.b2a_qp.
47
48- Issue #27758: Fix possible integer overflow in the _csv module for large record
49  lengths.
50
51- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the
52  HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates
53  that the script is in CGI mode.
54
55- Issue #27759: Fix selectors incorrectly retain invalid file descriptors.
56  Patch by Mark Williams.
57
58Build
59-----
60
61- Issue #28248: Update Windows build to use OpenSSL 1.0.2j.
62
63Tests
64-----
65
66- Issue #27369: In test_pyexpat, avoid testing an error message detail that
67  changed in Expat 2.2.0.
68
69
70What's New in Python 3.4.5?
71===========================
72
73Release date: 2016-06-26
74
75Tests
76-----
77
78- Issue #26867: Ubuntu's openssl OP_NO_SSLv3 is forced on by default; fix test.
79
80
81What's New in Python 3.4.5rc1?
82==============================
83
84Release date: 2016-06-11
85
86Core and Builtins
87-----------------
88
89- Issue #26478: Fix semantic bugs when using binary operators with dictionary
90  views and tuples.
91
92- Issue #26171: Fix possible integer overflow and heap corruption in
93  zipimporter.get_data().
94
95Library
96-------
97
98- Issue #26556: Update expat to 2.1.1, fixes CVE-2015-1283.
99
100- Fix TLS stripping vulnerability in smptlib, CVE-2016-0772.  Reported by Team
101  Oststrom
102
103- Issue #25939: On Windows open the cert store readonly in ssl.enum_certificates.
104
105- Issue #26012: Don't traverse into symlinks for ** pattern in
106  pathlib.Path.[r]glob().
107
108- Issue #24120: Ignore PermissionError when traversing a tree with
109  pathlib.Path.[r]glob().  Patch by Ulrich Petri.
110
111- Skip getaddrinfo if host is already resolved.
112  Patch by A. Jesse Jiryu Davis.
113
114- Add asyncio.timeout() context manager.
115
116- Issue #26050: Add asyncio.StreamReader.readuntil() method.
117  Patch by Марк Коренберг.
118
119Tests
120-----
121
122- Issue #25940: Changed test_ssl to use self-signed.pythontest.net.  This
123  avoids relying on svn.python.org, which recently changed root certificate.
124
125
126What's New in Python 3.4.4?
127===========================
128
129Release date: 2015/12/20
130
131Windows
132-------
133
134- Issue #25844: Corrected =/== typo potentially leading to crash in launcher.
135
136
137What's New in Python 3.4.4rc1?
138==============================
139
140Release date: 2015/12/06
141
142Core and Builtins
143-----------------
144
145- Issue #25709: Fixed problem with in-place string concatenation and utf-8
146  cache.
147
148- Issue #24097: Fixed crash in object.__reduce__() if slot name is freed inside
149  __getattr__.
150
151- Issue #24731: Fixed crash on converting objects with special methods
152  __bytes__, __trunc__, and __float__ returning instances of subclasses of
153  bytes, int, and float to subclasses of bytes, int, and float correspondingly.
154
155- Issue #25388: Fixed tokenizer crash when processing undecodable source code
156  with a null byte.
157
158- Issue #22995: Default implementation of __reduce__ and __reduce_ex__ now
159  rejects builtin types with not defined __new__.
160
161- Issue #24802: Avoid buffer overreads when int(), float(), compile(), exec()
162  and eval() are passed bytes-like objects.  These objects are not
163  necessarily terminated by a null byte, but the functions assumed they were.
164
165- Issue #24402: Fix input() to prompt to the redirected stdout when
166  sys.stdout.fileno() fails.
167
168- Issue #24806: Prevent builtin types that are not allowed to be subclassed from
169  being subclassed through multiple inheritance.
170
171- Issue #24848: Fixed a number of bugs in UTF-7 decoding of misformed data.
172
173- Issue #25280: Import trace messages emitted in verbose (-v) mode are no
174  longer formatted twice.
175
176- Issue #25003: os.urandom() doesn't use getentropy() on Solaris because
177  getentropy() is blocking, whereas os.urandom() should not block. getentropy()
178  is supported since Solaris 11.3.
179
180- Issue #25182: The stdprinter (used as sys.stderr before the io module is
181  imported at startup) now uses the backslashreplace error handler.
182
183- Issue #24891: Fix a race condition at Python startup if the file descriptor
184  of stdin (0), stdout (1) or stderr (2) is closed while Python is creating
185  sys.stdin, sys.stdout and sys.stderr objects. These attributes are now set
186  to None if the creation of the object failed, instead of raising an OSError
187  exception. Initial patch written by Marco Paolini.
188
189- Issue #21167: NAN operations are now handled correctly when python is
190  compiled with ICC even if -fp-model strict is not specified.
191
192- Issue #4395: Better testing and documentation of binary operators.
193  Patch by Martin Panter.
194
195- Issue #24467: Fixed possible buffer over-read in bytearray. The bytearray
196  object now always allocates place for trailing null byte and it's buffer now
197  is always null-terminated.
198
199- Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
200  PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
201  to check for and handle errors correctly.
202
203- Issue #24257: Fixed system error in the comparison of faked
204  types.SimpleNamespace.
205
206- Issue #22939: Fixed integer overflow in iterator object.  Patch by
207  Clement Rouault.
208
209- Issue #23985: Fix a possible buffer overrun when deleting a slice from
210  the front of a bytearray and then appending some other bytes data.
211
212- Issue #24102: Fixed exception type checking in standard error handlers.
213
214- Issue #23757: PySequence_Tuple() incorrectly called the concrete list API
215  when the data was a list subclass.
216
217- Issue #24407: Fix crash when dict is mutated while being updated.
218
219- Issue #24096: Make warnings.warn_explicit more robust against mutation of the
220  warnings.filters list.
221
222- Issue #23996: Avoid a crash when a delegated generator raises an
223  unnormalized StopIteration exception.  Patch by Stefan Behnel.
224
225- Issue #24022: Fix tokenizer crash when processing undecodable source code.
226
227- Issue #23309: Avoid a deadlock at shutdown if a daemon thread is aborted
228  while it is holding a lock to a buffered I/O object, and the main thread
229  tries to use the same I/O object (typically stdout or stderr).  A fatal
230  error is emitted instead.
231
232- Issue #22977: Fixed formatting Windows error messages on Wine.
233  Patch by Martin Panter.
234
235- Issue #23803: Fixed str.partition() and str.rpartition() when a separator
236  is wider then partitioned string.
237
238- Issue #23192: Fixed generator lambdas.  Patch by Bruno Cauet.
239
240- Issue #23629: Fix the default __sizeof__ implementation for variable-sized
241  objects.
242
243- Issue #24044: Fix possible null pointer dereference in list.sort in out of
244  memory conditions.
245
246- Issue #21354: PyCFunction_New function is exposed by python DLL again.
247
248Library
249-------
250
251- Issue #24903: Fix regression in number of arguments compileall accepts when
252  '-d' is specified.  The check on the number of arguments has been dropped
253  completely as it never worked correctly anyway.
254
255- Issue #25764: In the subprocess module, preserve any exception caused by
256  fork() failure when preexec_fn is used.
257
258- Issue #6478: _strptime's regexp cache now is reset after changing timezone
259  with time.tzset().
260
261- Issue #25177: Fixed problem with the mean of very small and very large
262  numbers. As a side effect, statistics.mean and statistics.variance should
263  be significantly faster.
264
265- Issue #25718: Fixed copying object with state with boolean value is false.
266
267- Issue #10131: Fixed deep copying of minidom documents.  Based on patch
268  by Marian Ganisin.
269
270- Issue #25725: Fixed a reference leak in pickle.loads() when unpickling
271  invalid data including tuple instructions.
272
273- Issue #25663: In the Readline completer, avoid listing duplicate global
274  names, and search the global namespace before searching builtins.
275
276- Issue #25688: Fixed file leak in ElementTree.iterparse() raising an error.
277
278- Issue #23914: Fixed SystemError raised by unpickler on broken pickle data.
279
280- Issue #25691: Fixed crash on deleting ElementTree.Element attributes.
281
282- Issue #25624: ZipFile now always writes a ZIP_STORED header for directory
283  entries.  Patch by Dingyuan Wang.
284
285- Issue #25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True)
286  when the OS gives priority to errors such as EACCES over EEXIST.
287
288- Issue #25593: Change semantics of EventLoop.stop() in asyncio.
289
290- Issue #6973: When we know a subprocess.Popen process has died, do
291  not allow the send_signal(), terminate(), or kill() methods to do
292  anything as they could potentially signal a different process.
293
294- Issue #25578: Fix (another) memory leak in SSLSocket.getpeercer().
295
296- Issue #25590: In the Readline completer, only call getattr() once per
297  attribute.
298
299- Issue #25498: Fix a crash when garbage-collecting ctypes objects created
300  by wrapping a memoryview.  This was a regression made in 3.4.3.  Based
301  on patch by Eryksun.
302
303- Issue #18010: Fix the pydoc web server's module search function to handle
304  exceptions from importing packages.
305
306- Issue #25510: fileinput.FileInput.readline() now returns b'' instead of ''
307  at the end if the FileInput was opened with binary mode.
308  Patch by Ryosuke Ito.
309
310- Issue #25530: Disable the vulnerable SSLv3 protocol by default when creating
311  ssl.SSLContext.
312
313- Issue #25569: Fix memory leak in SSLSocket.getpeercert().
314
315- Issue #21827: Fixed textwrap.dedent() for the case when largest common
316  whitespace is a substring of smallest leading whitespace.
317  Based on patch by Robert Li.
318
319- Issue #25471: Sockets returned from accept() shouldn't appear to be
320  nonblocking.
321
322- Issue #25441: asyncio: Raise error from drain() when socket is closed.
323
324- Issue #25411: Improved Unicode support in SMTPHandler through better use of
325  the email package. Thanks to user simon04 for the patch.
326
327- Issue #25380: Fixed protocol for the STACK_GLOBAL opcode in
328  pickletools.opcodes.
329
330- Issue #23972: Updates asyncio datagram create method allowing reuseport
331  and reuseaddr socket options to be set prior to binding the socket.
332  Mirroring the existing asyncio create_server method the reuseaddr option
333  for datagram sockets defaults to True if the O/S is 'posix' (except if the
334  platform is Cygwin). Patch by Chris Laws.
335
336- Issue #25304: Add asyncio.run_coroutine_threadsafe().  This lets you
337  submit a coroutine to a loop from another thread, returning a
338  concurrent.futures.Future.  By Vincent Michel.
339
340- Issue #25319: When threading.Event is reinitialized, the underlying condition
341  should use a regular lock rather than a recursive lock.
342
343- Issue #25232: Fix CGIRequestHandler to split the query from the URL at the
344  first question mark (?) rather than the last. Patch from Xiang Zhang.
345
346- Issue #24657: Prevent CGIRequestHandler from collapsing slashes in the
347  query part of the URL as if it were a path. Patch from Xiang Zhang.
348
349- Issue #22958: Constructor and update method of weakref.WeakValueDictionary
350  now accept the self and the dict keyword arguments.
351
352- Issue #22609: Constructor of collections.UserDict now accepts the self keyword
353  argument.
354
355- Issue #25262. Added support for BINBYTES8 opcode in Python implementation of
356  unpickler.  Highest 32 bits of 64-bit size for BINUNICODE8 and BINBYTES8
357  opcodes no longer silently ignored on 32-bit platforms in C implementation.
358
359- Issue #25034: Fix string.Formatter problem with auto-numbering and
360  nested format_specs. Patch by Anthon van der Neut.
361
362- Issue #25233: Rewrite the guts of asyncio.Queue and
363  asyncio.Semaphore to be more understandable and correct.
364
365- Issue #23600: Default implementation of tzinfo.fromutc() was returning
366  wrong results in some cases.
367
368- Issue #25203: Failed readline.set_completer_delims() no longer left the
369  module in inconsistent state.
370
371- Prevent overflow in _Unpickler_Read.
372
373- Issue #25047: The XML encoding declaration written by Element Tree now
374  respects the letter case given by the user. This restores the ability to
375  write encoding names in uppercase like "UTF-8", which worked in Python 2.
376
377- Issue #19143: platform module now reads Windows version from kernel32.dll to
378  avoid compatibility shims.
379
380- Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
381  of datetime.datetime: microseconds are now rounded to nearest with ties
382  going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding
383  towards zero (ROUND_DOWN). It's important that these methods use the same
384  rounding mode than datetime.timedelta to keep the property:
385  (datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t).
386  It also the rounding mode used by round(float) for example.
387
388- Issue #24684: socket.socket.getaddrinfo() now calls
389  PyUnicode_AsEncodedString() instead of calling the encode() method of the
390  host, to handle correctly custom string with an encode() method which doesn't
391  return a byte string. The encoder of the IDNA codec is now called directly
392  instead of calling the encode() method of the string.
393
394- Issue #24982: shutil.make_archive() with the "zip" format now adds entries
395  for directories (including empty directories) in ZIP file.
396
397- Issue #24857: Comparing call_args to a long sequence now correctly returns a
398  boolean result instead of raising an exception.  Patch by A Kaptur.
399
400- Issue #25019: Fixed a crash caused by setting non-string key of expat parser.
401  Based on patch by John Leitch.
402
403- Issue #24917: time_strftime() buffer over-read.
404
405- Issue #23144: Make sure that HTMLParser.feed() returns all the data, even
406  when convert_charrefs is True.
407
408- Issue #16180: Exit pdb if file has syntax error, instead of trapping user
409  in an infinite loop.  Patch by Xavier de Gaye.
410
411- Issue #21112: Fix regression in unittest.expectedFailure on subclasses.
412  Patch from Berker Peksag.
413
414- Issue #24931: Instances of subclasses of namedtuples have their own __dict__
415  which breaks the inherited __dict__ property and breaks the _asdict() method.
416  Removed the __dict__ property to prevent the conflict and fixed _asdict().
417
418- Issue #24764: cgi.FieldStorage.read_multi() now ignores the Content-Length
419  header in part headers. Patch written by Peter Landry and reviewed by Pierre
420  Quentel.
421
422- Issue #24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu.
423
424- Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
425  Patch from Łukasz Langa.
426
427- Issue #23888: Handle fractional time in cookie expiry. Patch by ssh.
428
429- Issue #23004: mock_open() now reads binary data correctly when the type of
430  read_data is bytes.  Initial patch by Aaron Hill.
431
432- Issue #23652: Make it possible to compile the select module against the
433  libc headers from the Linux Standard Base, which do not include some
434  EPOLL macros.  Patch by Matt Frank.
435
436- Issue #22932: Fix timezones in email.utils.formatdate.
437  Patch from Dmitry Shachnev.
438
439- Issue #23779: imaplib raises TypeError if authenticator tries to abort.
440  Patch from Craig Holmquist.
441
442- Issue #23319: Fix ctypes.BigEndianStructure, swap correctly bytes. Patch
443  written by Matthieu Gautier.
444
445- Issue #23254: Document how to close the TCPServer listening socket.
446  Patch from Martin Panter.
447
448- Issue #19450: Update Windows and OS X installer builds to use SQLite 3.8.11.
449
450- Issue #23441: rcompleter now prints a tab character instead of displaying
451  possible completions for an empty word.  Initial patch by Martin Sekera.
452
453- Issue #24735: Fix invalid memory access in
454  itertools.combinations_with_replacement().
455
456- Issue #17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella.
457
458- Issue #24683: Fixed crashes in _json functions called with arguments of
459  inappropriate type.
460
461- Issue #21697: shutil.copytree() now correctly handles symbolic links that
462  point to directories.  Patch by Eduardo Seabra and Thomas Kluyver.
463
464- Issue #24620: Random.setstate() now validates the value of state last element.
465
466- Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero.
467
468- Issue #24206: Fixed __eq__ and __ne__ methods of inspect classes.
469
470- Issue #21750: mock_open.read_data can now be read from each instance, as it
471  could in Python 3.3.
472
473- Issue #23247: Fix a crash in the StreamWriter.reset() of CJK codecs.
474
475- Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
476  Patch from Nicola Palumbo and Laurent De Buyst.
477
478- Issue #24608: chunk.Chunk.read() now always returns bytes, not str.
479
480- Issue #18684: Fixed reading out of the buffer in the re module.
481
482- Issue #24259: tarfile now raises a ReadError if an archive is truncated
483  inside a data segment.
484
485- Issue #24552: Fix use after free in an error case of the _pickle module.
486
487- Issue #24514: tarfile now tolerates number fields consisting of only
488  whitespace.
489
490- Issue #19176: Fixed doctype() related bugs in C implementation of ElementTree.
491  A deprecation warning no longer issued by XMLParser subclass with default
492  doctype() method.  Direct call of doctype() now issues a warning.  Parser's
493  doctype() now is not called if target's doctype() is called.  Based on patch
494  by Martin Panter.
495
496- Issue #20387: Restore semantic round-trip correctness in tokenize/untokenize
497  for tab-indented blocks.
498
499- Issue #24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm()
500  functions of the audioop module.
501
502- Issue #24336: The contextmanager decorator now works with functions with
503  keyword arguments called "func" and "self".  Patch by Martin Panter.
504
505- Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar().
506
507- Issue #5633: Fixed timeit when the statement is a string and the setup is not.
508
509- Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
510  Original patch by David Moore.
511
512- Issue #23840: tokenize.open() now closes the temporary binary file on error
513  to fix a resource warning.
514
515- Issue #24257: Fixed segmentation fault in sqlite3.Row constructor with faked
516  cursor type.
517
518- Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again
519  when a directory with the chosen name already exists on Windows as well as
520  on Unix.  tempfile.mkstemp() now fails early if parent directory is not
521  valid (not exists or is a file) on Windows.
522
523- Issue #6598: Increased time precision and random number range in
524  email.utils.make_msgid() to strengthen the uniqueness of the message ID.
525
526- Issue #24091: Fixed various crashes in corner cases in C implementation of
527  ElementTree.
528
529- Issue #21931: msilib.FCICreate() now raises TypeError in the case of a bad
530  argument instead of a ValueError with a bogus FCI error number.
531  Patch by Jeffrey Armstrong.
532
533- Issue #23796: peek and read1 methods of BufferedReader now raise ValueError
534  if they called on a closed object. Patch by John Hergenroeder.
535
536- Issue #24521: Fix possible integer overflows in the pickle module.
537
538- Issue #22931: Allow '[' and ']' in cookie values.
539
540- Issue #20274: Remove ignored and erroneous "kwargs" parameters from three
541  METH_VARARGS methods on _sqlite.Connection.
542
543- Issue #24094: Fix possible crash in json.encode with poorly behaved dict
544  subclasses.
545
546- Asyncio issue 222 / PR 231 (Victor Stinner) -- fix @coroutine
547  functions without __name__.
548
549- Issue #9246: On POSIX, os.getcwd() now supports paths longer than 1025 bytes.
550  Patch written by William Orr.
551
552- The keywords attribute of functools.partial is now always a dictionary.
553
554- Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq's siftup
555  and siftdown functions.
556
557- Backport collections.deque fixes from Python 3.5.  Prevents reentrant badness
558  during deletion by deferring the decref until the container has been restored
559  to a consistent state.
560
561- Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.
562
563- Fix asyncio issue 235: LifoQueue and PriorityQueue's put didn't
564  increment unfinished tasks (this bug was introduced in 3.4.3 when
565  JoinableQueue was merged with Queue).
566
567- Issue #23908: os functions now reject paths with embedded null character
568  on Windows instead of silently truncate them.
569
570- Issue #23728: binascii.crc_hqx() could return an integer outside of the range
571  0-0xffff for empty data.
572
573- Issue #23811: Add missing newline to the PyCompileError error message.
574  Patch by Alex Shkop.
575
576- Issue #17898: Fix exception in gettext.py when parsing certain plural forms.
577
578- Issue #22982: Improve BOM handling when seeking to multiple positions of
579  a writable text file.
580
581- Issue #23865: close() methods in multiple modules now are idempotent and more
582  robust at shutdown. If they need to release multiple resources, all are
583  released even if errors occur.
584
585- Issue #23881: urllib.request.ftpwrapper constructor now closes the socket if
586  the FTP connection failed to fix a ResourceWarning.
587
588- Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not
589  available.  Patch by Davin Potts.
590
591- Issue #15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and always
592  returns bool.  tkinter.BooleanVar now validates input values (accepted bool,
593  int, str, and Tcl_Obj).  tkinter.BooleanVar.get() now always returns bool.
594
595- Issue #23338: Fixed formatting ctypes error messages on Cygwin.
596  Patch by Makoto Kato.
597
598- Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and
599  arbitrary precision integers added in Tcl 8.5.
600
601- Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the
602  result of sendto() instead of the C int type.
603
604- Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.
605
606- Issue #23838: linecache now clears the cache and returns an empty result on
607  MemoryError.
608
609- Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.  Fixed
610  ambigious reverse mappings.  Added many new mappings.  Import mapping is no
611  longer applied to modules already mapped with full name mapping.
612
613- Issue #23745: The new email header parser now handles duplicate MIME
614  parameter names without error, similar to how get_param behaves.
615
616- Issue #23792: Ignore KeyboardInterrupt when the pydoc pager is active.
617  This mimics the behavior of the standard unix pagers, and prevents
618  pipepager from shutting down while the pager itself is still running.
619
620- Issue #23742: ntpath.expandvars() no longer loses unbalanced single quotes.
621
622- Issue #21802: The reader in BufferedRWPair now is closed even when closing
623  writer failed in BufferedRWPair.close().
624
625- Issue #23671: string.Template now allows to specify the "self" parameter as
626  keyword argument.  string.Formatter now allows to specify the "self" and
627  the "format_string" parameters as keyword arguments.
628
629- Issue #21560: An attempt to write a data of wrong type no longer cause
630  GzipFile corruption.  Original patch by Wolfgang Maier.
631
632- Issue #23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes.
633
634- Issue #23539: If body is None, http.client.HTTPConnection.request now sets
635  Content-Length to 0 for PUT, POST, and PATCH headers to avoid 411 errors from
636  some web servers.
637
638- Issue #22351: The nntplib.NNTP constructor no longer leaves the connection
639  and socket open until the garbage collector cleans them up.  Patch by
640  Martin Panter.
641
642- Issue #23136: _strptime now uniformly handles all days in week 0, including
643  Dec 30 of previous year.  Based on patch by Jim Carroll.
644
645- Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to
646  NamedTemporaryFile instance.  Patch by Bohuslav Kabrda.
647
648- Issue #22903: The fake test case created by unittest.loader when it fails
649  importing a test module is now picklable.
650
651- Issue #23568: Add rdivmod support to MagicMock() objects.
652  Patch by Håkan Lövdahl.
653
654- Issue #23138: Fixed parsing cookies with absent keys or values in cookiejar.
655  Patch by Demian Brecht.
656
657- Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() now
658  handle exceptions raised by an iterator.  Patch by Alon Diamant and Davin
659  Potts.
660
661- Issue #22928: Disabled HTTP header injections in http.client.
662  Original patch by Demian Brecht.
663
664- Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
665  imp.reload().  Patch by Thomas Kluyver.
666
667- Issue #23476: In the ssl module, enable OpenSSL's X509_V_FLAG_TRUSTED_FIRST
668  flag on certificate stores when it is available.
669
670- Issue #23576: Avoid stalling in SSL reads when EOF has been reached in the
671  SSL layer but the underlying connection hasn't been closed.
672
673- Issue #23504: Added an __all__ to the types module.
674
675- Issue #20204: Added the __module__ attribute to _tkinter classes.
676
677- Issue #23521: Corrected pure python implementation of timedelta division.
678
679 * Eliminated OverflowError from timedelta * float for some floats;
680 * Corrected rounding in timedelta true division.
681
682- Issue #21619: Popen objects no longer leave a zombie after exit in the with
683  statement if the pipe was broken.  Patch by Martin Panter.
684
685- Issue #6639: Module-level turtle functions no longer raise TclError after
686  closing the window.
687
688- Issues #814253, #9179: Warnings now are raised when group references and
689  conditional group references are used in lookbehind assertions in regular
690  expressions.
691
692- Issue #23215: Multibyte codecs with custom error handlers that ignores errors
693  consumed too much memory and raised SystemError or MemoryError.
694  Original patch by Aleksi Torhamo.
695
696- Issue #5700: io.FileIO() called flush() after closing the file.
697  flush() was not called in close() if closefd=False.
698
699- Issue #23374: Fixed pydoc failure with non-ASCII files when stdout encoding
700  differs from file system encoding (e.g. on Mac OS).
701
702- Issue #23481: Remove RC4 from the SSL module's default cipher list.
703
704- Issue #21548: Fix pydoc.synopsis() and pydoc.apropos() on modules with empty
705  docstrings.
706
707- Issue #22885: Fixed arbitrary code execution vulnerability in the dbm.dumb
708  module.  Original patch by Claudiu Popa.
709
710- Issue #23146: Fix mishandling of absolute Windows paths with forward
711  slashes in pathlib.
712
713- Issue #23421: Fixed compression in tarfile CLI.  Patch by wdv4758h.
714
715- Issue #23367: Fix possible overflows in the unicodedata module.
716
717- Issue #23361: Fix possible overflow in Windows subprocess creation code.
718
719- Issue #23801: Fix issue where cgi.FieldStorage did not always ignore the
720  entire preamble to a multipart body.
721
722- Issue #23310: Fix MagicMock's initializer to work with __methods__, just
723  like configure_mock().  Patch by Kasia Jachim.
724
725- asyncio: New event loop APIs: set_task_factory() and get_task_factory().
726
727- asyncio: async() function is deprecated in favour of ensure_future().
728
729- Issue #23898: Fix inspect.classify_class_attrs() to support attributes
730  with overloaded __eq__ and __bool__.  Patch by Mike Bayer.
731
732- Issue #24298: Fix inspect.signature() to correctly unwrap wrappers
733  around bound methods.
734
735- Issue #23572: Fixed functools.singledispatch on classes with falsy
736  metaclasses.  Patch by Ethan Furman.
737
738IDLE
739----
740
741- Issue 15348: Stop the debugger engine (normally in a user process)
742  before closing the debugger window (running in the IDLE process).
743  This prevents the RuntimeErrors that were being caught and ignored.
744
745- Issue #24455: Prevent IDLE from hanging when a) closing the shell while the
746  debugger is active (15347); b) closing the debugger with the [X] button
747  (15348); and c) activating the debugger when already active (24455).
748  The patch by Mark Roseman does this by making two changes.
749  1. Suspend and resume the gui.interaction method with the tcl vwait
750  mechanism intended for this purpose (instead of root.mainloop & .quit).
751  2. In gui.run, allow any existing interaction to terminate first.
752
753- Change 'The program' to 'Your program' in an IDLE 'kill program?' message
754  to make it clearer that the program referred to is the currently running
755  user program, not IDLE itself.
756
757- Issue #24750: Improve the appearance of the IDLE editor window status bar.
758  Patch by Mark Roseman.
759
760- Issue #25313: Change the handling of new built-in text color themes to better
761  address the compatibility problem introduced by the addition of IDLE Dark.
762  Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
763
764- Issue #24782: Extension configuration is now a tab in the IDLE Preferences
765  dialog rather than a separate dialog.   The former tabs are now a sorted
766  list.  Patch by Mark Roseman.
767
768- Issue #22726: Re-activate the config dialog help button with some content
769  about the other buttons and the new IDLE Dark theme.
770
771- Issue #24820: IDLE now has an 'IDLE Dark' built-in text color theme.
772  It is more or less IDLE Classic inverted, with a cobalt blue background.
773  Strings, comments, keywords, ... are still green, red, orange, ... .
774  To use it with IDLEs released before November 2015, hit the
775  'Save as New Custom Theme' button and enter a new name,
776  such as 'Custom Dark'.  The custom theme will work with any IDLE
777  release, and can be modified.
778
779- Issue #25224: README.txt is now an idlelib index for IDLE developers and
780  curious users.  The previous user content is now in the IDLE doc chapter.
781  'IDLE' now means 'Integrated Development and Learning Environment'.
782
783- Issue #24820: Users can now set breakpoint colors in
784  Settings -> Custom Highlighting.  Original patch by Mark Roseman.
785
786- Issue #24972: Inactive selection background now matches active selection
787  background, as configured by users, on all systems.  Found items are now
788  always highlighted on Windows.  Initial patch by Mark Roseman.
789
790- Issue #24570: Idle: make calltip and completion boxes appear on Macs
791  affected by a tk regression.  Initial patch by Mark Roseman.
792
793- Issue #24988: Idle ScrolledList context menus (used in debugger)
794  now work on Mac Aqua.  Patch by Mark Roseman.
795
796- Issue #24801: Make right-click for context menu work on Mac Aqua.
797  Patch by Mark Roseman.
798
799- Issue #25173: Associate tkinter messageboxes with a specific widget.
800  For Mac OSX, make them a 'sheet'.  Patch by Mark Roseman.
801
802- Issue #25198: Enhance the initial html viewer now used for Idle Help.
803  * Properly indent fixed-pitch text (patch by Mark Roseman).
804  * Give code snippet a very Sphinx-like light blueish-gray background.
805  * Re-use initial width and height set by users for shell and editor.
806  * When the Table of Contents (TOC) menu is used, put the section header
807  at the top of the screen.
808
809- Issue #25225: Condense and rewrite Idle doc section on text colors.
810
811- Issue #21995: Explain some differences between IDLE and console Python.
812
813- Issue #22820: Explain need for *print* when running file from Idle editor.
814
815- Issue #25224: Doc: augment Idle feature list and no-subprocess section.
816
817- Issue #25219: Update doc for Idle command line options.
818  Some were missing and notes were not correct.
819
820- Issue #24861: Most of idlelib is private and subject to change.
821  Use idleib.idle.* to start Idle. See idlelib.__init__.__doc__.
822
823- Issue #25199: Idle: add synchronization comments for future maintainers.
824
825- Issue #16893: Replace help.txt with help.html for Idle doc display.
826  The new idlelib/help.html is rstripped Doc/build/html/library/idle.html.
827  It looks better than help.txt and will better document Idle as released.
828  The tkinter html viewer that works for this file was written by Mark Roseman.
829  The now unused EditorWindow.HelpDialog class and helt.txt file are deprecated.
830
831- Issue #24199: Deprecate unused idlelib.idlever with possible removal in 3.6.
832
833- Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
834
835- Issue #23672: Allow Idle to edit and run files with astral chars in name.
836  Patch by Mohd Sanad Zaki Rizvi.
837
838- Issue 24745: Idle editor default font. Switch from Courier to
839  platform-sensitive TkFixedFont.  This should not affect current customized
840  font selections.  If there is a problem, edit $HOME/.idlerc/config-main.cfg
841  and remove 'fontxxx' entries from [Editor Window].  Patch by Mark Roseman.
842
843- Issue #21192: Idle editor. When a file is run, put its name in the restart bar.
844  Do not print false prompts. Original patch by Adnan Umer.
845
846- Issue #13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy.
847
848- Issue #23184: remove unused names and imports in idlelib.
849  Initial patch by Al Sweigart.
850
851Tests
852-----
853
854- Issue #25616: Tests for OrderedDict are extracted from test_collections
855  into separate file test_ordered_dict.
856
857- Issue #25099: Make test_compileall not fail when an entry on sys.path cannot
858  be written to (commonly seen in administrative installs on Windows).
859
860- Issue #24751: When running regrtest with the ``-w`` command line option,
861  a test run is no longer marked as a failure if all tests succeed when
862  re-run.
863
864- Issue #21520: test_zipfile no longer fails if the word 'bad' appears
865  anywhere in the name of the current directory.
866
867- Issue #23799: Added test.support.start_threads() for running and
868  cleaning up multiple threads.
869
870- Issue #22390: test.regrtest now emits a warning if temporary files or
871  directories are left after running a test.
872
873- Issue #23583: Added tests for standard IO streams in IDLE.
874
875Build
876-----
877
878- Issue #23445: pydebug builds now use "gcc -Og" where possible, to make
879  the resulting executable faster.
880
881- Issue #24603: Update Windows builds to use OpenSSL1.0.2d
882  and OS X 10.5 installer to use OpenSSL 1.0.2e.
883
884C API
885-----
886
887- Issue #23998: PyImport_ReInitLock() now checks for lock allocation error
888
889Documentation
890-------------
891
892- Issue #12067: Rewrite Comparisons section in the Expressions chapter of the
893  language reference. Some of the details of comparing mixed types were
894  incorrect or ambiguous. NotImplemented is only relevant at a lower level
895  than the Expressions chapter. Added details of comparing range() objects,
896  and default behaviour and consistency suggestions for user-defined classes.
897  Patch from Andy Maier.
898
899- Issue #24952: Clarify the default size argument of stack_size() in
900  the "threading" and "_thread" modules. Patch from Mattip.
901
902- Issue #24808: Update the types of some PyTypeObject fields. Patch by
903  Joseph Weston.
904
905- Issue #22812: Fix unittest discovery examples.
906  Patch from Pam McA'Nulty.
907
908- Issue #24129: Clarify the reference documentation for name resolution.
909  This includes removing the assumption that readers will be familiar with the
910  name resolution scheme Python used prior to the introduction of lexical
911  scoping for function namespaces. Patch by Ivan Levkivskyi.
912
913- Issue #20769: Improve reload() docs. Patch by Dorian Pula.
914
915- Issue #23589: Remove duplicate sentence from the FAQ.  Patch by Yongzhi Pan.
916
917- Issue #24729: Correct IO tutorial to match implementation regarding
918  encoding parameter to open function.
919
920- Issue #24351: Clarify what is meant by "identifier" in the context of
921  string.Template instances.
922
923- Issue #22155: Add File Handlers subsection with createfilehandler to tkinter
924  doc.  Remove obsolete example from FAQ.  Patch by Martin Panter.
925
926- Issue #24029: Document the name binding behavior for submodule imports.
927
928- Issue #24077: Fix typo in man page for -I command option: -s, not -S.
929
930Tools/Demos
931-----------
932
933- Issue #25440: Fix output of python-config --extension-suffix.
934
935- Issue #23330: h2py now supports arbitrary filenames in #include.
936
937- Issue #24031: make patchcheck now supports git checkouts, too.
938
939Windows
940-------
941
942- Issue #24306: Sets component ID for launcher to match 3.5 and later
943  to avoid downgrading.
944
945- Issue #25022: Removed very outdated PC/example_nt/ directory.
946
947
948What's New in Python 3.4.3?
949===========================
950
951Release date: 2015-02-23
952
953Core and Builtins
954-----------------
955
956- Issue #22735: Fix many edge cases (including crashes) involving custom mro()
957  implementations.
958
959- Issue #22896: Avoid using PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
960  and PyObject_AsWriteBuffer().
961
962- Issue #21295: Revert some changes (issue #16795) to AST line numbers and
963  column offsets that constituted a regression.
964
965- Issue #21408: The default __ne__() now returns NotImplemented if __eq__()
966  returned NotImplemented.  Original patch by Martin Panter.
967
968- Issue #23321: Fixed a crash in str.decode() when error handler returned
969  replacement string longer than malformed input data.
970
971- Issue #23048: Fix jumping out of an infinite while loop in the pdb.
972
973- Issue #20335: bytes constructor now raises TypeError when encoding or errors
974  is specified with non-string argument.  Based on patch by Renaud Blanch.
975
976- Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff
977  bytes on a 32-bit platform.
978
979- Issue #22653: Fix an assertion failure in debug mode when doing a reentrant
980  dict insertion in debug mode.
981
982- Issue #22643: Fix integer overflow in Unicode case operations (upper, lower,
983  title, swapcase, casefold).
984
985- Issue #22604: Fix assertion error in debug mode when dividing a complex
986  number by (nan+0j).
987
988- Issue #22470: Fixed integer overflow issues in "backslashreplace",
989  "xmlcharrefreplace", and "surrogatepass" error handlers.
990
991- Issue #22520: Fix overflow checking when generating the repr of a unicode
992  object.
993
994- Issue #22519: Fix overflow checking in PyBytes_Repr.
995
996- Issue #22518: Fix integer overflow issues in latin-1 encoding.
997
998- Issue #23165: Perform overflow checks before allocating memory in the
999  _Py_char2wchar function.
1000
1001Library
1002-------
1003
1004- Issue #23399: pyvenv creates relative symlinks where possible.
1005
1006- Issue #23099: Closing io.BytesIO with exported buffer is rejected now to
1007  prevent corrupting exported buffer.
1008
1009- Issue #23363: Fix possible overflow in itertools.permutations.
1010
1011- Issue #23364: Fix possible overflow in itertools.product.
1012
1013- Issue #23366: Fixed possible integer overflow in itertools.combinations.
1014
1015- Issue #23369: Fixed possible integer overflow in
1016  _json.encode_basestring_ascii.
1017
1018- Issue #23353: Fix the exception handling of generators in
1019  PyEval_EvalFrameEx(). At entry, save or swap the exception state even if
1020  PyEval_EvalFrameEx() is called with throwflag=0. At exit, the exception state
1021  is now always restored or swapped, not only if why is WHY_YIELD or
1022  WHY_RETURN. Patch co-written with Antoine Pitrou.
1023
1024- Issue #18518: timeit now rejects statements which can't be compiled outside
1025  a function or a loop (e.g. "return" or "break").
1026
1027- Issue #23094: Fixed readline with frames in Python implementation of pickle.
1028
1029- Issue #23268: Fixed bugs in the comparison of ipaddress classes.
1030
1031- Issue #21408: Removed incorrect implementations of __ne__() which didn't
1032  returned NotImplemented if __eq__() returned NotImplemented.  The default
1033  __ne__() now works correctly.
1034
1035- Issue #19996: :class:`email.feedparser.FeedParser` now handles (malformed)
1036  headers with no key rather than assuming the body has started.
1037
1038- Issue #23248: Update ssl error codes from latest OpenSSL git master.
1039
1040- Issue #23098: 64-bit dev_t is now supported in the os module.
1041
1042- Issue #23250: In the http.cookies module, capitalize "HttpOnly" and "Secure"
1043  as they are written in the standard.
1044
1045- Issue #23063: In the distutils' check command, fix parsing of reST with code or
1046  code-block directives.
1047
1048- Issue #23209, #23225: selectors.BaseSelector.close() now clears its internal
1049  reference to the selector mapping to break a reference cycle. Initial patch
1050  written by Martin Richard.
1051
1052- Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
1053  availability of the function is checked during the compilation. Patch written
1054  by Bernard Spil.
1055
1056- Issue #20896, #22935: The :func:`ssl.get_server_certificate` function now
1057  uses the :data:`~ssl.PROTOCOL_SSLv23` protocol by default, not
1058  :data:`~ssl.PROTOCOL_SSLv3`, for maximum compatibility and support platforms
1059  where :data:`~ssl.PROTOCOL_SSLv3` support is disabled.
1060
1061- Issue #23111: In the ftplib, make ssl.PROTOCOL_SSLv23 the default protocol
1062  version.
1063
1064- Issue #23132: Mitigate regression in speed and clarity in functools.total_ordering.
1065
1066- Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
1067  instead of reading /dev/urandom, to get pseudo-random bytes.
1068
1069- Issue #23112: Fix SimpleHTTPServer to correctly carry the query string and
1070  fragment when it redirects to add a trailing slash.
1071
1072- Issue #23093: In the io, module allow more operations to work on detached
1073  streams.
1074
1075- Issue #19104: pprint now produces evaluable output for wrapped strings.
1076
1077- Issue #23071: Added missing names to codecs.__all__.  Patch by Martin Panter.
1078
1079- Issue #15513: Added a __sizeof__ implementation for pickle classes.
1080
1081- Issue #19858: pickletools.optimize() now aware of the MEMOIZE opcode, can
1082  produce more compact result and no longer produces invalid output if input
1083  data contains MEMOIZE opcodes together with PUT or BINPUT opcodes.
1084
1085- Issue #22095: Fixed HTTPConnection.set_tunnel with default port.  The port
1086  value in the host header was set to "None".  Patch by Demian Brecht.
1087
1088- Issue #23016: A warning no longer produces an AttributeError when the program
1089  is run with pythonw.exe.
1090
1091- Issue #21775: shutil.copytree(): fix crash when copying to VFAT. An exception
1092  handler assumed that that OSError objects always have a 'winerror' attribute.
1093  That is not the case, so the exception handler itself raised AttributeError
1094  when run on Linux (and, presumably, any other non-Windows OS).
1095  Patch by Greg Ward.
1096
1097- Issue #1218234: Fix inspect.getsource() to load updated source of
1098  reloaded module. Initial patch by Berker Peksag.
1099
1100- Issue #22959: In the constructor of http.client.HTTPSConnection, prefer the
1101  context's check_hostname attribute over the *check_hostname* parameter.
1102
1103- Issue #16043: Add a default limit for the amount of data xmlrpclib.gzip_decode
1104  will return. This resolves CVE-2013-1753.
1105
1106- Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile is
1107  asked to compile a source file containing multiple dots in the source file
1108  name.
1109
1110- Issue #21971: Update turtledemo doc and add module to the index.
1111
1112- Issue #21032. Fixed socket leak if HTTPConnection.getresponse() fails.
1113  Original patch by Martin Panter.
1114
1115- Issue #22960: Add a context argument to xmlrpclib.ServerProxy constructor.
1116
1117- Issue #22915: SAX parser now supports files opened with file descriptor or
1118  bytes path.
1119
1120- Issue #22609: Constructors and update methods of mapping classes in the
1121  collections module now accept the self keyword argument.
1122
1123- Issue #22788: Add *context* parameter to logging.handlers.HTTPHandler.
1124
1125- Issue #22921: Allow SSLContext to take the *hostname* parameter even if
1126  OpenSSL doesn't support SNI.
1127
1128- Issue #22894: TestCase.subTest() would cause the test suite to be stopped
1129  when in failfast mode, even in the absence of failures.
1130
1131- Issue #22638: SSLv3 is now disabled throughout the standard library.
1132  It can still be enabled by instantiating a SSLContext manually.
1133
1134- Issue #22370: Windows detection in pathlib is now more robust.
1135
1136- Issue #22841: Reject coroutines in asyncio add_signal_handler().
1137  Patch by Ludovic.Gasc.
1138
1139- Issue #22849: Fix possible double free in the io.TextIOWrapper constructor.
1140
1141- Issue #12728: Different Unicode characters having the same uppercase but
1142  different lowercase are now matched in case-insensitive regular expressions.
1143
1144- Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian
1145  platforms.
1146
1147- Issue #22406: Fixed the uu_codec codec incorrectly ported to 3.x.
1148  Based on patch by Martin Panter.
1149
1150- Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
1151  Based on patch by Aivars Kalvāns.
1152
1153- Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments.
1154
1155- Issue #22417: Verify certificates by default in httplib (PEP 476).
1156
1157- Issue #22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2
1158  and above.  Patch by Tim Graham.
1159
1160- Issue #22366: urllib.request.urlopen will accept a context object
1161  (SSLContext) as an argument which will then used be for HTTPS connection.
1162  Patch by Alex Gaynor.
1163
1164- Issue #22776: Brought excluded code into the scope of a try block in
1165  SysLogHandler.emit().
1166
1167- Issue #22665: Add missing get_terminal_size and SameFileError to
1168  shutil.__all__.
1169
1170- Issue #17381: Fixed handling of case-insensitive ranges in regular
1171  expressions.
1172
1173- Issue #22410: Module level functions in the re module now cache compiled
1174  locale-dependent regular expressions taking into account the locale.
1175
1176- Issue #22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.)
1177  now return False when the underlying stat call raises NotADirectoryError.
1178
1179- Issue #8876: distutils now falls back to copying files when hard linking
1180  doesn't work.  This allows use with special filesystems such as VirtualBox
1181  shared folders.
1182
1183- Issue #18853: Fixed ResourceWarning in shlex.__nain__.
1184
1185- Issue #9351: Defaults set with set_defaults on an argparse subparser
1186  are no longer ignored when also set on the parent parser.
1187
1188- Issue #21991: Make email.headerregistry's header 'params' attributes
1189  be read-only (MappingProxyType).  Previously the dictionary was modifiable
1190  but a new one was created on each access of the attribute.
1191
1192- Issue #22641: In asyncio, the default SSL context for client connections
1193  is now created using ssl.create_default_context(), for stronger security.
1194
1195- Issue #22435: Fix a file descriptor leak when SocketServer bind fails.
1196
1197- Issue #13096: Fixed segfault in CTypes POINTER handling of large
1198  values.
1199
1200- Issue #11694: Raise ConversionError in xdrlib as documented.  Patch
1201  by Filip Gruszczyński and Claudiu Popa.
1202
1203- Issue #22462: Fix pyexpat's creation of a dummy frame to make it
1204  appear in exception tracebacks.
1205
1206- Issue #21173: Fix len() on a WeakKeyDictionary when .clear() was called
1207  with an iterator alive.
1208
1209- Issue #11866: Eliminated race condition in the computation of names
1210  for new threads.
1211
1212- Issue #21905: Avoid RuntimeError in pickle.whichmodule() when sys.modules
1213  is mutated while iterating.  Patch by Olivier Grisel.
1214
1215- Issue #22219: The zipfile module CLI now adds entries for directories
1216  (including empty directories) in ZIP file.
1217
1218- Issue #22449: In the ssl.SSLContext.load_default_certs, consult the
1219  environmental variables SSL_CERT_DIR and SSL_CERT_FILE on Windows.
1220
1221- Issue #20076: Added non derived UTF-8 aliases to locale aliases table.
1222
1223- Issue #20079: Added locales supported in glibc 2.18 to locale alias table.
1224
1225- Issue #22396: On 32-bit AIX platform, don't expose os.posix_fadvise() nor
1226  os.posix_fallocate() because their prototypes in system headers are wrong.
1227
1228- Issue #22517: When a io.BufferedRWPair object is deallocated, clear its
1229  weakrefs.
1230
1231- Issue #22448: Improve canceled timer handles cleanup to prevent
1232  unbound memory usage. Patch by Joshua Moore-Oliva.
1233
1234- Issue #23009: Make sure selectors.EpollSelector.select() works when no
1235  FD is registered.
1236
1237IDLE
1238----
1239
1240- Issue #20577: Configuration of the max line length for the FormatParagraph
1241  extension has been moved from the General tab of the Idle preferences dialog
1242  to the FormatParagraph tab of the Config Extensions dialog.
1243  Patch by Tal Einat.
1244
1245- Issue #16893: Update Idle doc chapter to match current Idle and add new
1246  information.
1247
1248- Issue #3068: Add Idle extension configuration dialog to Options menu.
1249  Changes are written to HOME/.idlerc/config-extensions.cfg.
1250  Original patch by Tal Einat.
1251
1252- Issue #16233: A module browser (File : Class Browser, Alt+C) requires an
1253  editor window with a filename.  When Class Browser is requested otherwise,
1254  from a shell, output window, or 'Untitled' editor, Idle no longer displays
1255  an error box.  It now pops up an Open Module box (Alt+M). If a valid name
1256  is entered and a module is opened, a corresponding browser is also opened.
1257
1258- Issue #4832: Save As to type Python files automatically adds .py to the
1259  name you enter (even if your system does not display it).  Some systems
1260  automatically add .txt when type is Text files.
1261
1262- Issue #21986: Code objects are not normally pickled by the pickle module.
1263  To match this, they are no longer pickled when running under Idle.
1264
1265- Issue #23180: Rename IDLE "Windows" menu item to "Window".
1266  Patch by Al Sweigart.
1267
1268Tests
1269-----
1270
1271- Issue #23392: Added tests for marshal C API that works with FILE*.
1272
1273- Issue #18982: Add tests for CLI of the calendar module.
1274
1275- Issue #19548: Added some additional checks to test_codecs to ensure that
1276  statements in the updated documentation remain accurate. Patch by Martin
1277  Panter.
1278
1279- Issue #22838: All test_re tests now work with unittest test discovery.
1280
1281- Issue #22173: Update lib2to3 tests to use unittest test discovery.
1282
1283- Issue #16000: Convert test_curses to use unittest.
1284
1285- Issue #21456: Skip two tests in test_urllib2net.py if _ssl module not
1286  present. Patch by Remi Pointel.
1287
1288- Issue #22770: Prevent some Tk segfaults on OS X when running gui tests.
1289
1290- Issue #23211: Workaround test_logging failure on some OS X 10.6 systems.
1291
1292- Issue #23345: Prevent test_ssl failures with large OpenSSL patch level
1293  values (like 0.9.8zc).
1294
1295- Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout.
1296
1297Build
1298-----
1299
1300- Issue #15506: Use standard PKG_PROG_PKG_CONFIG autoconf macro in the configure
1301  script.
1302
1303- Issue #22935: Allow the ssl module to be compiled if openssl doesn't support
1304  SSL 3.
1305
1306- Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
1307  Jonathan Hosmer.
1308
1309- Issue #18096: Fix library order returned by python-config.
1310
1311- Issue #17219: Add library build dir for Python extension cross-builds.
1312
1313- Issue #17128: Use private version of OpenSSL for 3.4.3 OS X 10.5+ installer.
1314
1315C API
1316-----
1317
1318- Issue #22079: PyType_Ready() now checks that statically allocated type has
1319  no dynamically allocated bases.
1320
1321Documentation
1322-------------
1323
1324- Issue #19548: Update the codecs module documentation to better cover the
1325  distinction between text encodings and other codecs, together with other
1326  clarifications. Patch by Martin Panter.
1327
1328- Issue #22914: Update the Python 2/3 porting HOWTO to describe a more automated
1329  approach.
1330
1331- Issue #21514: The documentation of the json module now refers to new JSON RFC
1332  7159 instead of obsoleted RFC 4627.
1333
1334Tools/Demos
1335-----------
1336
1337- Issue #22314: pydoc now works when the LINES environment variable is set.
1338
1339Windows
1340-------
1341
1342- Issue #17896: The Windows build scripts now expect external library sources
1343  to be in ``PCbuild\..\externals`` rather than ``PCbuild\..\..``.
1344
1345- Issue #17717: The Windows build scripts now use a copy of NASM pulled from
1346  svn.python.org to build OpenSSL.
1347
1348- Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j.
1349
1350
1351What's New in Python 3.4.2?
1352===========================
1353
1354Release date: 2014-10-06
1355
1356Library
1357-------
1358
1359- Issue #10510: distutils register and upload methods now use HTML standards
1360  compliant CRLF line endings.
1361
1362- Issue #9850: Fixed macpath.join() for empty first component.  Patch by
1363  Oleg Oshmyan.
1364
1365- Issue #22427: TemporaryDirectory no longer attempts to clean up twice when
1366  used in the with statement in generator.
1367
1368- Issue #20912: Now directories added to ZIP file have correct Unix and MS-DOS
1369  directory attributes.
1370
1371- Issue #21866: ZipFile.close() no longer writes ZIP64 central directory
1372  records if allowZip64 is false.
1373
1374- Issue #22415: Fixed debugging output of the GROUPREF_EXISTS opcode in the re
1375  module.  Removed trailing spaces in debugging output.
1376
1377- Issue #22423: Unhandled exception in thread no longer causes unhandled
1378  AttributeError when sys.stderr is None.
1379
1380- Issue #21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects
1381  line buffering, rather than block buffering.  Patch by Akira Li.
1382
1383
1384What's New in Python 3.4.2rc1?
1385==============================
1386
1387Release date: 2014-09-22
1388
1389Core and Builtins
1390-----------------
1391
1392- Issue #22258: Fix the internal function set_inheritable() on Illumos.
1393  This platform exposes the function ``ioctl(FIOCLEX)``, but calling it fails
1394  with errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable()
1395  now falls back to the slower ``fcntl()`` (``F_GETFD`` and then ``F_SETFD``).
1396
1397- Issue #21669: With the aid of heuristics in SyntaxError.__init__, the
1398  parser now attempts to generate more meaningful (or at least more search
1399  engine friendly) error messages when "exec" and "print" are used as
1400  statements.
1401
1402- Issue #21642: In the conditional if-else expression, allow an integer written
1403  with no space between itself and the ``else`` keyword (e.g. ``True if 42else
1404  False``) to be valid syntax.
1405
1406- Issue #21523: Fix over-pessimistic computation of the stack effect of
1407  some opcodes in the compiler.  This also fixes a quadratic compilation
1408  time issue noticeable when compiling code with a large number of "and"
1409  and "or" operators.
1410
1411Library
1412-------
1413
1414- Issue #21091: Fix API bug: email.message.EmailMessage.is_attachment is now
1415  a method.  Since EmailMessage is provisional, we can change the API in a
1416  maintenance release, but we use a trick to remain backward compatible with
1417  3.4.0/1.
1418
1419- Issue #21079: Fix email.message.EmailMessage.is_attachment to return the
1420  correct result when the header has parameters as well as a value.
1421
1422- Issue #22247: Add NNTPError to nntplib.__all__.
1423
1424- Issue #4180: The warnings registries are now reset when the filters
1425  are modified.
1426
1427- Issue #22419: Limit the length of incoming HTTP request in wsgiref server to
1428  65536 bytes and send a 414 error code for higher lengths. Patch contributed
1429  by Devin Cook.
1430
1431- Lax cookie parsing in http.cookies could be a security issue when combined
1432  with non-standard cookie handling in some Web browsers.  Reported by
1433  Sergey Bobrov.
1434
1435- Issue #22384: An exception in Tkinter callback no longer crashes the program
1436  when it is run with pythonw.exe.
1437
1438- Issue #22168: Prevent turtle AttributeError with non-default Canvas on OS X.
1439
1440- Issue #21147: sqlite3 now raises an exception if the request contains a null
1441  character instead of truncate it.  Based on patch by Victor Stinner.
1442
1443- Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command with
1444  empty string or tuple argument.
1445
1446- Issue #21951: Tkinter now most likely raises MemoryError instead of crash
1447  if the memory allocation fails.
1448
1449- Issue #22338: Fix a crash in the json module on memory allocation failure.
1450
1451- Issue #22226: First letter no longer is stripped from the "status" key in
1452  the result of Treeview.heading().
1453
1454- Issue #19524: Fixed resource leak in the HTTP connection when an invalid
1455  response is received.  Patch by Martin Panter.
1456
1457- Issue #22051: turtledemo no longer reloads examples to re-run them.
1458  Initialization of variables and gui setup should be done in main(),
1459  which is called each time a demo is run, but not on import.
1460
1461- Issue #21933: Turtledemo users can change the code font size with a menu
1462  selection or control(command) '-' or '+' or control-mousewheel.
1463  Original patch by Lita Cho.
1464
1465- Issue #21597: The separator between the turtledemo text pane and the drawing
1466  canvas can now be grabbed and dragged with a mouse.  The code text pane can
1467  be widened to easily view or copy the full width of the text.  The canvas
1468  can be widened on small screens.  Original patches by Jan Kanis and Lita Cho.
1469
1470- Issue #18132: Turtledemo buttons no longer disappear when the window is
1471  shrunk.  Original patches by Jan Kanis and Lita Cho.
1472
1473- Issue #22216: smtplib now resets its state more completely after a quit.  The
1474  most obvious consequence of the previous behavior was a STARTTLS failure
1475  during a connect/starttls/quit/connect/starttls sequence.
1476
1477- Issue #22185: Fix an occasional RuntimeError in threading.Condition.wait()
1478  caused by mutation of the waiters queue without holding the lock.  Patch
1479  by Doug Zongker.
1480
1481- Issue #22182: Use e.args to unpack exceptions correctly in
1482  distutils.file_util.move_file. Patch by Claudiu Popa.
1483
1484- The webbrowser module now uses subprocess's start_new_session=True rather
1485  than a potentially risky preexec_fn=os.setsid call.
1486
1487- Issue #22236: Fixed Tkinter images copying operations in NoDefaultRoot mode.
1488
1489- Issue #22191: Fix warnings.__all__.
1490
1491- Issue #15696: Add a __sizeof__ implementation for mmap objects on Windows.
1492
1493- Issue #22068: Avoided reference loops with Variables and Fonts in Tkinter.
1494
1495- Issue #22165: SimpleHTTPRequestHandler now supports undecodable file names.
1496
1497- Issue #8797: Raise HTTPError on failed Basic Authentication immediately.
1498  Initial patch by Sam Bull.
1499
1500- Issue #20729: Restored the use of lazy iterkeys()/itervalues()/iteritems()
1501  in the mailbox module.
1502
1503- Issue #21448: Changed FeedParser feed() to avoid O(N**2) behavior when
1504  parsing long line.  Original patch by Raymond Hettinger.
1505
1506- Issue #22184: The functools LRU Cache decorator factory now gives an earlier
1507  and clearer error message when the user forgets the required parameters.
1508
1509- Issue #17923: glob() patterns ending with a slash no longer match non-dirs on
1510  AIX.  Based on patch by Delhallt.
1511
1512- Issue #21121: Don't force 3rd party C extensions to be built with
1513  -Werror=declaration-after-statement.
1514
1515- Issue #21975: Fixed crash when using uninitialized sqlite3.Row (in particular
1516  when unpickling pickled sqlite3.Row).  sqlite3.Row is now initialized in the
1517  __new__() method.
1518
1519- Issue #21580: Now Tkinter correctly handles bytes arguments passed to Tk.
1520  In particular this allows to initialize images from binary data.
1521
1522- Issue #17172: Make turtledemo start as active on OS X even when run with
1523  subprocess.  Patch by Lita Cho.
1524
1525- Issue #21704: Fix build error for _multiprocessing when semaphores
1526  are not available.  Patch by Arfrever Frehtes Taifersar Arahesis.
1527
1528- Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError
1529  on closed socket. repr(socket.socket) already works fine.
1530
1531- Issue #16133: The asynchat.async_chat.handle_read() method now ignores
1532  BlockingIOError exceptions.
1533
1534- Issue #22044: Fixed premature DECREF in call_tzinfo_method.
1535  Patch by Tom Flanagan.
1536
1537- Issue #19884: readline: Disable the meta modifier key if stdout is not
1538  a terminal to not write the ANSI sequence "\033[1034h" into stdout. This
1539  sequence is used on some terminal (ex: TERM=xterm-256color") to enable
1540  support of 8 bit characters.
1541
1542- Issue #21888: plistlib's load() and loads() now work if the fmt parameter is
1543  specified.
1544
1545- Issue #21044: tarfile.open() now handles fileobj with an integer 'name'
1546  attribute.  Based on patch by Antoine Pietri.
1547
1548- Issue #21867: Prevent turtle crash due to invalid undo buffer size.
1549
1550- Issue #19076: Don't pass the redundant 'file' argument to self.error().
1551
1552- Issue #21942: Fixed source file viewing in pydoc's server mode on Windows.
1553
1554- Issue #11259: asynchat.async_chat().set_terminator() now raises a ValueError
1555  if the number of received bytes is negative.
1556
1557- Issue #12523: asynchat.async_chat.push() now raises a TypeError if it doesn't
1558  get a bytes string
1559
1560- Issue #21707: Add missing kwonlyargcount argument to
1561  ModuleFinder.replace_paths_in_code().
1562
1563- Issue #20639: calling Path.with_suffix('') allows removing the suffix
1564  again.  Patch by July Tikhonov.
1565
1566- Issue #21714: Disallow the construction of invalid paths using
1567  Path.with_name().  Original patch by Antony Lee.
1568
1569- Issue #21897: Fix a crash with the f_locals attribute with closure
1570  variables when frame.clear() has been called.
1571
1572- Issue #21151: Fixed a segfault in the winreg module when ``None`` is passed
1573  as a ``REG_BINARY`` value to SetValueEx.  Patch by John Ehresman.
1574
1575- Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before,
1576  it ignored I/O errors if at least the first C call read() succeed.
1577
1578- Issue #21781: ssl.RAND_add() now supports strings longer than 2 GB.
1579
1580- Issue #11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper
1581  object is destroyed. The destructor now closes the file if needed. The
1582  close() method can now be called twice: the second call does nothing.
1583
1584- Issue #21858: Better handling of Python exceptions in the sqlite3 module.
1585
1586- Issue #21476: Make sure the email.parser.BytesParser TextIOWrapper is
1587  discarded after parsing, so the input file isn't unexpectedly closed.
1588
1589- Issue #21729: Used the "with" statement in the dbm.dumb module to ensure
1590  files closing.  Patch by Claudiu Popa.
1591
1592- Issue #21491: socketserver: Fix a race condition in child processes reaping.
1593
1594- Issue #21832: Require named tuple inputs to be exact strings.
1595
1596- Issue #19145: The times argument for itertools.repeat now handles
1597  negative values the same way for keyword arguments as it does for
1598  positional arguments.
1599
1600- Issue #21812: turtle.shapetransform did not transform the turtle on the
1601  first call.  (Issue identified and fixed by Lita Cho.)
1602
1603- Issue #21635: The difflib SequenceMatcher.get_matching_blocks() method
1604  cache didn't match the actual result.  The former was a list of tuples
1605  and the latter was a list of named tuples.
1606
1607- Issue #21722: The distutils "upload" command now exits with a non-zero
1608  return code when uploading fails.  Patch by Martin Dengler.
1609
1610- Issue #21723: asyncio.Queue: support any type of number (ex: float) for the
1611  maximum size. Patch written by Vajrasky Kok.
1612
1613- Issue #21326: Add a new is_closed() method to asyncio.BaseEventLoop.
1614  run_forever() and run_until_complete() methods of asyncio.BaseEventLoop now
1615  raise an exception if the event loop was closed.
1616
1617- Issue #21774: Fixed NameError for an incorrect variable reference in the
1618  XML Minidom code for creating processing instructions.
1619  (Found and fixed by Claudiu Popa.)
1620
1621- Issue #21766: Prevent a security hole in CGIHTTPServer by URL unquoting paths
1622  before checking for a CGI script at that path.
1623
1624- Issue #21310: Fixed possible resource leak in failed open().
1625
1626- Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods.
1627
1628- Issue #11709: Fix the pydoc.help function to not fail when sys.stdin is not a
1629  valid file.
1630
1631- Issue #13223: Fix pydoc.writedoc so that the HTML documentation for methods
1632  that use 'self' in the example code is generated correctly.
1633
1634- Issue #21463: In urllib.request, fix pruning of the FTP cache.
1635
1636- Issue #21618: The subprocess module could fail to close open fds that were
1637  inherited by the calling process and already higher than POSIX resource
1638  limits would otherwise allow.  On systems with a functioning /proc/self/fd
1639  or /dev/fd interface the max is now ignored and all fds are closed.
1640
1641- Issue #21552: Fixed possible integer overflow of too long string lengths in
1642  the tkinter module on 64-bit platforms.
1643
1644- Issue #14315: The zipfile module now ignores extra fields in the central
1645  directory that are too short to be parsed instead of letting a struct.unpack
1646  error bubble up as this "bad data" appears in many real world zip files in
1647  the wild and is ignored by other zip tools.
1648
1649- Issue #21402: tkinter.ttk now works when default root window is not set.
1650
1651- Issue #10203: sqlite3.Row now truly supports sequence protocol.  In particular
1652  it supports reverse() and negative indices.  Original patch by Claudiu Popa.
1653
1654- Issue #18807: If copying (no symlinks) specified for a venv, then the python
1655  interpreter aliases (python, python3) are now created by copying rather than
1656  symlinking.
1657
1658- Issue #14710: pkgutil.get_loader() no longer raises an exception when None is
1659  found in sys.modules.
1660
1661- Issue #14710: pkgutil.find_loader() no longer raises an exception when a
1662  module doesn't exist.
1663
1664- Issue #21481: Argparse equality and inequality tests now return
1665  NotImplemented when comparing to an unknown type.
1666
1667- Issue #8743: Fix interoperability between set objects and the
1668  collections.Set() abstract base class.
1669
1670- Issue #13355: random.triangular() no longer fails with a ZeroDivisionError
1671  when low equals high.
1672
1673- Issue #21538: The plistlib module now supports loading of binary plist files
1674  when reference or offset size is not a power of two.
1675
1676- Issue #21801: Validate that __signature__ is None or an instance of Signature.
1677
1678- Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler
1679  due to possible uninitialized _config_vars.
1680
1681- Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,
1682  broken by the fix for security issue #19435.  Patch by Zach Byrne.
1683
1684Extension Modules
1685-----------------
1686
1687- Issue #22176: Update the ctypes module's libffi to v3.1.  This release
1688  adds support for the Linux AArch64 and POWERPC ELF ABIv2 little endian
1689  architectures.
1690
1691Build
1692-----
1693
1694- Issue #15661: python.org OS X installers are now distributed as signed
1695  installer packages compatible with the Gatekeeper security feature.
1696
1697- Issue #21958: Define HAVE_ROUND when building with Visual Studio 2013 and
1698  above.  Patch by Zachary Turner.
1699
1700- Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
1701  now display special message when and only when there are failures.
1702
1703- Issue #17095: Fix Modules/Setup *shared* support.
1704
1705- Issue #21811: Anticipated fixes to support OS X versions > 10.9.
1706
1707- Issue #21166: Prevent possible segfaults and other random failures of
1708  python --generate-posix-vars in pybuilddir.txt build target.
1709
1710IDLE
1711----
1712
1713- Issue #17390: Adjust Editor window title; remove 'Python',
1714  move version to end.
1715
1716- Issue #14105: Idle debugger breakpoints no longer disappear
1717  when inseting or deleting lines.
1718
1719- Issue #17172: Turtledemo can now be run from Idle.
1720  Currently, the entry is on the Help menu, but it may move to Run.
1721  Patch by Ramchandra Apt and Lita Cho.
1722
1723- Issue #21765: Add support for non-ascii identifiers to HyperParser.
1724
1725- Issue #21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav
1726  Heblikar.
1727
1728- Issue #18592: Add unittest for SearchDialogBase. Patch by Phil Webster.
1729
1730- Issue #21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar.
1731
1732- Issue #21686: add unittest for HyperParser. Original patch by Saimadhav
1733  Heblikar.
1734
1735- Issue #12387: Add missing upper(lower)case versions of default Windows key
1736  bindings for Idle so Caps Lock does not disable them. Patch by Roger Serwy.
1737
1738- Issue #21695: Closing a Find-in-files output window while the search is
1739  still in progress no longer closes Idle.
1740
1741- Issue #18910: Add unittest for textView. Patch by Phil Webster.
1742
1743- Issue #18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar.
1744
1745- Issue #18409: Add unittest for AutoComplete. Patch by Phil Webster.
1746
1747Tests
1748-----
1749
1750- Issue #22166: With the assistance of a new internal _codecs._forget_codec
1751  helping function, test_codecs now clears the encoding caches to avoid the
1752  appearance of a reference leak
1753
1754- Issue #22236: Tkinter tests now don't reuse default root window.  New root
1755  window is created for every test class.
1756
1757- Issue #20746: Fix test_pdb to run in refleak mode (-R).  Patch by Xavier
1758  de Gaye.
1759
1760- Issue #22060: test_ctypes has been somewhat cleaned up and simplified; it
1761  now uses unittest test discovery to find its tests.
1762
1763- Issue #22104: regrtest.py no longer holds a reference to the suite of tests
1764  loaded from test modules that don't define test_main().
1765
1766- Issue #22002: Added ``load_package_tests`` function to test.support and used
1767  it to implement/augment test discovery in test_asyncio, test_email,
1768  test_importlib, test_json, and test_tools.
1769
1770- Issue #21976: Fix test_ssl to accept LibreSSL version strings.  Thanks
1771  to William Orr.
1772
1773- Issue #21918: Converted test_tools from a module to a package containing
1774  separate test files for each tested script.
1775
1776- Issue #20155: Changed HTTP method names in failing tests in test_httpservers
1777  so that packet filtering software (specifically Windows Base Filtering Engine)
1778  does not interfere with the transaction semantics expected by the tests.
1779
1780- Issue #19493: Refactored the ctypes test package to skip tests explicitly
1781  rather than silently.
1782
1783- Issue #18492: All resources are now allowed when tests are not run by
1784  regrtest.py.
1785
1786- Issue #21634: Fix pystone micro-benchmark: use floor division instead of true
1787  division to benchmark integers instead of floating point numbers. Set pystone
1788  version to 1.2. Patch written by Lennart Regebro.
1789
1790- Issue #21605: Added tests for Tkinter images.
1791
1792- Issue #21493: Added test for ntpath.expanduser().  Original patch by
1793  Claudiu Popa.
1794
1795- Issue #19925: Added tests for the spwd module. Original patch by Vajrasky Kok.
1796
1797- Issue #21522: Added Tkinter tests for Listbox.itemconfigure(),
1798  PanedWindow.paneconfigure(), and Menu.entryconfigure().
1799
1800Documentation
1801-------------
1802
1803- Issue #21777: The binary sequence methods on bytes and bytearray are now
1804  documented explicitly, rather than assuming users will be able to derive
1805  the expected behaviour from the behaviour of the corresponding str methods.
1806
1807Windows
1808-------
1809
1810- Issue #21671, #22160, CVE-2014-0224: The bundled version of OpenSSL has been
1811  updated to 1.0.1i.
1812
1813- Issue #10747: Use versioned labels in the Windows start menu.
1814  Patch by Olive Kilburn.
1815
1816Tools/Demos
1817-----------
1818
1819- Issue #22201: Command-line interface of the zipfile module now correctly
1820  extracts ZIP files with directory entries.  Patch by Ryan Wilson.
1821
1822- Issue #21906: Make Tools/scripts/md5sum.py work in Python 3.
1823  Patch by Zachary Ware.
1824
1825- Issue #21629: Fix Argument Clinic's "--converters" feature.
1826
1827
1828What's New in Python 3.4.1?
1829===========================
1830
1831Release date: 2014-05-18
1832
1833Core and Builtins
1834-----------------
1835
1836- Issue #21418: Fix a crash in the builtin function super() when called without
1837  argument and without current frame (ex: embedded Python).
1838
1839- Issue #21425: Fix flushing of standard streams in the interactive
1840  interpreter.
1841
1842- Issue #21435: In rare cases, when running finalizers on objects in cyclic
1843  trash a bad pointer dereference could occur due to a subtle flaw in
1844  internal iteration logic.
1845
1846Library
1847-------
1848
1849- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial
1850  shape.
1851
1852- Issue #20998: Fixed re.fullmatch() of repeated single character pattern
1853  with ignore case.  Original patch by Matthew Barnett.
1854
1855- Issue #21075: fileinput.FileInput now reads bytes from standard stream if
1856  binary mode is specified.  Patch by Sam Kimbrel.
1857
1858- Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a
1859  flush() on the underlying binary stream.  Patch by akira.
1860
1861- Issue #21470: Do a better job seeding the random number generator by
1862  using enough bytes to span the full state space of the Mersenne Twister.
1863
1864- Issue #21398: Fix an unicode error in the pydoc pager when the documentation
1865  contains characters not encodable to the stdout encoding.
1866
1867Tests
1868-----
1869
1870- Issue #17756: Fix test_code test when run from the installed location.
1871
1872- Issue #17752: Fix distutils tests when run from the installed location.
1873
1874IDLE
1875----
1876
1877- Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin
1878  consolidating and improving human-validated tests of Idle. Change other files
1879  as needed to work with htest.  Running the module as __main__ runs all tests.
1880
1881
1882What's New in Python 3.4.1rc1?
1883==============================
1884
1885Release date: 2014-05-05
1886
1887Core and Builtins
1888-----------------
1889
1890- Issue #21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c.
1891
1892- Issue #21209: Fix sending tuples to custom generator objects with the yield
1893  from syntax.
1894
1895- Issue #21134: Fix segfault when str is called on an uninitialized
1896  UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object.
1897
1898- Issue #19537: Fix PyUnicode_DATA() alignment under m68k.  Patch by
1899  Andreas Schwab.
1900
1901- Issue #20929: Add a type cast to avoid shifting a negative number.
1902
1903- Issue #20731: Properly position in source code files even if they
1904  are opened in text mode. Patch by Serhiy Storchaka.
1905
1906- Issue #20637: Key-sharing now also works for instance dictionaries of
1907  subclasses.  Patch by Peter Ingebretson.
1908
1909- Issue #12546: Allow ``\x00`` to be used as a fill character when using str, int,
1910  float, and complex __format__ methods.
1911
1912- Issue #13598: Modify string.Formatter to support auto-numbering of
1913  replacement fields. It now matches the behavior of str.format() in
1914  this regard. Patches by Phil Elson and Ramchandra Apte.
1915
1916Library
1917-------
1918
1919- Issue #21088: Bugfix for curses.window.addch() regression in 3.4.0.
1920  In porting to Argument Clinic, the first two arguments were reversed.
1921
1922- Issue #21469: Reduced the risk of false positives in robotparser by
1923  checking to make sure that robots.txt has been read or does not exist
1924  prior to returning True in can_fetch().
1925
1926- Issue #21321: itertools.islice() now releases the reference to the source
1927  iterator when the slice is exhausted.  Patch by Anton Afanasyev.
1928
1929- Issue #9815: assertRaises now tries to clear references to local variables
1930  in the exception's traceback.
1931
1932- Issue #13204: Calling sys.flags.__new__ would crash the interpreter,
1933  now it raises a TypeError.
1934
1935- Issue #19385: Make operations on a closed dbm.dumb database always raise the
1936  same exception.
1937
1938- Issue #21207: Detect when the os.urandom cached fd has been closed or
1939  replaced, and open it anew.
1940
1941- Issue #21291: subprocess's Popen.wait() is now thread safe so that
1942  multiple threads may be calling wait() or poll() on a Popen instance
1943  at the same time without losing the Popen.returncode value.
1944
1945- Issue #21127: Path objects can now be instantiated from str subclass
1946  instances (such as ``numpy.str_``).
1947
1948- Issue #15002: urllib.response object to use _TemporaryFileWrapper (and
1949  _TemporaryFileCloser) facility. Provides a better way to handle file
1950  descriptor close. Patch contributed by Christian Theune.
1951
1952- Issue #12220: mindom now raises a custom ValueError indicating it doesn't
1953  support spaces in URIs instead of letting a 'split' ValueError bubble up.
1954
1955- Issue #21239: patch.stopall() didn't work deterministically when the same
1956  name was patched more than once.
1957
1958- Issue #21222: Passing name keyword argument to mock.create_autospec now
1959  works.
1960
1961- Issue #21197: Add lib64 -> lib symlink in venvs on 64-bit non-OS X POSIX.
1962
1963- Issue #17498: Some SMTP servers disconnect after certain errors, violating
1964  strict RFC conformance.  Instead of losing the error code when we issue the
1965  subsequent RSET, smtplib now returns the error code and defers raising the
1966  SMTPServerDisconnected error until the next command is issued.
1967
1968- Issue #17826: setting an iterable side_effect on a mock function created by
1969  create_autospec now works. Patch by Kushal Das.
1970
1971- Issue #7776: Fix ``Host:`` header and reconnection when using
1972  http.client.HTTPConnection.set_tunnel(). Patch by Nikolaus Rath.
1973
1974- Issue #20968: unittest.mock.MagicMock now supports division.
1975  Patch by Johannes Baiter.
1976
1977- Issue #21529 (CVE-2014-4616): Fix arbitrary memory access in
1978  JSONDecoder.raw_decode with a negative second parameter. Bug reported by Guido
1979  Vranken.
1980
1981- Issue #21169: getpass now handles non-ascii characters that the
1982  input stream encoding cannot encode by re-encoding using the
1983  replace error handler.
1984
1985- Issue #21171: Fixed undocumented filter API of the rot13 codec.
1986  Patch by Berker Peksag.
1987
1988- Issue #21172: isinstance check relaxed from dict to collections.Mapping.
1989
1990- Issue #21155: asyncio.EventLoop.create_unix_server() now raises a ValueError
1991  if path and sock are specified at the same time.
1992
1993- Issue #21149: Improved thread-safety in logging cleanup during interpreter
1994  shutdown. Thanks to Devin Jeanpierre for the patch.
1995
1996- Issue #20145: `assertRaisesRegex` and `assertWarnsRegex` now raise a
1997  TypeError if the second argument is not a string or compiled regex.
1998
1999- Issue #21058: Fix a leak of file descriptor in
2000  :func:`tempfile.NamedTemporaryFile`, close the file descriptor if
2001  :func:`io.open` fails
2002
2003- Issue #21200: Return None from pkgutil.get_loader() when __spec__ is missing.
2004
2005- Issue #21013: Enhance ssl.create_default_context() when used for server side
2006  sockets to provide better security by default.
2007
2008- Issue #20633: Replace relative import by absolute import.
2009
2010- Issue #20980: Stop wrapping exception when using ThreadPool.
2011
2012- Issue #21082: In os.makedirs, do not set the process-wide umask. Note this
2013  changes behavior of makedirs when exist_ok=True.
2014
2015- Issue #20990: Fix issues found by pyflakes for multiprocessing.
2016
2017- Issue #21015: SSL contexts will now automatically select an elliptic
2018  curve for ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise
2019  default to "prime256v1".
2020
2021- Issue #20995: Enhance default ciphers used by the ssl module to enable
2022  better security an prioritize perfect forward secrecy.
2023
2024- Issue #20884: Don't assume that __file__ is defined on importlib.__init__.
2025
2026- Issue #21499: Ignore __builtins__ in several test_importlib.test_api tests.
2027
2028- Issue #20879: Delay the initialization of encoding and decoding tables for
2029  base32, ascii85 and base85 codecs in the base64 module, and delay the
2030  initialization of the unquote_to_bytes() table of the urllib.parse module, to
2031  not waste memory if these modules are not used.
2032
2033- Issue #19157: Include the broadcast address in the usuable hosts for IPv6
2034  in ipaddress.
2035
2036- Issue #11599: When an external command (e.g. compiler) fails, distutils now
2037  prints out the whole command line (instead of just the command name) if the
2038  environment variable DISTUTILS_DEBUG is set.
2039
2040- Issue #4931: distutils should not produce unhelpful "error: None" messages
2041  anymore.  distutils.util.grok_environment_error is kept but doc-deprecated.
2042
2043- Issue #20875: Prevent possible gzip "'read' is not defined" NameError.
2044  Patch by Claudiu Popa.
2045
2046- Issue #11558: ``email.message.Message.attach`` now returns a more
2047  useful error message if ``attach`` is called on a message for which
2048  ``is_multipart`` is False.
2049
2050- Issue #20283: RE pattern methods now accept the string keyword parameters
2051  as documented.  The pattern and source keyword parameters are left as
2052  deprecated aliases.
2053
2054- Issue #20778: Fix modulefinder to work with bytecode-only modules.
2055
2056- Issue #20791: copy.copy() now doesn't make a copy when the input is
2057  a bytes object.  Initial patch by Peter Otten.
2058
2059- Issue #19748: On AIX, time.mktime() now raises an OverflowError for year
2060  outsize range [1902; 2037].
2061
2062- Issue #20816: Fix inspect.getcallargs() to raise correct TypeError for
2063  missing keyword-only arguments. Patch by Jeremiah Lowin.
2064
2065- Issue #20817: Fix inspect.getcallargs() to fail correctly if more
2066  than 3 arguments are missing. Patch by Jeremiah Lowin.
2067
2068- Issue #6676: Ensure a meaningful exception is raised when attempting
2069  to parse more than one XML document per pyexpat xmlparser instance.
2070  (Original patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with
2071  suggested wording by David Gutteridge)
2072
2073- Issue #21117: Fix inspect.signature to better support functools.partial.
2074  Due to the specifics of functools.partial implementation,
2075  positional-or-keyword arguments passed as keyword arguments become
2076  keyword-only.
2077
2078- Issue #21209: Fix asyncio.tasks.CoroWrapper to workaround a bug
2079  in yield-from implementation in CPythons prior to 3.4.1.
2080
2081- asyncio: Add gi_{frame,running,code} properties to CoroWrapper
2082  (upstream issue #163).
2083
2084- Issue #21311: Avoid exception in _osx_support with non-standard compiler
2085  configurations.  Patch by John Szakmeister.
2086
2087- Issue #11571: Ensure that the turtle window becomes the topmost window
2088  when launched on OS X.
2089
2090Extension Modules
2091-----------------
2092
2093- Issue #21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
2094
2095- Issue #21226: Set up modules properly in PyImport_ExecCodeModuleObject
2096  (and friends).
2097
2098IDLE
2099----
2100
2101- Issue #21139: Change default paragraph width to 72, the PEP 8 recommendation.
2102
2103- Issue #21284: Paragraph reformat test passes after user changes reformat width.
2104
2105- Issue #17654: Ensure IDLE menus are customized properly on OS X for
2106  non-framework builds and for all variants of Tk.
2107
2108Build
2109-----
2110
2111- The Windows build now includes OpenSSL 1.0.1g
2112
2113- Issue #21285: Refactor and fix curses configure check to always search
2114  in a ncursesw directory.
2115
2116- Issue #15234: For BerkelyDB and Sqlite, only add the found library and
2117  include directories if they aren't already being searched. This avoids
2118  an explicit runtime library dependency.
2119
2120- Issue #20644: OS X installer build support for documentation build changes
2121  in 3.4.1: assume externally supplied sphinx-build is available in /usr/bin.
2122
2123C API
2124-----
2125
2126- Issue #20942: PyImport_ImportFrozenModuleObject() no longer sets __file__ to
2127  match what importlib does; this affects _frozen_importlib as well as any
2128  module loaded using imp.init_frozen().
2129
2130Documentation
2131-------------
2132
2133- Issue #17386: Expanded functionality of the ``Doc/make.bat`` script to make
2134  it much more comparable to ``Doc/Makefile``.
2135
2136- Issue #21043: Remove the recommendation for specific CA organizations and to
2137  mention the ability to load the OS certificates.
2138
2139- Issue #20765: Add missing documentation for PurePath.with_name() and
2140  PurePath.with_suffix().
2141
2142- Issue #19407: New package installation and distribution guides based on
2143  the Python Packaging Authority tools. Existing guides have been retained
2144  as legacy links from the distutils docs, as they still contain some
2145  required reference material for tool developers that isn't recorded
2146  anywhere else.
2147
2148- Issue #19697: Document cases where __main__.__spec__ is None.
2149
2150Tests
2151-----
2152
2153- Issue #18604: Consolidated checks for GUI availability.  All platforms now
2154  at least check whether Tk can be instantiated when the GUI resource is
2155  requested.
2156
2157- Issue #21275: Fix a socket test on KFreeBSD.
2158
2159- Issue #21223: Pass test_site/test_startup_imports when some of the extensions
2160  are built as builtins.
2161
2162- Issue #20635: Added tests for Tk geometry managers.
2163
2164- Add test case for freeze.
2165
2166- Issue #20743: Fix a reference leak in test_tcl.
2167
2168- Issue #21097: Move test_namespace_pkgs into test_importlib.
2169
2170- Issue #20939: Avoid various network test failures due to new
2171  redirect of http://www.python.org/ to https://www.python.org:
2172  use http://www.example.com instead.
2173
2174- Issue #20668: asyncio tests no longer rely on tests.txt file.
2175  (Patch by Vajrasky Kok)
2176
2177- Issue #21093: Prevent failures of ctypes test_macholib on OS X if a
2178  copy of libz exists in $HOME/lib or /usr/local/lib.
2179
2180Tools/Demos
2181-----------
2182
2183- Add support for ``yield from`` to 2to3.
2184
2185- Add support for the PEP 465 matrix multiplication operator to 2to3.
2186
2187- Issue #16047: Fix module exception list and __file__ handling in freeze.
2188  Patch by Meador Inge.
2189
2190- Issue #11824: Consider ABI tags in freeze. Patch by Meador Inge.
2191
2192- Issue #20535: PYTHONWARNING no longer affects the run_tests.py script.
2193  Patch by Arfrever Frehtes Taifersar Arahesis.
2194
2195
2196What's New in Python 3.4.0?
2197===========================
2198
2199Release date: 2014-03-16
2200
2201Library
2202-------
2203
2204- Issue #20939: Fix test_geturl failure in test_urllibnet due to
2205  new redirect of http://www.python.org/ to https://www.python.org.
2206
2207Documentation
2208-------------
2209
2210- Merge in all documentation changes since branching 3.4.0rc1.
2211
2212
2213What's New in Python 3.4.0 release candidate 3?
2214===============================================
2215
2216Release date: 2014-03-09
2217
2218Core and Builtins
2219-----------------
2220
2221- Issue #20786: Fix signatures for dict.__delitem__ and
2222  property.__delete__ builtins.
2223
2224Library
2225-------
2226
2227- Issue #20839: Don't trigger a DeprecationWarning in the still supported
2228  pkgutil.get_loader() API when __loader__ isn't set on a module (nor
2229  when pkgutil.find_loader() is called directly).
2230
2231Build
2232-----
2233
2234- Issue #14512: Launch pydoc -b instead of pydocgui.pyw on Windows.
2235
2236- Issue #20748: Uninstalling pip does not leave behind the pyc of
2237  the uninstaller anymore.
2238
2239- Issue #20568: The Windows installer now installs the unversioned ``pip``
2240  command in addition to the versioned ``pip3`` and ``pip3.4`` commands.
2241
2242- Issue #20757: The ensurepip helper for the Windows uninstaller now skips
2243  uninstalling pip (rather than failing) if the user has updated pip to a
2244  different version from the one bundled with ensurepip.
2245
2246- Issue #20465: Update OS X and Windows installer builds to use
2247  SQLite 3.8.3.1.
2248
2249
2250What's New in Python 3.4.0 release candidate 2?
2251===============================================
2252
2253Release date: 2014-02-23
2254
2255Core and Builtins
2256-----------------
2257
2258- Issue #20625: Parameter names in __annotations__ were not mangled properly.
2259  Discovered by Jonas Wielicki, patch by Yury Selivanov.
2260
2261- Issue #20261: In pickle, lookup __getnewargs__ and __getnewargs_ex__ on the
2262  type of the object.
2263
2264- Issue #20619: Give the AST nodes of keyword-only arguments a column and line
2265  number.
2266
2267- Issue #20526: Revert changes of issue #19466 which introduces a regression:
2268  don't clear anymore the state of Python threads early during the Python
2269  shutdown.
2270
2271Library
2272-------
2273
2274- Issue #20710: The pydoc summary line no longer displays the "self" parameter
2275  for bound methods.
2276
2277- Issue #20566: Change asyncio.as_completed() to use a Queue, to
2278  avoid O(N**2) behavior.
2279
2280- Issue #20704: Implement new debug API in asyncio. Add new methods
2281  BaseEventLoop.set_debug() and BaseEventLoop.get_debug().
2282  Add support for setting 'asyncio.tasks._DEBUG' variable with
2283  'PYTHONASYNCIODEBUG' environment variable.
2284
2285- asyncio: Refactoring and fixes: BaseEventLoop.sock_connect() raises an
2286  error if the address is not resolved; use __slots__ in Handle and
2287  TimerHandle; as_completed() and wait() raise TypeError if the passed
2288  list of Futures is a single Future; call_soon() and other 'call_*()'
2289  functions raise TypeError if the passed callback is a coroutine
2290  function; _ProactorBasePipeTransport uses _FlowControlMixin;
2291  WriteTransport.set_write_buffer_size() calls _maybe_pause_protocol()
2292  to consider pausing receiving if the watermark limits have changed;
2293  fix _check_resolved_address() for IPv6 address; and other minor
2294  improvements, along with multiple documentation updates.
2295
2296- Issue #20684: Fix inspect.getfullargspec() to not to follow __wrapped__
2297  chains. Make its behaviour consistent with bound methods first argument.
2298  Patch by Nick Coghlan and Yury Selivanov.
2299
2300- Issue #20681: Add new error handling API in asyncio. New APIs:
2301  loop.set_exception_handler(), loop.default_exception_handler(), and
2302  loop.call_exception_handler().
2303
2304- Issue #20673: Implement support for UNIX Domain Sockets in asyncio.
2305  New APIs: loop.create_unix_connection(), loop.create_unix_server(),
2306  streams.open_unix_connection(), and streams.start_unix_server().
2307
2308- Issue #20616: Add a format() method to tracemalloc.Traceback.
2309
2310- Issue #19744: the ensurepip installation step now just prints a warning to
2311  stderr rather than failing outright if SSL/TLS is unavailable. This allows
2312  local installation of POSIX builds without SSL/TLS support.
2313
2314- Issue #20594: Avoid name clash with the libc function posix_close.
2315
2316Build
2317-----
2318
2319- Issue #20641: Run MSI custom actions (pip installation, pyc compilation)
2320  with the NoImpersonate flag, to support elevated execution (UAC).
2321
2322- Issue #20221: Removed conflicting (or circular) hypot definition when
2323  compiled with VS 2010 or above.  Initial patch by Tabrez Mohammed.
2324
2325- Issue #20609: Restored the ability to build 64-bit Windows binaries on
2326  32-bit Windows, which was broken by the change in issue #19788.
2327
2328
2329What's New in Python 3.4.0 release candidate 1?
2330===============================================
2331
2332Release date: 2014-02-10
2333
2334Core and Builtins
2335-----------------
2336
2337- Issue #19255: The builtins module is restored to initial value before
2338  cleaning other modules.  The sys and builtins modules are cleaned last.
2339
2340- Issue #20588: Make Python-ast.c C89 compliant.
2341
2342- Issue #20437: Fixed 22 potential bugs when deleting objects references.
2343
2344- Issue #20500: Displaying an exception at interpreter shutdown no longer
2345  risks triggering an assertion failure in PyObject_Str.
2346
2347- Issue #20538: UTF-7 incremental decoder produced inconsistent string when
2348  input was truncated in BASE64 section.
2349
2350- Issue #20404: io.TextIOWrapper (and hence the open() builtin) now uses the
2351  internal codec marking system added for issue #19619 to throw LookupError
2352  for known non-text encodings at stream construction time. The existing
2353  output type checks remain in place to deal with unmarked third party
2354  codecs.
2355
2356- Issue #17162: Add PyType_GetSlot.
2357
2358- Issue #20162: Fix an alignment issue in the siphash24() hash function which
2359  caused a crash on PowerPC 64-bit (ppc64).
2360
2361Library
2362-------
2363
2364- Issue #20530: The signatures for slot builtins have been updated
2365  to reflect the fact that they only accept positional-only arguments.
2366
2367- Issue #20517: Functions in the os module that accept two filenames
2368  now register both filenames in the exception on failure.
2369
2370- Issue #20563: The ipaddress module API is now considered stable.
2371
2372- Issue #14983: email.generator now always adds a line end after each MIME
2373  boundary marker, instead of doing so only when there is an epilogue.  This
2374  fixes an RFC compliance bug and solves an issue with signed MIME parts.
2375
2376- Issue #20540: Fix a performance regression (vs. Python 3.2) when layering
2377  a multiprocessing Connection over a TCP socket.  For small payloads, Nagle's
2378  algorithm would introduce idle delays before the entire transmission of a
2379  message.
2380
2381- Issue #16983: the new email header parsing code will now decode encoded words
2382  that are (incorrectly) surrounded by quotes, and register a defect.
2383
2384- Issue #19772: email.generator no longer mutates the message object when
2385  doing a down-transform from 8bit to 7bit CTEs.
2386
2387- Issue #20536: the statistics module now correctly handle Decimal instances
2388  with positive exponents
2389
2390- Issue #18805: the netmask/hostmask parsing in ipaddress now more reliably
2391  filters out illegal values and correctly allows any valid prefix length.
2392
2393- Issue #20481: For at least Python 3.4, the statistics module will require
2394  that all inputs for a single operation be of a single consistent type, or
2395  else a mixed of ints and a single other consistent type. This avoids
2396  some interoperability issues that arose with the previous approach of
2397  coercing to a suitable common type.
2398
2399- Issue #20478: the statistics module now treats collections.Counter inputs
2400  like any other iterable.
2401
2402- Issue #17369: get_filename was raising an exception if the filename
2403  parameter's RFC2231 encoding was broken in certain ways.  This was
2404  a regression relative to python2.
2405
2406- Issue #20013: Some imap servers disconnect if the current mailbox is
2407  deleted, and imaplib did not handle that case gracefully.  Now it
2408  handles the 'bye' correctly.
2409
2410- Issue #20531: Revert 3.4 version of fix for #19063, and apply the 3.3
2411  version.  That is, do *not* raise an error if unicode is passed to
2412  email.message.Message.set_payload.
2413
2414- Issue #20476: If a non-compat32 policy is used with any of the email parsers,
2415  EmailMessage is now used as the factory class.  The factory class should
2416  really come from the policy; that will get fixed in 3.5.
2417
2418- Issue #19920: TarFile.list() no longer fails when outputs a listing
2419  containing non-encodable characters.  Based on patch by Vajrasky Kok.
2420
2421- Issue #20515: Fix NULL pointer dereference introduced by issue #20368.
2422
2423- Issue #19186: Restore namespacing of expat symbols inside the pyexpat module.
2424
2425- Issue #20053: ensurepip (and hence venv) are no longer affected by the
2426  settings in the default pip configuration file.
2427
2428- Issue #20426: When passing the re.DEBUG flag, re.compile() displays the
2429  debug output every time it is called, regardless of the compilation cache.
2430
2431- Issue #20368: The null character now correctly passed from Tcl to Python.
2432  Improved error handling in variables-related commands.
2433
2434- Issue #20435: Fix _pyio.StringIO.getvalue() to take into account newline
2435  translation settings.
2436
2437- tracemalloc: Fix slicing traces and fix slicing a traceback.
2438
2439- Issue #20354: Fix an alignment issue in the tracemalloc module on 64-bit
2440  platforms. Bug seen on 64-bit Linux when using "make profile-opt".
2441
2442- Issue #17159: inspect.signature now accepts duck types of functions,
2443  which adds support for Cython functions. Initial patch by Stefan Behnel.
2444
2445- Issue #18801: Fix inspect.classify_class_attrs to correctly classify
2446  object.__new__ and object.__init__.
2447
2448- Fixed cmath.isinf's name in its argument parsing code.
2449
2450- Issue #20311, #20452: poll and epoll now round the timeout away from zero,
2451  instead of rounding towards zero, in select and selectors modules:
2452  select.epoll.poll(), selectors.PollSelector.poll() and
2453  selectors.EpollSelector.poll(). For example, a timeout of one microsecond
2454  (1e-6) is now rounded to one millisecondi (1e-3), instead of being rounded to
2455  zero.  However, the granularity property and asyncio's resolution feature
2456  were removed again.
2457
2458- asyncio: Some refactoring; various fixes; add write flow control to
2459  unix pipes; Future.set_exception() instantiates the exception
2460  argument if it is a class; improved proactor pipe transport; support
2461  wait_for(f, None); don't log broken/disconnected pipes; use
2462  ValueError instead of assert for forbidden subprocess_{shell,exec}
2463  arguments; added a convenience API for subprocess management; added
2464  StreamReader.at_eof(); properly handle duplicate coroutines/futures
2465  in gather(), wait(), as_completed(); use a bytearray for buffering
2466  in StreamReader; and more.
2467
2468- Issue #20288: fix handling of invalid numeric charrefs in HTMLParser.
2469
2470- Issue #20424: Python implementation of io.StringIO now supports lone surrogates.
2471
2472- Issue #20308: inspect.signature now works on classes without user-defined
2473  __init__ or __new__ methods.
2474
2475- Issue #20372: inspect.getfile (and a bunch of other inspect functions that
2476  use it) doesn't crash with unexpected AttributeError on classes defined in C
2477  without __module__.
2478
2479- Issue #20356: inspect.signature formatting uses '/' to separate
2480  positional-only parameters from others.
2481
2482- Issue #20223: inspect.signature now supports methods defined with
2483  functools.partialmethods.
2484
2485- Issue #19456: ntpath.join() now joins relative paths correctly when a drive
2486  is present.
2487
2488- Issue #19077: tempfile.TemporaryDirectory cleanup no longer fails when
2489  called during shutdown.  Emitting resource warning in __del__ no longer fails.
2490  Original patch by Antoine Pitrou.
2491
2492- Issue #20394: Silence Coverity warning in audioop module.
2493
2494- Issue #20367: Fix behavior of concurrent.futures.as_completed() for
2495  duplicate arguments.  Patch by Glenn Langford.
2496
2497- Issue #8260: The read(), readline() and readlines() methods of
2498  codecs.StreamReader returned incomplete data when were called after
2499  readline() or read(size).  Based on patch by Amaury Forgeot d'Arc.
2500
2501- Issue #20105: the codec exception chaining now correctly sets the
2502  traceback of the original exception as its __traceback__ attribute.
2503
2504- Issue #17481: inspect.getfullargspec() now uses inspect.signature() API.
2505
2506- Issue #15304: concurrent.futures.wait() can block forever even if
2507  Futures have completed. Patch by Glenn Langford.
2508
2509- Issue #14455: plistlib: fix serializing integers in the range
2510  of an unsigned long long but outside of the range of signed long long for
2511  binary plist files.
2512
2513IDLE
2514----
2515
2516- Issue #20406: Use Python application icons for Idle window title bars.
2517  Patch mostly by Serhiy Storchaka.
2518
2519- Update the python.gif icon for the Idle classbrowser and pathbowser
2520  from the old green snake to the new blue and yellow snakes.
2521
2522- Issue #17721: Remove non-functional configuration dialog help button until we
2523  make it actually gives some help when clicked. Patch by Guilherme Simões.
2524
2525Tests
2526-----
2527
2528- Issue #20532: Tests which use _testcapi now are marked as CPython only.
2529
2530- Issue #19920: Added tests for TarFile.list().  Based on patch by Vajrasky Kok.
2531
2532- Issue #19990: Added tests for the imghdr module.  Based on patch by
2533  Claudiu Popa.
2534
2535- Issue #20474: Fix test_socket "unexpected success" failures on OS X 10.7+.
2536
2537Tools/Demos
2538-----------
2539
2540- Issue #20530: Argument Clinic's signature format has been revised again.
2541  The new syntax is highly human readable while still preventing false
2542  positives.  The syntax also extends Python syntax to denote "self" and
2543  positional-only parameters, allowing inspect.Signature objects to be
2544  totally accurate for all supported builtins in Python 3.4.
2545
2546- Issue #20456: Argument Clinic now observes the C preprocessor conditional
2547  compilation statements of the C files it parses.  When a Clinic block is
2548  inside a conditional code, it adjusts its output to match, including
2549  automatically generating an empty methoddef macro.
2550
2551- Issue #20456: Cloned functions in Argument Clinic now use the correct
2552  name, not the name of the function they were cloned from, for text
2553  strings inside generated code.
2554
2555- Issue #20456: Fixed Argument Clinic's test suite and "--converters" feature.
2556
2557- Issue #20456: Argument Clinic now allows specifying different names
2558  for a parameter in Python and C, using "as" on the parameter line.
2559
2560- Issue #20326: Argument Clinic now uses a simple, unique signature to
2561  annotate text signatures in docstrings, resulting in fewer false
2562  positives.  "self" parameters are also explicitly marked, allowing
2563  inspect.Signature() to authoritatively detect (and skip) said parameters.
2564
2565- Issue #20326: Argument Clinic now generates separate checksums for the
2566  input and output sections of the block, allowing external tools to verify
2567  that the input has not changed (and thus the output is not out-of-date).
2568
2569Build
2570-----
2571
2572- Issue #20465: Update SQLite shipped with OS X installer to 3.8.3.
2573
2574C-API
2575-----
2576
2577- Issue #20517: Added new functions allowing OSError exceptions to reference
2578  two filenames instead of one: PyErr_SetFromErrnoWithFilenameObjects() and
2579  PyErr_SetExcFromWindowsErrWithFilenameObjects().
2580
2581Documentation
2582-------------
2583
2584- Issue #20488: Change wording to say importlib is *the* implementation of
2585  import instead of just *an* implementation.
2586
2587- Issue #6386: Clarify in the tutorial that specifying a symlink to execute
2588  means the directory containing the executed script and not the symlink is
2589  added to sys.path.
2590
2591
2592What's New in Python 3.4.0 Beta 3?
2593==================================
2594
2595Release date: 2014-01-26
2596
2597Core and Builtins
2598-----------------
2599
2600- Issue #20189: Four additional builtin types (PyTypeObject,
2601  PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
2602  have been modified to provide introspection information for builtins.
2603
2604- Issue #17825: Cursor "^" is correctly positioned for SyntaxError and
2605  IndentationError.
2606
2607- Issue #2382: SyntaxError cursor "^" is now written at correct position in most
2608  cases when multibyte characters are in line (before "^").  This still not
2609  works correctly with wide East Asian characters.
2610
2611- Issue #18960: The first line of Python script could be executed twice when
2612  the source encoding was specified on the second line.  Now the source encoding
2613  declaration on the second line isn't effective if the first line contains
2614  anything except a comment.  'python -x' works now again with files with the
2615  source encoding declarations, and can be used to make Python batch files
2616  on Windows.
2617
2618Library
2619-------
2620
2621- asyncio: Various improvements and small changes not all covered by
2622  issues listed below.  E.g. wait_for() now cancels the inner task if
2623  the timeout occcurs; tweaked the set of exported symbols; renamed
2624  Empty/Full to QueueEmpty/QueueFull; "with (yield from lock)" now
2625  uses a separate context manager; readexactly() raises if not enough
2626  data was read; PTY support tweaks.
2627
2628- Issue #20311: asyncio: Add a granularity attribute to BaseEventLoop: maximum
2629  between the resolution of the BaseEventLoop.time() method and the resolution
2630  of the selector. The granuarility is used in the scheduler to round time and
2631  deadline.
2632
2633- Issue #20311: selectors: Add a resolution attribute to BaseSelector.
2634
2635- Issue #20189: unittest.mock now no longer assumes that any object for
2636  which it could get an inspect.Signature is a callable written in Python.
2637  Fix courtesy of Michael Foord.
2638
2639- Issue #20317: ExitStack.__exit__ could create a self-referential loop if an
2640  exception raised by a cleanup operation already had its context set
2641  correctly (for example, by the @contextmanager decorator). The infinite
2642  loop this caused is now avoided by checking if the expected context is
2643  already set before trying to fix it.
2644
2645- Issue #20374: Fix build with GNU readline >= 6.3.
2646
2647- Issue #20262: Warnings are raised now when duplicate names are added in the
2648  ZIP file or too long ZIP file comment is truncated.
2649
2650- Issue #20165: The unittest module no longer considers tests marked with
2651  @expectedFailure successful if they pass.
2652
2653- Issue #18574: Added missing newline in 100-Continue reply from
2654  http.server.BaseHTTPRequestHandler. Patch by Nikolaus Rath.
2655
2656- Issue #20270: urllib.urlparse now supports empty ports.
2657
2658- Issue #20243: TarFile no longer raise ReadError when opened in write mode.
2659
2660- Issue #20238: TarFile opened with external fileobj and "w:gz" mode didn't
2661  write complete output on close.
2662
2663- Issue #20245: The open functions in the tarfile module now correctly handle
2664  empty mode.
2665
2666- Issue #20242: Fixed basicConfig() format strings for the alternative
2667  formatting styles. Thanks to kespindler for the bug report and patch.
2668
2669- Issue #20246: Fix buffer overflow in socket.recvfrom_into.
2670
2671- Issues #20206 and #5803: Fix edge case in email.quoprimime.encode where it
2672  truncated lines ending in a character needing encoding but no newline by
2673  using a more efficient algorithm that doesn't have the bug.
2674
2675- Issue #19082: Working xmlrpc.server and xmlrpc.client examples. Both in
2676  modules and in documentation. Initial patch contributed by Vajrasky Kok.
2677
2678- Issue #20138: The wsgiref.application_uri() and wsgiref.request_uri()
2679  functions now conform to PEP 3333 when handle non-ASCII URLs.
2680
2681- Issue #19097: Raise the correct Exception when cgi.FieldStorage is given an
2682  invalid fileobj.
2683
2684- Issue #20152: Ported Python/import.c over to Argument Clinic.
2685
2686- Issue #13107: argparse and optparse no longer raises an exception when output
2687  a help on environment with too small COLUMNS.  Based on patch by
2688  Elazar Gershuni.
2689
2690- Issue #20207: Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly
2691  asked for.
2692
2693- Issue #18960: The tokenize module now ignore the source encoding declaration
2694  on the second line if the first line contains anything except a comment.
2695
2696- Issue #20078: Reading malformed zipfiles no longer hangs with 100% CPU
2697  consumption.
2698
2699- Issue #20113: os.readv() and os.writev() now raise an OSError exception on
2700  error instead of returning -1.
2701
2702- Issue #19719: Make importlib.abc.MetaPathFinder.find_module(),
2703  PathEntryFinder.find_loader(), and Loader.load_module() use PEP 451 APIs to
2704  help with backwards-compatibility.
2705
2706- Issue #20144: inspect.Signature now supports parsing simple symbolic
2707  constants as parameter default values in __text_signature__.
2708
2709- Issue #20072: Fixed multiple errors in tkinter with wantobjects is False.
2710
2711- Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver().
2712
2713- Issue #14455: Fix some problems with the new binary plist support in plistlib.
2714
2715IDLE
2716----
2717
2718- Issue #17390: Add Python version to Idle editor window title bar.
2719  Original patches by Edmond Burnett and Kent Johnson.
2720
2721- Issue #18960: IDLE now ignores the source encoding declaration on the second
2722  line if the first line contains anything except a comment.
2723
2724Tests
2725-----
2726
2727- Issue #20358: Tests for curses.window.overlay and curses.window.overwrite
2728  no longer specify min{row,col} > max{row,col}.
2729
2730- Issue #19804: The test_find_mac test in test_uuid is now skipped if the
2731  ifconfig executable is not available.
2732
2733- Issue #19886: Use better estimated memory requirements for bigmem tests.
2734
2735Tools/Demos
2736-----------
2737
2738- Issue #20390: Argument Clinic's "file" output preset now defaults to
2739  "{dirname}/clinic/{basename}.h".
2740
2741- Issue #20390: Argument Clinic's "class" directive syntax has been extended
2742  with two new required arguments: "typedef" and "type_object".
2743
2744- Issue #20390: Argument Clinic: If __new__ or __init__ functions didn't use
2745  kwargs (or args), the PyArg_NoKeywords (or PyArg_NoPositional) calls
2746  generated are only run when the type object is an exact match.
2747
2748- Issue #20390: Argument Clinic now fails if you have required parameters after
2749  optional parameters.
2750
2751- Issue #20390: Argument Clinic converters now have a new template they can
2752  inject code into: "modifiers".  Code put there is run in the parsing
2753  function after argument parsing but before the call to the impl.
2754
2755- Issue #20376: Argument Clinic now escapes backslashes in docstrings.
2756
2757- Issue #20381: Argument Clinic now sanity checks the default argument when
2758  c_default is also specified, providing a nice failure message for
2759  disallowed values.
2760
2761- Issue #20189: Argument Clinic now ensures that parser functions for
2762  __new__ are always of type newfunc, the type of the tp_new slot.
2763  Similarly, parser functions for __init__ are now always of type initproc,
2764  the type of tp_init.
2765
2766- Issue #20189: Argument Clinic now suppresses the docstring for __new__
2767  and __init__ functions if no docstring is provided in the input.
2768
2769- Issue #20189: Argument Clinic now suppresses the "self" parameter in the
2770  impl for @staticmethod functions.
2771
2772- Issue #20294: Argument Clinic now supports argument parsing for __new__ and
2773  __init__ functions.
2774
2775- Issue #20299: Argument Clinic custom converters may now change the default
2776  value of c_default and py_default with a class member.
2777
2778- Issue #20287: Argument Clinic's output is now configurable, allowing
2779  delaying its output or even redirecting it to a separate file.
2780
2781- Issue #20226: Argument Clinic now permits simple expressions
2782  (e.g. "sys.maxsize - 1") as default values for parameters.
2783
2784- Issue #19936: Added executable bits or shebang lines to Python scripts which
2785  requires them.  Disable executable bits and shebang lines in test and
2786  benchmark files in order to prevent using a random system python, and in
2787  source files of modules which don't provide command line interface.  Fixed
2788  shebang lines in the unittestgui and checkpip scripts.
2789
2790- Issue #20268: Argument Clinic now supports cloning the parameters and
2791  return converter of existing functions.
2792
2793- Issue #20228: Argument Clinic now has special support for class special
2794  methods.
2795
2796- Issue #20214: Fixed a number of small issues and documentation errors in
2797  Argument Clinic (see issue for details).
2798
2799- Issue #20196: Fixed a bug where Argument Clinic did not generate correct
2800  parsing code for functions with positional-only parameters where all arguments
2801  are optional.
2802
2803- Issue #18960: 2to3 and the findnocoding.py script now ignore the source
2804  encoding declaration on the second line if the first line contains anything
2805  except a comment.
2806
2807- Issue #19723: The marker comments Argument Clinic uses have been changed
2808  to improve readability.
2809
2810- Issue #20157: When Argument Clinic renames a parameter because its name
2811  collides with a C keyword, it no longer exposes that rename to PyArg_Parse.
2812
2813- Issue #20141: Improved Argument Clinic's support for the PyArg_Parse "O!"
2814  format unit.
2815
2816- Issue #20144: Argument Clinic now supports simple symbolic constants
2817  as parameter default values.
2818
2819- Issue #20143: The line numbers reported in Argument Clinic errors are
2820  now more accurate.
2821
2822- Issue #20142: Py_buffer variables generated by Argument Clinic are now
2823  initialized with a default value.
2824
2825Build
2826-----
2827
2828- Issue #12837: Silence a tautological comparison warning on OS X under Clang in
2829  socketmodule.c.
2830
2831
2832What's New in Python 3.4.0 Beta 2?
2833==================================
2834
2835Release date: 2014-01-05
2836
2837Core and Builtins
2838-----------------
2839
2840- Issue #17432: Drop UCS2 from names of Unicode functions in python3.def.
2841
2842- Issue #19526: Exclude all new API from the stable ABI. Exceptions can be
2843  made if a need is demonstrated.
2844
2845- Issue #19969: PyBytes_FromFormatV() now raises an OverflowError if "%c"
2846  argument is not in range [0; 255].
2847
2848- Issue #19995: %c, %o, %x, and %X now issue a DeprecationWarning on non-integer
2849  input; reworded docs to clarify that an integer type should define both __int__
2850  and __index__.
2851
2852- Issue #19787: PyThread_set_key_value() now always set the value. In Python
2853  3.3, the function did nothing if the key already exists (if the current value
2854  is a non-NULL pointer).
2855
2856- Issue #14432: Remove the thread state field from the frame structure. Fix a
2857  crash when a generator is created in a C thread that is destroyed while the
2858  generator is still used. The issue was that a generator contains a frame, and
2859  the frame kept a reference to the Python state of the destroyed C thread. The
2860  crash occurs when a trace function is setup.
2861
2862- Issue #19576: PyGILState_Ensure() now initializes threads. At startup, Python
2863  has no concrete GIL. If PyGILState_Ensure() is called from a new thread for
2864  the first time and PyEval_InitThreads() was not called yet, a GIL needs to be
2865  created.
2866
2867- Issue #17576: Deprecation warning emitted now when __int__() or __index__()
2868  return not int instance.
2869
2870- Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes.
2871
2872- Issue #19736: Add module-level statvfs constants defined for GNU/glibc
2873  based systems.
2874
2875- Issue #20097: Fix bad use of "self" in importlib's WindowsRegistryFinder.
2876
2877- Issue #19729: In str.format(), fix recursive expansion in format spec.
2878
2879- Issue #19638: Fix possible crash / undefined behaviour from huge (more than 2
2880  billion characters) input strings in _Py_dg_strtod.
2881
2882Library
2883-------
2884
2885- Issue #20154: Deadlock in asyncio.StreamReader.readexactly().
2886
2887- Issue #16113: Remove sha3 module again.
2888
2889- Issue #20111: pathlib.Path.with_suffix() now sanity checks the given suffix.
2890
2891- Fix breakage in TestSuite.countTestCases() introduced by issue #11798.
2892
2893- Issue #20108: Avoid parameter name clash in inspect.getcallargs().
2894
2895- Issue #19918: Fix PurePath.relative_to() under Windows.
2896
2897- Issue #19422: Explicitly disallow non-SOCK_STREAM sockets in the ssl
2898  module, rather than silently let them emit clear text data.
2899
2900- Issue #20046: Locale alias table no longer contains entities which can be
2901  calculated.  Generalized support of the euro modifier.
2902
2903- Issue #20027: Fixed locale aliases for devanagari locales.
2904
2905- Issue #20067: Tkinter variables now work when wantobjects is false.
2906
2907- Issue #19020: Tkinter now uses splitlist() instead of split() in configure
2908  methods.
2909
2910- Issue #19744: ensurepip now provides a better error message when Python is
2911  built without SSL/TLS support (pip currently requires that support to run,
2912  even if only operating with local wheel files)
2913
2914- Issue #19734: ensurepip now ignores all pip environment variables to avoid
2915  odd behaviour based on user configuration settings
2916
2917- Fix TypeError on "setup.py upload --show-response".
2918
2919- Issue #20045: Fix "setup.py register --list-classifiers".
2920
2921- Issue #18879: When a method is looked up on a temporary file, avoid closing
2922  the file before the method is possibly called.
2923
2924- Issue #20037: Avoid crashes when opening a text file late at interpreter
2925  shutdown.
2926
2927- Issue #19967: Thanks to the PEP 442, asyncio.Future now uses a
2928  destructor to log uncaught exceptions, instead of the dedicated
2929  _TracebackLogger class.
2930
2931- Added a Task.current_task() class method to asyncio.
2932
2933- Issue #19850: Set SA_RESTART in asyncio when registering a signal
2934  handler to limit EINTR occurrences.
2935
2936- Implemented write flow control in asyncio for proactor event loop (Windows).
2937
2938- Change write buffer in asyncio use to avoid O(N**2) behavior.  Make
2939  write()/sendto() accept bytearray/memoryview.
2940
2941- Issue #20034: Updated alias mapping to most recent locale.alias file
2942  from X.org distribution using makelocalealias.py.
2943
2944- Issue #5815: Fixed support for locales with modifiers.  Fixed support for
2945  locale encodings with hyphens.
2946
2947- Issue #20026: Fix the sqlite module to handle correctly invalid isolation
2948  level (wrong type).
2949
2950- Issue #18829: csv.Dialect() now checks type for delimiter, escapechar and
2951  quotechar fields.  Original patch by Vajrasky Kok.
2952
2953- Issue #19855: uuid.getnode() on Unix now looks on the PATH for the
2954  executables used to find the mac address, with /sbin and /usr/sbin as
2955  fallbacks.
2956
2957- Issue #20007: HTTPResponse.read(0) no more prematurely closes connection.
2958  Original patch by Simon Sapin.
2959
2960- Issue #19946: multiprocessing now uses runpy to initialize __main__ in
2961  child processes when necessary, allowing it to correctly handle scripts
2962  without suffixes and submodules that use explicit relative imports or
2963  otherwise rely on parent modules being correctly imported prior to
2964  execution.
2965
2966- Issue #19921: When Path.mkdir() is called with parents=True, any missing
2967  parent is created with the default permissions, ignoring the mode argument
2968  (mimicking the POSIX "mkdir -p" command).
2969
2970- Issue #19887: Improve the Path.resolve() algorithm to support certain
2971  symlink chains.
2972
2973- Issue #19912: Fixed numerous bugs in ntpath.splitunc().
2974
2975- Issue #19911: ntpath.splitdrive() now correctly processes the 'İ' character
2976  (U+0130, LATIN CAPITAL LETTER I WITH DOT ABOVE).
2977
2978- Issue #19532: python -m compileall with no filename/directory arguments now
2979  respects the -f and -q flags instead of ignoring them.
2980
2981- Issue #19623: Fixed writing to unseekable files in the aifc module.
2982
2983- Issue #19946: multiprocessing.spawn now raises ImportError when the module to
2984  be used as the main module cannot be imported.
2985
2986- Issue #17919: select.poll.register() again works with poll.POLLNVAL on AIX.
2987  Fixed integer overflow in the eventmask parameter.
2988
2989- Issue #19063: if a Charset's body_encoding was set to None, the email
2990  package would generate a message claiming the Content-Transfer-Encoding
2991  was 7bit, and produce garbage output for the content.  This now works.
2992  A couple of other set_payload mishandlings of non-ASCII are also fixed.
2993  In addition, calling set_payload with a string argument without
2994  specifying a charset now raises an error (this is a new error in 3.4).
2995
2996- Issue #15475: Add __sizeof__ implementations for itertools objects.
2997
2998- Issue #19944: Fix importlib.find_spec() so it imports parents as needed
2999  and move the function to importlib.util.
3000
3001- Issue #19880: Fix a reference leak in unittest.TestCase. Explicitly break
3002  reference cycles between frames and the _Outcome instance.
3003
3004- Issue #17429: platform.linux_distribution() now decodes files from the UTF-8
3005  encoding with the surrogateescape error handler, instead of decoding from the
3006  locale encoding in strict mode. It fixes the function on Fedora 19 which is
3007  probably the first major distribution release with a non-ASCII name. Patch
3008  written by Toshio Kuratomi.
3009
3010- Issue #19343: Expose FreeBSD-specific APIs in resource module.  Original
3011  patch by Koobs.
3012
3013- Issue #19929: Call os.read with 32768 within subprocess.Popen.communicate
3014  rather than 4096 for efficiency.  A microbenchmark shows Linux and OS X
3015  both using ~50% less cpu time this way.
3016
3017- Issue #19506: Use a memoryview to avoid a data copy when piping data
3018  to stdin within subprocess.Popen.communicate.  5-10% less cpu usage.
3019
3020- Issue #19876: selectors unregister() no longer raises ValueError or OSError
3021  if the FD is closed (as long as it was registered).
3022
3023- Issue #19908: pathlib now joins relative Windows paths correctly when a drive
3024  is present.  Original patch by Antoine Pitrou.
3025
3026- Issue #19296: Silence compiler warning in dbm_open
3027
3028- Issue #6784: Strings from Python 2 can now be unpickled as bytes
3029  objects by setting the encoding argument of Unpickler to be 'bytes'.
3030  Initial patch by Merlijn van Deen.
3031
3032- Issue #19839: Fix regression in bz2 module's handling of non-bzip2 data at
3033  EOF, and analogous bug in lzma module.
3034
3035- Issue #19881: Fix pickling bug where cpickle would emit bad pickle data for
3036  large bytes string (i.e., with size greater than 2**32-1).
3037
3038- Issue #19138: doctest's IGNORE_EXCEPTION_DETAIL now allows a match when
3039  no exception detail exists (no colon following the exception's name, or
3040  a colon does follow but no text follows the colon).
3041
3042- Issue #19927: Add __eq__ to path-based loaders in importlib.
3043
3044- Issue #19827: On UNIX, setblocking() and settimeout() methods of
3045  socket.socket can now avoid a second syscall if the ioctl() function can be
3046  used, or if the non-blocking flag of the socket is unchanged.
3047
3048- Issue #19785: smtplib now supports SSLContext.check_hostname and server name
3049  indication for TLS/SSL connections.
3050
3051- Issue #19784: poplib now supports SSLContext.check_hostname and server name
3052  indication for TLS/SSL connections.
3053
3054- Issue #19783: nntplib now supports SSLContext.check_hostname and server name
3055  indication for TLS/SSL connections.
3056
3057- Issue #19782: imaplib now supports SSLContext.check_hostname and server name
3058  indication for TLS/SSL connections.
3059
3060- Issue #20123: Fix pydoc.synopsis() for "binary" modules.
3061
3062- Issue #19834: Support unpickling of exceptions pickled by Python 2.
3063
3064- Issue #19781: ftplib now supports SSLContext.check_hostname and server name
3065  indication for TLS/SSL connections.
3066
3067- Issue #19509: Add SSLContext.check_hostname to match the peer's certificate
3068  with server_hostname on handshake.
3069
3070- Issue #15798: Fixed subprocess.Popen() to no longer fail if file
3071  descriptor 0, 1 or 2 is closed.
3072
3073- Issue #17897: Optimized unpickle prefetching.
3074
3075- Issue #3693: Make the error message more helpful when the array.array()
3076  constructor is given a str. Move the array module typecode documentation to
3077  the docstring of the constructor.
3078
3079- Issue #19088: Fixed incorrect caching of the copyreg module in
3080  object.__reduce__() and object.__reduce_ex__().
3081
3082- Issue #19698: Removed exec_module() methods from
3083  importlib.machinery.BuiltinImporter and ExtensionFileLoader.
3084
3085- Issue #18864: Added a setter for ModuleSpec.has_location.
3086
3087- Fixed _pickle.Unpickler to not fail when loading empty strings as
3088  persistent IDs.
3089
3090- Issue #11480: Fixed copy.copy to work with classes with custom metaclasses.
3091  Patch by Daniel Urban.
3092
3093- Issue #6477: Added support for pickling the types of built-in singletons
3094  (i.e., Ellipsis, NotImplemented, None).
3095
3096- Issue #19713: Add remaining PEP 451-related deprecations and move away
3097  from using find_module/find_loaer/load_module.
3098
3099- Issue #19708: Update pkgutil to use the new importer APIs.
3100
3101- Issue #19703: Update pydoc to use the new importer APIs.
3102
3103- Issue #19851: Fixed a regression in reloading sub-modules.
3104
3105- ssl.create_default_context() sets OP_NO_COMPRESSION to prevent CRIME.
3106
3107- Issue #19802: Add socket.SO_PRIORITY.
3108
3109- Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with
3110  virtual interface.  Original patch by Kent Frazier.
3111
3112- Issue #11489: JSON decoder now accepts lone surrogates.
3113
3114- Issue #19545: Avoid chained exceptions while passing stray % to
3115  time.strptime().  Initial patch by Claudiu Popa.
3116
3117IDLE
3118----
3119
3120- Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
3121
3122- Issue #19481: print() of string subclass instance in IDLE no longer hangs.
3123
3124- Issue #18270: Prevent possible IDLE AttributeError on OS X when no initial
3125  shell window is present.
3126
3127Tests
3128-----
3129
3130- Issue #20055: Fix test_shutil under Windows with symlink privileges held.
3131  Patch by Vajrasky Kok.
3132
3133- Issue #20070: Don't run test_urllib2net when network resources are not
3134  enabled.
3135
3136- Issue #19938: Re-enabled test_bug_1333982 in test_dis, which had been
3137  disabled since 3.0 due to the changes in listcomp handling.
3138
3139- Issue #19320: test_tcl no longer fails when wantobjects is false.
3140
3141- Issue #19919: Fix flaky SSL test. connect_ex() sometimes returns
3142  EWOULDBLOCK on Windows or VMs hosted on Windows.
3143
3144- Issue #19912: Added tests for ntpath.splitunc().
3145
3146- Issue #19828: Fixed test_site when the whole suite is run with -S.
3147
3148- Issue #19928: Implemented a test for repr() of cell objects.
3149
3150- Issue #19535: Fixed test_docxmlrpc, test_functools, test_inspect, and
3151  test_statistics when python is run with -OO.
3152
3153- Issue #19926: Removed unneeded test_main from test_abstract_numbers.
3154  Patch by Vajrasky Kok.
3155
3156- Issue #19572: More skipped tests explicitly marked as skipped.
3157
3158- Issue #19595, #19987: Re-enabled a long-disabled test in test_winsound.
3159
3160- Issue #19588: Fixed tests in test_random that were silently skipped most
3161  of the time.  Patch by Julian Gindi.
3162
3163Build
3164-----
3165
3166- Issue #19728: Enable pip installation by default on Windows.
3167
3168- Issue #16136: Remove VMS support
3169
3170- Issue #18215: Add script Tools/ssl/test_multiple_versions.py to compile and
3171  run Python's unit tests with multiple versions of OpenSSL.
3172
3173- Issue #19922: define _INCLUDE__STDC_A1_SOURCE in HP-UX to include mbstate_t
3174  for mbrtowc().
3175
3176- Issue #19788: kill_python(_d).exe is now run as a PreBuildEvent on the
3177  pythoncore sub-project.  This should prevent build errors due a previous
3178  build's python(_d).exe still running.
3179
3180Documentation
3181-------------
3182
3183- Issue #20265: Updated some parts of the Using Windows document.
3184
3185- Issue #20266: Updated some parts of the Windows FAQ.
3186
3187- Issue #20255: Updated the about and bugs pages.
3188
3189- Issue #20253: Fixed a typo in the ipaddress docs that advertised an
3190  illegal attribute name.  Found by INADA Naoki.
3191
3192- Issue #18840: Introduce the json module in the tutorial, and de-emphasize
3193  the pickle module.
3194
3195- Issue #19845: Updated the Compiling Python on Windows section.
3196
3197- Issue #19795: Improved markup of True/False constants.
3198
3199Tools/Demos
3200-----------
3201
3202- Issue #19659: Added documentation for Argument Clinic.
3203
3204- Issue #19976: Argument Clinic METH_NOARGS functions now always
3205  take two parameters.
3206
3207
3208What's New in Python 3.4.0 Beta 1?
3209==================================
3210
3211Release date: 2013-11-24
3212
3213Core and Builtins
3214-----------------
3215
3216- Use the repr of a module name in more places in import, especially
3217  exceptions.
3218
3219- Issue #19619: str.encode, bytes.decode and bytearray.decode now use an
3220  internal API to throw LookupError for known non-text encodings, rather
3221  than attempting the encoding or decoding operation and then throwing a
3222  TypeError for an unexpected output type. (The latter mechanism remains
3223  in place for third party non-text encodings)
3224
3225- Issue #19183: Implement PEP 456 'secure and interchangeable hash algorithm'.
3226  Python now uses SipHash24 on all major platforms.
3227
3228- Issue #12892: The utf-16* and utf-32* encoders no longer allow surrogate code
3229  points (U+D800-U+DFFF) to be encoded.  The utf-32* decoders no longer decode
3230  byte sequences that correspond to surrogate code points.  The surrogatepass
3231  error handler now works with the utf-16* and utf-32* codecs.  Based on
3232  patches by Victor Stinner and Kang-Hao (Kenny) Lu.
3233
3234- Issue #17806: Added keyword-argument support for "tabsize" to
3235  str/bytes.expandtabs().
3236
3237- Issue #17828: Output type errors in str.encode(), bytes.decode() and
3238  bytearray.decode() now direct users to codecs.encode() or codecs.decode()
3239  as appropriate.
3240
3241- Issue #17828: The interpreter now attempts to chain errors that occur in
3242  codec processing with a replacement exception of the same type that
3243  includes the codec name in the error message. It ensures it only does this
3244  when the creation of the replacement exception won't lose any information.
3245
3246- Issue #19466: Clear the frames of daemon threads earlier during the
3247  Python shutdown to call objects destructors. So "unclosed file" resource
3248  warnings are now correctly emitted for daemon threads.
3249
3250- Issue #19514: Deduplicate some _Py_IDENTIFIER declarations.
3251  Patch by Andrei Dorian Duma.
3252
3253- Issue #17936: Fix O(n**2) behaviour when adding or removing many subclasses
3254  of a given type.
3255
3256- Issue #19428: zipimport now handles errors when reading truncated or invalid
3257  ZIP archive.
3258
3259- Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handle
3260  exceptions when merging fast locals into f_locals of a frame.
3261  PyEval_GetLocals() now raises an exception and return NULL on failure.
3262
3263- Issue #19369: Optimized the usage of __length_hint__().
3264
3265- Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
3266  Python executable and not removed by the linker's optimizer.
3267
3268- Issue #19306: Add extra hints to the faulthandler module's stack
3269  dumps that these are "upside down".
3270
3271Library
3272-------
3273
3274- Issue #3158: doctest can now find doctests in functions and methods
3275  written in C.
3276
3277- Issue #13477: Added command line interface to the tarfile module.
3278  Original patch by Berker Peksag.
3279
3280- Issue #19674: inspect.signature() now produces a correct signature
3281  for some builtins.
3282
3283- Issue #19722: Added opcode.stack_effect(), which
3284  computes the stack effect of bytecode instructions.
3285
3286- Issue #19735: Implement private function ssl._create_stdlib_context() to
3287  create SSLContext objects in Python's stdlib module. It provides a single
3288  configuration point and makes use of SSLContext.load_default_certs().
3289
3290- Issue #16203: Add re.fullmatch() function and regex.fullmatch() method,
3291  which anchor the pattern at both ends of the string to match.
3292  Original patch by Matthew Barnett.
3293
3294- Issue #13592: Improved the repr for regular expression pattern objects.
3295  Based on patch by Hugo Lopes Tavares.
3296
3297- Issue #19641: Added the audioop.byteswap() function to convert big-endian
3298  samples to little-endian and vice versa.
3299
3300- Issue #15204: Deprecated the 'U' mode in file-like objects.
3301
3302- Issue #17810: Implement PEP 3154, pickle protocol 4.
3303
3304- Issue #19668: Added support for the cp1125 encoding.
3305
3306- Issue #19689: Add ssl.create_default_context() factory function. It creates
3307  a new SSLContext object with secure default settings.
3308
3309- Issue #19727: os.utime(..., None) is now potentially more precise
3310  under Windows.
3311
3312- Issue #17201: ZIP64 extensions now are enabled by default.  Patch by
3313  William Mallard.
3314
3315- Issue #19292: Add SSLContext.load_default_certs() to load default root CA
3316  certificates from default stores or system stores. By default the method
3317  loads CA certs for authentication of server certs.
3318
3319- Issue #19673: Add pathlib to the stdlib as a provisional module (PEP 428).
3320
3321- Issue #16596: pdb in a generator now properly skips over yield and
3322  yield from rather than stepping out of the generator into its
3323  caller.  (This is essential for stepping through asyncio coroutines.)
3324
3325- Issue #17916: Added dis.Bytecode.from_traceback() and
3326  dis.Bytecode.current_offset to easily display "current instruction"
3327  markers in the new disassembly API (Patch by Claudiu Popa).
3328
3329- Issue #19552: venv now supports bootstrapping pip into virtual environments
3330
3331- Issue #17134: Finalize interface to Windows' certificate store. Cert and
3332  CRL enumeration are now two functions. enum_certificates() also returns
3333  purpose flags as set of OIDs.
3334
3335- Issue #19555: Restore sysconfig.get_config_var('SO'), (and the distutils
3336  equivalent) with a DeprecationWarning pointing people at $EXT_SUFFIX.
3337
3338- Issue #8813: Add SSLContext.verify_flags to change the verification flags
3339  of the context in order to enable certification revocation list (CRL)
3340  checks or strict X509 rules.
3341
3342- Issue #18294: Fix the zlib module to make it 64-bit safe.
3343
3344- Issue #19682: Fix compatibility issue with old version of OpenSSL that
3345  was introduced by Issue #18379.
3346
3347- Issue #14455: plistlib now supports binary plists and has an updated API.
3348
3349- Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on
3350  big-endian platforms.
3351
3352- Issue #18379: SSLSocket.getpeercert() returns CA issuer AIA fields, OCSP
3353  and CRL distribution points.
3354
3355- Issue #18138: Implement cadata argument of SSLContext.load_verify_location()
3356  to load CA certificates and CRL from memory. It supports PEM and DER
3357  encoded strings.
3358
3359- Issue #18775: Add name and block_size attribute to HMAC object. They now
3360  provide the same API elements as non-keyed cryptographic hash functions.
3361
3362- Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC
3363  module supports digestmod names, e.g. hmac.HMAC('sha1').
3364
3365- Issue #19449: in csv's writerow, handle non-string keys when generating the
3366  error message that certain keys are not in the 'fieldnames' list.
3367
3368- Issue #13633: Added a new convert_charrefs keyword arg to HTMLParser that,
3369  when True, automatically converts all character references.
3370
3371- Issue #2927: Added the unescape() function to the html module.
3372
3373- Issue #8402: Added the escape() function to the glob module.
3374
3375- Issue #17618: Add Base85 and Ascii85 encoding/decoding to the base64 module.
3376
3377- Issue #19634: time.strftime("%y") now raises a ValueError on AIX when given a
3378  year before 1900.
3379
3380- Fix test.support.bind_port() to not cause an error when Python was compiled
3381  on a system with SO_REUSEPORT defined in the headers but run on a system
3382  with an OS kernel that does not support that reasonably new socket option.
3383
3384- Fix compilation error under gcc of the ctypes module bundled libffi for arm.
3385
3386- Issue #19448: Add private API to SSL module to lookup ASN.1 objects by OID,
3387  NID, short name and long name.
3388
3389- Issue #19282: dbm.open now supports the context management protocol. (Initial
3390  patch by Claudiu Popa)
3391
3392- Issue #8311: Added support for writing any bytes-like objects in the aifc,
3393  sunau, and wave modules.
3394
3395- Issue #5202: Added support for unseekable files in the wave module.
3396
3397- Issue #19544 and Issue #1180: Restore global option to ignore
3398  ~/.pydistutils.cfg in Distutils, accidentally removed in backout of
3399  distutils2 changes.
3400
3401- Issue #19523: Closed FileHandler leak which occurred when delay was set.
3402
3403- Issue #19544 and Issue #6516: Restore support for --user and --group
3404  parameters to sdist command accidentally rolled back as part of the
3405  distutils2 rollback.
3406
3407- Issue #13674: Prevented time.strftime from crashing on Windows when given
3408  a year before 1900 and a format of %y.
3409
3410- Issue #19406: implementation of the ensurepip module (part of PEP 453).
3411  Patch by Donald Stufft and Nick Coghlan.
3412
3413- Issue #19544 and Issue #6286: Restore use of urllib over http allowing use
3414  of http_proxy for Distutils upload command, a feature accidentally lost
3415  in the rollback of distutils2.
3416
3417- Issue #19544 and Issue #7457: Restore the read_pkg_file method to
3418  distutils.dist.DistributionMetadata accidentally removed in the undo of
3419  distutils2.
3420
3421- Issue #16685: Added support for any bytes-like objects in the audioop module.
3422  Removed support for strings.
3423
3424- Issue #7171: Add Windows implementation of ``inet_ntop`` and ``inet_pton``
3425  to socket module. Patch by Atsuo Ishimoto.
3426
3427- Issue #19261: Added support for writing 24-bit samples in the sunau module.
3428
3429- Issue #1097797: Added CP273 encoding, used on IBM mainframes in
3430  Germany and Austria.  Mapping provided by Michael Bierenfeld.
3431
3432- Issue #1575020: Fixed support of 24-bit wave files on big-endian platforms.
3433
3434- Issue #19378: Fixed a number of cases in the dis module where the new
3435  "file" parameter was not being honoured correctly
3436
3437- Issue #19378: Removed the "dis.Bytecode.show_info" method
3438
3439- Issue #19378: Renamed the "dis.Bytecode.display_code" method to
3440  "dis.Bytecode.dis" and converted it to returning a string rather than
3441  printing output.
3442
3443- Issue #19378: the "line_offset" parameter in the new "dis.get_instructions"
3444  API has been renamed to "first_line" (and the default value and usage
3445  changed accordingly). This should reduce confusion with the more common use
3446  of "offset" in the dis docs to refer to bytecode offsets.
3447
3448- Issue #18678: Corrected spwd struct member names in spwd module:
3449  sp_nam->sp_namp, and sp_pwd->sp_pwdp.  The old names are kept as extra
3450  structseq members, for backward compatibility.
3451
3452- Issue #6157: Fixed tkinter.Text.debug().  tkinter.Text.bbox() now raises
3453  TypeError instead of TclError on wrong number of arguments.  Original patch
3454  by Guilherme Polo.
3455
3456- Issue #10197: Rework subprocess.get[status]output to use subprocess
3457  functionality and thus to work on Windows. Patch by Nick Coghlan
3458
3459- Issue #6160: The bbox() method of tkinter.Spinbox now returns a tuple of
3460  integers instead of a string.  Based on patch by Guilherme Polo.
3461
3462- Issue #19403: contextlib.redirect_stdout is now reentrant
3463
3464- Issue #19286: Directories in ``package_data`` are no longer added to
3465  the filelist, preventing failure outlined in the ticket.
3466
3467- Issue #19480: HTMLParser now accepts all valid start-tag names as defined
3468  by the HTML5 standard.
3469
3470- Issue #15114: The html.parser module now raises a DeprecationWarning when the
3471  strict argument of HTMLParser or the HTMLParser.error method are used.
3472
3473- Issue #19410: Undo the special-casing removal of '' for
3474  importlib.machinery.FileFinder.
3475
3476- Issue #19424: Fix the warnings module to accept filename containing surrogate
3477  characters.
3478
3479- Issue #19435: Fix directory traversal attack on CGIHttpRequestHandler.
3480
3481- Issue #19227: Remove pthread_atfork() handler. The handler was added to
3482  solve #18747 but has caused issues.
3483
3484- Issue #19420: Fix reference leak in module initialization code of
3485  _hashopenssl.c
3486
3487- Issue #19329: Optimized compiling charsets in regular expressions.
3488
3489- Issue #19227: Try to fix deadlocks caused by re-seeding then OpenSSL
3490  pseudo-random number generator on fork().
3491
3492- Issue #16037: HTTPMessage.readheaders() raises an HTTPException when more than
3493  100 headers are read.  Adapted from patch by Jyrki Pulliainen.
3494
3495- Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to
3496  prevent readline() calls from consuming too much memory.  Patch by Jyrki
3497  Pulliainen.
3498
3499- Issue #16041: CVE-2013-1752: poplib: Limit maximum line lengths to 2048 to
3500  prevent readline() calls from consuming too much memory.  Patch by Jyrki
3501  Pulliainen.
3502
3503- Issue #17997: Change behavior of ``ssl.match_hostname()`` to follow RFC 6125,
3504  for security reasons.  It now doesn't match multiple wildcards nor wildcards
3505  inside IDN fragments.
3506
3507- Issue #16039: CVE-2013-1752: Change use of readline in imaplib module to limit
3508  line length.  Patch by Emil Lind.
3509
3510- Issue #19330: the unnecessary wrapper functions have been removed from the
3511  implementations of the new contextlib.redirect_stdout and
3512  contextlib.suppress context managers, which also ensures they provide
3513  reasonable help() output on instances
3514
3515- Issue #19393: Fix symtable.symtable function to not be confused when there are
3516  functions or classes named "top".
3517
3518- Issue #18685: Restore re performance to pre-PEP 393 levels.
3519
3520- Issue #19339: telnetlib module is now using time.monotonic() when available
3521  to compute timeout.
3522
3523- Issue #19399: fix sporadic test_subprocess failure.
3524
3525- Issue #13234: Fix os.listdir to work with extended paths on Windows.
3526  Patch by Santoso Wijaya.
3527
3528- Issue #19375: The site module adding a "site-python" directory to sys.path,
3529  if it exists, is now deprecated.
3530
3531- Issue #19379: Lazily import linecache in the warnings module, to make
3532  startup with warnings faster until a warning gets printed.
3533
3534- Issue #19288: Fixed the "in" operator of dbm.gnu databases for string
3535  argument.  Original patch by Arfrever Frehtes Taifersar Arahesis.
3536
3537- Issue #19287: Fixed the "in" operator of dbm.ndbm databases for string
3538  argument.  Original patch by Arfrever Frehtes Taifersar Arahesis.
3539
3540- Issue #19327: Fixed the working of regular expressions with too big charset.
3541
3542- Issue #17400: New 'is_global' attribute for ipaddress to tell if an address
3543  is allocated by IANA for global or private networks.
3544
3545- Issue #19350: Increasing the test coverage of macurl2path. Patch by Colin
3546  Williams.
3547
3548- Issue #19365: Optimized the parsing of long replacement string in re.sub*()
3549  functions.
3550
3551- Issue #19352: Fix unittest discovery when a module can be reached
3552  through several paths (e.g. under Debian/Ubuntu with virtualenv).
3553
3554- Issue #15207: Fix mimetypes to read from correct part of Windows registry
3555  Original patch by Dave Chambers
3556
3557- Issue #16595: Add prlimit() to resource module.
3558
3559- Issue #19324: Expose Linux-specific constants in resource module.
3560
3561- Load SSL's error strings in hashlib.
3562
3563- Issue #18527: Upgrade internal copy of zlib to 1.2.8.
3564
3565- Issue #19274: Add a filterfunc parameter to PyZipFile.writepy.
3566
3567- Issue #8964: fix platform._sys_version to handle IronPython 2.6+.
3568  Patch by Martin Matusiak.
3569
3570- Issue #19413: Restore pre-3.3 reload() semantics of re-finding modules.
3571
3572- Issue #18958: Improve error message for json.load(s) while passing a string
3573  that starts with a UTF-8 BOM.
3574
3575- Issue #19307: Improve error message for json.load(s) while passing objects
3576  of the wrong type.
3577
3578- Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by
3579  limiting the call to readline().  Original patch by Michał
3580  Jastrzębski and Giampaolo Rodola.
3581
3582- Issue #17087: Improved the repr for regular expression match objects.
3583
3584Tests
3585-----
3586
3587- Issue #19664: test_userdict's repr test no longer depends on the order
3588  of dict elements.
3589
3590- Issue #19440: Clean up test_capi by removing an unnecessary __future__
3591  import, converting from test_main to unittest.main, and running the
3592  _testcapi module tests as subTests of a unittest TestCase method.
3593
3594- Issue #19378: the main dis module tests are now run with both stdout
3595  redirection *and* passing an explicit file parameter
3596
3597- Issue #19378: removed the not-actually-helpful assertInstructionMatches
3598  and assertBytecodeExactlyMatches helpers from bytecode_helper
3599
3600- Issue #18702: All skipped tests now reported as skipped.
3601
3602- Issue #19439: interpreter embedding tests are now executed on Windows
3603  (Patch by Zachary Ware)
3604
3605- Issue #19085: Added basic tests for all tkinter widget options.
3606
3607- Issue #19384: Fix test_py_compile for root user, patch by Claudiu Popa.
3608
3609Documentation
3610-------------
3611
3612- Issue #18326: Clarify that list.sort's arguments are keyword-only.  Also,
3613  attempt to reduce confusion in the glossary by not saying there are
3614  different "types" of arguments and parameters.
3615
3616Build
3617-----
3618
3619- Issue #19358: "make clinic" now runs the Argument Clinic preprocessor
3620  over all CPython source files.
3621
3622- Update SQLite to 3.8.1, xz to 5.0.5, and Tcl/Tk to 8.6.1 on Windows.
3623
3624- Issue #16632: Enable DEP and ASLR on Windows.
3625
3626- Issue #17791: Drop PREFIX and EXEC_PREFIX definitions from PC/pyconfig.h
3627
3628- Add workaround for VS 2010 nmake clean issue. VS 2010 doesn't set up PATH
3629  for nmake.exe correctly.
3630
3631- Issue #19550: Implement Windows installer changes of PEP 453 (ensurepip).
3632
3633- Issue #19520: Fix compiler warning in the _sha3 module on 32bit Windows.
3634
3635- Issue #19356: Avoid using a C variabled named "_self", it's a reserved
3636  word in some C compilers.
3637
3638- Issue #15792: Correct build options on Win64. Patch by Jeremy Kloth.
3639
3640- Issue #19373: Apply upstream change to Tk 8.5.15 fixing OS X 10.9
3641  screen refresh problem for OS X installer build.
3642
3643- Issue #19649: On OS X, the same set of file names are now installed
3644  in bin directories for all configurations: non-framework vs framework,
3645  and single arch vs universal builds.  pythonx.y-32 is now always
3646  installed for 64-bit/32-bit universal builds.  The obsolete and
3647  undocumented pythonw* symlinks are no longer installed anywhere.
3648
3649- Issue #19553: PEP 453 - "make install" and "make altinstall" now install or
3650  upgrade pip by default, using the bundled pip provided by the new ensurepip
3651  module.  A new configure option, --with-ensurepip[=upgrade|install|no], is
3652  available to override the default ensurepip "--upgrade" option.  The option
3653  can also be set with "make [alt]install ENSUREPIP=[upgrade|install|no]".
3654
3655- Issue #19551: PEP 453 - the OS X installer now installs pip by default.
3656
3657- Update third-party libraries for OS X installers: xz 5.0.3 -> 5.0.5,
3658  SQLite 3.7.13 -> 3.8.1
3659
3660- Issue #15663: Revert OS X installer built-in Tcl/Tk support for 3.4.0b1.
3661  Some third-party projects, such as Matplotlib and PIL/Pillow,
3662  depended on being able to build with Tcl and Tk frameworks in
3663  /Library/Frameworks.
3664
3665Tools/Demos
3666-----------
3667
3668- Issue #19730: Argument Clinic now supports all the existing PyArg
3669  "format units" as legacy converters, as well as two new features:
3670  "self converters" and the "version" directive.
3671
3672- Issue #19552: pyvenv now bootstraps pip into virtual environments by
3673  default (pass --without-pip to request the old behaviour)
3674
3675- Issue #19390: Argument Clinic no longer accepts malformed Python
3676  and C ids.
3677
3678
3679What's New in Python 3.4.0 Alpha 4?
3680===================================
3681
3682Release date: 2013-10-20
3683
3684Core and Builtins
3685-----------------
3686
3687- Issue #19301: Give classes and functions that are explicitly marked global a
3688  global qualname.
3689
3690- Issue #19279: UTF-7 decoder no longer produces illegal strings.
3691
3692- Issue #16612: Add "Argument Clinic", a compile-time preprocessor for
3693  C files to generate argument parsing code.  (See PEP 436.)
3694
3695- Issue #18810: Shift stat calls in importlib.machinery.FileFinder such that
3696  the code is optimistic that if something exists in a directory named exactly
3697  like the possible package being searched for that it's in actuality a
3698  directory.
3699
3700- Issue #18416: importlib.machinery.PathFinder now treats '' as the cwd and
3701  importlib.machinery.FileFinder no longer special-cases '' to '.'. This leads
3702  to modules imported from cwd to now possess an absolute file path for
3703  __file__ (this does not affect modules specified by path on the CLI but it
3704  does affect -m/runpy). It also allows FileFinder to be more consistent by not
3705  having an edge case.
3706
3707- Issue #4555: All exported C symbols are now prefixed with either
3708  "Py" or "_Py".
3709
3710- Issue #19219: Speed up marshal.loads(), and make pyc files slightly
3711  (5% to 10%) smaller.
3712
3713- Issue #19221: Upgrade Unicode database to version 6.3.0.
3714
3715- Issue #16742: The result of the C callback PyOS_ReadlineFunctionPointer must
3716  now be a string allocated by PyMem_RawMalloc() or PyMem_RawRealloc() (or NULL
3717  if an error occurred), instead of a string allocated by PyMem_Malloc() or
3718  PyMem_Realloc().
3719
3720- Issue #19199: Remove ``PyThreadState.tick_counter`` field
3721
3722- Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at
3723  least one place so as to avoid regressions.
3724
3725- Issue #19087: Improve bytearray allocation in order to allow cheap popping
3726  of data at the front (slice deletion).
3727
3728- Issue #19014: memoryview.cast() is now allowed on zero-length views.
3729
3730- Issue #18690: memoryview is now automatically registered with
3731  collections.abc.Sequence
3732
3733- Issue #19078: memoryview now correctly supports the reversed builtin
3734  (Patch by Claudiu Popa)
3735
3736Library
3737-------
3738
3739- Issue #17457: unittest test discovery now works with namespace packages.
3740  Patch by Claudiu Popa.
3741
3742- Issue #18235: Fix the sysconfig variables LDSHARED and BLDSHARED under AIX.
3743  Patch by David Edelsohn.
3744
3745- Issue #18606: Add the new "statistics" module (PEP 450).  Contributed
3746  by Steven D'Aprano.
3747
3748- Issue #12866: The audioop module now supports 24-bit samples.
3749
3750- Issue #19254: Provide an optimized Python implementation of pbkdf2_hmac.
3751
3752- Issues #19201, Issue #19222, Issue #19223: Add "x" mode (exclusive creation)
3753  in opening file to bz2, gzip and lzma modules. Patches by Tim Heaney and
3754  Vajrasky Kok.
3755
3756- Fix a reference count leak in _sre.
3757
3758- Issue #19262: Initial check in of the 'asyncio' package (a.k.a. Tulip,
3759  a.k.a. PEP 3156).  There are no docs yet, and the PEP is slightly
3760  out of date with the code.  This module will have *provisional* status
3761  in Python 3.4.
3762
3763- Issue #19276: Fixed the wave module on 64-bit big-endian platforms.
3764
3765- Issue #19266: Rename the new-in-3.4 ``contextlib.ignore`` context manager
3766  to ``contextlib.suppress`` in order to be more consistent with existing
3767  descriptions of that operation elsewhere in the language and standard
3768  library documentation (Patch by Zero Piraeus).
3769
3770- Issue #18891: Completed the new email package (provisional) API additions
3771  by adding new classes EmailMessage, MIMEPart, and ContentManager.
3772
3773- Issue #18281: Unused stat constants removed from `tarfile`.
3774
3775- Issue #18999: Multiprocessing now supports 'contexts' with the same API
3776  as the module, but bound to specified start methods.
3777
3778- Issue #18468: The re.split, re.findall, and re.sub functions and the group()
3779  and groups() methods of match object now always return a string or a bytes
3780  object.
3781
3782- Issue #18725: The textwrap module now supports truncating multiline text.
3783
3784- Issue #18776: atexit callbacks now display their full traceback when they
3785  raise an exception.
3786
3787- Issue #17827: Add the missing documentation for ``codecs.encode`` and
3788  ``codecs.decode``.
3789
3790- Issue #19218: Rename collections.abc to _collections_abc in order to
3791  speed up interpreter start.
3792
3793- Issue #18582: Add 'pbkdf2_hmac' to the hashlib module. It implements PKCS#5
3794  password-based key derivation functions with HMAC as pseudorandom function.
3795
3796- Issue #19131: The aifc module now correctly reads and writes sampwidth of
3797  compressed streams.
3798
3799- Issue #19209: Remove import of copyreg from the os module to speed up
3800  interpreter startup. stat_result and statvfs_result are now hard-coded to
3801  reside in the os module.
3802
3803- Issue #19205: Don't import the 're' module in site and sysconfig module to
3804  speed up interpreter start.
3805
3806- Issue #9548: Add a minimal "_bootlocale" module that is imported by the
3807  _io module instead of the full locale module.
3808
3809- Issue #18764: Remove the 'print' alias for the PDB 'p' command so that it no
3810  longer shadows the print function.
3811
3812- Issue #19158: A rare race in BoundedSemaphore could allow .release() too
3813  often.
3814
3815- Issue #15805: Add contextlib.redirect_stdout().
3816
3817- Issue #18716: Deprecate the formatter module.
3818
3819- Issue #10712: 2to3 has a new "asserts" fixer that replaces deprecated names
3820  of unittest methods (e.g. failUnlessEqual -> assertEqual).
3821
3822- Issue #18037: 2to3 now escapes ``'\u'`` and ``'\U'`` in native strings.
3823
3824- Issue #17839: base64.decodebytes and base64.encodebytes now accept any
3825  object that exports a 1 dimensional array of bytes (this means the same
3826  is now also true for base64_codec)
3827
3828- Issue #19132: The pprint module now supports compact mode.
3829
3830- Issue #19137: The pprint module now correctly formats instances of set and
3831  frozenset subclasses.
3832
3833- Issue #10042: functools.total_ordering now correctly handles
3834  NotImplemented being returned by the underlying comparison function (Patch
3835  by Katie Miller)
3836
3837- Issue #19092: contextlib.ExitStack now correctly reraises exceptions
3838  from the __exit__ callbacks of inner context managers (Patch by Hrvoje
3839  Nikšić)
3840
3841- Issue #12641: Avoid passing "-mno-cygwin" to the mingw32 compiler, except
3842  when necessary.  Patch by Oscar Benjamin.
3843
3844- Issue #5845: In site.py, only load readline history from ~/.python_history
3845  if no history has been read already.  This avoids double writes to the
3846  history file at shutdown.
3847
3848- Properly initialize all fields of a SSL object after allocation.
3849
3850- Issue #19095: SSLSocket.getpeercert() now raises ValueError when the
3851  SSL handshake hasn't been done.
3852
3853- Issue #4366: Fix building extensions on all platforms when --enable-shared
3854  is used.
3855
3856- Issue #19030: Fixed `inspect.getmembers` and `inspect.classify_class_attrs`
3857  to attempt activating descriptors before falling back to a __dict__ search
3858  for faulty descriptors.  `inspect.classify_class_attrs` no longer returns
3859  Attributes whose home class is None.
3860
3861C API
3862-----
3863
3864- Issue #1772673: The type of `char*` arguments now changed to `const char*`.
3865
3866- Issue #16129: Added a `Py_SetStandardStreamEncoding` pre-initialization API
3867  to allow embedding applications like Blender to force a particular
3868  encoding and error handler for the standard IO streams (initial patch by
3869  Bastien Montagne)
3870
3871Tests
3872-----
3873
3874- Issue #19275: Fix test_site on AMD64 Snow Leopard
3875
3876- Issue #14407: Fix unittest test discovery in test_concurrent_futures.
3877
3878- Issue #18919: Unified and extended tests for audio modules: aifc, sunau and
3879  wave.
3880
3881- Issue #18714: Added tests for ``pdb.find_function()``.
3882
3883Documentation
3884-------------
3885
3886- Issue #18758: Fixed and improved cross-references.
3887
3888- Issue #18972: Modernize email examples and use the argparse module in them.
3889
3890Build
3891-----
3892
3893- Issue #19130: Correct PCbuild/readme.txt, Python 3.3 and 3.4 require VS 2010.
3894
3895- Issue #15663: Update OS X 10.6+ installer to use Tcl/Tk 8.5.15.
3896
3897- Issue #14499: Fix several problems with OS X universal build support:
3898    1. ppc arch detection for extension module builds broke with Xcode 5
3899    2. ppc arch detection in configure did not work on OS X 10.4
3900    3. -sysroot and -arch flags were unnecessarily duplicated
3901    4. there was no obvious way to configure an intel-32 only build.
3902
3903- Issue #19019: Change the OS X installer build script to use CFLAGS instead
3904  of OPT for special build options.  By setting OPT, some compiler-specific
3905  options like -fwrapv were overridden and thus not used, which could result
3906  in broken interpreters when building with clang.
3907
3908
3909What's New in Python 3.4.0 Alpha 3?
3910===================================
3911
3912Release date: 2013-09-29
3913
3914Core and Builtins
3915-----------------
3916
3917- Issue #18818: The "encodingname" part of PYTHONIOENCODING is now optional.
3918
3919- Issue #19098: Prevent overflow in the compiler when the recursion limit is set
3920  absurdly high.
3921
3922Library
3923-------
3924
3925- Issue #18929: `inspect.classify_class_attrs()` now correctly finds class
3926  attributes returned by `dir()` that are located in the metaclass.
3927
3928- Issue #18950: Fix miscellaneous bugs in the sunau module.
3929  Au_read.readframes() now updates current file position and reads correct
3930  number of frames from multichannel stream.  Au_write.writeframesraw() now
3931  correctly updates current file position.  Au_read.getnframes() now returns an
3932  integer (as in Python 2).  Au_read and Au_write now correctly works with file
3933  object if start file position is not a zero.
3934
3935- Issue #18594: The fast path for collections.Counter() was never taken
3936  due to an over-restrictive type check.
3937
3938- Issue #19053: ZipExtFile.read1() with non-zero argument no more returns empty
3939  bytes until end of data.
3940
3941- logging: added support for Unix domain sockets to SocketHandler and
3942  DatagramHandler.
3943
3944- Issue #18996: TestCase.assertEqual() now more cleverly shorten differing
3945  strings in error report.
3946
3947- Issue #19034: repr() for tkinter.Tcl_Obj now exposes string reperesentation.
3948
3949- Issue #18978: ``urllib.request.Request`` now allows the method to be
3950  indicated on the class and no longer sets it to None in ``__init__``.
3951
3952- Issue #18626: the inspect module now offers a basic command line
3953  introspection interface (Initial patch by Claudiu Popa)
3954
3955- Issue #3015: Fixed tkinter with wantobject=False.  Any Tcl command call
3956  returned empty string.
3957
3958- Issue #19037: The mailbox module now makes all changes to maildir files
3959  before moving them into place, to avoid race conditions with other programs
3960  that may be accessing the maildir directory.
3961
3962- Issue #14984: On POSIX systems, when netrc is called without a filename
3963  argument (and therefore is reading the user's $HOME/.netrc file), it now
3964  enforces the same security rules as typical ftp clients: the .netrc file must
3965  be owned by the user that owns the process and must not be readable by any
3966  other user.
3967
3968- Issue #18873: The tokenize module now detects Python source code encoding
3969  only in comment lines.
3970
3971- Issue #17764: Enable http.server to bind to a user specified network
3972  interface.  Patch contributed by Malte Swart.
3973
3974- Issue #18937: Add an assertLogs() context manager to unittest.TestCase
3975  to ensure that a block of code emits a message using the logging module.
3976
3977- Issue #17324: Fix http.server's request handling case on trailing '/'. Patch
3978  contributed by Vajrasky Kok.
3979
3980- Issue #19018: The heapq.merge() function no longer suppresses IndexError
3981  in the underlying iterables.
3982
3983- Issue #18784: The uuid module no longer attempts to load libc via ctypes.CDLL
3984  if all the necessary functions have already been found in libuuid.  Patch by
3985  Evgeny Sologubov.
3986
3987- The :envvar:`PYTHONFAULTHANDLER` environment variable now only enables the
3988  faulthandler module if the variable is non-empty. Same behaviour than other
3989  variables like :envvar:`PYTHONDONTWRITEBYTECODE`.
3990
3991- Issue #1565525: New function ``traceback.clear_frames`` will clear
3992  the local variables of all the stack frames referenced by a traceback
3993  object.
3994
3995Tests
3996-----
3997
3998- Issue #18952: Fix regression in support data downloads introduced when
3999  test.support was converted to a package. Regression noticed by Zachary
4000  Ware.
4001
4002IDLE
4003----
4004
4005- Issue #18873: IDLE now detects Python source code encoding only in comment
4006  lines.
4007
4008- Issue #18988: The "Tab" key now works when a word is already autocompleted.
4009
4010Documentation
4011-------------
4012
4013- Issue #17003: Unified the size argument names in the io module with common
4014  practice.
4015
4016Build
4017-----
4018
4019- Issue #18596: Support the use of address sanity checking in recent versions
4020  of clang and GCC by appropriately marking known false alarms in the small
4021  object allocator. Patch contributed by Dhiru Kholia.
4022
4023Tools/Demos
4024-----------
4025
4026- Issue #18873: 2to3 and the findnocoding.py script now detect Python source
4027  code encoding only in comment lines.
4028
4029
4030What's New in Python 3.4.0 Alpha 2?
4031===================================
4032
4033Release date: 2013-09-09
4034
4035Core and Builtins
4036-----------------
4037
4038- Issue #18942: sys._debugmallocstats() output was damaged on Windows.
4039
4040- Issue #18571: Implementation of the PEP 446: file descriptors and file
4041  handles are now created non-inheritable; add functions
4042  os.get/set_inheritable(), os.get/set_handle_inheritable() and
4043  socket.socket.get/set_inheritable().
4044
4045- Issue #11619: The parser and the import machinery do not encode Unicode
4046  filenames anymore on Windows.
4047
4048- Issue #18808: Non-daemon threads are now automatically joined when
4049  a sub-interpreter is shutdown (it would previously dump a fatal error).
4050
4051- Remove support for compiling on systems without getcwd().
4052
4053- Issue #18774: Remove last bits of GNU PTH thread code and thread_pth.h.
4054
4055- Issue #18771: Add optimization to set object lookups to reduce the cost
4056  of hash collisions.  The core idea is to inspect a second key/hash pair
4057  for each cache line retrieved.
4058
4059- Issue #16105: When a signal handler fails to write to the file descriptor
4060  registered with ``signal.set_wakeup_fd()``, report an exception instead
4061  of ignoring the error.
4062
4063- Issue #18722: Remove uses of the "register" keyword in C code.
4064
4065- Issue #18667: Add missing "HAVE_FCHOWNAT" symbol to posix._have_functions.
4066
4067- Issue #16499: Add command line option for isolated mode.
4068
4069- Issue #15301: Parsing fd, uid, and gid parameters for builtins
4070  in Modules/posixmodule.c is now far more robust.
4071
4072- Issue #18368: PyOS_StdioReadline() no longer leaks memory when realloc()
4073  fail.
4074
4075- Issue #17934: Add a clear() method to frame objects, to help clean up
4076  expensive details (local variables) and break reference cycles.
4077
4078- Issue #18780: %-formatting codes %d, %i, and %u now treat int-subclasses
4079  as int (displays value of int-subclass instead of str(int-subclass) ).
4080
4081Library
4082-------
4083
4084- Issue #18808: Thread.join() now waits for the underlying thread state to
4085  be destroyed before returning.  This prevents unpredictable aborts in
4086  Py_EndInterpreter() when some non-daemon threads are still running.
4087
4088- Issue #18458: Prevent crashes with newer versions of libedit.  Its readline
4089  emulation has changed from 0-based indexing to 1-based like gnu readline.
4090
4091- Issue #18852: Handle case of ``readline.__doc__`` being ``None`` in the new
4092  readline activation code in ``site.py``.
4093
4094- Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in
4095  the _sre module.
4096
4097- Issue #18830: inspect.getclasstree() no longer produces duplicate entries even
4098  when input list contains duplicates.
4099
4100- Issue #18878: sunau.open now supports the context management protocol.  Based on
4101  patches by Claudiu Popa and R. David Murray.
4102
4103- Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast
4104  64-bit pointer to long (32 bits).
4105
4106- Issue #18876: The FileIO.mode attribute now better reflects the actual mode
4107  under which the file was opened.  Patch by Erik Bray.
4108
4109- Issue #16853: Add new selectors module.
4110
4111- Issue #18882: Add threading.main_thread() function.
4112
4113- Issue #18901: The sunau getparams method now returns a namedtuple rather than
4114  a plain tuple.  Patch by Claudiu Popa.
4115
4116- Issue #17487: The result of the wave getparams method now is pickleable again.
4117  Patch by Claudiu Popa.
4118
4119- Issue #18756: os.urandom() now uses a lazily-opened persistent file
4120  descriptor, so as to avoid using many file descriptors when run in
4121  parallel from multiple threads.
4122
4123- Issue #18418: After fork(), reinit all threads states, not only active ones.
4124  Patch by A. Jesse Jiryu Davis.
4125
4126- Issue #17974: Switch unittest from using getopt to using argparse.
4127
4128- Issue #11798: TestSuite now drops references to own tests after execution.
4129
4130- Issue #16611: http.cookie now correctly parses the 'secure' and 'httponly'
4131  cookie flags.
4132
4133- Issue #11973: Fix a problem in kevent. The flags and fflags fields are now
4134  properly handled as unsigned.
4135
4136- Issue #18807: ``pyvenv`` now takes a --copies argument allowing copies
4137  instead of symlinks even where symlinks are available and the default.
4138
4139- Issue #18538: ``python -m dis`` now uses argparse for argument processing.
4140  Patch by Michele Orrù.
4141
4142- Issue #18394: Close cgi.FieldStorage's optional file.
4143
4144- Issue #17702: On error, os.environb now suppresses the exception context
4145  when raising a new KeyError with the original key.
4146
4147- Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6.
4148
4149- Issue #16809: Tkinter's splitlist() and split() methods now accept Tcl_Obj
4150  argument.
4151
4152- Issue #18324: set_payload now correctly handles binary input.  This also
4153  supersedes the previous fixes for #14360, #1717, and #16564.
4154
4155- Issue #18794: Add a fileno() method and a closed attribute to select.devpoll
4156  objects.
4157
4158- Issue #17119: Fixed integer overflows when processing large strings and tuples
4159  in the tkinter module.
4160
4161- Issue #18747: Re-seed OpenSSL's pseudo-random number generator after fork.
4162  A pthread_atfork() parent handler is used to seed the PRNG with pid, time
4163  and some stack data.
4164
4165- Issue #8865: Concurrent invocation of select.poll.poll() now raises a
4166  RuntimeError exception.  Patch by Christian Schubert.
4167
4168- Issue #18777: The ssl module now uses the new CRYPTO_THREADID API of
4169  OpenSSL 1.0.0+ instead of the deprecated CRYPTO id callback function.
4170
4171- Issue #18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok.
4172
4173- Issue #18178: Fix ctypes on BSD. dlmalloc.c was compiled twice which broke
4174  malloc weak symbols.
4175
4176- Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes
4177  inside subjectAltName correctly. Formerly the module has used OpenSSL's
4178  GENERAL_NAME_print() function to get the string representation of ASN.1
4179  strings for ``rfc822Name`` (email), ``dNSName`` (DNS) and
4180  ``uniformResourceIdentifier`` (URI).
4181
4182- Issue #18701: Remove support of old CPython versions (<3.0) from C code.
4183
4184- Issue #18756: Improve error reporting in os.urandom() when the failure
4185  is due to something else than /dev/urandom not existing (for example,
4186  exhausting the file descriptor limit).
4187
4188- Issue #18673: Add O_TMPFILE to os module. O_TMPFILE requires Linux kernel
4189  3.11 or newer. It's only defined on system with 3.11 uapi headers, too.
4190
4191- Issue #18532: Change the builtin hash algorithms' names to lower case names
4192  as promised by hashlib's documentation.
4193
4194- Issue #8713: add new spwan and forkserver start methods, and new functions
4195  get_all_start_methods, get_start_method, and set_start_method, to
4196  multiprocessing.
4197
4198- Issue #18405: Improve the entropy of crypt.mksalt().
4199
4200- Issue #12015: The tempfile module now uses a suffix of 8 random characters
4201  instead of 6, to reduce the risk of filename collision. The entropy was
4202  reduced when uppercase letters were removed from the charset used to generate
4203  random characters.
4204
4205- Issue #18585: Add :func:`textwrap.shorten` to collapse and truncate a
4206  piece of text to a given length.
4207
4208- Issue #18598: Tweak exception message for importlib.import_module() to
4209  include the module name when a key argument is missing.
4210
4211- Issue #19151: Fix docstring and use of _get_supported_file_loaders() to
4212  reflect 2-tuples.
4213
4214- Issue #19152: Add ExtensionFileLoader.get_filename().
4215
4216- Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get
4217  docstrings and ValueError messages. Patch by Zhongyue Luo
4218
4219- Fix refcounting issue with extension types in tkinter.
4220
4221- Issue #8112: xlmrpc.server's DocXMLRPCServer server no longer raises an error
4222  if methods have annotations; it now correctly displays the annotations.
4223
4224- Issue #18600: Added policy argument to email.message.Message.as_string,
4225  and as_bytes and __bytes__ methods to Message.
4226
4227- Issue #18671: Output more information when logging exceptions occur.
4228
4229- Issue #18621: Prevent the site module's patched builtins from keeping
4230  too many references alive for too long.
4231
4232- Issue #4885: Add weakref support to mmap objects.  Patch by Valerie Lambert.
4233
4234- Issue #8860: Fixed rounding in timedelta constructor.
4235
4236- Issue #18849: Fixed a Windows-specific tempfile bug where collision with an
4237  existing directory caused mkstemp and related APIs to fail instead of
4238  retrying. Report and fix by Vlad Shcherbina.
4239
4240- Issue #18920: argparse's default destination for the version action (-v,
4241  --version) has also been changed to stdout, to match the Python executable.
4242
4243Tests
4244-----
4245
4246- Issue #18623: Factor out the _SuppressCoreFiles context manager into
4247  test.support.  Patch by Valerie Lambert.
4248
4249- Issue #12037: Fix test_email for desktop Windows.
4250
4251- Issue #15507: test_subprocess's test_send_signal could fail if the test
4252  runner were run in an environment where the process inherited an ignore
4253  setting for SIGINT.  Restore the SIGINT handler to the desired
4254  KeyboardInterrupt raising one during that test.
4255
4256- Issue #16799: Switched from getopt to argparse style in regrtest's argument
4257  parsing.  Added more tests for regrtest's argument parsing.
4258
4259- Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as
4260  possible, since "localhost" goes through a DNS lookup under recent Windows
4261  versions.
4262
4263IDLE
4264----
4265
4266- Issue #18489: Add tests for SearchEngine. Original patch by Phil Webster.
4267
4268Documentation
4269-------------
4270
4271- Issue #18743: Fix references to non-existent "StringIO" module.
4272
4273- Issue #18783: Removed existing mentions of Python long type in docstrings,
4274  error messages and comments.
4275
4276Build
4277-----
4278
4279- Issue #1584: Provide configure options to override default search paths for
4280  Tcl and Tk when building _tkinter.
4281
4282- Issue #15663: Tcl/Tk 8.5.14 is now included with the OS X 10.6+ 64-/32-bit
4283  installer.  It is no longer necessary to install a third-party version of
4284  Tcl/Tk 8.5 to work around the problems in the Apple-supplied Tcl/Tk 8.5
4285  shipped in OS X 10.6 and later releases.
4286
4287Tools/Demos
4288-----------
4289
4290- Issue #18922: Now The Lib/smtpd.py and Tools/i18n/msgfmt.py scripts write
4291  their version strings to stdout, and not to sderr.
4292
4293
4294What's New in Python 3.4.0 Alpha 1?
4295===================================
4296
4297Release date: 2013-08-03
4298
4299Core and Builtins
4300-----------------
4301
4302- Issue #16741: Fix an error reporting in int().
4303
4304- Issue #17899: Fix rare file descriptor leak in os.listdir().
4305
4306- Issue #10241: Clear extension module dict copies at interpreter shutdown.
4307  Patch by Neil Schemenauer, minimally modified.
4308
4309- Issue #9035: ismount now recognises volumes mounted below a drive root
4310  on Windows. Original patch by Atsuo Ishimoto.
4311
4312- Issue #18214: Improve finalization of Python modules to avoid setting
4313  their globals to None, in most cases.
4314
4315- Issue #18112: PEP 442 implementation (safe object finalization).
4316
4317- Issue #18552: Check return value of PyArena_AddPyObject() in
4318  obj2ast_object().
4319
4320- Issue #18560: Fix potential NULL pointer dereference in sum().
4321
4322- Issue #18520: Add a new PyStructSequence_InitType2() function, same than
4323  PyStructSequence_InitType() except that it has a return value (0 on success,
4324  -1 on error).
4325
4326- Issue #15905: Fix theoretical buffer overflow in handling of sys.argv[0],
4327  prefix and exec_prefix if the operation system does not obey MAXPATHLEN.
4328
4329- Issue #18408: Fix many various bugs in code handling errors, especially
4330  on memory allocation failure (MemoryError).
4331
4332- Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all().
4333
4334- Issue #18342: Use the repr of a module name when an import fails when using
4335  ``from ... import ...``.
4336
4337- Issue #17872: Fix a segfault in marshal.load() when input stream returns
4338  more bytes than requested.
4339
4340- Issue #18338: `python --version` now prints version string to stdout, and
4341  not to stderr.  Patch by Berker Peksag and Michael Dickens.
4342
4343- Issue #18426: Fix NULL pointer dereference in C extension import when
4344  PyModule_GetDef() returns an error.
4345
4346- Issue #17206: On Windows, increase the stack size from 2 MB to 4.2 MB to fix
4347  a stack overflow in the marshal module (fix a crash in test_marshal).
4348  Patch written by Jeremy Kloth.
4349
4350- Issue #3329: Implement the PEP 445: Add new APIs to customize Python memory
4351  allocators.
4352
4353- Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the
4354  tstate is first removed from TLS and then deallocated.
4355
4356- Issue #13483: Use VirtualAlloc in obmalloc on Windows.
4357
4358- Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
4359  OverflowError when an argument of %c format is out of range.
4360
4361- Issue #18111: The min() and max() functions now support a default argument
4362  to be returned instead of raising a ValueError on an empty sequence.
4363  (Contributed by Julian Berman.)
4364
4365- Issue #18137: Detect integer overflow on precision in float.__format__()
4366  and complex.__format__().
4367
4368- Issue #18183: Fix various unicode operations on strings with large unicode
4369  codepoints.
4370
4371- Issue #18180: Fix ref leak in _PyImport_GetDynLoadWindows().
4372
4373- Issue #18038: SyntaxError raised during compilation sources with illegal
4374  encoding now always contains an encoding name.
4375
4376- Issue #17931: Resolve confusion on Windows between pids and process
4377  handles.
4378
4379- Tweak the exception message when the magic number or size value in a bytecode
4380  file is truncated.
4381
4382- Issue #17932: Fix an integer overflow issue on Windows 64-bit in iterators:
4383  change the C type of seqiterobject.it_index from long to Py_ssize_t.
4384
4385- Issue #18065: Don't set __path__ to the package name for frozen packages.
4386
4387- Issue #18088: When reloading a module, unconditionally reset all relevant
4388  attributes on the module (e.g. __name__, __loader__, __package__, __file__,
4389  __cached__).
4390
4391- Issue #17937: Try harder to collect cyclic garbage at shutdown.
4392
4393- Issue #12370: Prevent class bodies from interfering with the __class__
4394  closure.
4395
4396- Issue #17644: Fix a crash in str.format when curly braces are used in square
4397  brackets.
4398
4399- Issue #17237: Fix crash in the ASCII decoder on m68k.
4400
4401- Issue #17927: Frame objects kept arguments alive if they had been
4402  copied into a cell, even if the cell was cleared.
4403
4404- Issue #1545463: At shutdown, defer finalization of codec modules so
4405  that stderr remains usable.
4406
4407- Issue #7330: Implement width and precision (ex: "%5.3s") for the format
4408  string of PyUnicode_FromFormat() function, original patch written by Ysj Ray.
4409
4410- Issue #1545463: Global variables caught in reference cycles are now
4411  garbage-collected at shutdown.
4412
4413- Issue #17094: Clear stale thread states after fork().  Note that this
4414  is a potentially disruptive change since it may release some system
4415  resources which would otherwise remain perpetually alive (e.g. database
4416  connections kept in thread-local storage).
4417
4418- Issue #17408: Avoid using an obsolete instance of the copyreg module when
4419  the interpreter is shutdown and then started again.
4420
4421- Issue #5845: Enable tab-completion in the interactive interpreter by
4422  default, thanks to a new sys.__interactivehook__.
4423
4424- Issue #17115,17116: Module initialization now includes setting __package__ and
4425  __loader__ attributes to None.
4426
4427- Issue #17853: Ensure locals of a class that shadow free variables always win
4428  over the closures.
4429
4430- Issue #17863: In the interactive console, don't loop forever if the encoding
4431  can't be fetched from stdin.
4432
4433- Issue #17867: Raise an ImportError if __import__ is not found in __builtins__.
4434
4435- Issue #18698: Ensure importlib.reload() returns the module out of sys.modules.
4436
4437- Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
4438  such as was shipped with Centos 5 and Mac OS X 10.4.
4439
4440- Issue #17413: sys.settrace callbacks were being passed a string instead of an
4441  exception instance for the 'value' element of the arg tuple if the exception
4442  originated from C code; now an exception instance is always provided.
4443
4444- Issue #17782: Fix undefined behaviour on platforms where
4445  ``struct timespec``'s "tv_nsec" member is not a C long.
4446
4447- Issue #17722: When looking up __round__, resolve descriptors.
4448
4449- Issue #16061: Speed up str.replace() for replacing 1-character strings.
4450
4451- Issue #17715: Fix segmentation fault from raising an exception in a __trunc__
4452  method.
4453
4454- Issue #17643: Add __callback__ attribute to weakref.ref.
4455
4456- Issue #16447: Fixed potential segmentation fault when setting __name__ on a
4457  class.
4458
4459- Issue #17669: Fix crash involving finalization of generators using yield from.
4460
4461- Issue #14439: Python now prints the traceback on runpy failure at startup.
4462
4463- Issue #17469: Fix _Py_GetAllocatedBlocks() and sys.getallocatedblocks()
4464  when running on valgrind.
4465
4466- Issue #17619: Make input() check for Ctrl-C correctly on Windows.
4467
4468- Issue #17357: Add missing verbosity messages for -v/-vv that were lost during
4469  the importlib transition.
4470
4471- Issue #17610: Don't rely on non-standard behavior of the C qsort() function.
4472
4473- Issue #17323: The "[X refs, Y blocks]" printed by debug builds has been
4474  disabled by default.  It can be re-enabled with the `-X showrefcount` option.
4475
4476- Issue #17328: Fix possible refleak in dict.setdefault.
4477
4478- Issue #17275: Corrected class name in init error messages of the C version of
4479  BufferedWriter and BufferedRandom.
4480
4481- Issue #7963: Fixed misleading error message that issued when object is
4482  called without arguments.
4483
4484- Issue #8745: Small speed up zipimport on Windows. Patch by Catalin Iacob.
4485
4486- Issue #5308: Raise ValueError when marshalling too large object (a sequence
4487  with size >= 2**31), instead of producing illegal marshal data.
4488
4489- Issue #12983: Bytes literals with invalid ``\x`` escape now raise a SyntaxError
4490  and a full traceback including line number.
4491
4492- Issue #16967: In function definition, evaluate positional defaults before
4493  keyword-only defaults.
4494
4495- Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.)
4496  in the interpreter.
4497
4498- Issue #17137: When an Unicode string is resized, the internal wide character
4499  string (wstr) format is now cleared.
4500
4501- Issue #17043: The unicode-internal decoder no longer read past the end of
4502  input buffer.
4503
4504- Issue #17098: All modules now have __loader__ set even if they pre-exist the
4505  bootstrapping of importlib.
4506
4507- Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.
4508
4509- Issue #16772: The base argument to the int constructor no longer accepts
4510  floats, or other non-integer objects with an __int__ method.  Objects
4511  with an __index__ method are now accepted.
4512
4513- Issue #10156: In the interpreter's initialization phase, unicode globals
4514  are now initialized dynamically as needed.
4515
4516- Issue #16980: Fix processing of escaped non-ascii bytes in the
4517  unicode-escape-decode decoder.
4518
4519- Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
4520
4521- Issue #14850: Now a charmap decoder treats U+FFFE as "undefined mapping"
4522  in any mapping, not only in a string.
4523
4524- Issue #16613: Add *m* argument to ``collections.Chainmap.new_child`` to
4525  allow the new child map to be specified explicitly.
4526
4527- Issue #16730: importlib.machinery.FileFinder now no longers raises an
4528  exception when trying to populate its cache and it finds out the directory is
4529  unreadable or has turned into a file. Reported and diagnosed by
4530  David Pritchard.
4531
4532- Issue #16906: Fix a logic error that prevented most static strings from being
4533  cleared.
4534
4535- Issue #11461: Fix the incremental UTF-16 decoder. Original patch by
4536  Amaury Forgeot d'Arc.
4537
4538- Issue #16856: Fix a segmentation fault from calling repr() on a dict with
4539  a key whose repr raise an exception.
4540
4541- Issue #16367: Fix FileIO.readall() on Windows for files larger than 2 GB.
4542
4543- Issue #16761: Calling int() with base argument only now raises TypeError.
4544
4545- Issue #16759: Support the full DWORD (unsigned long) range in Reg2Py
4546  when retrieving a REG_DWORD value. This corrects functions like
4547  winreg.QueryValueEx that may have been returning truncated values.
4548
4549- Issue #14420: Support the full DWORD (unsigned long) range in Py2Reg
4550  when passed a REG_DWORD value. Fixes OverflowError in winreg.SetValueEx.
4551
4552- Issue #11939: Set the st_dev attribute of stat_result to allow Windows to
4553  take advantage of the os.path.samefile/sameopenfile/samestat implementations
4554  used by other platforms.
4555
4556- Issue #16772: The int() constructor's second argument (base) no longer
4557  accepts non integer values.  Consistent with the behavior in Python 2.
4558
4559- Issue #14470: Remove w9xpopen support per PEP 11.
4560
4561- Issue #9856: Replace deprecation warning with raising TypeError
4562  in object.__format__. Patch by Florent Xicluna.
4563
4564- Issue #16597: In buffered and text IO, call close() on the underlying stream
4565  if invoking flush() fails.
4566
4567- Issue #16722: In the bytes() constructor, try to call __bytes__ on the
4568  argument before __index__.
4569
4570- Issue #16421: loading multiple modules from one shared object is now
4571  handled correctly (previously, the first module loaded from that file
4572  was silently returned). Patch by Václav Šmilauer.
4573
4574- Issue #16602: When a weakref's target was part of a long deallocation
4575  chain, the object could remain reachable through its weakref even though
4576  its refcount had dropped to zero.
4577
4578- Issue #16495: Remove extraneous NULL encoding check from bytes_decode().
4579
4580- Issue #16619: Create NameConstant AST class to represent None, True, and False
4581  literals. As a result, these constants are never loaded at runtime from
4582  builtins.
4583
4584- Issue #16455: On FreeBSD and Solaris, if the locale is C, the
4585  ASCII/surrogateescape codec is now used (instead of the locale encoding) to
4586  decode the command line arguments. This change fixes inconsistencies with
4587  os.fsencode() and os.fsdecode(), because these operating systems announce an
4588  ASCII locale encoding, but actually use the ISO-8859-1 encoding in practice.
4589
4590- Issue #16562: Optimize dict equality testing.  Patch by Serhiy Storchaka.
4591
4592- Issue #16588: Silence unused-but-set warnings in Python/thread_pthread
4593
4594- Issue #16592: stringlib_bytes_join doesn't raise MemoryError on allocation
4595  failure.
4596
4597- Issue #16546: Fix: ast.YieldFrom argument is now mandatory.
4598
4599- Issue #16514: Fix regression causing a traceback when sys.path[0] is None
4600  (actually, any non-string or non-bytes type).
4601
4602- Issue #16306: Fix multiple error messages when unknown command line
4603  parameters where passed to the interpreter.  Patch by Hieu Nguyen.
4604
4605- Issue #16215: Fix potential double memory free in str.replace().  Patch
4606  by Serhiy Storchaka.
4607
4608- Issue #16290: A float return value from the __complex__ special method is no
4609  longer accepted in the complex() constructor.
4610
4611- Issue #16416: On Mac OS X, operating system data are now always
4612  encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding
4613  (which may be ASCII if no locale environment variable is set), to avoid
4614  inconsistencies with os.fsencode() and os.fsdecode() functions which are
4615  already using UTF-8/surrogateescape.
4616
4617- Issue #16453: Fix equality testing of dead weakref objects.
4618
4619- Issue #9535: Fix pending signals that have been received but not yet
4620  handled by Python to not persist after os.fork() in the child process.
4621
4622- Issue #14794: Fix slice.indices to return correct results for huge values,
4623  rather than raising OverflowError.
4624
4625- Issue #15001: fix segfault on "del sys.modules['__main__']". Patch by Victor
4626  Stinner.
4627
4628- Issue #8271: the utf-8 decoder now outputs the correct number of U+FFFD
4629  characters when used with the 'replace' error handler on invalid utf-8
4630  sequences.  Patch by Serhiy Storchaka, tests by Ezio Melotti.
4631
4632- Issue #5765: Apply a hard recursion limit in the compiler instead of
4633  blowing the stack and segfaulting. Initial patch by Andrea Griffini.
4634
4635- Issue #16402: When slicing a range, fix shadowing of exceptions from
4636  __index__.
4637
4638- Issue #16336: fix input checking in the surrogatepass error handler.
4639  Patch by Serhiy Storchaka.
4640
4641- Issue #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now
4642  raises an error.
4643
4644- Issue #7317: Display full tracebacks when an error occurs asynchronously.
4645  Patch by Alon Horev with update by Alexey Kachayev.
4646
4647- Issue #16309: Make PYTHONPATH="" behavior the same as if PYTHONPATH
4648  not set at all.
4649
4650- Issue #10189: Improve the error reporting of SyntaxErrors related to global
4651  and nonlocal statements.
4652
4653- Fix segfaults on setting __qualname__ on builtin types and attempting to
4654  delete it on any type.
4655
4656- Issue #14625: Rewrite the UTF-32 decoder. It is now 3x to 4x faster. Patch
4657  written by Serhiy Storchaka.
4658
4659- Issue #16345: Fix an infinite loop when ``fromkeys`` on a dict subclass
4660  received a nonempty dict from the constructor.
4661
4662- Issue #16271: Fix strange bugs that resulted from __qualname__ appearing in a
4663  class's __dict__ and on type.
4664
4665- Issue #12805: Make bytes.join and bytearray.join faster when the separator
4666  is empty.  Patch by Serhiy Storchaka.
4667
4668- Issue #6074: Ensure cached bytecode files can always be updated by the
4669  user that created them, even when the source file is read-only.
4670
4671- Issue #15958: bytes.join and bytearray.join now accept arbitrary buffer
4672  objects.
4673
4674- Issue #14783: Improve int() docstring and switch docstrings for str(),
4675  range(), and slice() to use multi-line signatures.
4676
4677- Issue #16160: Subclass support now works for types.SimpleNamespace.
4678
4679- Issue #16148: Implement PEP 424, adding operator.length_hint and
4680  PyObject_LengthHint.
4681
4682- Upgrade Unicode data (UCD) to version 6.2.
4683
4684- Issue #15379: Fix passing of non-BMP characters as integers for the charmap
4685  decoder (already working as unicode strings).  Patch by Serhiy Storchaka.
4686
4687- Issue #15144: Fix possible integer overflow when handling pointers as integer
4688  values, by using `Py_uintptr_t` instead of `size_t`.  Patch by Serhiy
4689  Storchaka.
4690
4691- Issue #15965: Explicitly cast `AT_FDCWD` as (int).  Required on Solaris 10
4692  (which defines `AT_FDCWD` as ``0xffd19553``), harmless on other platforms.
4693
4694- Issue #15839: Convert SystemErrors in `super()` to RuntimeErrors.
4695
4696- Issue #15448: Buffered IO now frees the buffer when closed, instead
4697  of when deallocating.
4698
4699- Issue #15846: Fix SystemError which happened when using `ast.parse()` in an
4700  exception handler on code with syntax errors.
4701
4702- Issue #15897: zipimport.c doesn't check return value of fseek().
4703  Patch by Felipe Cruz.
4704
4705- Issue #15801: Make sure mappings passed to '%' formatting are actually
4706  subscriptable.
4707
4708- Issue #15111: __import__ should propagate ImportError when raised as a
4709  side-effect of a module triggered from using fromlist.
4710
4711- Issue #15022: Add pickle and comparison support to types.SimpleNamespace.
4712
4713Library
4714-------
4715
4716- Issue #4331: Added functools.partialmethod (Initial patch by Alon Horev)
4717
4718- Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit
4719  platforms.  Patch by Yogesh Chaudhari.
4720
4721- Issue #18681: Fix a NameError in importlib.reload() (noticed by Weizhao Li).
4722
4723- Issue #14323: Expanded the number of digits in the coefficients for the
4724  RGB -- YIQ conversions so that they match the FCC NTSC versions.
4725
4726- Issue #17998: Fix an internal error in regular expression engine.
4727
4728- Issue #17557: Fix os.getgroups() to work with the modified behavior of
4729  getgroups(2) on OS X 10.8.  Original patch by Mateusz Lenik.
4730
4731- Issue #18608: Avoid keeping a strong reference to the locale module
4732  inside the _io module.
4733
4734- Issue #18619: Fix atexit leaking callbacks registered from sub-interpreters,
4735  and make it GC-aware.
4736
4737- Issue #15699: The readline module now uses PEP 3121-style module
4738  initialization, so as to reclaim allocated resources (Python callbacks)
4739  at shutdown.  Original patch by Robin Schreiber.
4740
4741- Issue #17616: wave.open now supports the context management protocol.
4742
4743- Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns
4744  'SHA1' instead of 'SHA'.
4745
4746- Issue #13266: Added inspect.unwrap to easily unravel __wrapped__ chains
4747  (initial patch by Daniel Urban and Aaron Iles)
4748
4749- Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
4750
4751- Issue #18559: Fix NULL pointer dereference error in _pickle module
4752
4753- Issue #18556: Check the return type of PyUnicode_AsWideChar() in ctype's
4754  U_set().
4755
4756- Issue #17818: aifc.getparams now returns a namedtuple.
4757
4758- Issue #18549: Eliminate dead code in socket_ntohl()
4759
4760- Issue #18530: Remove additional stat call from posixpath.ismount.
4761  Patch by Alex Gaynor.
4762
4763- Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
4764
4765- Issue #9177: Calling read() or write() now raises ValueError, not
4766  AttributeError, on a closed SSL socket.  Patch by Senko Rasic.
4767
4768- Issue #18513: Fix behaviour of cmath.rect w.r.t. signed zeros on OS X 10.8 +
4769  gcc.
4770
4771- Issue #18479: Changed venv Activate.ps1 to make deactivate a function, and
4772  removed Deactivate.ps1.
4773
4774- Issue #18480: Add missing call to PyType_Ready to the _elementtree extension.
4775
4776- Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
4777  Zachary Ware.)
4778
4779- Issue #18393: The private module _gestalt and private functions
4780  platform._mac_ver_gestalt, platform._mac_ver_lookup and
4781  platform._bcd2str have been removed. This does not affect the public
4782  interface of the platform module.
4783
4784- Issue #17482: functools.update_wrapper (and functools.wraps) now set the
4785  __wrapped__ attribute correctly even if the underlying function has a
4786  __wrapped__ attribute set.
4787
4788- Issue #18431: The new email header parser now decodes RFC2047 encoded words
4789  in structured headers.
4790
4791- Issue #18432: The sched module's queue method was incorrectly returning
4792  an iterator instead of a list.
4793
4794- Issue #18044: The new email header parser was mis-parsing encoded words where
4795  an encoded character immediately followed the '?' that follows the CTE
4796  character, resulting in a decoding failure.  They are now decoded correctly.
4797
4798- Issue #18101: Tcl.split() now process strings nested in a tuple as it
4799  do with byte strings.
4800
4801- Issue #18116: getpass was always getting an error when testing /dev/tty,
4802  and thus was always falling back to stdin, and would then raise an exception
4803  if stdin could not be used (such as /dev/null).  It also leaked an open file.
4804  All of these issues are now fixed.
4805
4806- Issue #17198: Fix a NameError in the dbm module.  Patch by Valentina
4807  Mukhamedzhanova.
4808
4809- Issue #18013: Fix cgi.FieldStorage to parse the W3C sample form.
4810
4811- Issue #18020: improve html.escape speed by an order of magnitude.
4812  Patch by Matt Bryant.
4813
4814- Issue #18347: ElementTree's html serializer now preserves the case of
4815  closing tags.
4816
4817- Issue #17261: Ensure multiprocessing's proxies use proper address.
4818
4819- Issue #18343: faulthandler.register() now keeps the previous signal handler
4820  when the function is called twice, so faulthandler.unregister() restores
4821  correctly the original signal handler.
4822
4823- Issue #17097: Make multiprocessing ignore EINTR.
4824
4825- Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a
4826  segfault inside the _pickle C extension.
4827
4828- Issue #18240: The HMAC module is no longer restricted to bytes and accepts
4829  any bytes-like object, e.g. memoryview. Original patch by Jonas Borgström.
4830
4831- Issue #18224: Removed pydoc script from created venv, as it causes problems
4832  on Windows and adds no value over and above python -m pydoc ...
4833
4834- Issue #18155: The csv module now correctly handles csv files that use
4835  a delimter character that has a special meaning in regexes, instead of
4836  throwing an exception.
4837
4838- Issue #14360: encode_quopri can now be successfully used as an encoder
4839  when constructing a MIMEApplication object.
4840
4841- Issue #11390: Add -o and -f command line options to the doctest CLI to
4842  specify doctest options (and convert it to using argparse).
4843
4844- Issue #18135: ssl.SSLSocket.write() now raises an OverflowError if the input
4845  string in longer than 2 gigabytes, and ssl.SSLContext.load_cert_chain()
4846  raises a ValueError if the password is longer than 2 gigabytes. The ssl
4847  module does not support partial write.
4848
4849- Issue #11016: Add C implementation of the stat module as _stat.
4850
4851- Issue #18248: Fix libffi build on AIX.
4852
4853- Issue #18259: Declare sethostname in socketmodule.c for AIX
4854
4855- Issue #18147: Add diagnostic functions to ssl.SSLContext(). get_ca_list()
4856  lists all loaded CA certificates and cert_store_stats() returns amount of
4857  loaded X.509 certs, X.509 CA certs and CRLs.
4858
4859- Issue #18167: cgi.FieldStorage no longer fails to handle multipart/form-data
4860  when ``\r\n`` appears at end of 65535 bytes without other newlines.
4861
4862- Issue #18076: Introduce importlib.util.decode_source().
4863
4864- Issue #18357: add tests for dictview set difference.
4865  Patch by Fraser Tweedale.
4866
4867- importlib.abc.SourceLoader.get_source() no longer changes SyntaxError or
4868  UnicodeDecodeError into ImportError.
4869
4870- Issue #18058, 18057: Make the namespace package loader meet the
4871  importlib.abc.InspectLoader ABC, allowing for namespace packages to work with
4872  runpy.
4873
4874- Issue #17177: The imp module is pending deprecation.
4875
4876- subprocess: Prevent a possible double close of parent pipe fds when the
4877  subprocess exec runs into an error.  Prevent a regular multi-close of the
4878  /dev/null fd when any of stdin, stdout and stderr was set to DEVNULL.
4879
4880- Issue #18194: Introduce importlib.util.cache_from_source() and
4881  source_from_cache() while documenting the equivalent functions in imp as
4882  deprecated.
4883
4884- Issue #17907: Document imp.new_module() as deprecated in favour of
4885  types.ModuleType.
4886
4887- Issue #18192: Introduce importlib.util.MAGIC_NUMBER and document as deprecated
4888  imp.get_magic().
4889
4890- Issue #18149: Add filecmp.clear_cache() to manually clear the filecmp cache.
4891  Patch by Mark Levitt
4892
4893- Issue #18193: Add importlib.reload().
4894
4895- Issue #18157: Stop using imp.load_module() in pydoc.
4896
4897- Issue #16102: Make uuid._netbios_getnode() work again on Python 3.
4898
4899- Issue #17134: Add ssl.enum_cert_store() as interface to Windows' cert store.
4900
4901- Issue #18143: Implement ssl.get_default_verify_paths() in order to debug
4902  the default locations for cafile and capath.
4903
4904- Issue #17314: Move multiprocessing.forking over to importlib.
4905
4906- Issue #11959: SMTPServer and SMTPChannel now take an optional map, use of
4907  which avoids affecting global state.
4908
4909- Issue #18109: os.uname() now decodes fields from the locale encoding, and
4910  socket.gethostname() now decodes the hostname from the locale encoding,
4911  instead of using the UTF-8 encoding in strict mode.
4912
4913- Issue #18089: Implement importlib.abc.InspectLoader.load_module.
4914
4915- Issue #18088: Introduce importlib.abc.Loader.init_module_attrs for setting
4916  module attributes. Leads to the pending deprecation of
4917  importlib.util.module_for_loader.
4918
4919- Issue #17403: urllib.parse.robotparser normalizes the urls before adding to
4920  ruleline. This helps in handling certain types invalid urls in a conservative
4921  manner. Patch contributed by Mher Movsisyan.
4922
4923- Issue #18070: Have importlib.util.module_for_loader() set attributes
4924  unconditionally in order to properly support reloading.
4925
4926- Added importlib.util.module_to_load to return a context manager to provide the
4927  proper module object to load.
4928
4929- Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw
4930  stream's read() returns more bytes than requested.
4931
4932- Issue #18011: As was originally intended, base64.b32decode() now raises a
4933  binascii.Error if there are non-b32-alphabet characters present in the input
4934  string, instead of a TypeError.
4935
4936- Issue #18072: Implement importlib.abc.InspectLoader.get_code() and
4937  importlib.abc.ExecutionLoader.get_code().
4938
4939- Issue #8240: Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag on SSL
4940  sockets.
4941
4942- Issue #17269: Workaround for socket.getaddrinfo crash on MacOS X
4943  with port None or "0" and flags AI_NUMERICSERV.
4944
4945- Issue #16986: ElementTree now correctly works with string input when the
4946  internal XML encoding is not UTF-8 or US-ASCII.
4947
4948- Issue #17996: socket module now exposes AF_LINK constant on BSD and OSX.
4949
4950- Issue #17900: Allowed pickling of recursive OrderedDicts.  Decreased pickled
4951  size and pickling time.
4952
4953- Issue #17914: Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an
4954  initial patch by Trent Nelson.
4955
4956- Issue #17812: Fixed quadratic complexity of base64.b32encode().
4957  Optimize base64.b32encode() and base64.b32decode() (speed up to 3x).
4958
4959- Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of
4960  service using certificates with many wildcards (CVE-2013-2099).
4961
4962- Issue #15758: Fix FileIO.readall() so it no longer has O(n**2) complexity.
4963
4964- Issue #14596: The struct.Struct() objects now use a more compact
4965  implementation.
4966
4967- Issue #17981: logging's SysLogHandler now closes the socket when it catches
4968  socket OSErrors.
4969
4970- Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function
4971  is long, not int.
4972
4973- Fix typos in the multiprocessing module.
4974
4975- Issue #17754: Make ctypes.util.find_library() independent of the locale.
4976
4977- Issue #17968: Fix memory leak in os.listxattr().
4978
4979- Issue #17606: Fixed support of encoded byte strings in the XMLGenerator
4980  characters() and ignorableWhitespace() methods.  Original patch by Sebastian
4981  Ortiz Vasquez.
4982
4983- Issue #17732: Ignore distutils.cfg options pertaining to install paths if a
4984  virtual environment is active.
4985
4986- Issue #17915: Fix interoperability of xml.sax with file objects returned by
4987  codecs.open().
4988
4989- Issue #16601: Restarting iteration over tarfile really restarts rather
4990  than continuing from where it left off.  Patch by Michael Birtwell.
4991
4992- Issue #17289: The readline module now plays nicer with external modules
4993  or applications changing the rl_completer_word_break_characters global
4994  variable.  Initial patch by Bradley Froehle.
4995
4996- Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit
4997  platforms. Patch by Federico Schwindt.
4998
4999- Issue #11816: multiple improvements to the dis module: get_instructions
5000  generator, ability to redirect output to a file, Bytecode and Instruction
5001  abstractions. Patch by Nick Coghlan, Ryan Kelly and Thomas Kluyver.
5002
5003- Issue #13831: Embed stringification of remote traceback in local
5004  traceback raised when pool task raises an exception.
5005
5006- Issue #15528: Add weakref.finalize to support finalization using
5007  weakref callbacks.
5008
5009- Issue #14173: Avoid crashing when reading a signal handler during
5010  interpreter shutdown.
5011
5012- Issue #15902: Fix imp.load_module() accepting None as a file when loading an
5013  extension module.
5014
5015- Issue #13721: SSLSocket.getpeercert() and SSLSocket.do_handshake() now
5016  raise an OSError with ENOTCONN, instead of an AttributeError, when the
5017  SSLSocket is not connected.
5018
5019- Issue #14679: add an __all__ (that contains only HTMLParser) to html.parser.
5020
5021- Issue #17802: Fix an UnboundLocalError in html.parser.  Initial tests by
5022  Thomas Barlow.
5023
5024- Issue #17358: Modules loaded by imp.load_source() and load_compiled() (and by
5025  extension load_module()) now have a better chance of working when reloaded.
5026
5027- Issue #17804: New function ``struct.iter_unpack`` allows for streaming
5028  struct unpacking.
5029
5030- Issue #17830: When keyword.py is used to update a keyword file, it now
5031  preserves the line endings of the original file.
5032
5033- Issue #17272: Making the urllib.request's Request.full_url a descriptor.
5034  Fixes bugs with assignment to full_url. Patch by Demian Brecht.
5035
5036- Issue #17353: Plistlib emitted empty data tags with deeply nested datastructures
5037
5038- Issue #11714: Use 'with' statements to assure a Semaphore releases a
5039  condition variable.  Original patch by Thomas Rachel.
5040
5041- Issue #16624: `subprocess.check_output` now accepts an `input` argument,
5042  allowing the subprocess's stdin to be provided as a (byte) string.
5043  Patch by Zack Weinberg.
5044
5045- Issue #17795: Reverted backwards-incompatible change in SysLogHandler with
5046  Unix domain sockets.
5047
5048- Issue #16694: Add a pure Python implementation of the operator module.
5049  Patch by Zachary Ware.
5050
5051- Issue #11182: remove the unused and undocumented pydoc.Scanner class.
5052  Patch by Martin Morrison.
5053
5054- Issue #17741: Add ElementTree.XMLPullParser, an event-driven parser for
5055  non-blocking applications.
5056
5057- Issue #17555: Fix ForkAwareThreadLock so that size of after fork
5058  registry does not grow exponentially with generation of process.
5059
5060- Issue #17707: fix regression in multiprocessing.Queue's get() method where
5061  it did not block for short timeouts.
5062
5063- Issue #17720: Fix the Python implementation of pickle.Unpickler to correctly
5064  process the APPENDS opcode when it is used on non-list objects.
5065
5066- Issue #17012: shutil.which() no longer falls back to the PATH environment
5067  variable if an empty path argument is specified.  Patch by Serhiy Storchaka.
5068
5069- Issue #17710: Fix pickle raising a SystemError on bogus input.
5070
5071- Issue #17341: Include the invalid name in the error messages from re about
5072  invalid group names.
5073
5074- Issue #17702: os.environ now raises KeyError with the original environment
5075  variable name (str on UNIX), instead of using the encoded name (bytes on
5076  UNIX).
5077
5078- Issue #16163: Make the importlib based version of pkgutil.iter_importers
5079  work for submodules. Initial patch by Berker Peksag.
5080
5081- Issue #16804: Fix a bug in the 'site' module that caused running
5082  'python -S -m site' to incorrectly throw an exception.
5083
5084- Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal.
5085  Initial patch by Daniel Riti.
5086
5087- Issue #2118: SMTPException is now a subclass of OSError.
5088
5089- Issue #17016: Get rid of possible pointer wraparounds and integer overflows
5090  in the re module.  Patch by Nickolai Zeldovich.
5091
5092- Issue #16658: add missing return to HTTPConnection.send().
5093  Patch by Jeff Knupp.
5094
5095- Issue #9556: the logging package now allows specifying a time-of-day for a
5096  TimedRotatingFileHandler to rotate.
5097
5098- Issue #14971: unittest test discovery no longer gets confused when a function
5099  has a different __name__ than its name in the TestCase class dictionary.
5100
5101- Issue #17487: The wave getparams method now returns a namedtuple rather than
5102  a plain tuple.
5103
5104- Issue #17675: socket repr() provides local and remote addresses (if any).
5105  Patch by Giampaolo Rodola'
5106
5107- Issue #17093: Make the ABCs in importlib.abc provide default values or raise
5108  reasonable exceptions for their methods to make them more amenable to super()
5109  calls.
5110
5111- Issue #17566: Make importlib.abc.Loader.module_repr() optional instead of an
5112  abstractmethod; now it raises NotImplementedError so as to be ignored by default.
5113
5114- Issue #17678: Remove the use of deprecated method in http/cookiejar.py by
5115  changing the call to get_origin_req_host() to origin_req_host.
5116
5117- Issue #17666: Fix reading gzip files with an extra field.
5118
5119- Issue #16475: Support object instancing, recursion and interned strings
5120  in marshal
5121
5122- Issue #17502: Process DEFAULT values in mock side_effect that returns iterator.
5123
5124- Issue #16795: On the ast.arguments object, unify vararg with varargannotation
5125  and kwarg and kwargannotation. Change the column offset of ast.Attribute to be
5126  at the attribute name.
5127
5128- Issue #17434: Properly raise a SyntaxError when a string occurs between future
5129  imports.
5130
5131- Issue #17117: Import and @importlib.util.set_loader now set __loader__ when
5132  it has a value of None or the attribute doesn't exist.
5133
5134- Issue #17032: The "global" in the "NameError: global name 'x' is not defined"
5135  error message has been removed.  Patch by Ram Rachum.
5136
5137- Issue #18080: When building a C extension module on OS X, if the compiler
5138  is overridden with the CC environment variable, use the new compiler as
5139  the default for linking if LDSHARED is not also overridden.  This restores
5140  Distutils behavior introduced in 3.2.3 and inadvertently dropped in 3.3.0.
5141
5142- Issue #18113: Fixed a refcount leak in the curses.panel module's
5143  set_userptr() method.  Reported by Atsuo Ishimoto.
5144
5145- Implement PEP 443 "Single-dispatch generic functions".
5146
5147- Implement PEP 435 "Adding an Enum type to the Python standard library".
5148
5149- Issue #15596: Faster pickling of unicode strings.
5150
5151- Issue #17572: Avoid chained exceptions when passing bad directives to
5152  time.strptime().  Initial patch by Claudiu Popa.
5153
5154- Issue #17435: threading.Timer's __init__ method no longer uses mutable
5155  default values for the args and kwargs parameters.
5156
5157- Issue #17526: fix an IndexError raised while passing code without filename to
5158  inspect.findsource().  Initial patch by Tyler Doyle.
5159
5160- Issue #17540: Added style parameter to logging formatter configuration by dict.
5161
5162- Issue #16692: The ssl module now supports TLS 1.1 and TLS 1.2.  Initial
5163  patch by Michele Orrù.
5164
5165- Issue #17025: multiprocessing: Reduce Queue and SimpleQueue contention.
5166
5167- Issue #17536: Add to webbrowser's browser list: www-browser, x-www-browser,
5168  iceweasel, iceape.
5169
5170- Issue #17150: pprint now uses line continuations to wrap long string
5171  literals.
5172
5173- Issue #17488: Change the subprocess.Popen bufsize parameter default value
5174  from unbuffered (0) to buffering (-1) to match the behavior existing code
5175  expects and match the behavior of the subprocess module in Python 2 to avoid
5176  introducing hard to track down bugs.
5177
5178- Issue #17521: Corrected non-enabling of logger following two calls to
5179  fileConfig().
5180
5181- Issue #17508: Corrected logging MemoryHandler configuration in dictConfig()
5182  where the target handler wasn't configured first.
5183
5184- Issue #17209: curses.window.get_wch() now correctly handles KeyboardInterrupt
5185  (CTRL+c).
5186
5187- Issue #5713: smtplib now handles 421 (closing connection) error codes when
5188  sending mail by closing the socket and reporting the 421 error code via the
5189  exception appropriate to the command that received the error response.
5190
5191- Issue #16997: unittest.TestCase now provides a subTest() context manager
5192  to procedurally generate, in an easy way, small test instances.
5193
5194- Issue #17485: Also delete the Request Content-Length header if the data
5195  attribute is deleted.  (Follow on to issue Issue #16464).
5196
5197- Issue #15927: CVS now correctly parses escaped newlines and carriage
5198  when parsing with quoting turned off.
5199
5200- Issue #17467: add readline and readlines support to mock_open in
5201  unittest.mock.
5202
5203- Issue #13248: removed deprecated and undocumented difflib.isbjunk,
5204  isbpopular.
5205
5206- Issue #17192: Update the ctypes module's libffi to v3.0.13.  This
5207  specifically addresses a stack misalignment issue on x86 and issues on
5208  some more recent platforms.
5209
5210- Issue #8862: Fixed curses cleanup when getkey is interrupted by a signal.
5211
5212- Issue #17443: imaplib.IMAP4_stream was using the default unbuffered IO
5213  in subprocess, but the imap code assumes buffered IO.  In Python2 this
5214  worked by accident.  IMAP4_stream now explicitly uses buffered IO.
5215
5216- Issue #17476: Fixed regression relative to Python2 in undocumented pydoc
5217  'allmethods'; it was missing unbound methods on the class.
5218
5219- Issue #17474: Remove the deprecated methods of Request class.
5220
5221- Issue #16709: unittest discover order is no-longer filesystem specific. Patch
5222  by Jeff Ramnani.
5223
5224- Use the HTTPS PyPI url for upload, overriding any plain HTTP URL in pypirc.
5225
5226- Issue #5024: sndhdr.whichhdr now returns the frame count for WAV files
5227  rather than -1.
5228
5229- Issue #17460: Remove the strict argument of HTTPConnection and removing the
5230  DeprecationWarning being issued from 3.2 onwards.
5231
5232- Issue #16880: Do not assume _imp.load_dynamic() is defined in the imp module.
5233
5234- Issue #16389: Fixed a performance regression relative to Python 3.1 in the
5235  caching of compiled regular expressions.
5236
5237- Added missing FeedParser and BytesFeedParser to email.parser.__all__.
5238
5239- Issue #17431: Fix missing import of BytesFeedParser in email.parser.
5240
5241- Issue #12921: http.server's send_error takes an explain argument to send more
5242  information in response. Patch contributed by Karl.
5243
5244- Issue #17414: Add timeit, repeat, and default_timer to timeit.__all__.
5245
5246- Issue #1285086: Get rid of the refcounting hack and speed up
5247  urllib.parse.unquote() and urllib.parse.unquote_to_bytes().
5248
5249- Issue #17099: Have importlib.find_loader() raise ValueError when __loader__
5250  is not set, harmonizing with what happens when the attribute is set to None.
5251
5252- Expose the O_PATH constant in the os module if it is available.
5253
5254- Issue #17368: Fix an off-by-one error in the Python JSON decoder that caused
5255  a failure while decoding empty object literals when object_pairs_hook was
5256  specified.
5257
5258- Issue #17385: Fix quadratic behavior in threading.Condition.  The FIFO
5259  queue now uses a deque instead of a list.
5260
5261- Issue #15806: Add contextlib.ignore().  This creates a context manager to
5262  ignore specified exceptions, replacing the "except SomeException: pass" idiom.
5263
5264- Issue #14645: The email generator classes now produce output using the
5265  specified linesep throughout.  Previously if the prolog, epilog, or
5266  body were stored with a different linesep, that linesep was used.  This
5267  fix corrects an RFC non-compliance issue with smtplib.send_message.
5268
5269- Issue #17278: Fix a crash in heapq.heappush() and heapq.heappop() when
5270  the list is being resized concurrently.
5271
5272- Issue #16962: Use getdents64 instead of the obsolete getdents syscall
5273  in the subprocess module on Linux.
5274
5275- Issue #16935: unittest now counts the module as skipped if it raises SkipTest,
5276  instead of counting it as an error.  Patch by Zachary Ware.
5277
5278- Issue #17018: Make Process.join() retry if os.waitpid() fails with EINTR.
5279
5280- Issue #17223: array module: Fix a crasher when converting an array containing
5281  invalid characters (outside range [U+0000; U+10ffff]) to Unicode:
5282  repr(array), str(array) and array.tounicode(). Patch written by Manuel Jacob.
5283
5284- Issue #17197: profile/cProfile modules refactored so that code of run() and
5285  runctx() utility functions is not duplicated in both modules.
5286
5287- Issue #14720: sqlite3: Convert datetime microseconds correctly.
5288  Patch by Lowe Thiderman.
5289
5290- Issue #15132: Allow a list for the defaultTest argument of
5291  unittest.TestProgram. Patch by Jyrki Pulliainen.
5292
5293- Issue #17225: JSON decoder now counts columns in the first line starting
5294  with 1, as in other lines.
5295
5296- Issue #6623: Added explicit DeprecationWarning for ftplib.netrc, which has
5297  been deprecated and undocumented for a long time.
5298
5299- Issue #13700: Fix byte/string handling in imaplib authentication when an
5300  authobject is specified.
5301
5302- Issue #13153: Tkinter functions now raise TclError instead of ValueError when
5303  a string argument contains non-BMP character.
5304
5305- Issue #9669: Protect re against infinite loops on zero-width matching in
5306  non-greedy repeat.  Patch by Matthew Barnett.
5307
5308- Issue #13169: The maximal repetition number in a regular expression has been
5309  increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on
5310  64-bit).
5311
5312- Issue #17143: Fix a missing import in the trace module.  Initial patch by
5313  Berker Peksag.
5314
5315- Issue #15220: email.feedparser's line splitting algorithm is now simpler and
5316  faster.
5317
5318- Issue #16743: Fix mmap overflow check on 32 bit Windows.
5319
5320- Issue #16996: webbrowser module now uses shutil.which() to find a
5321  web-browser on the executable search path.
5322
5323- Issue #16800: tempfile.gettempdir() no longer left temporary files when
5324  the disk is full.  Original patch by Amir Szekely.
5325
5326- Issue #17192: Import libffi-3.0.12.
5327
5328- Issue #16564: Fixed regression relative to Python2 in the operation of
5329  email.encoders.encode_7or8bit when used with binary data.
5330
5331- Issue #17052: unittest discovery should use self.testLoader.
5332
5333- Issue #4591: Uid and gid values larger than 2**31 are supported now.
5334
5335- Issue #17141: random.vonmisesvariate() no longer hangs for large kappas.
5336
5337- Issue #17149: Fix random.vonmisesvariate to always return results in
5338  [0, 2*math.pi].
5339
5340- Issue #1470548: XMLGenerator now works with binary output streams.
5341
5342- Issue #6975: os.path.realpath() now correctly resolves multiple nested
5343  symlinks on POSIX platforms.
5344
5345- Issue #13773: sqlite3.connect() gets a new `uri` parameter to pass the
5346  filename as a URI, allowing to pass custom options.
5347
5348- Issue #16564: Fixed regression relative to Python2 in the operation of
5349  email.encoders.encode_noop when used with binary data.
5350
5351- Issue #10355: The mode, name, encoding and newlines properties now work on
5352  SpooledTemporaryFile objects even when they have not yet rolled over.
5353  Obsolete method xreadline (which has never worked in Python 3) has been
5354  removed.
5355
5356- Issue #16686: Fixed a lot of bugs in audioop module.  Fixed crashes in
5357  avgpp(), maxpp() and ratecv().  Fixed an integer overflow in add(), bias(),
5358  and ratecv().  reverse(), lin2lin() and ratecv() no more lose precision for
5359  32-bit samples.  max() and rms() no more returns a negative result and
5360  various other functions now work correctly with 32-bit sample -0x80000000.
5361
5362- Issue #17073: Fix some integer overflows in sqlite3 module.
5363
5364- Issue #16723: httplib.HTTPResponse no longer marked closed when the connection
5365  is automatically closed.
5366
5367- Issue #15359: Add CAN_BCM protocol support to the socket module. Patch by
5368  Brian Thorne.
5369
5370- Issue #16948: Fix quoted printable body encoding for non-latin1 character
5371  sets in the email package.
5372
5373- Issue #16811: Fix folding of headers with no value in the provisional email
5374  policies.
5375
5376- Issue #17132: Update symbol for "yield from" grammar changes.
5377
5378- Issue #17076: Make copying of xattrs more tolerant of missing FS support.
5379  Patch by Thomas Wouters.
5380
5381- Issue #17089: Expat parser now correctly works with string input when the
5382  internal XML encoding is not UTF-8 or US-ASCII.  It also now accepts bytes
5383  and strings larger than 2 GiB.
5384
5385- Issue #6083: Fix multiple segmentation faults occurred when PyArg_ParseTuple
5386  parses nested mutating sequence.
5387
5388- Issue #5289: Fix ctypes.util.find_library on Solaris.
5389
5390- Issue #17106: Fix a segmentation fault in io.TextIOWrapper when an underlying
5391  stream or a decoder produces data of an unexpected type (i.e. when
5392  io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec).
5393
5394- Issue #17015: When it has a spec, a Mock object now inspects its signature
5395  when matching calls, so that arguments can be matched positionally or
5396  by name.
5397
5398- Issue #15633: httplib.HTTPResponse is now mark closed when the server
5399  sends less than the advertised Content-Length.
5400
5401- Issue #12268: The io module file object write methods no longer abort early
5402  when one of its write system calls is interrupted (EINTR).
5403
5404- Issue #6972: The zipfile module no longer overwrites files outside of
5405  its destination path when extracting malicious zip files.
5406
5407- Issue #4844: ZipFile now raises BadZipFile when opens a ZIP file with an
5408  incomplete "End of Central Directory" record.  Original patch by Guilherme
5409  Polo and Alan McIntyre.
5410
5411- Issue #17071: Signature.bind() now works when one of the keyword arguments
5412  is named ``self``.
5413
5414- Issue #12004: Fix an internal error in PyZipFile when writing an invalid
5415  Python file.  Patch by Ben Morgan.
5416
5417- Have py_compile use importlib as much as possible to avoid code duplication.
5418  Code now raises FileExistsError if the file path to be used for the
5419  byte-compiled file is a symlink or non-regular file as a warning that import
5420  will not keep the file path type if it writes to that path.
5421
5422- Issue #16972: Have site.addpackage() consider already known paths even when
5423  none are explicitly passed in. Bug report and fix by Kirill.
5424
5425- Issue #1602133: on Mac OS X a shared library build (``--enable-shared``)
5426  now fills the ``os.environ`` variable correctly.
5427
5428- Issue #15505: `unittest.installHandler` no longer assumes SIGINT handler is
5429  set to a callable object.
5430
5431- Issue #13454: Fix a crash when deleting an iterator created by itertools.tee()
5432  if all other iterators were very advanced before.
5433
5434- Issue #12411: Fix to cgi.parse_multipart to correctly use bytes boundaries
5435  and bytes data. Patch by Jonas Wagner.
5436
5437- Issue #16957: shutil.which() no longer searches a bare file name in the
5438  current directory on Unix and no longer searches a relative file path with
5439  a directory part in PATH directories.  Patch by Thomas Kluyver.
5440
5441- Issue #1159051: GzipFile now raises EOFError when reading a corrupted file
5442  with truncated header or footer.
5443
5444- Issue #16993: shutil.which() now preserves the case of the path and extension
5445  on Windows.
5446
5447- Issue #16992: On Windows in signal.set_wakeup_fd, validate the file
5448  descriptor argument.
5449
5450- Issue #16422: For compatibility with the Python version, the C version of
5451  decimal now uses strings instead of integers for rounding mode constants.
5452
5453- Issue #15861: tkinter now correctly works with lists and tuples containing
5454  strings with whitespaces, backslashes or unbalanced braces.
5455
5456- Issue #9720: zipfile now writes correct local headers for files larger than
5457  4 GiB.
5458
5459- Issue #16955: Fix the poll() method for multiprocessing's socket
5460  connections on Windows.
5461
5462- SSLContext.load_dh_params() now properly closes the input file.
5463
5464- Issue #15031: Refactor some .pyc management code to cut down on code
5465  duplication. Thanks to Ronan Lamy for the report and taking an initial stab
5466  at the problem.
5467
5468- Issue #16398: Optimize deque.rotate() so that it only moves pointers
5469  and doesn't touch the underlying data with increfs and decrefs.
5470
5471- Issue #16900: Issue a ResourceWarning when an ssl socket is left unclosed.
5472
5473- Issue #13899: ``\A``, ``\Z``, and ``\B`` now correctly match the A, Z,
5474  and B literals when used inside character classes (e.g. ``'[\A]'``).
5475  Patch by Matthew Barnett.
5476
5477- Issue #15545: Fix regression in sqlite3's iterdump method where it was
5478  failing if the connection used a row factory (such as sqlite3.Row) that
5479  produced unsortable objects. (Regression was introduced by fix for 9750).
5480
5481- fcntl: add F_DUPFD_CLOEXEC constant, available on Linux 2.6.24+.
5482
5483- Issue #15972: Fix error messages when os functions expecting a file name or
5484  file descriptor receive the incorrect type.
5485
5486- Issue #8109: The ssl module now has support for server-side SNI, thanks
5487  to a :meth:`SSLContext.set_servername_callback` method.  Patch by Daniel
5488  Black.
5489
5490- Issue #16860: In tempfile, use O_CLOEXEC when available to set the
5491  close-on-exec flag atomically.
5492
5493- Issue #16674: random.getrandbits() is now 20-40% faster for small integers.
5494
5495- Issue #16009: JSON error messages now provide more information.
5496
5497- Issue #16828: Fix error incorrectly raised by bz2.compress(b'') and
5498  bz2.BZ2Compressor.compress(b''). Initial patch by Martin Packman.
5499
5500- Issue #16833: In http.client.HTTPConnection, do not concatenate the request
5501  headers and body when the payload exceeds 16 KB, since it can consume more
5502  memory for no benefit.  Patch by Benno Leslie.
5503
5504- Issue #16541: tk_setPalette() now works with keyword arguments.
5505
5506- Issue #16820: In configparser, `parser.popitem()` no longer raises ValueError.
5507  This makes `parser.clean()` work correctly.
5508
5509- Issue #16820: In configparser, ``parser['section'] = {}`` now preserves
5510  section order within the parser. This makes `parser.update()` preserve section
5511  order as well.
5512
5513- Issue #16820: In configparser, ``parser['DEFAULT'] = {}`` now correctly
5514  clears previous values stored in the default section. Same goes for
5515  ``parser.update({'DEFAULT': {}})``.
5516
5517- Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy.
5518
5519- Issue #16787: Increase asyncore and asynchat default output buffers size, to
5520  decrease CPU usage and increase throughput.
5521
5522- Issue #10527: make multiprocessing use poll() instead of select() if available.
5523
5524- Issue #16688: Now regexes contained backreferences correctly work with
5525  non-ASCII strings.  Patch by Matthew Barnett.
5526
5527- Issue #16486: Make aifc files act as context managers.
5528
5529- Issue #16485: Now file descriptors are closed if file header patching failed
5530  on closing an aifc file.
5531
5532- Issue #16640: Run less code under a lock in sched module.
5533
5534- Issue #16165: sched.scheduler.run() no longer blocks a scheduler for other
5535  threads.
5536
5537- Issue #16641: Default values of sched.scheduler.enter() are no longer
5538  modifiable.
5539
5540- Issue #16618: Make glob.glob match consistently across strings and bytes
5541  regarding leading dots.  Patch by Serhiy Storchaka.
5542
5543- Issue #16788: Add samestat to Lib/ntpath.py
5544
5545- Issue #16713: Parsing of 'tel' urls using urlparse separates params from
5546  path.
5547
5548- Issue #16443: Add docstrings to regular expression match objects.
5549  Patch by Anton Kasyanov.
5550
5551- Issue #15701: Fix HTTPError info method call to return the headers information.
5552
5553- Issue #16752: Add a missing import to modulefinder. Patch by Berker Peksag.
5554
5555- Issue #16646: ftplib.FTP.makeport() might lose socket error details.
5556  (patch by Serhiy Storchaka)
5557
5558- Issue #16626: Fix infinite recursion in glob.glob() on Windows when the
5559  pattern contains a wildcard in the drive or UNC path.  Patch by Serhiy
5560  Storchaka.
5561
5562- Issue #15783: Except for the number methods, the C version of decimal now
5563  supports all None default values present in decimal.py. These values were
5564  largely undocumented.
5565
5566- Issue #11175: argparse.FileType now accepts encoding and errors
5567  arguments. Patch by Lucas Maystre.
5568
5569- Issue #16488: epoll() objects now support the `with` statement.  Patch
5570  by Serhiy Storchaka.
5571
5572- Issue #16298: In HTTPResponse.read(), close the socket when there is no
5573  Content-Length and the incoming stream is finished.  Patch by Eran
5574  Rundstein.
5575
5576- Issue #16049: Add abc.ABC class to enable the use of inheritance to create
5577  ABCs, rather than the more cumbersome metaclass=ABCMeta. Patch by Bruno
5578  Dupuis.
5579
5580- Expose the TCP_FASTOPEN and MSG_FASTOPEN flags in socket when they're
5581  available.
5582
5583- Issue #15701: Add a .headers attribute to urllib.error.HTTPError. Patch
5584  contributed by Berker Peksag.
5585
5586- Issue #15872: Fix 3.3 regression introduced by the new fd-based shutil.rmtree
5587  that caused it to not ignore certain errors when ignore_errors was set.
5588  Patch by Alessandro Moura and Serhiy Storchaka.
5589
5590- Issue #16248: Disable code execution from the user's home directory by
5591  tkinter when the -E flag is passed to Python.  Patch by Zachary Ware.
5592
5593- Issue #13390: New function :func:`sys.getallocatedblocks()` returns the
5594  number of memory blocks currently allocated.
5595
5596- Issue #16628: Fix a memory leak in ctypes.resize().
5597
5598- Issue #13614: Fix setup.py register failure with invalid rst in description.
5599  Patch by Julien Courteau and Pierre Paul Lefebvre.
5600
5601- Issue #13512: Create ~/.pypirc securely (CVE-2011-4944).  Initial patch by
5602  Philip Jenvey, tested by Mageia and Debian.
5603
5604- Issue #7719: Make distutils ignore ``.nfs*`` files instead of choking later
5605  on.  Initial patch by SilentGhost and Jeff Ramnani.
5606
5607- Issue #13120: Allow to call pdb.set_trace() from thread.
5608  Patch by Ilya Sandler.
5609
5610- Issue #16585: Make CJK encoders support error handlers that return bytes per
5611  PEP 383.
5612
5613- Issue #10182: The re module doesn't truncate indices to 32 bits anymore.
5614  Patch by Serhiy Storchaka.
5615
5616- Issue #16333: use (",", ": ") as default separator in json when indent is
5617  specified, to avoid trailing whitespace.  Patch by Serhiy Storchaka.
5618
5619- Issue #16573: In 2to3, treat enumerate() like a consuming call, so superfluous
5620  list() calls aren't added to filter(), map(), and zip() which are directly
5621  passed enumerate().
5622
5623- Issue #16464: Reset the Content-Length header when a urllib Request is reused
5624  with new data.
5625
5626- Issue #12848: The pure Python pickle implementation now treats object
5627  lengths as unsigned 32-bit integers, like the C implementation does.
5628  Patch by Serhiy Storchaka.
5629
5630- Issue #16423: urllib.request now has support for ``data:`` URLs.  Patch by
5631  Mathias Panzenböck.
5632
5633- Issue #4473: Add a POP3.stls() to switch a clear-text POP3 session into
5634  an encrypted POP3 session, on supported servers.  Patch by Lorenzo Catucci.
5635
5636- Issue #4473: Add a POP3.capa() method to query the capabilities advertised
5637  by the POP3 server.  Patch by Lorenzo Catucci.
5638
5639- Issue #4473: Ensure the socket is shutdown cleanly in POP3.close().
5640  Patch by Lorenzo Catucci.
5641
5642- Issue #16522: added FAIL_FAST flag to doctest.
5643
5644- Issue #15627: Add the importlib.abc.InspectLoader.source_to_code() method.
5645
5646- Issue #16408: Fix file descriptors not being closed in error conditions
5647  in the zipfile module.  Patch by Serhiy Storchaka.
5648
5649- Issue #14631: Add a new :class:`weakref.WeakMethod` to simulate weak
5650  references to bound methods.
5651
5652- Issue #16469: Fix exceptions from float -> Fraction and Decimal -> Fraction
5653  conversions for special values to be consistent with those for float -> int
5654  and Decimal -> int.  Patch by Alexey Kachayev.
5655
5656- Issue #16481: multiprocessing no longer leaks process handles on Windows.
5657
5658- Issue #12428: Add a pure Python implementation of functools.partial().
5659  Patch by Brian Thorne.
5660
5661- Issue #16140: The subprocess module no longer double closes its child
5662  subprocess.PIPE parent file descriptors on child error prior to exec().
5663
5664- Remove a bare print to stdout from the subprocess module that could have
5665  happened if the child process wrote garbage to its pre-exec error pipe.
5666
5667- The subprocess module now raises its own SubprocessError instead of a
5668  RuntimeError in various error situations which should not normally happen.
5669
5670- Issue #16327: The subprocess module no longer leaks file descriptors
5671  used for stdin/stdout/stderr pipes to the child when fork() fails.
5672
5673- Issue #14396: Handle the odd rare case of waitpid returning 0 when not
5674  expected in subprocess.Popen.wait().
5675
5676- Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access
5677  previously-freed memory. Patch by Serhiy Storchaka.
5678
5679- Issue #16357: fix calling accept() on a SSLSocket created through
5680  SSLContext.wrap_socket().  Original patch by Jeff McNeil.
5681
5682- Issue #16409: The reporthook callback made by the legacy
5683  urllib.request.urlretrieve API now properly supplies a constant non-zero
5684  block_size as it did in Python 3.2 and 2.7.  This matches the behavior of
5685  urllib.request.URLopener.retrieve.
5686
5687- Issue #16431: Use the type information when constructing a Decimal subtype
5688  from a Decimal argument.
5689
5690- Issue #15641: Clean up deprecated classes from importlib.
5691  Patch by Taras Lyapun.
5692
5693- Issue #16350: zlib.decompressobj().decompress() now accumulates data from
5694  successive calls after EOF in unused_data, instead of only saving the argument
5695  to the last call. decompressobj().flush() now correctly sets unused_data and
5696  unconsumed_tail. A bug in the handling of MemoryError when setting the
5697  unconsumed_tail attribute has also been fixed. Patch by Serhiy Storchaka.
5698
5699- Issue #12759: sre_parse now raises a proper error when the name of the group
5700  is missing.  Initial patch by Serhiy Storchaka.
5701
5702- Issue #16152: fix tokenize to ignore whitespace at the end of the code when
5703  no newline is found.  Patch by Ned Batchelder.
5704
5705- Issue #16284: Prevent keeping unnecessary references to worker functions
5706  in concurrent.futures ThreadPoolExecutor.
5707
5708- Issue #16230: Fix a crash in select.select() when one the lists changes
5709  size while iterated on.  Patch by Serhiy Storchaka.
5710
5711- Issue #16228: Fix a crash in the json module where a list changes size
5712  while it is being encoded.  Patch by Serhiy Storchaka.
5713
5714- Issue #16351: New function gc.get_stats() returns per-generation collection
5715  statistics.
5716
5717- Issue #14897: Enhance error messages of struct.pack and
5718  struct.pack_into. Patch by Matti Mäki.
5719
5720- Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions.
5721  Patch by Serhiy Storchaka.
5722
5723- Issue #12890: cgitb no longer prints spurious <p> tags in text
5724  mode when the logdir option is specified.
5725
5726- Issue #16307: Fix multiprocessing.Pool.map_async not calling its callbacks.
5727  Patch by Janne Karila.
5728
5729- Issue #16305: Fix a segmentation fault occurring when interrupting
5730  math.factorial.
5731
5732- Issue #16116: Fix include and library paths to be correct when building C
5733  extensions in venvs.
5734
5735- Issue #16245: Fix the value of a few entities in html.entities.html5.
5736
5737- Issue #16301: Fix the localhost verification in urllib/request.py for file://
5738  urls.
5739
5740- Issue #16250: Fix the invocations of URLError which had misplaced filename
5741  attribute for exception.
5742
5743- Issue #10836: Fix exception raised when file not found in urlretrieve
5744  Initial patch by Ezio Melotti.
5745
5746- Issue #14398: Fix size truncation and overflow bugs in the bz2 module.
5747
5748- Issue #12692: Fix resource leak in urllib.request when talking to an HTTP
5749  server that does not include a ``Connection: close`` header in its responses.
5750
5751- Issue #12034: Fix bogus caching of result in check_GetFinalPathNameByHandle.
5752  Patch by Atsuo Ishimoto.
5753
5754- Improve performance of `lzma.LZMAFile` (see also issue #16034).
5755
5756- Issue #16220: wsgiref now always calls close() on an iterable response.
5757  Patch by Brent Tubbs.
5758
5759- Issue #16270: urllib may hang when used for retrieving files via FTP by using
5760  a context manager.  Patch by Giampaolo Rodola'.
5761
5762- Issue #16461: Wave library should be able to deal with 4GB wav files,
5763  and sample rate of 44100 Hz.
5764
5765- Issue #16176: Properly identify Windows 8 via platform.platform()
5766
5767- Issue #16088: BaseHTTPRequestHandler's send_error method includes a
5768  Content-Length header in it's response now. Patch by Antoine Pitrou.
5769
5770- Issue #16114: The subprocess module no longer provides a misleading error
5771  message stating that args[0] did not exist when either the cwd or executable
5772  keyword arguments specified a path that did not exist.
5773
5774- Issue #16169: Fix ctypes.WinError()'s confusion between errno and winerror.
5775
5776- Issue #16110: logging.fileConfig now accepts a pre-initialised ConfigParser
5777  instance.
5778
5779- Issue #1492704: shutil.copyfile() raises a distinct SameFileError now if
5780  source and destination are the same file. Patch by Atsuo Ishimoto.
5781
5782- Issue #13896: Make shelf instances work with 'with' as context managers.
5783  Original patch by Filip Gruszczyński.
5784
5785- Issue #15417: Add support for csh and fish in venv activation scripts.
5786
5787- Issue #14377: ElementTree.write and some of the module-level functions have
5788  a new parameter - *short_empty_elements*. It controls how elements with no
5789  contents are emitted.
5790
5791- Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element
5792  element_factory (fixes a regression in SimpleTAL).
5793
5794- Issue #9650: List commonly used format codes in time.strftime and
5795  time.strptime docsttings.  Original patch by Mike Hoy.
5796
5797- Issue #15452: logging configuration socket listener now has a verify option
5798  that allows an application to apply a verification function to the
5799  received configuration data before it is acted upon.
5800
5801- Issue #16034: Fix performance regressions in the new `bz2.BZ2File`
5802  implementation.  Initial patch by Serhiy Storchaka.
5803
5804- `pty.spawn()` now returns the child process status returned by `os.waitpid()`.
5805
5806- Issue #15756: `subprocess.poll()` now properly handles `errno.ECHILD` to
5807  return a returncode of 0 when the child has already exited or cannot be waited
5808  on.
5809
5810- Issue #15323: Improve failure message of `Mock.assert_called_once_with()`.
5811
5812- Issue #16064: ``unittest -m`` claims executable is "python", not "python3".
5813
5814- Issue #12376: Pass on parameters in `TextTestResult.__init__()` super call.
5815
5816- Issue #15222: Insert blank line after each message in mbox mailboxes.
5817
5818- Issue #16013: Fix `csv.Reader` parsing issue with ending quote characters.
5819  Patch by Serhiy Storchaka.
5820
5821- Issue #15421: Fix an OverflowError in `Calendar.itermonthdates()` after
5822  `datetime.MAXYEAR`.  Patch by Cédric Krier.
5823
5824- Issue #16112: platform.architecture does not correctly escape argument to
5825  /usr/bin/file.  Patch by David Benjamin.
5826
5827- Issue #15970: `xml.etree.ElementTree` now serializes correctly the empty HTML
5828  elements 'meta' and 'param'.
5829
5830- Issue #15842: The `SocketIO.{readable,writable,seekable}` methods now raise
5831  ValueError when the file-like object is closed.  Patch by Alessandro Moura.
5832
5833- Issue #15876: Fix a refleak in the `curses` module: window.encoding.
5834
5835- Issue #15881: Fix `atexit` hook in `multiprocessing`.  Original patch by Chris
5836  McDonough.
5837
5838- Issue #15841: The readable(), writable() and seekable() methods of
5839  `io.BytesIO` and `io.StringIO` objects now raise ValueError when the object
5840  has been closed.  Patch by Alessandro Moura.
5841
5842- Issue #15447: Use `subprocess.DEVNULL` in webbrowser, instead of opening
5843  `os.devnull` explicitly and leaving it open.
5844
5845- Issue #15509: `webbrowser.UnixBrowser` no longer passes empty arguments to
5846  Popen when ``%action`` substitutions produce empty strings.
5847
5848- Issue #12776, issue #11839: Call `argparse` type function (specified by
5849  add_argument) only once. Before, the type function was called twice in the
5850  case where the default was specified and the argument was given as well.  This
5851  was especially problematic for the FileType type, as a default file would
5852  always be opened, even if a file argument was specified on the command line.
5853
5854- Issue #15906: Fix a regression in argparse caused by the preceding change,
5855  when ``action='append'``, ``type='str'`` and ``default=[]``.
5856
5857- Issue #16113: Added sha3 module based on the Keccak reference implementation
5858  3.2. The `hashlib` module has four additional hash algorithms: `sha3_224`,
5859  `sha3_256`, `sha3_384` and `sha3_512`. As part of the patch some common
5860  code was moved from _hashopenssl.c to hashlib.h.
5861
5862- ctypes.call_commethod was removed, since its only usage was in the defunct
5863  samples directory.
5864
5865- Issue #16692: Added TLSv1.1 and TLSv1.2 support for the ssl modules.
5866
5867- Issue #16832: add abc.get_cache_token() to expose cache validity checking
5868  support in ABCMeta.
5869
5870IDLE
5871----
5872
5873- Issue #18429: Format / Format Paragraph, now works when comment blocks
5874  are selected. As with text blocks, this works best when the selection
5875  only includes complete lines.
5876
5877- Issue #18226: Add docstrings and unittests for FormatParagraph.py.
5878  Original patches by Todd Rovito and Phil Webster.
5879
5880- Issue #18279: Format - Strip trailing whitespace no longer marks a file as
5881  changed when it has not been changed. This fix followed the addition of a
5882  test file originally written by Phil Webster (the issue's main goal).
5883
5884- Issue #7136: In the Idle File menu, "New Window" is renamed "New File".
5885  Patch by Tal Einat, Roget Serwy, and Todd Rovito.
5886
5887- Remove dead imports of imp.
5888
5889- Issue #18196: Avoid displaying spurious SystemExit tracebacks.
5890
5891- Issue #5492: Avoid traceback when exiting IDLE caused by a race condition.
5892
5893- Issue #17511: Keep IDLE find dialog open after clicking "Find Next".
5894  Original patch by Sarah K.
5895
5896- Issue #18055: Move IDLE off of imp and on to importlib.
5897
5898- Issue #15392: Create a unittest framework for IDLE.
5899  Initial patch by Rajagopalasarma Jayakrishnan.
5900  See Lib/idlelib/idle_test/README.txt for how to run Idle tests.
5901
5902- Issue #14146: Highlight source line while debugging on Windows.
5903
5904- Issue #17838: Allow sys.stdin to be reassigned.
5905
5906- Issue #13495: Avoid loading the color delegator twice in IDLE.
5907
5908- Issue #17798: Allow IDLE to edit new files when specified on command line.
5909
5910- Issue #14735: Update IDLE docs to omit "Control-z on Windows".
5911
5912- Issue #17532: Always include Options menu for IDLE on OS X.
5913  Patch by Guilherme Simões.
5914
5915- Issue #17585: Fixed IDLE regression. Now closes when using exit() or quit().
5916
5917- Issue #17657: Show full Tk version in IDLE's about dialog.
5918  Patch by Todd Rovito.
5919
5920- Issue #17613: Prevent traceback when removing syntax colorizer in IDLE.
5921
5922- Issue #1207589: Backwards-compatibility patch for right-click menu in IDLE.
5923
5924- Issue #16887: IDLE now accepts Cancel in tabify/untabify dialog box.
5925
5926- Issue #17625: In IDLE, close the replace dialog after it is used.
5927
5928- Issue #14254: IDLE now handles readline correctly across shell restarts.
5929
5930- Issue #17614: IDLE no longer raises exception when quickly closing a file.
5931
5932- Issue #6698: IDLE now opens just an editor window when configured to do so.
5933
5934- Issue #8900: Using keyboard shortcuts in IDLE to open a file no longer
5935  raises an exception.
5936
5937- Issue #6649: Fixed missing exit status in IDLE. Patch by Guilherme Polo.
5938
5939- Issue #17114: IDLE now uses non-strict config parser.
5940
5941- Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
5942  interface and support all mandatory methods and properties.
5943
5944- Issue #5066: Update IDLE docs. Patch by Todd Rovito.
5945
5946- Issue #16829: IDLE printing no longer fails if there are spaces or other
5947  special characters in the file path.
5948
5949- Issue #16491: IDLE now prints chained exception tracebacks.
5950
5951- Issue #16819: IDLE method completion now correctly works for bytes literals.
5952
5953- Issue #16504: IDLE now catches SyntaxErrors raised by tokenizer. Patch by
5954  Roger Serwy.
5955
5956- Issue #16511: Use default IDLE width and height if config param is not valid.
5957  Patch Serhiy Storchaka.
5958
5959- Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu.
5960  Patch by Todd Rovito.
5961
5962- Issue #16123: IDLE - deprecate running without a subprocess.
5963  Patch by Roger Serwy.
5964
5965Tests
5966-----
5967
5968- Issue #1666318: Add a test that shutil.copytree() retains directory
5969  permissions.  Patch by Catherine Devlin.
5970
5971- Issue #18273: move the tests in Lib/test/json_tests to Lib/test/test_json
5972  and make them discoverable by unittest.  Patch by Zachary Ware.
5973
5974- Fix a fcntl test case on KFreeBSD, Debian #708653 (Petr Salinger).
5975
5976- Issue #18396: Fix spurious test failure in test_signal on Windows when
5977  faulthandler is enabled (Patch by Jeremy Kloth)
5978
5979- Issue #17046: Fix broken test_executable_without_cwd in test_subprocess.
5980
5981- Issue #15415: Add new temp_dir() and change_cwd() context managers to
5982  test.support, and refactor temp_cwd() to use them.  Patch by Chris Jerdonek.
5983
5984- Issue #15494: test.support is now a package rather than a module (Initial
5985  patch by Indra Talip)
5986
5987- Issue #17944: test_zipfile now discoverable and uses subclassing to
5988  generate tests for different compression types.  Fixed a bug with skipping
5989  some tests due to use of exhausted iterators.
5990
5991- Issue #18266: test_largefile now works with unittest test discovery and
5992  supports running only selected tests.  Patch by Zachary Ware.
5993
5994- Issue #17767: test_locale now works with unittest test discovery.
5995  Original patch by Zachary Ware.
5996
5997- Issue #18375: Assume --randomize when --randseed is used for running the
5998  testsuite.
5999
6000- Issue #11185: Fix test_wait4 under AIX.  Patch by Sébastien Sablé.
6001
6002- Issue #18207: Fix test_ssl for some versions of OpenSSL that ignore seconds
6003  in ASN1_TIME fields.
6004
6005- Issue #18094: test_uuid no longer reports skipped tests as passed.
6006
6007- Issue #17992: Add timeouts to asyncore and asynchat tests so that they won't
6008  accidentally hang.
6009
6010- Issue #17833: Fix test_gdb failures seen on machines where debug symbols
6011  for glibc are available (seen on PPC64 Linux).
6012
6013- Issue #7855: Add tests for ctypes/winreg for issues found in IronPython.
6014  Initial patch by Dino Viehland.
6015
6016- Issue #11078: test___all__ now checks for duplicates in __all__.
6017  Initial patch by R. David Murray.
6018
6019- Issue #17712: Fix test_gdb failures on Ubuntu 13.04.
6020
6021- Issue #17835: Fix test_io when the default OS pipe buffer size is larger
6022  than one million bytes.
6023
6024- Issue #17065: Use process-unique key for winreg tests to avoid failures if
6025  test is run multiple times in parallel (eg: on a buildbot host).
6026
6027- Issue #12820: add tests for the xml.dom.minicompat module.
6028  Patch by John Chandler and Phil Connell.
6029
6030- Issue #17691: test_univnewlines now works with unittest test discovery.
6031  Patch by Zachary Ware.
6032
6033- Issue #17790: test_set now works with unittest test discovery.
6034  Patch by Zachary Ware.
6035
6036- Issue #17789: test_random now works with unittest test discovery.
6037  Patch by Zachary Ware.
6038
6039- Issue #17779: test_osx_env now works with unittest test discovery.
6040  Patch by Zachary Ware.
6041
6042- Issue #17766: test_iterlen now works with unittest test discovery.
6043  Patch by Zachary Ware.
6044
6045- Issue #17690: test_time now works with unittest test discovery.
6046  Patch by Zachary Ware.
6047
6048- Issue #17692: test_sqlite now works with unittest test discovery.
6049  Patch by Zachary Ware.
6050
6051- Issue #11995: test_pydoc doesn't import all sys.path modules anymore.
6052
6053- Issue #17448: test_sax now skips if there are no xml parsers available
6054  instead of raising an ImportError.
6055
6056- Issue #11420: make test suite pass with -B/DONTWRITEBYTECODE set.
6057  Initial patch by Thomas Wouters.
6058
6059- Issue #10652: make tcl/tk tests run after __all__ test, patch by
6060  Zachary Ware.
6061
6062- Issue #11963: remove human verification from test_parser and test_subprocess.
6063
6064- Issue #11732: add a new suppress_crash_popup() context manager to test.support
6065  that disables crash popups on Windows and use it in test_faulthandler and
6066  test_capi.
6067
6068- Issue #13898: test_ssl no longer prints a spurious stack trace on Ubuntu.
6069
6070- Issue #17283: Share code between `__main__.py` and `regrtest.py` in
6071  `Lib/test`.
6072
6073- Issue #17249: convert a test in test_capi to use unittest and reap threads.
6074
6075- Issue #17107: Test client-side SNI support in urllib.request thanks to
6076  the new server-side SNI support in the ssl module.  Initial patch by
6077  Daniel Black.
6078
6079- Issue #17041: Fix testing when Python is configured with the
6080  --without-doc-strings.
6081
6082- Issue #16923: Fix ResourceWarnings in test_ssl.
6083
6084- Issue #15539: Added regression tests for Tools/scripts/pindent.py.
6085
6086- Issue #17479: test_io now works with unittest test discovery.
6087  Patch by Zachary Ware.
6088
6089- Issue #17066: test_robotparser now works with unittest test discovery.
6090  Patch by Zachary Ware.
6091
6092- Issue #17334: test_index now works with unittest test discovery.
6093  Patch by Zachary Ware.
6094
6095- Issue #17333: test_imaplib now works with unittest test discovery.
6096  Patch by Zachary Ware.
6097
6098- Issue #17082: test_dbm* now work with unittest test discovery.
6099  Patch by Zachary Ware.
6100
6101- Issue #17079: test_ctypes now works with unittest test discovery.
6102  Patch by Zachary Ware.
6103
6104- Issue #17304: test_hash now works with unittest test discovery.
6105  Patch by Zachary Ware.
6106
6107- Issue #17303: test_future* now work with unittest test discovery.
6108  Patch by Zachary Ware.
6109
6110- Issue #17163: test_file now works with unittest test discovery.
6111  Patch by Zachary Ware.
6112
6113- Issue #16925: test_configparser now works with unittest test discovery.
6114  Patch by Zachary Ware.
6115
6116- Issue #16918: test_codecs now works with unittest test discovery.
6117  Patch by Zachary Ware.
6118
6119- Issue #16919: test_crypt now works with unittest test discovery.
6120  Patch by Zachary Ware.
6121
6122- Issue #16910: test_bytes, test_unicode, and test_userstring now work with
6123  unittest test discovery.  Patch by Zachary Ware.
6124
6125- Issue #16905: test_warnings now works with unittest test discovery.
6126  Initial patch by Berker Peksag.
6127
6128- Issue #16898: test_bufio now works with unittest test discovery.
6129  Patch by Zachary Ware.
6130
6131- Issue #16888: test_array now works with unittest test discovery.
6132  Patch by Zachary Ware.
6133
6134- Issue #16896: test_asyncore now works with unittest test discovery.
6135  Patch by Zachary Ware.
6136
6137- Issue #16897: test_bisect now works with unittest test discovery.
6138  Initial patch by Zachary Ware.
6139
6140- Issue #16852: test_genericpath, test_posixpath, test_ntpath, and test_macpath
6141  now work with unittest test discovery.  Patch by Zachary Ware.
6142
6143- Issue #16748: test_heapq now works with unittest test discovery.
6144
6145- Issue #10646: Tests rearranged for os.samefile/samestat to check for not
6146  just symlinks but also hard links.
6147
6148- Issue #15302: Switch regrtest from using getopt to using argparse.
6149
6150- Issue #15324: Fix regrtest parsing of --fromfile, --match, and --randomize
6151  options.
6152
6153- Issue #16702: test_urllib2_localnet tests now correctly ignores proxies for
6154  localhost tests.
6155
6156- Issue #16664: Add regression tests for glob's behaviour concerning entries
6157  starting with a ".".  Patch by Sebastian Kreft.
6158
6159- Issue #13390: The ``-R`` option to regrtest now also checks for memory
6160  allocation leaks, using :func:`sys.getallocatedblocks()`.
6161
6162- Issue #16559: Add more tests for the json module, including some from the
6163  official test suite at json.org.  Patch by Serhiy Storchaka.
6164
6165- Issue #16661: Fix the `os.getgrouplist()` test by not assuming that it gives
6166  the same output as :command:`id -G`.
6167
6168- Issue #16115: Add some tests for the executable argument to
6169  subprocess.Popen().  Initial patch by Kushal Das.
6170
6171- Issue #16126: PyErr_Format format mismatch in _testcapimodule.c.
6172  Patch by Serhiy Storchaka.
6173
6174- Issue #15304: Fix warning message when `os.chdir()` fails inside
6175  `test.support.temp_cwd()`.  Patch by Chris Jerdonek.
6176
6177- Issue #15802: Fix test logic in `TestMaildir.test_create_tmp()`. Patch by
6178  Serhiy Storchaka.
6179
6180- Issue #15557: Added a test suite for the webbrowser module, thanks to Anton
6181  Barkovsky.
6182
6183- Issue #16698: Skip posix test_getgroups when built with OS X
6184  deployment target prior to 10.6.
6185
6186Build
6187-----
6188
6189- Issue #16067: Add description into MSI file to replace installer's
6190  temporary name.
6191
6192- Issue #18257: Fix readlink usage in python-config.  Install the python
6193  version again on Darwin.
6194
6195- Issue #18481: Add C coverage reporting with gcov and lcov. A new make target
6196  "coverage-report" creates an instrumented Python build, runs unit tests
6197  and creates a HTML. The report can be updated with "make coverage-lcov".
6198
6199- Issue #17845: Clarified the message printed when some module are not built.
6200
6201- Issue #18256: Compilation fix for recent AIX releases.  Patch by
6202  David Edelsohn.
6203
6204- Issue #17547: In configure, explicitly pass -Wformat for the benefit for GCC
6205  4.8.
6206
6207- Issue #15172: Document NASM 2.10+ as requirement for building OpenSSL 1.0.1
6208  on Windows.
6209
6210- Issue #17591: Use lowercase filenames when including Windows header files.
6211  Patch by Roumen Petrov.
6212
6213- Issue #17550: Fix the --enable-profiling configure switch.
6214
6215- Issue #17425: Build with openssl 1.0.1d on Windows.
6216
6217- Issue #16754: Fix the incorrect shared library extension on linux. Introduce
6218  two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
6219  SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
6220
6221- Issue #5033: Fix building of the sqlite3 extension module when the
6222  SQLite library version has "beta" in it. Patch by Andreas Pelme.
6223
6224- Issue #17228: Fix building without pymalloc.
6225
6226- Issue #3718: Use AC_ARG_VAR to set MACHDEP in configure.ac.
6227
6228- Issue #16235: Implement python-config as a shell script.
6229
6230- Issue #16769: Remove outdated Visual Studio projects.
6231
6232- Issue #17031: Fix running regen in cross builds.
6233
6234- Issue #3754: fix typo in pthread AC_CACHE_VAL.
6235
6236- Issue #15484: Fix _PYTHON_PROJECT_BASE for srcdir != builddir builds;
6237  use _PYTHON_PROJECT_BASE in distutils/sysconfig.py.
6238
6239- Drop support for Windows 2000 (changeset e52df05b496a).
6240
6241- Issue #17029: Let h2py search the multiarch system include directory.
6242
6243- Issue #16953: Fix socket module compilation on platforms with
6244  HAVE_BROKEN_POLL. Patch by Jeffrey Armstrong.
6245
6246- Issue #16320: Remove redundant Makefile dependencies for strings and bytes.
6247
6248- Cross compiling needs host and build settings. configure no longer
6249  creates a broken PYTHON_FOR_BUILD variable when --build is missing.
6250
6251- Fix cross compiling issue in setup.py, ensure that lib_dirs and inc_dirs are
6252  defined in cross compiling mode, too.
6253
6254- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
6255
6256- Issue #16593: Have BSD 'make -s' do the right thing, thanks to Daniel Shahaf
6257
6258- Issue #16262: fix out-of-src-tree builds, if mercurial is not installed.
6259
6260- Issue #15298: ensure _sysconfigdata is generated in build directory, not
6261  source directory.
6262
6263- Issue #15833: Fix a regression in 3.3 that resulted in exceptions being
6264  raised if importlib failed to write byte-compiled files.  This affected
6265  attempts to build Python out-of-tree from a read-only source directory.
6266
6267- Issue #15923: Fix a mistake in ``asdl_c.py`` that resulted in a TypeError
6268  after 2801bf875a24 (see #15801).
6269
6270- Issue #16135: Remove OS/2 support.
6271
6272- Issue #15819: Make sure we can build Python out-of-tree from a read-only
6273  source directory.  (Somewhat related to issue #9860.)
6274
6275- Issue #15587: Enable Tk high-resolution text rendering on Macs with
6276  Retina displays.  Applies to Tkinter apps, such as IDLE, on OS X
6277  framework builds linked with Cocoa Tk 8.5.
6278
6279- Issue #17161: make install now also installs a python3 man page.
6280
6281C-API
6282-----
6283
6284- Issue #18351: Fix various issues in a function in importlib provided to help
6285  PyImport_ExecCodeModuleWithPathnames() (and thus by extension
6286  PyImport_ExecCodeModule() and PyImport_ExecCodeModuleEx()).
6287
6288- Issue #9369: The types of `char*` arguments of PyObject_CallFunction() and
6289  PyObject_CallMethod() now changed to `const char*`.  Based on patches by
6290  Jörg Müller and Lars Buitinck.
6291
6292- Issue #17206: Py_CLEAR(), Py_DECREF(), Py_XINCREF() and Py_XDECREF() now
6293  expand their arguments once instead of multiple times.  Patch written by Illia
6294  Polosukhin.
6295
6296- Issue #17522: Add the PyGILState_Check() API.
6297
6298- Issue #17327: Add PyDict_SetDefault.
6299
6300- Issue #16881: Fix Py_ARRAY_LENGTH macro for GCC < 3.1.
6301
6302- Issue #16505: Remove unused Py_TPFLAGS_INT_SUBCLASS.
6303
6304- Issue #16086: PyTypeObject.tp_flags and PyType_Spec.flags are now unsigned
6305  (unsigned long and unsigned int) to avoid an undefined behaviour with
6306  Py_TPFLAGS_TYPE_SUBCLASS ((1 << 31). PyType_GetFlags() result type is
6307  now unsigned too (unsigned long, instead of long).
6308
6309- Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified
6310  endianness detection and handling.
6311
6312Documentation
6313-------------
6314
6315- Issue #17701: Improving strftime documentation.
6316
6317- Issue #18440: Clarify that `hash()` can truncate the value returned from an
6318  object's custom `__hash__()` method.
6319
6320- Issue #17844: Add links to encoders and decoders for bytes-to-bytes codecs.
6321
6322- Issue #14097: improve the "introduction" page of the tutorial.
6323
6324- Issue #17977: The documentation for the cadefault argument's default value
6325  in urllib.request.urlopen() is fixed to match the code.
6326
6327- Issue #6696: add documentation for the Profile objects, and improve
6328  profile/cProfile docs.  Patch by Tom Pinckney.
6329
6330- Issue #15940: Specify effect of locale on time functions.
6331
6332- Issue #17538: Document XML vulnerabilties
6333
6334- Issue #16642: sched.scheduler timefunc initial default is time.monotonic.
6335  Patch by Ramchandra Apte
6336
6337- Issue #17047: remove doubled words in docs and docstrings
6338  reported by Serhiy Storchaka and Matthew Barnett.
6339
6340- Issue #15465: Document the versioning macros in the C API docs rather than
6341  the standard library docs. Patch by Kushal Das.
6342
6343- Issue #16406: Combine the pages for uploading and registering to PyPI.
6344
6345- Issue #16403: Document how distutils uses the maintainer field in
6346  PKG-INFO. Patch by Jyrki Pulliainen.
6347
6348- Issue #16695: Document how glob handles filenames starting with a
6349  dot. Initial patch by Jyrki Pulliainen.
6350
6351- Issue #8890: Stop advertising an insecure practice by replacing uses
6352  of the /tmp directory with better alternatives in the documentation.
6353  Patch by Geoff Wilson.
6354
6355- Issue #17203: add long option names to unittest discovery docs.
6356
6357- Issue #13094: add "Why do lambdas defined in a loop with different values
6358  all return the same result?" programming FAQ.
6359
6360- Issue #14901: Update portions of the Windows FAQ.
6361  Patch by Ashish Nitin Patil.
6362
6363- Issue #16267: Better document the 3.3+ approach to combining
6364  @abstractmethod with @staticmethod, @classmethod and @property
6365
6366- Issue #15209: Clarify exception chaining description in exceptions module
6367  documentation
6368
6369- Issue #15990: Improve argument/parameter documentation.
6370
6371- Issue #16209: Move the documentation for the str built-in function to a new
6372  str class entry in the "Text Sequence Type" section.
6373
6374- Issue #13538: Improve str() and object.__str__() documentation.
6375
6376- Issue #16489: Make it clearer that importlib.find_loader() needs parent
6377  packages to be explicitly imported.
6378
6379- Issue #16400: Update the description of which versions of a given package
6380  PyPI displays.
6381
6382- Issue #15677: Document that zlib and gzip accept a compression level of 0 to
6383  mean 'no compression'. Patch by Brian Brazil.
6384
6385- Issue #16197: Update winreg docstrings and documentation to match code.
6386  Patch by Zachary Ware.
6387
6388- Issue #8040: added a version switcher to the documentation.  Patch by
6389  Yury Selivanov.
6390
6391- Issue #16241: Document -X faulthandler command line option.
6392  Patch by Marek Šuppa.
6393
6394- Additional comments and some style changes in the concurrent.futures URL
6395  retrieval example
6396
6397- Issue #16115: Improve subprocess.Popen() documentation around args, shell,
6398  and executable arguments.
6399
6400- Issue #13498: Clarify docs of os.makedirs()'s exist_ok argument.  Done with
6401  great native-speaker help from R. David Murray.
6402
6403- Issue #15533: Clarify docs and add tests for `subprocess.Popen()`'s cwd
6404  argument.
6405
6406- Issue #15979: Improve timeit documentation.
6407
6408- Issue #16036: Improve documentation of built-in `int()`'s signature and
6409  arguments.
6410
6411- Issue #15935: Clarification of `argparse` docs, re: add_argument() type and
6412  default arguments.  Patch contributed by Chris Jerdonek.
6413
6414- Issue #11964: Document a change in v3.2 to the behavior of the indent
6415  parameter of json encoding operations.
6416
6417- Issue #15116: Remove references to appscript as it is no longer being
6418  supported.
6419
6420Tools/Demos
6421-----------
6422
6423- Issue #18817: Fix a resource warning in Lib/aifc.py demo.  Patch by
6424  Vajrasky Kok.
6425
6426- Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
6427
6428- Issue #18448: Fix a typo in Tools/demo/eiffel.py.
6429
6430- Issue #18457: Fixed saving of formulas and complex numbers in
6431  Tools/demo/ss1.py.
6432
6433- Issue #18449: Make Tools/demo/ss1.py work again on Python 3.  Patch by
6434  Févry Thibault.
6435
6436- Issue #12990: The "Python Launcher" on OSX could not launch python scripts
6437  that have paths that include wide characters.
6438
6439- Issue #15239: Make mkstringprep.py work again on Python 3.
6440
6441- Issue #17028: Allowed Python arguments to be supplied to the Windows
6442  launcher.
6443
6444- Issue #17156: pygettext.py now detects the encoding of source files and
6445  correctly writes and escapes non-ascii characters.
6446
6447- Issue #15539: Fix a number of bugs in Tools/scripts/pindent.py.  Now
6448  pindent.py works with a "with" statement.  pindent.py no longer produces
6449  improper indentation.  pindent.py now works with continued lines broken after
6450  "class" or "def" keywords and with continuations at the start of line.
6451
6452- Issue #11797: Add a 2to3 fixer that maps reload() to imp.reload().
6453
6454- Issue #10966: Remove the concept of unexpected skipped tests.
6455
6456- Issue #9893: Removed the Misc/Vim directory.
6457
6458- Removed the Misc/TextMate directory.
6459
6460- Issue #16245: Add the Tools/scripts/parse_html5_entities.py script to parse
6461  the list of HTML5 entities and update the html.entities.html5 dictionary.
6462
6463- Issue #15378: Fix Tools/unicode/comparecodecs.py.  Patch by Serhiy Storchaka.
6464
6465- Issue #16549: Make json.tool work again on Python 3 and add tests.
6466  Initial patch by Berker Peksag and Serhiy Storchaka.
6467
6468- Issue #13301: use ast.literal_eval() instead of eval() in Tools/i18n/msgfmt.py.
6469  Patch by Serhiy Storchaka.
6470
6471Windows
6472-------
6473
6474- Issue #18569: The installer now adds .py to the PATHEXT variable when extensions
6475  are registered. Patch by Paul Moore.
6476
6477
6478What's New in Python 3.3.0?
6479===========================
6480
6481*Release date: 29-Sep-2012*
6482
6483Core and Builtins
6484-----------------
6485
6486- Issue #16046: Fix loading sourceless legacy .pyo files.
6487
6488- Issue #16060: Fix refcounting bug when `__trunc__()` returns an object whose
6489  `__int__()` gives a non-integer.  Patch by Serhiy Storchaka.
6490
6491Extension Modules
6492-----------------
6493
6494- Issue #16012: Fix a regression in pyexpat. The parser's `UseForeignDTD()`
6495  method doesn't require an argument again.
6496
6497
6498What's New in Python 3.3.0 Release Candidate 3?
6499===============================================
6500
6501*Release date: 23-Sep-2012*
6502
6503Core and Builtins
6504-----------------
6505
6506- Issue #15900: Fix reference leak in `PyUnicode_TranslateCharmap()`.
6507
6508- Issue #15926: Fix crash after multiple reinitializations of the interpreter.
6509
6510- Issue #15895: Fix FILE pointer leak in one error branch of
6511  `PyRun_SimpleFileExFlags()` when filename points to a pyc/pyo file, closeit is
6512  false an and set_main_loader() fails.
6513
6514- Fixes for a few crash and memory leak regressions found by Coverity.
6515
6516Library
6517-------
6518
6519- Issue #15882: Change `_decimal` to accept any coefficient tuple when
6520  constructing infinities. This is done for backwards compatibility with
6521  decimal.py: Infinity coefficients are undefined in _decimal (in accordance
6522  with the specification).
6523
6524- Issue #15925: Fix a regression in `email.util` where the `parsedate()` and
6525  `parsedate_tz()` functions did not return None anymore when the argument could
6526  not be parsed.
6527
6528Extension Modules
6529-----------------
6530
6531- Issue #15973: Fix a segmentation fault when comparing datetime timezone
6532  objects.
6533
6534- Issue #15977: Fix memory leak in Modules/_ssl.c when the function
6535  _set_npn_protocols() is called multiple times, thanks to Daniel Sommermann.
6536
6537- Issue #15969: `faulthandler` module: rename dump_tracebacks_later() to
6538  dump_traceback_later() and cancel_dump_tracebacks_later() to
6539  cancel_dump_traceback_later().
6540
6541- _decimal module: use only C 89 style comments.
6542
6543
6544What's New in Python 3.3.0 Release Candidate 2?
6545===============================================
6546
6547*Release date: 09-Sep-2012*
6548
6549Core and Builtins
6550-----------------
6551
6552- Issue #13992: The trashcan mechanism is now thread-safe.  This eliminates
6553  sporadic crashes in multi-thread programs when several long deallocator chains
6554  ran concurrently and involved subclasses of built-in container types.
6555
6556- Issue #15784: Modify `OSError`.__str__() to better distinguish between errno
6557  error numbers and Windows error numbers.
6558
6559- Issue #15781: Fix two small race conditions in import's module locking.
6560
6561Library
6562-------
6563
6564- Issue #17158: Add 'symbols' to help() welcome message; clarify
6565  'modules spam' messages.
6566
6567- Issue #15847: Fix a regression in argparse, which did not accept tuples as
6568  argument lists anymore.
6569
6570- Issue #15828: Restore support for C extensions in `imp.load_module()`.
6571
6572- Issue #15340: Fix importing the random module when ``/dev/urandom`` cannot be
6573  opened.  This was a regression caused by the hash randomization patch.
6574
6575- Issue #10650: Deprecate the watchexp parameter of the `Decimal.quantize()`
6576  method.
6577
6578- Issue #15785: Modify `window.get_wch()` API of the curses module: return a
6579  character for most keys, and an integer for special keys, instead of always
6580  returning an integer. So it is now possible to distinguish special keys like
6581  keypad keys.
6582
6583- Issue #14223: Fix `window.addch()` of the curses module for special characters
6584  like curses.ACS_HLINE: the Python function addch(int) and addch(bytes) is now
6585  calling the C function waddch()/mvwaddch() (as it was done in Python 3.2),
6586  instead of wadd_wch()/mvwadd_wch(). The Python function addch(str) is still
6587  calling the C function wadd_wch()/mvwadd_wch() if the Python curses is linked
6588  to libncursesw.
6589
6590Build
6591-----
6592
6593- Issue #15822: Really ensure 2to3 grammar pickles are properly installed
6594  (replaces fixes for Issue #15645).
6595
6596Documentation
6597-------------
6598
6599- Issue #15814: The memoryview enhancements in 3.3.0 accidentally permitted the
6600  hashing of multi-dimensional memorviews and memoryviews with multi-byte item
6601  formats. The intended restrictions have now been documented - they will be
6602  correctly enforced in 3.3.1.
6603
6604
6605What's New in Python 3.3.0 Release Candidate 1?
6606===============================================
6607
6608*Release date: 25-Aug-2012*
6609
6610Core and Builtins
6611-----------------
6612
6613- Issue #15573: memoryview comparisons are now performed by value with full
6614  support for any valid struct module format definition.
6615
6616- Issue #15316: When an item in the fromlist for `__import__()` doesn't exist,
6617  don't raise an error, but if an exception is raised as part of an import do
6618  let that propagate.
6619
6620- Issue #15778: Ensure that ``str(ImportError(msg))`` returns a str even when
6621  msg isn't a str.
6622
6623- Issue #2051: Source file permission bits are once again correctly copied to
6624  the cached bytecode file. (The migration to importlib reintroduced this
6625  problem because these was no regression test. A test has been added as part of
6626  this patch)
6627
6628- Issue #15761: Fix crash when ``PYTHONEXECUTABLE`` is set on Mac OS X.
6629
6630- Issue #15726: Fix incorrect bounds checking in PyState_FindModule.  Patch by
6631  Robin Schreiber.
6632
6633- Issue #15604: Update uses of `PyObject_IsTrue()` to check for and handle
6634  errors correctly.  Patch by Serhiy Storchaka.
6635
6636- Issue #14846: `importlib.FileFinder` now handles the case where the directory
6637  being searched is removed after a previous import attempt.
6638
6639Library
6640-------
6641
6642- Issue #13370: Ensure that ctypes works on Mac OS X when Python is compiled
6643  using the clang compiler.
6644
6645- Issue #13072: The array module's 'u' format code is now deprecated and will be
6646  removed in Python 4.0.
6647
6648- Issue #15544: Fix Decimal.__float__ to work with payload-carrying NaNs.
6649
6650- Issue #15776: Allow pyvenv to work in existing directory with --clean.
6651
6652- Issue #15249: email's BytesGenerator now correctly mangles From lines (when
6653  requested) even if the body contains undecodable bytes.
6654
6655- Issue #15777: Fix a refleak in _posixsubprocess.
6656
6657- Issue #665194: Update `email.utils.localtime` to use datetime.astimezone and
6658  correctly handle historic changes in UTC offsets.
6659
6660- Issue #15199: Fix JavaScript's default MIME type to application/javascript.
6661  Patch by Bohuslav Kabrda.
6662
6663- Issue #12643: `code.InteractiveConsole` now respects `sys.excepthook` when
6664  displaying exceptions.  Patch by Aaron Iles.
6665
6666- Issue #13579: `string.Formatter` now understands the 'a' conversion specifier.
6667
6668- Issue #15595: Fix ``subprocess.Popen(universal_newlines=True)`` for certain
6669  locales (utf-16 and utf-32 family). Patch by Chris Jerdonek.
6670
6671- Issue #15477: In cmath and math modules, add workaround for platforms whose
6672  system-supplied log1p function doesn't respect signs of zeros.
6673
6674- Issue #15715: `importlib.__import__()` will silence an ImportError when the
6675  use of fromlist leads to a failed import.
6676
6677- Issue #14669: Fix pickling of connections and sockets on Mac OS X by
6678  sending/receiving an acknowledgment after file descriptor transfer.
6679  TestPicklingConnection has been reenabled for Mac OS X.
6680
6681- Issue #11062: Fix adding a message from file to Babyl mailbox.
6682
6683- Issue #15646: Prevent equivalent of a fork bomb when using `multiprocessing`
6684  on Windows without the ``if __name__ == '__main__'`` idiom.
6685
6686IDLE
6687----
6688
6689- Issue #15678: Fix IDLE menus when started from OS X command line (3.3.0b2
6690  regression).
6691
6692Documentation
6693-------------
6694
6695- Touched up the Python 2 to 3 porting guide.
6696
6697- Issue #14674: Add a discussion of the `json` module's standard compliance.
6698  Patch by Chris Rebert.
6699
6700- Create a 'Concurrent Execution' section in the docs, and split up the
6701  'Optional Operating System Services' section to use a more user-centric
6702  classification scheme (splitting them across the new CE section, IPC and text
6703  processing). Operating system limitations can be reflected with the Sphinx
6704  ``:platform:`` tag, it doesn't make sense as part of the Table of Contents.
6705
6706- Issue #4966: Bring the sequence docs up to date for the Py3k transition and
6707  the many language enhancements since they were original written.
6708
6709- The "path importer" misnomer has been replaced with Eric Snow's
6710  more-awkward-but-at-least-not-wrong suggestion of "path based finder" in the
6711  import system reference docs.
6712
6713- Issue #15640: Document `importlib.abc.Finder` as deprecated.
6714
6715- Issue #15630: Add an example for "continue" stmt in the tutorial.  Patch by
6716  Daniel Ellis.
6717
6718Tests
6719-----
6720
6721- Issue #15747: ZFS always returns EOPNOTSUPP when attempting to set the
6722  UF_IMMUTABLE flag (via either chflags or lchflags); refactor affected tests in
6723  test_posix.py to account for this.
6724
6725- Issue #15285: Refactor the approach for testing connect timeouts using two
6726  external hosts that have been configured specifically for this type of test.
6727
6728- Issue #15743: Remove the deprecated method usage in `urllib` tests. Patch by
6729  Jeff Knupp.
6730
6731- Issue #15615: Add some tests for the `json` module's handling of invalid input
6732  data.  Patch by Kushal Das.
6733
6734Build
6735-----
6736
6737- Output lib files for PGO build into PGO directory.
6738
6739- Pick up 32-bit launcher from PGO directory on 64-bit PGO build.
6740
6741- Drop ``PC\python_nt.h`` as it's not used.  Add input dependency on custom
6742  build step.
6743
6744- Issue #15511: Drop explicit dependency on pythonxy.lib from _decimal amd64
6745  configuration.
6746
6747- Add missing PGI/PGO configurations for pywlauncher.
6748
6749- Issue #15645: Ensure 2to3 grammar pickles are properly installed.
6750
6751
6752What's New in Python 3.3.0 Beta 2?
6753==================================
6754
6755*Release date: 12-Aug-2012*
6756
6757Core and Builtins
6758-----------------
6759
6760- Issue #15568: Fix the return value of ``yield from`` when StopIteration is
6761  raised by a custom iterator.
6762
6763- Issue #13119: `sys.stdout` and `sys.stderr` are now using "\r\n" newline on
6764  Windows, as Python 2.
6765
6766- Issue #15534: Fix the fast-search function for non-ASCII Unicode strings.
6767
6768- Issue #15508: Fix the docstring for `__import__()` to have the proper default
6769  value of 0 for 'level' and to not mention negative levels since they are not
6770  supported.
6771
6772- Issue #15425: Eliminated traceback noise from more situations involving
6773  importlib.
6774
6775- Issue #14578: Support modules registered in the Windows registry again.
6776
6777- Issue #15466: Stop using TYPE_INT64 in marshal, to make importlib.h (and other
6778  byte code files) equal between 32-bit and 64-bit systems.
6779
6780- Issue #1692335: Move initial exception args assignment to
6781  `BaseException.__new__()` to help pickling of naive subclasses.
6782
6783- Issue #12834: Fix `PyBuffer_ToContiguous()` for non-contiguous arrays.
6784
6785- Issue #15456: Fix code `__sizeof__()` after #12399 change.  Patch by Serhiy
6786  Storchaka.
6787
6788- Issue #15404: Refleak in PyMethodObject repr.
6789
6790- Issue #15394: An issue in `PyModule_Create()` that caused references to be
6791  leaked on some error paths has been fixed.  Patch by Julia Lawall.
6792
6793- Issue #15368: An issue that caused bytecode generation to be non-deterministic
6794  has been fixed.
6795
6796- Issue #15202: Consistently use the name "follow_symlinks" for new parameters
6797  in os and shutil functions.
6798
6799- Issue #15314: ``__main__.__loader__`` is now set correctly during interpreter
6800  startup.
6801
6802- Issue #15111: When a module imported using 'from import' has an ImportError
6803  inside itself, don't mask that fact behind a generic ImportError for the
6804  module itself.
6805
6806- Issue #15293: Add GC support to the AST base node type.
6807
6808- Issue #15291: Fix a memory leak where AST nodes where not properly
6809  deallocated.
6810
6811- Issue #15110: Fix the tracebacks generated by "import xxx" to not show the
6812  importlib stack frames.
6813
6814- Issue #16369: Global PyTypeObjects not initialized with PyType_Ready(...).
6815
6816- Issue #15020: The program name used to search for Python's path is now
6817  "python3" under Unix, not "python".
6818
6819- Issue #15897: zipimport.c doesn't check return value of fseek().
6820  Patch by Felipe Cruz.
6821
6822- Issue #15033: Fix the exit status bug when modules invoked using -m switch,
6823  return the proper failure return value (1). Patch contributed by Jeff Knupp.
6824
6825- Issue #15229: An `OSError` subclass whose __init__ doesn't call back
6826  OSError.__init__ could produce incomplete instances, leading to crashes when
6827  calling str() on them.
6828
6829- Issue #15307: Virtual environments now use symlinks with framework builds on
6830  Mac OS X, like other POSIX builds.
6831
6832Library
6833-------
6834
6835- Issue #14590: configparser now correctly strips inline comments when delimiter
6836  occurs earlier without preceding space.
6837
6838- Issue #15424: Add a `__sizeof__()` implementation for array objects.  Patch by
6839  Ludwig Hähne.
6840
6841- Issue #15576: Allow extension modules to act as a package's __init__ module.
6842
6843- Issue #15502: Have `importlib.invalidate_caches()` work on `sys.meta_path`
6844  instead of `sys.path_importer_cache`.
6845
6846- Issue #15163: Pydoc shouldn't list __loader__ as module data.
6847
6848- Issue #15471: Do not use mutable objects as defaults for
6849  `importlib.__import__()`.
6850
6851- Issue #15559: To avoid a problematic failure mode when passed to the bytes
6852  constructor, objects in the ipaddress module no longer implement `__index__()`
6853  (they still implement `__int__()` as appropriate).
6854
6855- Issue #15546: Fix handling of pathological input data in the peek() and
6856  read1() methods of the BZ2File, GzipFile and LZMAFile classes.
6857
6858- Issue #12655: Instead of requiring a custom type, `os.sched_getaffinity()` and
6859  `os.sched_setaffinity()` now use regular sets of integers to represent the
6860  CPUs a process is restricted to.
6861
6862- Issue #15538: Fix compilation of the `socket.getnameinfo()` /
6863  `socket.getaddrinfo()` emulation code.  Patch by Philipp Hagemeister.
6864
6865- Issue #15519: Properly expose WindowsRegistryFinder in importlib (and use the
6866  correct term for it).  Original patch by Eric Snow.
6867
6868- Issue #15502: Bring the importlib ABCs into line with the current state of the
6869  import protocols given PEP 420.  Original patch by Eric Snow.
6870
6871- Issue #15499: Launching a webbrowser in Unix used to sleep for a few seconds.
6872  Original patch by Anton Barkovsky.
6873
6874- Issue #15463: The faulthandler module truncates strings to 500 characters,
6875  instead of 100, to be able to display long file paths.
6876
6877- Issue #6056: Make `multiprocessing` use setblocking(True) on the sockets it
6878  uses.  Original patch by J Derek Wilson.
6879
6880- Issue #15364: Fix sysconfig.get_config_var('srcdir') to be an absolute path.
6881
6882- Issue #15413: `os.times()` had disappeared under Windows.
6883
6884- Issue #15402: An issue in the struct module that caused `sys.getsizeof()` to
6885  return incorrect results for struct.Struct instances has been fixed.  Initial
6886  patch by Serhiy Storchaka.
6887
6888- Issue #15232: When mangle_from is True, `email.Generator` now correctly
6889  mangles lines that start with 'From ' that occur in a MIME preamble or
6890  epilogue.
6891
6892- Issue #15094: Incorrectly placed #endif in _tkinter.c.  Patch by Serhiy
6893  Storchaka.
6894
6895- Issue #13922: `argparse` no longer incorrectly strips '--'s that appear after
6896  the first one.
6897
6898- Issue #12353: `argparse` now correctly handles null argument values.
6899
6900- Issue #10017, issue #14998: Fix TypeError using pprint on dictionaries with
6901  user-defined types as keys or other unorderable keys.
6902
6903- Issue #15397: `inspect.getmodulename()` is now based directly on importlib via
6904  a new `importlib.machinery.all_suffixes()` API.
6905
6906- Issue #14635: `telnetlib` will use poll() rather than select() when possible to
6907  avoid failing due to the select() file descriptor limit.
6908
6909- Issue #15180: Clarify posixpath.join() error message when mixing str & bytes.
6910
6911- Issue #15343: pkgutil now includes an iter_importer_modules implementation for
6912  importlib.machinery.FileFinder (similar to the way it already handled
6913  zipimport.zipimporter).
6914
6915- Issue #15314: runpy now sets __main__.__loader__ correctly.
6916
6917- Issue #15357: The import emulation in pkgutil is now deprecated. pkgutil uses
6918  importlib internally rather than the emulation.
6919
6920- Issue #15233: Python now guarantees that callables registered with the atexit
6921  module will be called in a deterministic order.
6922
6923- Issue #15238: `shutil.copystat()` now copies Linux "extended attributes".
6924
6925- Issue #15230: runpy.run_path now correctly sets __package__ as described in
6926  the documentation.
6927
6928- Issue #15315: Support VS 2010 in distutils cygwincompiler.
6929
6930- Issue #15294: Fix a regression in pkgutil.extend_path()'s handling of nested
6931  namespace packages.
6932
6933- Issue #15056: `imp.cache_from_source()` and `imp.source_from_cache()` raise
6934  NotImplementedError when `sys.implementation.cache_tag` is set to None.
6935
6936- Issue #15256: Grammatical mistake in exception raised by `imp.find_module()`.
6937
6938- Issue #5931: `wsgiref` environ variable SERVER_SOFTWARE will specify an
6939  implementation specific term like CPython, Jython instead of generic "Python".
6940
6941- Issue #13248: Remove obsolete argument "max_buffer_size" of BufferedWriter and
6942  BufferedRWPair, from the io module.
6943
6944- Issue #13248: Remove obsolete argument "version" of `argparse.ArgumentParser`.
6945
6946- Issue #14814: Implement more consistent ordering and sorting behaviour for
6947  ipaddress objects.
6948
6949- Issue #14814: `ipaddress` network objects correctly return NotImplemented when
6950  compared to arbitrary objects instead of raising TypeError.
6951
6952- Issue #14990: Correctly fail with SyntaxError on invalid encoding declaration.
6953
6954- Issue #14814: `ipaddress` now provides more informative error messages when
6955  constructing instances directly (changes permitted during beta due to
6956  provisional API status).
6957
6958- Issue #15247: `io.FileIO` now raises an error when given a file descriptor
6959  pointing to a directory.
6960
6961- Issue #15261: Stop os.stat(fd) crashing on Windows when fd not open.
6962
6963- Issue #15166: Implement `imp.get_tag()` using `sys.implementation.cache_tag`.
6964
6965- Issue #15210: Catch KeyError when `importlib.__init__()` can't find
6966  _frozen_importlib in sys.modules, not ImportError.
6967
6968- Issue #15030: `importlib.abc.PyPycLoader` now supports the new source size
6969  header field in .pyc files.
6970
6971- Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on
6972  flush().
6973
6974- Issue #10571: Fix the "--sign" option of distutils' upload command.  Patch by
6975  Jakub Wilk.
6976
6977- Issue #9559: If messages were only added, a new file is no longer created and
6978  renamed over the old file when flush() is called on an mbox, MMDF or Babyl
6979  mailbox.
6980
6981- Issue #10924: Fixed `crypt.mksalt()` to use a RNG that is suitable for
6982  cryptographic purpose.
6983
6984- Issue #15184: Ensure consistent results of OS X configuration tailoring for
6985  universal builds by factoring out common OS X-specific customizations from
6986  sysconfig, distutils.sysconfig, distutils.util, and distutils.unixccompiler
6987  into a new module _osx_support.
6988
6989C API
6990-----
6991
6992- Issue #15610: `PyImport_ImportModuleEx()` now uses a 'level' of 0 instead of -1.
6993
6994- Issue #15169, issue #14599: Strip out the C implementation of
6995  `imp.source_from_cache()` used by PyImport_ExecCodeModuleWithPathnames() and
6996  used the Python code instead. Leads to PyImport_ExecCodeModuleObject() to not
6997  try to infer the source path from the bytecode path as
6998  PyImport_ExecCodeModuleWithPathnames() does.
6999
7000Extension Modules
7001-----------------
7002
7003- Issue #6493: An issue in ctypes on Windows that caused structure bitfields of
7004  type `ctypes.c_uint32` and width 32 to incorrectly be set has been fixed.
7005
7006- Issue #15194: Update libffi to the 3.0.11 release.
7007
7008IDLE
7009----
7010
7011- Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog
7012  ended with ``\``.  Patch by Roger Serwy.
7013
7014Tools/Demos
7015-----------
7016
7017- Issue #15458: python-config gets a new option --configdir to print the $LIBPL
7018  value.
7019
7020- Move importlib.test.benchmark to Tools/importbench.
7021
7022- Issue #12605: The gdb hooks for debugging CPython (within Tools/gdb) have been
7023  enhanced to show information on more C frames relevant to CPython within the
7024  "py-bt" and "py-bt-full" commands:
7025
7026  * C frames that are waiting on the GIL
7027  * C frames that are garbage-collecting
7028  * C frames that are due to the invocation of a PyCFunction
7029
7030Documentation
7031-------------
7032
7033- Issue #15041: Update "see also" list in tkinter documentation.
7034
7035- Issue #15444: Use proper spelling for non-ASCII contributor names.  Patch by
7036  Serhiy Storchaka.
7037
7038- Issue #15295: Reorganize and rewrite the documentation on the import system.
7039
7040- Issue #15230: Clearly document some of the limitations of the runpy module and
7041  nudge readers towards importlib when appropriate.
7042
7043- Issue #15053: Copy Python 3.3 import lock change notice to all relevant
7044  functions in imp instead of just at the top of the relevant section.
7045
7046- Issue #15288: Link to the term "loader" in notes in pkgutil about how things
7047  won't work as expected in Python 3.3 and mark the requisite functions as
7048  "changed" since they will no longer work with modules directly imported by
7049  import itself.
7050
7051- Issue #13557: Clarify effect of giving two different namespaces to `exec()` or
7052  `execfile()`.
7053
7054- Issue #15250: Document that `filecmp.dircmp()` compares files shallowly. Patch
7055  contributed by Chris Jerdonek.
7056
7057- Issue #15442: Expose the default list of directories ignored by
7058  `filecmp.dircmp()` as a module attribute, and expand the list to more modern
7059  values.
7060
7061Tests
7062-----
7063
7064- Issue #15467: Move helpers for `__sizeof__()` tests into test_support.  Patch
7065  by Serhiy Storchaka.
7066
7067- Issue #15320: Make iterating the list of tests thread-safe when running tests
7068  in multiprocess mode. Patch by Chris Jerdonek.
7069
7070- Issue #15168: Move `importlib.test` to `test.test_importlib`.
7071
7072- Issue #15091: Reactivate a test on UNIX which was failing thanks to a
7073  forgotten `importlib.invalidate_caches()` call.
7074
7075- Issue #15230: Adopted a more systematic approach in the runpy tests.
7076
7077- Issue #15300: Ensure the temporary test working directories are in the same
7078  parent folder when running tests in multiprocess mode from a Python build.
7079  Patch by Chris Jerdonek.
7080
7081- Issue #15284: Skip {send,recv}msg tests in test_socket when IPv6 is not
7082  enabled. Patch by Brian Brazil.
7083
7084- Issue #15277: Fix a resource leak in support.py when IPv6 is disabled.  Patch
7085  by Brian Brazil.
7086
7087Build
7088-----
7089
7090- Issue #11715: Fix multiarch detection without having Debian development tools
7091  (dpkg-dev) installed.
7092
7093- Issue #15037: Build OS X installers with local copy of ncurses 5.9 libraries
7094  to avoid curses.unget_wch bug present in older versions of ncurses such as
7095  those shipped with OS X.
7096
7097- Issue #15560: Fix building _sqlite3 extension on OS X with an SDK.  Also, for
7098  OS X installers, ensure consistent sqlite3 behavior and feature availability
7099  by building a local copy of libsqlite3 rather than depending on the wide range
7100  of versions supplied with various OS X releases.
7101
7102- Issue #8847: Disable COMDAT folding in Windows PGO builds.
7103
7104- Issue #14018: Fix OS X Tcl/Tk framework checking when using OS X SDKs.
7105
7106- Issue #16256: OS X installer now sets correct permissions for doc directory.
7107
7108- Issue #15431: Add _freeze_importlib project to regenerate importlib.h on
7109  Windows. Patch by Kristján Valur Jónsson.
7110
7111- Issue #14197: For OS X framework builds, ensure links to the shared library
7112  are created with the proper ABI suffix.
7113
7114- Issue #14330: For cross builds, don't use host python, use host search paths
7115  for host compiler.
7116
7117- Issue #15235: Allow Berkley DB versions up to 5.3 to build the dbm module.
7118
7119- Issue #15268: Search curses.h in /usr/include/ncursesw.
7120
7121
7122What's New in Python 3.3.0 Beta 1?
7123==================================
7124
7125*Release date: 27-Jun-2012*
7126
7127Core and Builtins
7128-----------------
7129
7130- Fix a (most likely) very rare memory leak when calling main() and not being
7131  able to decode a command-line argument.
7132
7133- Issue #14815: Use Py_ssize_t instead of long for the object hash, to
7134  preserve all 64 bits of hash on Win64.
7135
7136- Issue #12268: File readline, readlines and read() or readall() methods
7137  no longer lose data when an underlying read system call is interrupted.
7138  IOError is no longer raised due to a read system call returning EINTR
7139  from within these methods.
7140
7141- Issue #11626: Add _SizeT functions to stable ABI.
7142
7143- Issue #15142: Fix reference leak when deallocating instances of types
7144  created using PyType_FromSpec().
7145
7146- Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on
7147  the work by Hirokazu Yamamoto.
7148
7149- Issue #15096: Removed support for ur'' as the raw notation isn't
7150  compatible with Python 2.x's raw unicode strings.
7151
7152- Issue #13783: Generator objects now use the identifier APIs internally
7153
7154- Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels.
7155  Patch by Serhiy Storchaka.
7156
7157- Issue #15026: utf-16 encoding is now significantly faster (up to 10x).
7158  Patch by Serhiy Storchaka.
7159
7160- Issue #11022: open() and io.TextIOWrapper are now calling
7161  locale.getpreferredencoding(False) instead of locale.getpreferredencoding()
7162  in text mode if the encoding is not specified. Don't change temporary the
7163  locale encoding using locale.setlocale(), use the current locale encoding
7164  instead of the user preferred encoding.
7165
7166- Issue #14673: Add Eric Snow's sys.implementation implementation.
7167
7168- Issue #15038: Optimize python Locks on Windows.
7169
7170Library
7171-------
7172
7173- Issue #12288: Consider '0' and '0.0' as valid initialvalue
7174  for tkinter SimpleDialog.
7175
7176- Issue #15512: Add a __sizeof__ implementation for parser.
7177  Patch by Serhiy Storchaka.
7178
7179- Issue #15469: Add a __sizeof__ implementation for deque objects.
7180  Patch by Serhiy Storchaka.
7181
7182- Issue #15489: Add a __sizeof__ implementation for BytesIO objects.
7183  Patch by Serhiy Storchaka.
7184
7185- Issue #15487: Add a __sizeof__ implementation for buffered I/O objects.
7186  Patch by Serhiy Storchaka.
7187
7188- Issue #15514: Correct __sizeof__ support for cpu_set.
7189  Patch by Serhiy Storchaka.
7190
7191- Issue #15177: Added dir_fd parameter to os.fwalk().
7192
7193- Issue #15061: Re-implemented hmac.compare_digest() in C to prevent further
7194  timing analysis and to support all buffer protocol aware objects as well as
7195  ASCII only str instances safely.
7196
7197- Issue #15164: Change return value of platform.uname() from a
7198  plain tuple to a collections.namedtuple.
7199
7200- Support Mageia Linux in the platform module.
7201
7202- Issue #11678: Support Arch linux in the platform module.
7203
7204- Issue #15118: Change return value of os.uname() and os.times() from
7205  plain tuples to immutable iterable objects with named attributes
7206  (structseq objects).
7207
7208- Speed up _decimal by another 10-15% by caching the thread local context
7209  that was last accessed. In the pi benchmark (64-bit platform, prec=9),
7210  _decimal is now only 1.5x slower than float.
7211
7212- Remove the packaging module, which is not ready for prime time.
7213
7214- Issue #15154: Add "dir_fd" parameter to os.rmdir, remove "rmdir"
7215  parameter from os.remove / os.unlink.
7216
7217- Issue #4489: Add a shutil.rmtree that isn't susceptible to symlink attacks.
7218  It is used automatically on platforms supporting the necessary os.openat()
7219  and os.unlinkat() functions. Main code by Martin von Löwis.
7220
7221- Issue #15156: HTMLParser now uses the new "html.entities.html5" dictionary.
7222
7223- Issue #11113: add a new "html5" dictionary containing the named character
7224  references defined by the HTML5 standard and the equivalent Unicode
7225  character(s) to the html.entities module.
7226
7227- Issue #15114: the strict mode of HTMLParser and the HTMLParseError exception
7228  are deprecated now that the parser is able to parse invalid markup.
7229
7230- Issue #3665: \u and \U escapes are now supported in unicode regular
7231  expressions.  Patch by Serhiy Storchaka.
7232
7233- Issue #15153: Added inspect.getgeneratorlocals to simplify white box
7234  testing of generator state updates
7235
7236- Issue #13062: Added inspect.getclosurevars to simplify testing stateful
7237  closures
7238
7239- Issue #11024: Fixes and additional tests for Time2Internaldate.
7240
7241- Issue #14626: Large refactoring of functions / parameters in the os module.
7242  Many functions now support "dir_fd" and "follow_symlinks" parameters;
7243  some also support accepting an open file descriptor in place of a path
7244  string.  Added os.support_* collections as LBYL helpers.  Removed many
7245  functions only previously seen in 3.3 alpha releases (often starting with
7246  "f" or "l", or ending with "at").  Originally suggested by Serhiy Storchaka;
7247  implemented by Larry Hastings.
7248
7249- Issue #15008: Implement PEP 362 "Signature Objects".
7250  Patch by Yury Selivanov.
7251
7252- Issue #15138: base64.urlsafe_{en,de}code() are now 3-4x faster.
7253
7254- Issue #444582: Add shutil.which, for finding programs on the system path.
7255  Original patch by Erik Demaine, with later iterations by Jan Killian
7256  and Brian Curtin.
7257
7258- Issue #14837: SSL errors now have ``library`` and ``reason`` attributes
7259  describing precisely what happened and in which OpenSSL submodule.  The
7260  str() of a SSLError is also enhanced accordingly.
7261
7262- Issue #9527: datetime.astimezone() method will now supply a class
7263  timezone instance corresponding to the system local timezone when
7264  called with no arguments.
7265
7266- Issue #14653: email.utils.mktime_tz() no longer relies on system
7267  mktime() when timezone offest is supplied.
7268
7269- Issue #14684: zlib.compressobj() and zlib.decompressobj() now support the use
7270  of predefined compression dictionaries. Original patch by Sam Rushing.
7271
7272- Fix GzipFile's handling of filenames given as bytes objects.
7273
7274- Issue #14772: Return destination values from some shutil functions.
7275
7276- Issue #15064: Implement context management protocol for multiprocessing types
7277
7278- Issue #15101: Make pool finalizer avoid joining current thread.
7279
7280- Issue #14657: The frozen instance of importlib used for bootstrap is now
7281  also the module imported as importlib._bootstrap.
7282
7283- Issue #14055: Add __sizeof__ support to _elementtree.
7284
7285- Issue #15054: A bug in tokenize.tokenize that caused string literals
7286  with 'b' prefixes to be incorrectly tokenized has been fixed.
7287  Patch by Serhiy Storchaka.
7288
7289- Issue #15006: Allow equality comparison between naive and aware
7290  time or datetime objects.
7291
7292- Issue #15036: Mailbox no longer throws an error if a flush is done
7293  between operations when removing or changing multiple items in mbox,
7294  MMDF, or Babyl mailboxes.
7295
7296- Issue #14059: Implement multiprocessing.Barrier.
7297
7298- Issue #15061: The inappropriately named hmac.secure_compare has been
7299  renamed to hmac.compare_digest, restricted to operating on bytes inputs
7300  only and had its documentation updated to more accurately reflect both its
7301  intent and its limitations
7302
7303- Issue #13841: Make child processes exit using sys.exit() on Windows.
7304
7305- Issue #14936: curses_panel was converted to PEP 3121 and PEP 384 API.
7306  Patch by Robin Schreiber.
7307
7308- Issue #1667546: On platforms supporting tm_zone and tm_gmtoff fields
7309  in struct tm, time.struct_time objects returned by time.gmtime(),
7310  time.localtime() and time.strptime() functions now have tm_zone and
7311  tm_gmtoff attributes.  Original patch by Paul Boddie.
7312
7313- Rename adjusted attribute to adjustable in time.get_clock_info() result.
7314
7315- Issue #3518: Remove references to non-existent BaseManager.from_address()
7316  method.
7317
7318- Issue #13857: Added textwrap.indent() function (initial patch by Ezra
7319  Berch)
7320
7321- Issue #2736: Added datetime.timestamp() method.
7322
7323- Issue #13854: Make multiprocessing properly handle non-integer
7324  non-string argument to SystemExit.
7325
7326- Issue #12157: Make pool.map() empty iterables correctly.  Initial
7327  patch by mouad.
7328
7329- Issue #11823: disassembly now shows argument counts on calls with keyword args.
7330
7331- Issue #14711: os.stat_float_times() has been deprecated.
7332
7333- LZMAFile now accepts the modes "rb"/"wb"/"ab" as synonyms of "r"/"w"/"a".
7334
7335- The bz2 and lzma modules now each contain an open() function, allowing
7336  compressed files to readily be opened in text mode as well as binary mode.
7337
7338- BZ2File.__init__() and LZMAFile.__init__() now accept a file object as their
7339  first argument, rather than requiring a separate "fileobj" argument.
7340
7341- gzip.open() now accepts file objects as well as filenames.
7342
7343- Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError
7344  when the path existed and had the S_ISGID mode bit set when it was
7345  not explicitly asked for.  This is no longer an exception as mkdir
7346  cannot control if the OS sets that bit for it or not.
7347
7348- Issue #14989: Make the CGI enable option to http.server available via command
7349  line.
7350
7351- Issue #14987: Add a missing import statement to inspect.
7352
7353- Issue #1079: email.header.decode_header now correctly parses all the examples
7354  in RFC2047.  There is a necessary visible behavior change: the leading and/or
7355  trailing whitespace on ASCII parts is now preserved.
7356
7357- Issue #14969: Better handling of exception chaining in contextlib.ExitStack
7358
7359- Issue #14963: Convert contextlib.ExitStack.__exit__ to use an iterative
7360  algorithm (Patch by Alon Horev)
7361
7362- Issue #14785: Add sys._debugmallocstats() to help debug low-level memory
7363  allocation issues
7364
7365- Issue #14443: Ensure that .py files are byte-compiled with the correct Python
7366  executable within bdist_rpm even on older versions of RPM
7367
7368C-API
7369-----
7370
7371- Issue #15146: Add PyType_FromSpecWithBases. Patch by Robin Schreiber.
7372
7373- Issue #15042: Add PyState_AddModule and PyState_RemoveModule. Add version
7374  guard for Py_LIMITED_API additions. Patch by Robin Schreiber.
7375
7376- Issue #13783: Inadvertent additions to the public C API in the PEP 380
7377  implementation have either been removed or marked as private interfaces.
7378
7379Extension Modules
7380-----------------
7381
7382- Issue #15000: Support the "unique" x32 architecture in _posixsubprocess.c.
7383
7384IDLE
7385----
7386
7387- Issue #9803: Don't close IDLE on saving if breakpoint is open.
7388  Patch by Roger Serwy.
7389
7390- Issue #14962: Update text coloring in IDLE shell window after changing
7391  options.  Patch by Roger Serwy.
7392
7393Documentation
7394-------------
7395
7396- Issue #15176: Clarified behavior, documentation, and implementation
7397  of os.listdir().
7398
7399- Issue #14982: Document that pkgutil's iteration functions require the
7400  non-standard iter_modules() method to be defined by an importer (something
7401  the importlib importers do not define).
7402
7403- Issue #15081: Document PyState_FindModule.
7404  Patch by Robin Schreiber.
7405
7406- Issue #14814: Added first draft of ipaddress module API reference
7407
7408Tests
7409-----
7410
7411- Issue #15187: Bugfix: remove temporary directories test_shutil was leaving
7412  behind.
7413
7414- Issue #14769: test_capi now has SkipitemTest, which cleverly checks
7415  for "parity" between PyArg_ParseTuple() and the Python/getargs.c static
7416  function skipitem() for all possible "format units".
7417
7418- test_nntplib now tolerates being run from behind NNTP gateways that add
7419  "X-Antivirus" headers to articles
7420
7421- Issue #15043: test_gdb is now skipped entirely if gdb security settings
7422  block loading of the gdb hooks
7423
7424- Issue #14963: Add test cases for exception handling behaviour
7425  in contextlib.ExitStack (Initial patch by Alon Horev)
7426
7427Build
7428-----
7429
7430- Issue #13590: Improve support for OS X Xcode 4:
7431    * Try to avoid building Python or extension modules with problematic
7432      llvm-gcc compiler.
7433    * Since Xcode 4 removes ppc support, extension module builds now
7434      check for ppc compiler support and automatically remove ppc and
7435      ppc64 archs when not available.
7436    * Since Xcode 4 no longer install SDKs in default locations,
7437      extension module builds now revert to using installed headers
7438      and libs if the SDK used to build the interpreter is not
7439      available.
7440    * Update ./configure to use better defaults for universal builds;
7441      in particular, --enable-universalsdk=yes uses the Xcode default
7442      SDK and --with-universal-archs now defaults to "intel" if ppc
7443      not available.
7444
7445- Issue #14225: Fix Unicode support for curses (#12567) on OS X
7446
7447- Issue #14928: Fix importlib bootstrap issues by using a custom executable
7448  (Modules/_freeze_importlib) to build Python/importlib.h.
7449
7450
7451What's New in Python 3.3.0 Alpha 4?
7452===================================
7453
7454*Release date: 31-May-2012*
7455
7456Core and Builtins
7457-----------------
7458
7459- Issue #14835: Make plistlib output empty arrays & dicts like OS X.
7460  Patch by Sidney San Martín.
7461
7462- Issue #14744: Use the new _PyUnicodeWriter internal API to speed up
7463  str%args and str.format(args).
7464
7465- Issue #14930: Make memoryview objects weakrefable.
7466
7467- Issue #14775: Fix a potential quadratic dict build-up due to the garbage
7468  collector repeatedly trying to untrack dicts.
7469
7470- Issue #14857: fix regression in references to PEP 3135 implicit __class__
7471  closure variable (Reopens issue #12370)
7472
7473- Issue #14712 (PEP 405): Virtual environments. Implemented by Vinay Sajip.
7474
7475- Issue #14660 (PEP 420): Namespace packages. Implemented by Eric Smith.
7476
7477- Issue #14494: Fix __future__.py and its documentation to note that
7478  absolute imports are the default behavior in 3.0 instead of 2.7.
7479  Patch by Sven Marnach.
7480
7481- Issue #9260: A finer-grained import lock.  Most of the import sequence
7482  now uses per-module locks rather than the global import lock, eliminating
7483  well-known issues with threads and imports.
7484
7485- Issue #14624: UTF-16 decoding is now 3x to 4x faster on various inputs.
7486  Patch by Serhiy Storchaka.
7487
7488- asdl_seq and asdl_int_seq are now Py_ssize_t sized.
7489
7490- Issue #14133 (PEP 415): Implement suppression of __context__ display with an
7491  attribute on BaseException. This replaces the original mechanism of PEP 409.
7492
7493- Issue #14417: Mutating a dict during lookup now restarts the lookup instead
7494  of raising a RuntimeError (undoes issue #14205).
7495
7496- Issue #14738: Speed-up UTF-8 decoding on non-ASCII data.  Patch by Serhiy
7497  Storchaka.
7498
7499- Issue #14700: Fix two broken and undefined-behaviour-inducing overflow checks
7500  in old-style string formatting.
7501
7502Library
7503-------
7504
7505- Issue #14690: Use monotonic clock instead of system clock in the sched,
7506  subprocess and trace modules.
7507
7508- Issue #14443: Tell rpmbuild to use the correct version of Python in
7509  bdist_rpm. Initial patch by Ross Lagerwall.
7510
7511- Issue #12515: email now registers a defect if it gets to EOF while parsing
7512  a MIME part without seeing the closing MIME boundary.
7513
7514- Issue #1672568: email now always decodes base64 payloads, adding padding and
7515  ignoring non-base64-alphabet characters if needed, and registering defects
7516  for any such problems.
7517
7518- Issue #14925: email now registers a defect when the parser decides that there
7519  is a missing header/body separator line.  MalformedHeaderDefect, which the
7520  existing code would never actually generate, is deprecated.
7521
7522- Issue #10365: File open dialog now works instead of crashing even when
7523  the parent window is closed before the dialog. Patch by Roger Serwy.
7524
7525- Issue #8739: Updated smtpd to support RFC 5321, and added support for the
7526  RFC 1870 SIZE extension.
7527
7528- Issue #665194: Added a localtime function to email.utils to provide an
7529  aware local datetime for use in setting Date headers.
7530
7531- Issue #12586: Added new provisional policies that implement convenient
7532  unicode support for email headers.  See What's New for details.
7533
7534- Issue #14731: Refactored email Policy framework to support full backward
7535  compatibility with Python 3.2 by default yet allow for the introduction of
7536  new features through new policies.  Note that Policy.must_be_7bit is renamed
7537  to cte_type.
7538
7539- Issue #14876: Use user-selected font for highlight configuration.
7540
7541- Issue #14920: Fix the help(urllib.parse) failure on locale C on terminals.
7542  Have ascii characters in help.
7543
7544- Issue #14548: Make multiprocessing finalizers check pid before
7545  running to cope with possibility of gc running just after fork.
7546
7547- Issue #14036: Add an additional check to validate that port in urlparse does
7548  not go in illegal range and returns None.
7549
7550- Issue #14862: Add missing names to os.__all__
7551
7552- Issue #14875: Use float('inf') instead of float('1e66666') in the json module.
7553
7554- Issue #13585: Added contextlib.ExitStack
7555
7556- PEP 3144, Issue #14814: Added the ipaddress module
7557
7558- Issue #14426: Correct the Date format in Expires attribute of Set-Cookie
7559  Header in Cookie.py.
7560
7561- Issue #14588: The types module now provide new_class() and prepare_class()
7562  functions to support PEP 3115 compliant dynamic class creation. Patch by
7563  Daniel Urban and Nick Coghlan.
7564
7565- Issue #13152: Allow specifying a custom tabsize for expanding tabs in
7566  textwrap. Patch by John Feuerstein.
7567
7568- Issue #14721: Send the correct 'Content-length: 0' header when the body is an
7569  empty string ''. Initial Patch contributed by Arve Knudsen.
7570
7571- Issue #14072: Fix parsing of 'tel' URIs in urlparse by making the check for
7572  ports stricter.
7573
7574- Issue #9374: Generic parsing of query and fragment portions of url for any
7575  scheme. Supported both by RFC3986 and RFC2396.
7576
7577- Issue #14798: Fix the functions in pyclbr to raise an ImportError
7578  when the first part of a dotted name is not a package. Patch by
7579  Xavier de Gaye.
7580
7581- Issue #12098: multiprocessing on Windows now starts child processes
7582  using the same sys.flags as the current process.  Initial patch by
7583  Sergey Mezentsev.
7584
7585- Issue #13031: Small speed-up for tarfile when unzipping tarfiles.
7586  Patch by Justin Peel.
7587
7588- Issue #14780: urllib.request.urlopen() now has a ``cadefault`` argument
7589  to use the default certificate store.  Initial patch by James Oakley.
7590
7591- Issue #14829: Fix bisect and range() indexing with large indices
7592  (>= 2 ** 32) under 64-bit Windows.
7593
7594- Issue #14732: The _csv module now uses PEP 3121 module initialization.
7595  Patch by Robin Schreiber.
7596
7597- Issue #14809: Add HTTP status codes introduced by RFC 6585 to http.server
7598  and http.client. Patch by EungJun Yi.
7599
7600- Issue #14777: tkinter may return undecoded UTF-8 bytes as a string when
7601  accessing the Tk clipboard.  Modify clipboard_get() to first request type
7602  UTF8_STRING when no specific type is requested in an X11 windowing
7603  environment, falling back to the current default type STRING if that fails.
7604  Original patch by Thomas Kluyver.
7605
7606- Issue #14773: Fix os.fwalk() failing on dangling symlinks.
7607
7608- Issue #12541: Be lenient with quotes around Realm field of HTTP Basic
7609  Authentation in urllib2.
7610
7611- Issue #14807: move undocumented tarfile.filemode() to stat.filemode() and add
7612  doc entry. Add tarfile.filemode alias with deprecation warning.
7613
7614- Issue #13815: TarFile.extractfile() now returns io.BufferedReader objects.
7615
7616- Issue #14532: Add a secure_compare() helper to the hmac module, to mitigate
7617  timing attacks. Patch by Jon Oberheide.
7618
7619- Add importlib.util.resolve_name().
7620
7621- Issue #14366: Support lzma compression in zip files.
7622  Patch by Serhiy Storchaka.
7623
7624- Issue #13959: Introduce importlib.find_loader() and document
7625  imp.find_module/load_module as deprecated.
7626
7627- Issue #14082: shutil.copy2() now copies extended attributes, if possible.
7628  Patch by Hynek Schlawack.
7629
7630- Issue #13959: Make importlib.abc.FileLoader.load_module()/get_filename() and
7631  importlib.machinery.ExtensionFileLoader.load_module() have their single
7632  argument be optional. Allows for the replacement (and thus deprecation) of
7633  imp.load_source()/load_package()/load_compiled().
7634
7635- Issue #13959: imp.get_suffixes() has been deprecated in favour of the new
7636  attributes on importlib.machinery: SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES,
7637  OPTIMIZED_BYTECODE_SUFFIXES, BYTECODE_SUFFIXES, and EXTENSION_SUFFIXES. This
7638  led to an indirect deprecation of inspect.getmoduleinfo().
7639
7640- Issue #14662: Prevent shutil failures on OS X when destination does not
7641  support chflag operations.  Patch by Hynek Schlawack.
7642
7643- Issue #14157: Fix time.strptime failing without a year on February 29th.
7644  Patch by Hynek Schlawack.
7645
7646- Issue #14753: Make multiprocessing's handling of negative timeouts
7647  the same as it was in Python 3.2.
7648
7649- Issue #14583: Fix importlib bug when a package's __init__.py would first
7650  import one of its modules then raise an error.
7651
7652- Issue #14741: Fix missing support for Ellipsis ('...') in parser module.
7653
7654- Issue #14697: Fix missing support for set displays and set comprehensions in
7655  parser module.
7656
7657- Issue #14701: Fix missing support for 'raise ... from' in parser module.
7658
7659- Add support for timeouts to the acquire() methods of
7660  multiprocessing's lock/semaphore/condition proxies.
7661
7662- Issue #13989: Add support for text mode to gzip.open().
7663
7664- Issue #14127: The os.stat() result object now provides three additional
7665  fields: st_ctime_ns, st_mtime_ns, and st_atime_ns, providing those times as an
7666  integer with nanosecond resolution.  The functions os.utime(), os.lutimes(),
7667  and os.futimes() now accept a new parameter, ns, which accepts mtime and atime
7668  as integers with nanosecond resolution.
7669
7670- Issue #14127 and #10148: shutil.copystat now preserves exact mtime and atime
7671  on filesystems providing nanosecond resolution.
7672
7673IDLE
7674----
7675
7676- Issue #14958: Change IDLE systax highlighting to recognize all string and
7677  byte literals supported in Python 3.3.
7678
7679- Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu.
7680
7681- Issue #14929: Stop IDLE 3.x from closing on Unicode decode errors when
7682  grepping. Patch by Roger Serwy.
7683
7684- Issue #12510: Attempting to get invalid tooltip no longer closes IDLE.
7685  Other tooltipss have been corrected or improved and the number of tests
7686  has been tripled. Original patch by Roger Serwy.
7687
7688Tools/Demos
7689-----------
7690
7691- Issue #14695: Bring Tools/parser/unparse.py support up to date with
7692  the Python 3.3 Grammar.
7693
7694Build
7695-----
7696
7697- Issue #14472: Update .gitignore. Patch by Matej Cepl.
7698
7699- Upgrade Windows library versions: bzip 1.0.6, OpenSSL 1.0.1c.
7700
7701- Issue #14693: Under non-Windows platforms, hashlib's fallback modules are
7702  always compiled, even if OpenSSL is present at build time.
7703
7704- Issue #13210: Windows build now uses VS2010, ported from VS2008.
7705
7706C-API
7707-----
7708
7709- Issue #14705: The PyArg_Parse() family of functions now support the 'p' format
7710  unit, which accepts a "boolean predicate" argument.  It converts any Python
7711  value into an integer--0 if it is "false", and 1 otherwise.
7712
7713Documentation
7714-------------
7715
7716- Issue #14863: Update the documentation of os.fdopen() to reflect the
7717  fact that it's only a thin wrapper around open() anymore.
7718
7719- Issue #14588: The language reference now accurately documents the Python 3
7720  class definition process. Patch by Nick Coghlan.
7721
7722- Issue #14943: Correct a default argument value for winreg.OpenKey
7723  and correctly list the argument names in the function's explanation.
7724
7725
7726What's New in Python 3.3.0 Alpha 3?
7727===================================
7728
7729*Release date: 01-May-2012*
7730
7731Core and Builtins
7732-----------------
7733
7734- Issue #14699: Fix calling the classmethod descriptor directly.
7735
7736- Issue #14433: Prevent msvcrt crash in interactive prompt when stdin is closed.
7737
7738- Issue #14521: Make result of float('nan') and float('-nan') more consistent
7739  across platforms.
7740
7741- Issue #14646: __import__() sets __loader__ if the loader did not.
7742
7743- Issue #14605: No longer have implicit entries in sys.meta_path. If
7744  sys.meta_path is found to be empty, raise ImportWarning.
7745
7746- Issue #14605: No longer have implicit entries in sys.path_hooks. If
7747  sys.path_hooks is found to be empty, a warning will be raised. None is now
7748  inserted into sys.path_importer_cache if no finder was discovered. This also
7749  means imp.NullImporter is no longer implicitly used.
7750
7751- Issue #13903: Implement PEP 412. Individual dictionary instances can now share
7752  their keys with other dictionaries. Classes take advantage of this to share
7753  their instance dictionary keys for improved memory and performance.
7754
7755- Issue #11603 (again): Setting __repr__ to __str__ now raises a RuntimeError
7756  when repr() or str() is called on such an object.
7757
7758- Issue #14658: Fix binding a special method to a builtin implementation of a
7759  special method with a different name.
7760
7761- Issue #14630: Fix a memory access bug for instances of a subclass of int
7762  with value 0.
7763
7764- Issue #14339: Speed improvements to bin, oct and hex functions.  Patch by
7765  Serhiy Storchaka.
7766
7767- Issue #14385: It is now possible to use a custom type for the __builtins__
7768  namespace, instead of a dict. It can be used for sandboxing for example.
7769  Raise also a NameError instead of ImportError if __build_class__ name if not
7770  found in __builtins__.
7771
7772- Issue #12599: Be more strict in accepting None compared to a false-like
7773  object for importlib.util.module_for_loader and
7774  importlib.machinery.PathFinder.
7775
7776- Issue #14612: Fix jumping around with blocks by setting f_lineno.
7777
7778- Issue #14592: Attempting a relative import w/o __package__ or __name__ set in
7779  globals raises a KeyError.
7780
7781- Issue #14607: Fix keyword-only arguments which started with ``__``.
7782
7783- Issue #10854: The ImportError raised when an extension module on Windows
7784  fails to import now uses the new path and name attributes from
7785  Issue #1559549.
7786
7787- Issue #13889: Check and (if necessary) set FPU control word before calling
7788  any of the dtoa.c string <-> float conversion functions, on MSVC builds of
7789  Python.  This fixes issues when embedding Python in a Delphi app.
7790
7791- __import__() now matches PEP 328 and documentation by defaulting 'index' to 0
7792  instead of -1 and removing support for negative values.
7793
7794- Issue #2377: Make importlib the implementation of __import__().
7795
7796- Issue #1559549: ImportError now has 'name' and 'path' attributes that are set
7797  using keyword arguments to its constructor. They are currently not set by
7798  import as they are meant for use by importlib.
7799
7800- Issue #14474: Save and restore exception state in thread.start_new_thread()
7801  while writing error message if the thread leaves an unhandled exception.
7802
7803- Issue #13019: Fix potential reference leaks in bytearray.extend().  Patch
7804  by Suman Saha.
7805
7806Library
7807-------
7808
7809- Issue #14768: os.path.expanduser('~/a') doesn't work correctly when HOME is '/'.
7810
7811- Issue #14371: Support bzip2 in zipfile module.  Patch by Serhiy Storchaka.
7812
7813- Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running
7814  step.  Patch by Xavier de Gaye.
7815
7816- Issue #14696: Fix parser module to understand 'nonlocal' declarations.
7817
7818- Issue #10941: Fix imaplib.Internaldate2tuple to produce correct result near
7819  the DST transition.  Patch by Joe Peterson.
7820
7821- Issue #9154: Fix parser module to understand function annotations.
7822
7823- Issue #6085: In http.server.py SimpleHTTPServer.address_string returns the
7824  client ip address instead client hostname. Patch by Charles-François Natali.
7825
7826- Issue #14309: Deprecate time.clock(), use time.perf_counter() or
7827  time.process_time() instead.
7828
7829- Issue #14428: Implement the PEP 418. Add time.get_clock_info(),
7830  time.perf_counter() and time.process_time() functions, and rename
7831  time.steady() to time.monotonic().
7832
7833- Issue #14646: importlib.util.module_for_loader() now sets __loader__ and
7834  __package__ (when possible).
7835
7836- Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a
7837  test class that doesn't inherit from TestCase (i.e. a mixin).
7838
7839- Issue #4892: multiprocessing Connections can now be transferred over
7840  multiprocessing Connections.  Patch by Richard Oudkerk (sbt).
7841
7842- Issue #14160: TarFile.extractfile() failed to resolve symbolic links when
7843  the links were not located in an archive subdirectory.
7844
7845- Issue #14638: pydoc now treats non-string __name__ values as if they
7846  were missing, instead of raising an error.
7847
7848- Issue #13684: Fix httplib tunnel issue of infinite loops for certain sites
7849  which send EOF without trailing \r\n.
7850
7851- Issue #14605: Add importlib.abc.FileLoader, importlib.machinery.(FileFinder,
7852  SourceFileLoader, SourcelessFileLoader, ExtensionFileLoader).
7853
7854- Issue #13959: imp.cache_from_source()/source_from_cache() now follow
7855  os.path.join()/split() semantics for path manipulation instead of its prior,
7856  custom semantics of caring the right-most path separator forward in path
7857  joining.
7858
7859- Issue #2193: Allow ":" character in Cookie NAME values.
7860
7861- Issue #14629: tokenizer.detect_encoding will specify the filename in the
7862  SyntaxError exception if found at readline.__self__.name.
7863
7864- Issue #14629: Raise SyntaxError in tokenizer.detect_encoding if the
7865  first two lines have non-UTF-8 characters without an encoding declaration.
7866
7867- Issue #14308: Fix an exception when a "dummy" thread is in the threading
7868  module's active list after a fork().
7869
7870- Issue #11750: The Windows API functions scattered in the _subprocess and
7871  _multiprocessing.win32 modules now live in a single module "_winapi".
7872  Patch by sbt.
7873
7874- Issue #14087: multiprocessing: add Condition.wait_for(). Patch by sbt.
7875
7876- Issue #14538: HTMLParser can now parse correctly start tags that contain
7877  a bare '/'.
7878
7879- Issue #14452: SysLogHandler no longer inserts a UTF-8 BOM into the message.
7880
7881- Issue #14386: Expose the dict_proxy internal type as types.MappingProxyType.
7882
7883- Issue #13959: Make imp.reload() always use a module's __loader__ to perform
7884  the reload.
7885
7886- Issue #13959: Add imp.py and rename the built-in module to _imp, allowing for
7887  re-implementing parts of the module in pure Python.
7888
7889- Issue #13496: Fix potential overflow in bisect.bisect algorithm when applied
7890  to a collection of size > sys.maxsize / 2.
7891
7892- Have importlib take advantage of ImportError's new 'name' and 'path'
7893  attributes.
7894
7895- Issue #14399: zipfile now recognizes that the archive has been modified even
7896  if only the comment is changed.  In addition, the TypeError that results from
7897  trying to set a non-binary value as a comment is now raised at the time
7898  the comment is set rather than at the time the zipfile is written.
7899
7900- trace.CoverageResults.is_ignored_filename() now ignores any name that starts
7901  with "<" and ends with ">" instead of special-casing "<string>" and
7902  "<doctest ".
7903
7904- Issue #12537: The mailbox module no longer depends on knowledge of internal
7905  implementation details of the email package Message object.
7906
7907- Issue #7978: socketserver now restarts the select() call when EINTR is
7908  returned.  This avoids crashing the server loop when a signal is received.
7909  Patch by Jerzy Kozera.
7910
7911- Issue #14522: Avoid duplicating socket handles in multiprocessing.connection.
7912  Patch by sbt.
7913
7914- Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.
7915
7916- Issue #3033: Add displayof parameter to tkinter font. Patch by Guilherme Polo.
7917
7918- Issue #14482: Raise a ValueError, not a NameError, when trying to create
7919  a multiprocessing Client or Listener with an AF_UNIX type address under
7920  Windows.  Patch by Popa Claudiu.
7921
7922- Issue #802310: Generate always unique tkinter font names if not directly passed.
7923
7924- Issue #14151: Raise a ValueError, not a NameError, when trying to create
7925  a multiprocessing Client or Listener with an AF_PIPE type address under
7926  non-Windows platforms.  Patch by Popa Claudiu.
7927
7928- Issue #14493: Use gvfs-open or xdg-open in webbrowser.
7929
7930Build
7931-----
7932
7933- "make touch" will now touch generated files that are checked into Mercurial,
7934  after a "hg update" which failed to bring the timestamps into the right order.
7935
7936Tests
7937-----
7938
7939- Issue #14026: In test_cmd_line_script, check that sys.argv is populated
7940  correctly for the various invocation approaches (Patch by Jason Yeo)
7941
7942- Issue #14032: Fix incorrect variable name in test_cmd_line_script debugging
7943  message (Patch by Jason Yeo)
7944
7945- Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing
7946  a test failure in test_ssl.
7947
7948- Issue #14355: Regrtest now supports the standard unittest test loading, and
7949  will use it if a test file contains no `test_main` method.
7950
7951IDLE
7952----
7953
7954- Issue #8515: Set __file__ when run file in IDLE.
7955  Initial patch by Bruce Frederiksen.
7956
7957- Issue #14496: Fix wrong name in idlelib/tabbedpages.py.
7958  Patch by Popa Claudiu.
7959
7960Tools / Demos
7961-------------
7962
7963- Issue #3561: The Windows installer now has an option, off by default, for
7964  placing the Python installation into the system "Path" environment variable.
7965
7966- Issue #13165: stringbench is now available in the Tools/stringbench folder.
7967  It used to live in its own SVN project.
7968
7969C-API
7970-----
7971
7972- Issue #14098: New functions PyErr_GetExcInfo and PyErr_SetExcInfo.
7973  Patch by Stefan Behnel.
7974
7975
7976What's New in Python 3.3.0 Alpha 2?
7977===================================
7978
7979*Release date: 01-Apr-2012*
7980
7981Core and Builtins
7982-----------------
7983
7984- Issue #1683368: object.__new__ and object.__init__ raise a TypeError if they
7985  are passed arguments and their complementary method is not overridden.
7986
7987- Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as
7988  the module name that was not interned.
7989
7990- Issue #14331: Use significantly less stack space when importing modules by
7991  allocating path buffers on the heap instead of the stack.
7992
7993- Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not
7994  passed strings.
7995
7996- Issue #1469629: Allow cycles through an object's __dict__ slot to be
7997  collected. (For example if ``x.__dict__ is x``).
7998
7999- Issue #14205: dict lookup raises a RuntimeError if the dict is modified
8000  during a lookup.
8001
8002- Issue #14220: When a generator is delegating to another iterator with the
8003  yield from syntax, it needs to have its ``gi_running`` flag set to True.
8004
8005- Issue #14435: Remove dedicated block allocator from floatobject.c and rely
8006  on the PyObject_Malloc() api like all other objects.
8007
8008- Issue #14471: Fix a possible buffer overrun in the winreg module.
8009
8010- Issue #14288: Allow the serialization of builtin iterators
8011
8012Library
8013-------
8014
8015- Issue #14300: Under Windows, sockets created using socket.dup() now allow
8016  overlapped I/O.  Patch by sbt.
8017
8018- Issue #13872: socket.detach() now marks the socket closed (as mirrored
8019  in the socket repr()).  Patch by Matt Joiner.
8020
8021- Issue #14406: Fix a race condition when using ``concurrent.futures.wait(
8022  return_when=ALL_COMPLETED)``.  Patch by Matt Joiner.
8023
8024- Issue #5136: deprecate old, unused functions from tkinter.
8025
8026- Issue #14416: syslog now defines the LOG_ODELAY and LOG_AUTHPRIV constants
8027  if they are defined in <syslog.h>.
8028
8029- Issue #14295: Add unittest.mock
8030
8031- Issue #7652: Add --with-system-libmpdec option to configure for linking
8032  the _decimal module against an installed libmpdec.
8033
8034- Issue #14380: MIMEText now defaults to utf-8 when passed non-ASCII unicode
8035  with no charset specified.
8036
8037- Issue #10340: asyncore - properly handle EINVAL in dispatcher constructor on
8038  OSX; avoid to call handle_connect in case of a disconnected socket which
8039  was not meant to connect.
8040
8041- Issue #14204: The ssl module now has support for the Next Protocol
8042  Negotiation extension, if available in the underlying OpenSSL library.
8043  Patch by Colin Marc.
8044
8045- Issue #3035: Unused functions from tkinter are marked as pending deprecated.
8046
8047- Issue #12757: Fix the skipping of doctests when python is run with -OO so
8048  that it works in unittest's verbose mode as well as non-verbose mode.
8049
8050- Issue #7652: Integrate the decimal floating point libmpdec library to speed
8051  up the decimal module. Performance gains of the new C implementation are
8052  between 10x and 100x, depending on the application.
8053
8054- Issue #14269: SMTPD now conforms to the RFC and requires a HELO command
8055  before MAIL, RCPT, or DATA.
8056
8057- Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr
8058  attribute.
8059
8060- Issue #14344: fixed the repr of email.policy objects.
8061
8062- Issue #11686: Added missing entries to email package __all__ lists
8063  (mostly the new Bytes classes).
8064
8065- Issue #14335: multiprocessing's custom Pickler subclass now inherits from
8066  the C-accelerated implementation.  Patch by sbt.
8067
8068- Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem.
8069
8070- Issue #11199: Fix the with urllib which hangs on particular ftp urls.
8071
8072- Improve the memory utilization and speed of functools.lru_cache.
8073
8074- Issue #14222: Use the new time.steady() function instead of time.time() for
8075  timeout in queue and threading modules to not be affected of system time
8076  update.
8077
8078- Issue #13248: Remove lib2to3.pytree.Base.get_prefix/set_prefix.
8079
8080- Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes in the hash
8081  table internal to the pyexpat module's copy of the expat library to avoid a
8082  denial of service due to hash collisions.  Patch by David Malcolm with some
8083  modifications by the expat project.
8084
8085- Issue #12818: format address no longer needlessly \ escapes ()s in names when
8086  the name ends up being quoted.
8087
8088- Issue #14062: BytesGenerator now correctly folds Header objects,
8089  including using linesep when folding.
8090
8091- Issue #13839: When invoked on the command-line, the pstats module now
8092  accepts several filenames of profile stat files and merges them all.
8093  Patch by Matt Joiner.
8094
8095- Issue #14291: Email now defaults to utf-8 for non-ASCII unicode headers
8096  instead of raising an error.  This fixes a regression relative to 2.7.
8097
8098- Issue #989712: Support using Tk without a mainloop.
8099
8100- Issue #3835: Refuse to use unthreaded Tcl in threaded Python.
8101
8102- Issue #2843: Add new Tk API to Tkinter.
8103
8104- Issue #14184: Increase the default stack size for secondary threads on
8105  Mac OS X to avoid interpreter crashes when using threads on 10.7.
8106
8107- Issue #14180: datetime.date.fromtimestamp(),
8108  datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp()
8109  now raise an OSError instead of ValueError if localtime() or gmtime() failed.
8110
8111- Issue #14180: time.ctime(), gmtime(), time.localtime(),
8112  datetime.date.fromtimestamp(), datetime.datetime.fromtimestamp() and
8113  datetime.datetime.utcfromtimestamp() now raises an OverflowError, instead of
8114  a ValueError, if the timestamp does not fit in time_t.
8115
8116- Issue #14180: datetime.datetime.fromtimestamp() and
8117  datetime.datetime.utcfromtimestamp() now round microseconds towards zero
8118  instead of rounding to nearest with ties going away from zero.
8119
8120- Issue #10543: Fix unittest test discovery with Jython bytecode files.
8121
8122- Issue #1178863: Separate initialisation from setting when initializing
8123  Tkinter.Variables; harmonize exceptions to ValueError; only delete variables
8124  that have not been deleted; assert that variable names are strings.
8125
8126- Issue #14104: Implement time.monotonic() on Mac OS X, patch written by
8127  Nicholas Riley.
8128
8129- Issue #13394: the aifc module now uses warnings.warn() to signal warnings.
8130
8131- Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under
8132  Windows when the child process has already exited.
8133
8134- Issue #14223: curses.addch() is no more limited to the range 0-255 when the
8135  Python curses is not linked to libncursesw. It was a regression introduced
8136  in Python 3.3a1.
8137
8138- Issue #14168: Check for presence of Element._attrs in minidom before
8139  accessing it.
8140
8141- Issue #12328: Fix multiprocessing's use of overlapped I/O on Windows.
8142  Also, add a multiprocessing.connection.wait(rlist, timeout=None) function
8143  for polling multiple objects at once.  Patch by sbt.
8144
8145- Issue #14007: Accept incomplete TreeBuilder objects (missing start, end,
8146  data or close method) for the Python implementation as well.
8147  Drop the no-op TreeBuilder().xml() method from the C implementation.
8148
8149- Issue #14210: pdb now has tab-completion not only for command names, but
8150  also for their arguments, wherever possible.
8151
8152- Issue #14310: Sockets can now be with other processes on Windows using
8153  the api socket.socket.share() and socket.fromshare().
8154
8155- Issue #10576: The gc module now has a 'callbacks' member that will get
8156  called when garbage collection takes place.
8157
8158Build
8159-----
8160
8161- Issue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban.
8162
8163- Issue #14387: Do not include accu.h from Python.h.
8164
8165- Issue #14359: Only use O_CLOEXEC in _posixmodule.c if it is defined.
8166  Based on patch from Hervé Coatanhay.
8167
8168- Issue #14321: Do not run pgen during the build if files are up to date.
8169
8170Documentation
8171-------------
8172
8173- Issue #14034: added the argparse tutorial.
8174
8175- Issue #14324: Fix configure tests for cross builds.
8176
8177- Issue #14327: Call AC_CANONICAL_HOST in configure.ac and check in
8178  config.{guess,sub}. Don't use uname calls for cross builds.
8179
8180Extension Modules
8181-----------------
8182
8183- Issue #9041: An issue in ctypes.c_longdouble, ctypes.c_double, and
8184  ctypes.c_float that caused an incorrect exception to be returned in the
8185  case of overflow has been fixed.
8186
8187- Issue #14212: The re module didn't retain a reference to buffers it was
8188  scanning, resulting in segfaults.
8189
8190- Issue #14259: The finditer() method of re objects did not take any
8191  keyword arguments, contrary to the documentation.
8192
8193- Issue #10142: Support for SEEK_HOLE/SEEK_DATA (for example, under ZFS).
8194
8195Tests
8196-----
8197
8198- Issue #14442: Add missing errno import in test_smtplib.
8199
8200- Issue #8315: (partial fix) python -m unittest test.test_email now works.
8201
8202
8203What's New in Python 3.3.0 Alpha 1?
8204===================================
8205
8206*Release date: 05-Mar-2012*
8207
8208Core and Builtins
8209-----------------
8210
8211- Issue #14172: Fix reference leak when marshalling a buffer-like object
8212  (other than a bytes object).
8213
8214- Issue #13521: dict.setdefault() now does only one lookup for the given key,
8215  making it "atomic" for many purposes.  Patch by Filip Gruszczyński.
8216
8217- PEP 409, Issue #6210: "raise X from None" is now supported as a means of
8218  suppressing the display of the chained exception context. The chained
8219  context still remains available as the __context__ attribute.
8220
8221- Issue #10181: New memoryview implementation fixes multiple ownership
8222  and lifetime issues of dynamically allocated Py_buffer members (#9990)
8223  as well as crashes (#8305, #7433). Many new features have been added
8224  (See whatsnew/3.3), and the documentation has been updated extensively.
8225  The ndarray test object from _testbuffer.c implements all aspects of
8226  PEP-3118, so further development towards the complete implementation
8227  of the PEP can proceed in a test-driven manner.
8228
8229  Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review
8230  and many ideas.
8231
8232- Issue #12834: Fix incorrect results of memoryview.tobytes() for
8233  non-contiguous arrays.
8234
8235- Issue #5231: Introduce memoryview.cast() method that allows changing
8236  format and shape without making a copy of the underlying memory.
8237
8238- Issue #14084: Fix a file descriptor leak when importing a module with a
8239  bad encoding.
8240
8241- Upgrade Unicode data to Unicode 6.1.
8242
8243- Issue #14040: Remove rarely used file name suffixes for C extensions
8244  (under POSIX mainly).
8245
8246- Issue #14051: Allow arbitrary attributes to be set of classmethod and
8247  staticmethod.
8248
8249- Issue #13703: oCERT-2011-003: Randomize hashes of str and bytes to protect
8250  against denial of service attacks due to hash collisions within the dict and
8251  set types.  Patch by David Malcolm, based on work by Victor Stinner.
8252
8253- Issue #13020: Fix a reference leak when allocating a structsequence object
8254  fails.  Patch by Suman Saha.
8255
8256- Issue #13908: Ready types returned from PyType_FromSpec.
8257
8258- Issue #11235: Fix OverflowError when trying to import a source file whose
8259  modification time doesn't fit in a 32-bit timestamp.
8260
8261- Issue #12705: A SyntaxError exception is now raised when attempting to
8262  compile multiple statements as a single interactive statement.
8263
8264- Fix the builtin module initialization code to store the init function for
8265  future reinitialization.
8266
8267- Issue #8052: The posix subprocess module would take a long time closing
8268  all possible file descriptors in the child process rather than just open
8269  file descriptors.  It now closes only the open fds if possible for the
8270  default close_fds=True behavior.
8271
8272- Issue #13629: Renumber the tokens in token.h so that they match the indexes
8273  into _PyParser_TokenNames.
8274
8275- Issue #13752: Add a casefold() method to str.
8276
8277- Issue #13761: Add a "flush" keyword argument to the print() function,
8278  used to ensure flushing the output stream.
8279
8280- Issue #13645: pyc files now contain the size of the corresponding source
8281  code, to avoid timestamp collisions (especially on filesystems with a low
8282  timestamp resolution) when checking for freshness of the bytecode.
8283
8284- PEP 380, Issue #11682: Add "yield from <x>" to support easy delegation to
8285  subgenerators (initial patch by Greg Ewing, integration into 3.3 by
8286  Renaud Blanch, Ryan Kelly, Zbigniew Jędrzejewski-Szmek and Nick Coghlan)
8287
8288- Issue #13748: Raw bytes literals can now be written with the ``rb`` prefix
8289  as well as ``br``.
8290
8291- Issue #12736: Use full unicode case mappings for upper, lower, and title case.
8292
8293- Issue #12760: Add a create mode to open(). Patch by David Townshend.
8294
8295- Issue #13738: Simplify implementation of bytes.lower() and bytes.upper().
8296
8297- Issue #13577: Built-in methods and functions now have a __qualname__.
8298  Patch by sbt.
8299
8300- Issue #6695: Full garbage collection runs now clear the freelist of set
8301  objects.  Initial patch by Matthias Troffaes.
8302
8303- Fix OSError.__init__ and OSError.__new__ so that each of them can be
8304  overridden and take additional arguments (followup to issue #12555).
8305
8306- Fix the fix for issue #12149: it was incorrect, although it had the side
8307  effect of appearing to resolve the issue.  Thanks to Mark Shannon for
8308  noticing.
8309
8310- Issue #13505: Pickle bytes objects in a way that is compatible with
8311  Python 2 when using protocols <= 2.
8312
8313- Issue #11147: Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER.  (Fix
8314  given by Campbell Barton).
8315
8316- Issue #13503: Use a more efficient reduction format for bytearrays with
8317  pickle protocol >= 3.  The old reduction format is kept with older protocols
8318  in order to allow unpickling under Python 2.  Patch by Irmen de Jong.
8319
8320- Issue #7111: Python can now be run without a stdin, stdout or stderr
8321  stream.  It was already the case with Python 2.  However, the corresponding
8322  sys module entries are now set to None (instead of an unusable file object).
8323
8324- Issue #11849: Ensure that free()d memory arenas are really released
8325  on POSIX systems supporting anonymous memory mappings.  Patch by
8326  Charles-François Natali.
8327
8328- PEP 3155 / issue #13448: Qualified name for classes and functions.
8329
8330- Issue #13436: Fix a bogus error message when an AST object was passed
8331  an invalid integer value.
8332
8333- Issue #13411: memoryview objects are now hashable when the underlying
8334  object is hashable.
8335
8336- Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER
8337  to allow compiling extension modules with -Wswitch-enum on gcc.
8338  Initial patch by Floris Bruynooghe.
8339
8340- Issue #10227: Add an allocation cache for a single slice object.  Patch by
8341  Stefan Behnel.
8342
8343- Issue #13393: BufferedReader.read1() now asks the full requested size to
8344  the raw stream instead of limiting itself to the buffer size.
8345
8346- Issue #13392: Writing a pyc file should now be atomic under Windows as well.
8347
8348- Issue #13333: The UTF-7 decoder now accepts lone surrogates (the encoder
8349  already accepts them).
8350
8351- Issue #13389: Full garbage collection passes now clear the freelists for
8352  list and dict objects.  They already cleared other freelists in the
8353  interpreter.
8354
8355- Issue #13327: Remove the need for an explicit None as the second argument
8356  to os.utime, os.lutimes, os.futimes, os.futimens, os.futimesat, in
8357  order to update to the current time. Also added keyword argument
8358  handling to os.utimensat in order to remove the need for explicit None.
8359
8360- Issue #13350: Simplify some C code by replacing most usages of
8361  PyUnicode_Format by PyUnicode_FromFormat.
8362
8363- Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode
8364  error handler in interactive mode (when calling into PyOS_Readline()).
8365
8366- Issue #9896: Add start, stop, and step attributes to range objects.
8367
8368- Issue #13343: Fix a SystemError when a lambda expression uses a global
8369  variable in the default value of a keyword-only argument: ``lambda *,
8370  arg=GLOBAL_NAME: None``
8371
8372- Issue #12797: Added custom opener parameter to builtin open() and
8373  FileIO.open().
8374
8375- Issue #10519: Avoid unnecessary recursive function calls in
8376  setobject.c.
8377
8378- Issue #10363: Deallocate global locks in Py_Finalize().
8379
8380- Issue #13018: Fix reference leaks in error paths in dictobject.c.
8381  Patch by Suman Saha.
8382
8383- Issue #13201: Define '==' and '!=' to compare range objects based on
8384  the sequence of values they define (instead of comparing based on
8385  object identity).
8386
8387- Issue #1294232: In a few cases involving metaclass inheritance, the
8388  interpreter would sometimes invoke the wrong metaclass when building a new
8389  class object. These cases now behave correctly. Patch by Daniel Urban.
8390
8391- Issue #12753: Add support for Unicode name aliases and named sequences.
8392  Both ``unicodedata.lookup()`` and '\N{...}' now resolve aliases,
8393  and ``unicodedata.lookup()`` resolves named sequences too.
8394
8395- Issue #12170: The count(), find(), rfind(), index() and rindex() methods
8396  of bytes and bytearray objects now accept an integer between 0 and 255
8397  as their first argument.  Patch by Petri Lehtinen.
8398
8399- Issue #12604: VTRACE macro expanded to no-op in _sre.c to avoid compiler
8400  warnings. Patch by Josh Triplett and Petri Lehtinen.
8401
8402- Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignore
8403  error handlers on all Windows versions. The MBCS codec is now supporting all
8404  error handlers, instead of only replace to encode and ignore to decode.
8405
8406- Issue #13188: When called without an explicit traceback argument,
8407  generator.throw() now gets the traceback from the passed exception's
8408  ``__traceback__`` attribute.  Patch by Petri Lehtinen.
8409
8410- Issue #13146: Writing a pyc file is now atomic under POSIX.
8411
8412- Issue #7833: Extension modules built using distutils on Windows will no
8413  longer include a "manifest" to prevent them failing at import time in some
8414  embedded situations.
8415
8416- PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.
8417
8418- Add internal API for static strings (_Py_identifier et al.).
8419
8420- Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
8421  as "The pipe is being closed") is now mapped to POSIX errno EPIPE
8422  (previously EINVAL).
8423
8424- Issue #12911: Fix memory consumption when calculating the repr() of huge
8425  tuples or lists.
8426
8427- PEP 393: flexible string representation. Thanks to Torsten Becker for the
8428  initial implementation, and Victor Stinner for various bug fixes.
8429
8430- Issue #14081: The 'sep' and 'maxsplit' parameter to str.split, bytes.split,
8431  and bytearray.split may now be passed as keyword arguments.
8432
8433- Issue #13012: The 'keepends' parameter to str.splitlines may now be passed
8434  as a keyword argument:  "my_string.splitlines(keepends=True)".  The same
8435  change also applies to bytes.splitlines and bytearray.splitlines.
8436
8437- Issue #7732: Don't open a directory as a file anymore while importing a
8438  module. Ignore the directory if its name matches the module name (e.g.
8439  "__init__.py") and raise an ImportError instead.
8440
8441- Issue #13021: Missing decref on an error path.  Thanks to Suman Saha for
8442  finding the bug and providing a patch.
8443
8444- Issue #12973: Fix overflow checks that relied on undefined behaviour in
8445  list_repeat (listobject.c) and islice_next (itertoolsmodule.c).  These bugs
8446  caused test failures with recent versions of Clang.
8447
8448- Issue #12904: os.utime, os.futimes, os.lutimes, and os.futimesat now write
8449  atime and mtime with nanosecond precision on modern POSIX platforms.
8450
8451- Issue #12802: the Windows error ERROR_DIRECTORY (numbered 267) is now
8452  mapped to POSIX errno ENOTDIR (previously EINVAL).
8453
8454- Issue #9200: The str.is* methods now work with strings that contain non-BMP
8455  characters even in narrow Unicode builds.
8456
8457- Issue #12791: Break reference cycles early when a generator exits with
8458  an exception.
8459
8460- Issue #12773: Make __doc__ mutable on user-defined classes.
8461
8462- Issue #12766: Raise a ValueError when creating a class with a class variable
8463  that conflicts with a name in __slots__.
8464
8465- Issue #12266: Fix str.capitalize() to correctly uppercase/lowercase
8466  titlecased and cased non-letter characters.
8467
8468- Issue #12732: In narrow unicode builds, allow Unicode identifiers which fall
8469  outside the BMP.
8470
8471- Issue #12575: Validate user-generated AST before it is compiled.
8472
8473- Make type(None), type(Ellipsis), and type(NotImplemented) callable. They
8474  return the respective singleton instances.
8475
8476- Forbid summing bytes with sum().
8477
8478- Verify the types of AST strings and identifiers provided by the user before
8479  compiling them.
8480
8481- Issue #12647: The None object now has a __bool__() method that returns False.
8482  Formerly, bool(None) returned False only because of special case logic
8483  in PyObject_IsTrue().
8484
8485- Issue #12579: str.format_map() now raises a ValueError if used on a
8486  format string that contains positional fields. Initial patch by
8487  Julian Berman.
8488
8489- Issue #10271: Allow warnings.showwarning() be any callable.
8490
8491- Issue #11627: Fix segfault when __new__ on an exception returns a
8492  non-exception class.
8493
8494- Issue #12149: Update the method cache after a type's dictionary gets
8495  cleared by the garbage collector.  This fixes a segfault when an instance
8496  and its type get caught in a reference cycle, and the instance's
8497  deallocator calls one of the methods on the type (e.g. when subclassing
8498  IOBase).  Diagnosis and patch by Davide Rizzo.
8499
8500- Issue #9611, Issue #9015: FileIO.read() clamps the length to INT_MAX on Windows.
8501
8502- Issue #9642: Uniformize the tests on the availability of the mbcs codec, add
8503  a new HAVE_MBCS define.
8504
8505- Issue #9642: Fix filesystem encoding initialization: use the ANSI code page
8506  on Windows if the mbcs codec is not available, and fail with a fatal error if
8507  we cannot get the locale encoding (if nl_langinfo(CODESET) is not available)
8508  instead of using UTF-8.
8509
8510- When a generator yields, do not retain the caller's exception state on the
8511  generator.
8512
8513- Issue #12475: Prevent generators from leaking their exception state into the
8514  caller's frame as they return for the last time.
8515
8516- Issue #12291: You can now load multiple marshalled objects from a stream,
8517  with other data interleaved between marshalled objects.
8518
8519- Issue #12356: When required positional or keyword-only arguments are not
8520  given, produce an informative error message which includes the name(s) of the
8521  missing arguments.
8522
8523- Issue #12370: Fix super with no arguments when __class__ is overridden in the
8524  class body.
8525
8526- Issue #12084: os.stat on Windows now works properly with relative symbolic
8527  links when called from any directory.
8528
8529- Loosen type restrictions on the __dir__ method. __dir__ can now return any
8530  sequence, which will be converted to a list and sorted by dir().
8531
8532- Issue #12265: Make error messages produced by passing an invalid set of
8533  arguments to a function more informative.
8534
8535- Issue #12225: Still allow Python to build if Python is not in its hg repo or
8536  mercurial is not installed.
8537
8538- Issue #1195: my_fgets() now always clears errors before calling fgets(). Fix
8539  the following case: sys.stdin.read() stopped with CTRL+d (end of file),
8540  raw_input() interrupted by CTRL+c.
8541
8542- Issue #12216: Allow unexpected EOF errors to happen on any line of the file.
8543
8544- Issue #12199: The TryExcept and TryFinally and AST nodes have been unified
8545  into a Try node.
8546
8547- Issue #9670: Increase the default stack size for secondary threads on
8548  Mac OS X and FreeBSD to reduce the chances of a crash instead of a
8549  "maximum recursion depth" RuntimeError exception.
8550  (patch by Ronald Oussoren)
8551
8552- Issue #12106: The use of the multiple-with shorthand syntax is now reflected
8553  in the AST.
8554
8555- Issue #12190: Try to use the same filename object when compiling unmarshalling
8556  a code objects in the same file.
8557
8558- Issue #12166: Move implementations of dir() specialized for various types into
8559  the __dir__() methods of those types.
8560
8561- Issue #5715: In socketserver, close the server socket in the child process.
8562
8563- Correct lookup of __dir__ on objects. Among other things, this causes errors
8564  besides AttributeError found on lookup to be propagated.
8565
8566- Issue #12060: Use sig_atomic_t type and volatile keyword in the signal
8567  module. Patch written by Charles-François Natali.
8568
8569- Issue #1746656: Added the if_nameindex, if_indextoname, if_nametoindex
8570  methods to the socket module.
8571
8572- Issue #12044: Fixed subprocess.Popen when used as a context manager to
8573  wait for the process to end when exiting the context to avoid unintentionally
8574  leaving zombie processes around.
8575
8576- Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c,
8577  clear the end-of-file indicator after CTRL+d.
8578
8579- Issue #1856: Avoid crashes and lockups when daemon threads run while the
8580  interpreter is shutting down; instead, these threads are now killed when
8581  they try to take the GIL.
8582
8583- Issue #9756: When calling a method descriptor or a slot wrapper descriptor,
8584  the check of the object type doesn't read the __class__ attribute anymore.
8585  Fix a crash if a class override its __class__ attribute (e.g. a proxy of the
8586  str type). Patch written by Andreas Stührk.
8587
8588- Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_*
8589  APIs, to avoid a crash with the pthread implementation in RHEL 5.  Patch
8590  by Charles-François Natali.
8591
8592- Issue #10914: Initialize correctly the filesystem codec when creating a new
8593  subinterpreter to fix a bootstrap issue with codecs implemented in Python, as
8594  the ISO-8859-15 codec.
8595
8596- Issue #11918: OS/2 and VMS are no more supported because of the lack of
8597  maintainer.
8598
8599- Issue #6780: fix starts/endswith error message to mention that tuples are
8600  accepted too.
8601
8602- Issue #5057: fix a bug in the peepholer that led to non-portable pyc files
8603  between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP
8604  chars (e.g. "\U00012345"[0]).
8605
8606- Issue #11845: Fix typo in rangeobject.c that caused a crash in
8607  compute_slice_indices.  Patch by Daniel Urban.
8608
8609- Issue #5673: Added a `timeout` keyword argument to subprocess.Popen.wait,
8610  subprocess.Popen.communicated, subprocess.call, subprocess.check_call, and
8611  subprocess.check_output.  If the blocking operation takes more than `timeout`
8612  seconds, the `subprocess.TimeoutExpired` exception is raised.
8613
8614- Issue #11650: PyOS_StdioReadline() retries fgets() if it was interrupted
8615  (EINTR), for example if the program is stopped with CTRL+z on Mac OS X. Patch
8616  written by Charles-Francois Natali.
8617
8618- Issue #9319: Include the filename in "Non-UTF8 code ..." syntax error.
8619
8620- Issue #10785: Store the filename as Unicode in the Python parser.
8621
8622- Issue #11619: _PyImport_LoadDynamicModule() doesn't encode the path to bytes
8623  on Windows.
8624
8625- Issue #10998: Remove mentions of -Q, sys.flags.division_warning and
8626  Py_DivisionWarningFlag left over from Python 2.
8627
8628- Issue #11244: Remove an unnecessary peepholer check that was preventing
8629  negative zeros from being constant-folded properly.
8630
8631- Issue #11395: io.FileIO().write() clamps the data length to 32,767 bytes on
8632  Windows if the file is a TTY to workaround a Windows bug. The Windows console
8633  returns an error (12: not enough space error) on writing into stdout if
8634  stdout mode is binary and the length is greater than 66,000 bytes (or less,
8635  depending on heap usage).
8636
8637- Issue #11320: fix bogus memory management in Modules/getpath.c, leading to
8638  a possible crash when calling Py_SetPath().
8639
8640- Issue #11432: A bug was introduced in subprocess.Popen on posix systems with
8641  3.2.0 where the stdout or stderr file descriptor being the same as the stdin
8642  file descriptor would raise an exception. webbrowser.open would fail. fixed.
8643
8644- Issue #9856: Change object.__format__ with a non-empty format string
8645  to be a DeprecationWarning. In 3.2 it was a PendingDeprecationWarning.
8646  In 3.4 it will be a TypeError.
8647
8648- Issue #11244: The peephole optimizer is now able to constant-fold
8649  arbitrarily complex expressions.  This also fixes a 3.2 regression where
8650  operations involving negative numbers were not constant-folded.
8651
8652- Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when
8653  there are many tags (e.g. when using mq).  Patch by Nadeem Vawda.
8654
8655- Issue #11335: Fixed a memory leak in list.sort when the key function
8656  throws an exception.
8657
8658- Issue #8923: When a string is encoded to UTF-8 in strict mode, the result is
8659  cached into the object. Examples: str.encode(), str.encode('utf-8'),
8660  PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString(unicode, "utf-8",
8661  NULL).
8662
8663- Issue #10829: Refactor PyUnicode_FromFormat(), use the same function to parse
8664  the format string in the 3 steps, fix crashes on invalid format strings.
8665
8666- Issue #13007: whichdb should recognize gdbm 1.9 magic numbers.
8667
8668- Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with
8669  a buffer struct having a NULL data pointer.
8670
8671- Issue #11272: On Windows, input() strips '\r' (and not only '\n'), and
8672  sys.stdin uses universal newline (replace '\r\n' by '\n').
8673
8674- Issue #11828: startswith and endswith now accept None as slice index.
8675  Patch by Torsten Becker.
8676
8677- Issue #11168: Remove filename debug variable from PyEval_EvalFrameEx().
8678  It encoded the Unicode filename to UTF-8, but the encoding fails on
8679  undecodable filename (on surrogate characters) which raises an unexpected
8680  UnicodeEncodeError on recursion limit.
8681
8682- Issue #11187: Remove bootstrap code (use ASCII) of
8683  PyUnicode_AsEncodedString(), it was replaced by a better fallback (use the
8684  locale encoding) in PyUnicode_EncodeFSDefault().
8685
8686- Check for NULL result in PyType_FromSpec.
8687
8688- Issue #10516: New copy() and clear() methods for lists and bytearrays.
8689
8690- Issue #11386: bytearray.pop() now throws IndexError when the bytearray is
8691  empty, instead of OverflowError.
8692
8693- Issue #12380: The rjust, ljust and center methods of bytes and bytearray
8694  now accept a bytearray argument.
8695
8696Library
8697-------
8698
8699- Issue #14195: An issue that caused weakref.WeakSet instances to incorrectly
8700  return True for a WeakSet instance 'a' in both 'a < a' and 'a > a' has been
8701  fixed.
8702
8703- Issue #14166: Pickler objects now have an optional ``dispatch_table``
8704  attribute which allows setting custom per-pickler reduction functions.
8705  Patch by sbt.
8706
8707- Issue #14177: marshal.loads() now raises TypeError when given a unicode
8708  string.  Patch by Guilherme Gonçalves.
8709
8710- Issue #13550: Remove the debug machinery from the threading module: remove
8711  verbose arguments from all threading classes and functions.
8712
8713- Issue #14159: Fix the len() of weak containers (WeakSet, WeakKeyDictionary,
8714  WeakValueDictionary) to return a better approximation when some objects
8715  are dead or dying.  Moreover, the implementation is now O(1) rather than
8716  O(n).
8717
8718- Issue #11841: Fix comparison bug with 'rc' versions in packaging.version.
8719  Patch by Filip Gruszczyński.
8720
8721- Issue #6884: Fix long-standing bugs with MANIFEST.in parsing in distutils
8722  on Windows.  Also fixed in packaging.
8723
8724- Issue #8033: sqlite3: Fix 64-bit integer handling in user functions
8725  on 32-bit architectures. Initial patch by Philippe Devalkeneer.
8726
8727- HTMLParser is now able to handle slashes in the start tag.
8728
8729- Issue #13641: Decoding functions in the base64 module now accept ASCII-only
8730  unicode strings.  Patch by Catalin Iacob.
8731
8732- Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a
8733  new importlib.invalidate_caches() function.
8734
8735- Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in
8736  SimpleXMLRPCServer upon malformed POST request.
8737
8738- Issue #13961: Move importlib over to using os.replace() for atomic renaming.
8739
8740- Do away with ambiguous level values (as suggested by PEP 328) in
8741  importlib.__import__() by raising ValueError when level < 0.
8742
8743- Issue #2489: pty.spawn could consume 100% cpu when it encountered an EOF.
8744
8745- Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert().
8746
8747- Issue #13777: Add PF_SYSTEM sockets on OS X.
8748  Patch by Michael Goderbauer.
8749
8750- Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
8751  Patch by Suman Saha.
8752
8753- Issue #1326113: distutils' and packaging's build_ext commands option now
8754  correctly parses multiple values (separated by whitespace or commas) given
8755  to their --libraries option.
8756
8757- Issue #10287: nntplib now queries the server's CAPABILITIES first before
8758  sending MODE READER, and only sends it if not already in READER mode.
8759  Patch by Hynek Schlawack.
8760
8761- Issue #13993: HTMLParser is now able to handle broken end tags when
8762  strict=False.
8763
8764- Issue #13930: lib2to3 now supports writing converted output files to another
8765  directory tree as well as copying unchanged files and altering the file
8766  suffix.
8767
8768- Issue #9750: Fix sqlite3.Connection.iterdump on tables and fields
8769  with a name that is a keyword or contains quotes. Patch by Marko
8770  Kohtala.
8771
8772- Issue #10287: nntplib now queries the server's CAPABILITIES again after
8773  authenticating (since the result may change, according to RFC 4643).
8774  Patch by Hynek Schlawack.
8775
8776- Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building
8777  Distutils-based packages with C extension modules may fail because
8778  Apple has removed gcc-4.2, the version used to build python.org
8779  64-bit/32-bit Pythons.  If the user does not explicitly override
8780  the default C compiler by setting the CC environment variable,
8781  Distutils will now attempt to compile extension modules with clang
8782  if gcc-4.2 is required but not found. Also as a convenience, if
8783  the user does explicitly set CC, substitute its value as the default
8784  compiler in the Distutils LDSHARED configuration variable for OS X.
8785  (Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u
8786  SDK, neither of which are available in Xcode 4.  This change does not
8787  attempt to override settings to support their use with Xcode 4.)
8788
8789- Issue #13960: HTMLParser is now able to handle broken comments when
8790  strict=False.
8791
8792- When '' is a path (e.g. in sys.path), make sure __file__ uses the current
8793  working directory instead of '' in importlib.
8794
8795- Issue #13609: Add two functions to query the terminal size:
8796  os.get_terminal_size (low level) and shutil.get_terminal_size (high level).
8797  Patch by Zbigniew Jędrzejewski-Szmek.
8798
8799- Issue #13845: On Windows, time.time() now uses GetSystemTimeAsFileTime()
8800  instead of ftime() to have a resolution of 100 ns instead of 1 ms (the clock
8801  accuracy is between 0.5 ms and 15 ms).
8802
8803- Issue #13846: Add time.monotonic(), monotonic clock.
8804
8805- Issue #8184: multiprocessing: On Windows, don't set SO_REUSEADDR on
8806  Connection sockets, and set FILE_FLAG_FIRST_PIPE_INSTANCE on named pipes, to
8807  make sure two listeners can't bind to the same socket/pipe (or any existing
8808  socket/pipe).
8809
8810- Issue #10811: Fix recursive usage of cursors. Instead of crashing,
8811  raise a ProgrammingError now.
8812
8813- Issue #13734: Add os.fwalk(), a directory walking function yielding file
8814  descriptors.
8815
8816- Issue #2945: Make the distutils upload command aware of bdist_rpm products.
8817
8818- Issue #13712: pysetup create should not convert package_data to extra_files.
8819
8820- Issue #11805: package_data in setup.cfg should allow more than one value.
8821
8822- Issue #13676: Handle strings with embedded zeros correctly in sqlite3.
8823
8824- Issue #8828: Add new function os.replace(), for cross-platform renaming
8825  with overwriting.
8826
8827- Issue #13848: open() and the FileIO constructor now check for NUL
8828  characters in the file name.  Patch by Hynek Schlawack.
8829
8830- Issue #13806: The size check in audioop decompression functions was too
8831  strict and could reject valid compressed data.  Patch by Oleg Plakhotnyuk.
8832
8833- Issue #13812: When a multiprocessing Process child raises an exception,
8834  flush stderr after printing the exception traceback.
8835
8836- Issue #13885: CVE-2011-3389: the _ssl module would always disable the CBC
8837  IV attack countermeasure.
8838
8839- Issue #13847: time.localtime() and time.gmtime() now raise an OSError instead
8840  of ValueError on failure. time.ctime() and time.asctime() now raises an
8841  OSError if localtime() failed. time.clock() now raises a RuntimeError if the
8842  processor time used is not available or its value cannot be represented
8843
8844- Issue #13772: In os.symlink() under Windows, do not try to guess the link
8845  target's type (file or directory).  The detection was buggy and made the
8846  call non-atomic (therefore prone to race conditions).
8847
8848- Issue #6631: Disallow relative file paths in urllib urlopen methods.
8849
8850- Issue #13722: Avoid silencing ImportErrors when initializing the codecs
8851  registry.
8852
8853- Issue #13781: Fix GzipFile bug that caused an exception to be raised when
8854  opening for writing using a fileobj returned by os.fdopen().
8855
8856- Issue #13803: Under Solaris, distutils doesn't include bitness
8857  in the directory name.
8858
8859- Issue #10278: Add time.wallclock() function, monotonic clock.
8860
8861- Issue #13809: Fix regression where bz2 module wouldn't work when threads are
8862  disabled. Original patch by Amaury Forgeot d'Arc.
8863
8864- Issue #13589: Fix some serialization primitives in the aifc module.
8865  Patch by Oleg Plakhotnyuk.
8866
8867- Issue #13642: Unquote before b64encoding user:password during Basic
8868  Authentication. Patch contributed by Joonas Kuorilehto.
8869
8870- Issue #12364: Fix a hang in concurrent.futures.ProcessPoolExecutor.
8871  The hang would occur when retrieving the result of a scheduled future after
8872  the executor had been shut down.
8873
8874- Issue #13502: threading: Fix a race condition in Event.wait() that made it
8875  return False when the event was set and cleared right after.
8876
8877- Issue #9993: When the source and destination are on different filesystems,
8878  and the source is a symlink, shutil.move() now recreates a symlink on the
8879  destination instead of copying the file contents.  Patch by Jonathan Niehof
8880  and Hynek Schlawack.
8881
8882- Issue #12926: Fix a bug in tarfile's link extraction.
8883
8884- Issue #13696: Fix the 302 Relative URL Redirection problem.
8885
8886- Issue #13636: Weak ciphers are now disabled by default in the ssl module
8887  (except when SSLv2 is explicitly asked for).
8888
8889- Issue #12715: Add an optional symlinks argument to shutil functions
8890  (copyfile, copymode, copystat, copy, copy2).  When that parameter is
8891  true, symlinks aren't dereferenced and the operation instead acts on the
8892  symlink itself (or creates one, if relevant).  Patch by Hynek Schlawack.
8893
8894- Add a flags parameter to select.epoll.
8895
8896- Issue #13626: Add support for SSL Diffie-Hellman key exchange, through the
8897  SSLContext.load_dh_params() method and the ssl.OP_SINGLE_DH_USE option.
8898
8899- Issue #11006: Don't issue low level warning in subprocess when pipe2() fails.
8900
8901- Issue #13620: Support for Chrome browser in webbrowser.  Patch contributed
8902  by Arnaud Calmettes.
8903
8904- Issue #11829: Fix code execution holes in inspect.getattr_static for
8905  metaclasses with metaclasses. Patch by Andreas Stührk.
8906
8907- Issue #12708: Add starmap() and starmap_async() methods (similar to
8908  itertools.starmap()) to multiprocessing.Pool.  Patch by Hynek Schlawack.
8909
8910- Issue #1785: Fix inspect and pydoc with misbehaving descriptors.
8911
8912- Issue #13637: "a2b" functions in the binascii module now accept ASCII-only
8913  unicode strings.
8914
8915- Issue #13634: Add support for querying and disabling SSL compression.
8916
8917- Issue #13627: Add support for SSL Elliptic Curve-based Diffie-Hellman
8918  key exchange, through the SSLContext.set_ecdh_curve() method and the
8919  ssl.OP_SINGLE_ECDH_USE option.
8920
8921- Issue #13635: Add ssl.OP_CIPHER_SERVER_PREFERENCE, so that SSL servers
8922  choose the cipher based on their own preferences, rather than on the
8923  client's.
8924
8925- Issue #11813: Fix inspect.getattr_static for modules. Patch by Andreas
8926  Stührk.
8927
8928- Issue #7502: Fix equality comparison for DocTestCase instances.  Patch by
8929  Cédric Krier.
8930
8931- Issue #11870: threading: Properly reinitialize threads internal locks and
8932  condition variables to avoid deadlocks in child processes.
8933
8934- Issue #8035: urllib: Fix a bug where the client could remain stuck after a
8935  redirection or an error.
8936
8937- Issue #13560: os.strerror() now uses the current locale encoding instead of
8938  UTF-8.
8939
8940- Issue #8373: The filesystem path of AF_UNIX sockets now uses the filesystem
8941  encoding and the surrogateescape error handler, rather than UTF-8.  Patch
8942  by David Watson.
8943
8944- Issue #10350: Read and save errno before calling a function which might
8945  overwrite it.  Original patch by Hallvard B Furuseth.
8946
8947- Issue #11610: Introduce a more general way to declare abstract properties.
8948
8949- Issue #13591: A bug in importlib has been fixed that caused import_module
8950  to load a module twice.
8951
8952- Issue #13449: sched.scheduler.run() method has a new "blocking" parameter which
8953  when set to False makes run() execute the scheduled events due to expire
8954  soonest (if any) and then return.  Patch by Giampaolo Rodolà.
8955
8956- Issue #8684: sched.scheduler class can be safely used in multi-threaded
8957  environments.  Patch by Josiah Carlson and Giampaolo Rodolà.
8958
8959- Alias resource.error to OSError ala PEP 3151.
8960
8961- Issue #5689: Add support for lzma compression to the tarfile module.
8962
8963- Issue #13248: Turn 3.2's PendingDeprecationWarning into 3.3's
8964  DeprecationWarning.  It covers 'cgi.escape', 'importlib.abc.PyLoader',
8965  'importlib.abc.PyPycLoader', 'nntplib.NNTP.xgtitle', 'nntplib.NNTP.xpath',
8966  and private attributes of 'smtpd.SMTPChannel'.
8967
8968- Issue #5905, Issue #13560: time.strftime() is now using the current locale
8969  encoding, instead of UTF-8, if the wcsftime() function is not available.
8970
8971- Issue #13464: Add a readinto() method to http.client.HTTPResponse.  Patch
8972  by Jon Kuhn.
8973
8974- tarfile.py: Correctly detect bzip2 compressed streams with blocksizes
8975  other than 900k.
8976
8977- Issue #13439: Fix many errors in turtle docstrings.
8978
8979- Issue #6715: Add a module 'lzma' for compression using the LZMA algorithm.
8980  Thanks to Per Øyvind Karlsen for the initial implementation.
8981
8982- Issue #13487: Make inspect.getmodule robust against changes done to
8983  sys.modules while it is iterating over it.
8984
8985- Issue #12618: Fix a bug that prevented py_compile from creating byte
8986  compiled files in the current directory.  Initial patch by Sjoerd de Vries.
8987
8988- Issue #13444: When stdout has been closed explicitly, we should not attempt
8989  to flush it at shutdown and print an error.
8990
8991- Issue #12567: The curses module uses Unicode functions for Unicode arguments
8992  when it is linked to the ncurses library. It encodes also Unicode strings to
8993  the locale encoding instead of UTF-8.
8994
8995- Issue #12856: Ensure child processes do not inherit the parent's random
8996  seed for filename generation in the tempfile module.  Patch by Brian
8997  Harring.
8998
8999- Issue #9957: SpooledTemporaryFile.truncate() now accepts an optional size
9000  parameter, as other file-like objects.  Patch by Ryan Kelly.
9001
9002- Issue #13458: Fix a memory leak in the ssl module when decoding a
9003  certificate with a subjectAltName.  Patch by Robert Xiao.
9004
9005- Issue #13415: os.unsetenv() doesn't ignore errors anymore.
9006
9007- Issue #13245: sched.scheduler class constructor's timefunc and
9008  delayfunct parameters are now optional.
9009  scheduler.enter and scheduler.enterabs methods gained a new kwargs parameter.
9010  Patch contributed by Chris Clark.
9011
9012- Issue #12328: Under Windows, refactor handling of Ctrl-C events and
9013  make _multiprocessing.win32.WaitForMultipleObjects interruptible when
9014  the wait_flag parameter is false.  Patch by sbt.
9015
9016- Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is
9017  raised when the wrapped raw file is non-blocking and the write would block.
9018  Previous code assumed that the raw write() would raise BlockingIOError, but
9019  RawIOBase.write() is defined to returned None when the call would block.
9020  Patch by sbt.
9021
9022- Issue #13358: HTMLParser now calls handle_data only once for each CDATA.
9023
9024- Issue #4147: minidom's toprettyxml no longer adds whitespace around a text
9025  node when it is the only child of an element.  Initial patch by Dan
9026  Kenigsberg.
9027
9028- Issue #13374: The Windows bytes API has been deprecated in the os module. Use
9029  Unicode filenames instead of bytes filenames to not depend on the ANSI code
9030  page anymore and to support any filename.
9031
9032- Issue #13297: Use bytes type to send and receive binary data through XMLRPC.
9033
9034- Issue #6397: Support "/dev/poll" polling objects in select module,
9035  under Solaris & derivatives.
9036
9037- Issues #1745761, #755670, #13357, #12629, #1200313: HTMLParser now correctly
9038  handles non-valid attributes, including adjacent and unquoted attributes.
9039
9040- Issue #13193: Fix distutils.filelist.FileList and packaging.manifest.Manifest
9041  under Windows.
9042
9043- Issue #13384: Remove unnecessary __future__ import in Lib/random.py
9044
9045- Issue #13149: Speed up append-only StringIO objects.
9046
9047- Issue #13373: multiprocessing.Queue.get() could sometimes block indefinitely
9048  when called with a timeout.  Patch by Arnaud Ysmal.
9049
9050- Issue #13254: Fix Maildir initialization so that maildir contents
9051  are read correctly.
9052
9053- Issue #3067: locale.setlocale() now raises TypeError if the second
9054  argument is an invalid iterable. Its documentation and docstring
9055  were also updated. Initial patch by Jyrki Pulliainen.
9056
9057- Issue #13140: Fix the daemon_threads attribute of ThreadingMixIn.
9058
9059- Issue #13339: Fix compile error in posixmodule.c due to missing semicolon.
9060  Thanks to Robert Xiao.
9061
9062- Byte compilation in packaging is now isolated from the calling Python -B or
9063  -O options, instead of being disallowed under -B or buggy under -O.
9064
9065- Issue #10570: curses.putp() and curses.tparm() are now expecting a byte
9066  string, instead of a Unicode string.
9067
9068- Issue #13295: http.server now produces valid HTML 4.01 strict.
9069
9070- Issue #2892: preserve iterparse events in case of SyntaxError.
9071
9072- Issue #13287: urllib.request and urllib.error now contains an __all__
9073  attribute to expose only relevant classes and functions.  Patch by Florent
9074  Xicluna.
9075
9076- Issue #670664: Fix HTMLParser to correctly handle the content of
9077  ``<script>...</script>`` and ``<style>...</style>``.
9078
9079- Issue #10817: Fix urlretrieve function to raise ContentTooShortError even
9080  when reporthook is None. Patch by Jyrki Pulliainen.
9081
9082- Fix the xmlrpc.client user agent to return something similar to
9083  urllib.request user agent: "Python-xmlrpc/3.3".
9084
9085- Issue #13293: Better error message when trying to marshal bytes using
9086  xmlrpc.client.
9087
9088- Issue #13291: NameError in xmlrpc package.
9089
9090- Issue #13258: Use callable() built-in in the standard library.
9091
9092- Issue #13273: fix a bug that prevented HTMLParser to properly detect some
9093  tags when strict=False.
9094
9095- Issue #11183: Add finer-grained exceptions to the ssl module, so that
9096  you don't have to inspect the exception's attributes in the common case.
9097
9098- Issue #13216: Add cp65001 codec, the Windows UTF-8 (CP_UTF8).
9099
9100- Issue #13226: Add RTLD_xxx constants to the os module. These constants can be
9101  used with sys.setdlopenflags().
9102
9103- Issue #10278: Add clock_getres(), clock_gettime() and CLOCK_xxx constants to
9104  the time module. time.clock_gettime(time.CLOCK_MONOTONIC) provides a
9105  monotonic clock
9106
9107- Issue #10332: multiprocessing: fix a race condition when a Pool is closed
9108  before all tasks have completed.
9109
9110- Issue #13255: wrong docstrings in array module.
9111
9112- Issue #8540: Remove deprecated Context._clamp attribute in Decimal module.
9113
9114- Issue #13235: Added DeprecationWarning to logging.warn() method and function.
9115
9116- Issue #9168: now smtpd is able to bind privileged port.
9117
9118- Issue #12529: fix cgi.parse_header issue on strings with double-quotes and
9119  semicolons together. Patch by Ben Darnell and Petri Lehtinen.
9120
9121- Issue #13227: functools.lru_cache() now has an option to distinguish
9122  calls with different argument types.
9123
9124- Issue #6090: zipfile raises a ValueError when a document with a timestamp
9125  earlier than 1980 is provided. Patch contributed by Petri Lehtinen.
9126
9127- Issue #13150: sysconfig no longer parses the Makefile and config.h files
9128  when imported, instead doing it at build time.  This makes importing
9129  sysconfig faster and reduces Python startup time by 20%.
9130
9131- Issue #12448: smtplib now flushes stdout while running ``python -m smtplib``
9132  in order to display the prompt correctly.
9133
9134- Issue #12454: The mailbox module is now using ASCII, instead of the locale
9135  encoding, to read and write .mh_sequences files.
9136
9137- Issue #13194: zlib.compressobj().copy() and zlib.decompressobj().copy() are
9138  now available on Windows.
9139
9140- Issue #1673007: urllib.request now supports HEAD request via new method argument.
9141  Patch contributions by David Stanek, Patrick Westerhoff and Ezio Melotti.
9142
9143- Issue #12386: packaging does not fail anymore when writing the RESOURCES
9144  file.
9145
9146- Issue #13158: Fix decoding and encoding of GNU tar specific base-256 number
9147  fields in tarfile.
9148
9149- Issue #13025: mimetypes is now reading MIME types using the UTF-8 encoding,
9150  instead of the locale encoding.
9151
9152- Issue #10653: On Windows, use strftime() instead of wcsftime() because
9153  wcsftime() doesn't format time zone correctly.
9154
9155- Issue #13150: The tokenize module doesn't compile large regular expressions
9156  at startup anymore.
9157
9158- Issue #11171: Fix distutils.sysconfig.get_makefile_filename when Python was
9159  configured with different prefix and exec-prefix.
9160
9161- Issue #11254: Teach distutils and packaging to compile .pyc and .pyo files in
9162  PEP 3147-compliant __pycache__ directories.
9163
9164- Issue #7367: Fix pkgutil.walk_paths to skip directories whose
9165  contents cannot be read.
9166
9167- Issue #3163: The struct module gets new format characters 'n' and 'N'
9168  supporting C integer types ``ssize_t`` and ``size_t``, respectively.
9169
9170- Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale.
9171  Reported and diagnosed by Thomas Kluyver.
9172
9173- Issue #13087: BufferedReader.seek() now always raises UnsupportedOperation
9174  if the underlying raw stream is unseekable, even if the seek could be
9175  satisfied using the internal buffer.  Patch by John O'Connor.
9176
9177- Issue #7689: Allow pickling of dynamically created classes when their
9178  metaclass is registered with copyreg.  Patch by Nicolas M. Thiéry and Craig
9179  Citro.
9180
9181- Issue #13034: When decoding some SSL certificates, the subjectAltName
9182  extension could be unreported.
9183
9184- Issue #12306: Expose the runtime version of the zlib C library as a constant,
9185  ZLIB_RUNTIME_VERSION, in the zlib module. Patch by Torsten Landschoff.
9186
9187- Issue #12959: Add collections.ChainMap to collections.__all__.
9188
9189- Issue #8933: distutils' PKG-INFO files and packaging's METADATA files will
9190  now correctly report Metadata-Version: 1.1 instead of 1.0 if a Classifier or
9191  Download-URL field is present.
9192
9193- Issue #12567: Add curses.unget_wch() function. Push a character so the next
9194  get_wch() will return it.
9195
9196- Issue #9561: distutils and packaging now writes egg-info files using UTF-8,
9197  instead of the locale encoding.
9198
9199- Issue #8286: The distutils command sdist will print a warning message instead
9200  of crashing when an invalid path is given in the manifest template.
9201
9202- Issue #12841: tarfile unnecessarily checked the existence of numerical user
9203  and group ids on extraction. If one of them did not exist the respective id
9204  of the current user (i.e. root) was used for the file and ownership
9205  information was lost.
9206
9207- Issue #12888: Fix a bug in HTMLParser.unescape that prevented it to escape
9208  more than 128 entities.  Patch by Peter Otten.
9209
9210- Issue #12878: Expose a __dict__ attribute on io.IOBase and its subclasses.
9211
9212- Issue #12494: On error, call(), check_call(), check_output() and
9213  getstatusoutput() functions of the subprocess module now kill the process,
9214  read its status (to avoid zombis) and close pipes.
9215
9216- Issue #12720: Expose low-level Linux extended file attribute functions in os.
9217
9218- Issue #10946: The distutils commands bdist_dumb, bdist_wininst and bdist_msi
9219  now respect a --skip-build option given to bdist.  The packaging commands
9220  were fixed too.
9221
9222- Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments in
9223  the C pickle implementation.
9224
9225- Issue #11564: Avoid crashes when trying to pickle huge objects or containers
9226  (more than 2**31 items).  Instead, in most cases, an OverflowError is raised.
9227
9228- Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
9229  greater than FD_SETSIZE.
9230
9231- Issue #12839: Fix crash in zlib module due to version mismatch.
9232  Fix by Richard M. Tew.
9233
9234- Issue #9923: The mailcap module now correctly uses the platform path
9235  separator for the MAILCAP environment variable on non-POSIX platforms.
9236
9237- Issue #12835: Follow up to #6560 that unconditionally prevents use of the
9238  unencrypted sendmsg/recvmsg APIs on SSL wrapped sockets. Patch by David
9239  Watson.
9240
9241- Issue #12803: SSLContext.load_cert_chain() now accepts a password argument
9242  to be used if the private key is encrypted.  Patch by Adam Simpkins.
9243
9244- Issue #11657: Fix sending file descriptors over 255 over a multiprocessing
9245  Pipe.
9246
9247- Issue #12811: tabnanny.check() now promptly closes checked files. Patch by
9248  Anthony Briggs.
9249
9250- Issue #6560: The sendmsg/recvmsg API is now exposed by the socket module
9251  when provided by the underlying platform, supporting processing of
9252  ancillary data in pure Python code. Patch by David Watson and Heiko Wundram.
9253
9254- Issue #12326: On Linux, sys.platform doesn't contain the major version
9255  anymore. It is now always 'linux', instead of 'linux2' or 'linux3' depending
9256  on the Linux version used to build Python.
9257
9258- Issue #12213: Fix a buffering bug with interleaved reads and writes that
9259  could appear on BufferedRandom streams.
9260
9261- Issue #12778: Reduce memory consumption when JSON-encoding a large
9262  container of many small objects.
9263
9264- Issue #12650: Fix a race condition where a subprocess.Popen could leak
9265  resources (FD/zombie) when killed at the wrong time.
9266
9267- Issue #12744: Fix inefficient representation of integers between 2**31 and
9268  2**63 on systems with a 64-bit C "long".
9269
9270- Issue #12646: Add an 'eof' attribute to zlib.Decompress, to make it easier to
9271  detect truncated input streams.
9272
9273- Issue #11513: Fix exception handling ``tarfile.TarFile.gzopen()`` when
9274  the file cannot be opened.
9275
9276- Issue #12687: Fix a possible buffering bug when unpickling text mode
9277  (protocol 0, mostly) pickles.
9278
9279- Issue #10087: Fix the html output format of the calendar module.
9280
9281- Issue #13121: add support for inplace math operators to collections.Counter.
9282
9283- Add support for unary plus and unary minus to collections.Counter.
9284
9285- Issue #12683: urlparse updated to include svn as schemes that uses relative
9286  paths. (svn from 1.5 onwards support relative path).
9287
9288- Issue #12655: Expose functions from sched.h in the os module: sched_yield(),
9289  sched_setscheduler(), sched_getscheduler(), sched_setparam(),
9290  sched_get_min_priority(), sched_get_max_priority(), sched_rr_get_interval(),
9291  sched_getaffinity(), sched_setaffinity().
9292
9293- Add ThreadError to threading.__all__.
9294
9295- Issues #11104, #8688: Fix the behavior of distutils' sdist command with
9296  manually-maintained MANIFEST files.
9297
9298- Issue #11281: smtplib.STMP gets source_address parameter, which adds the
9299  ability to bind to specific source address on a machine with multiple
9300  interfaces. Patch by Paulo Scardine.
9301
9302- Issue #12464: tempfile.TemporaryDirectory.cleanup() should not follow
9303  symlinks: fix it. Patch by Petri Lehtinen.
9304
9305- Issue #8887: "pydoc somebuiltin.somemethod" (or help('somebuiltin.somemethod')
9306  in Python code) now finds the doc of the method.
9307
9308- Issue #10968: Remove indirection in threading.  The public names (Event,
9309  Condition, etc.) used to be factory functions returning instances of hidden
9310  classes (_Event, _Condition, etc.), because (if Guido recalls correctly) this
9311  code pre-dates the ability to subclass extension types.  It is now possible
9312  to inherit from these classes, without having to import the private
9313  underscored names like multiprocessing did.
9314
9315- Issue #9723: Add shlex.quote functions, to escape filenames and command
9316  lines.
9317
9318- Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime.
9319
9320- Issue #12514: Use try/finally to assure the timeit module restores garbage
9321  collections when it is done.
9322
9323- Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is
9324  given as a low fd, it gets overwritten.
9325
9326- Issue #12576: Fix urlopen behavior on sites which do not send (or obfuscates)
9327  ``Connection: close`` header.
9328
9329- Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling.
9330
9331- Issue #1813: Fix codec lookup under Turkish locales.
9332
9333- Issue #12591: Improve support of "universal newlines" in the subprocess
9334  module: the piped streams can now be properly read from or written to.
9335
9336- Issue #12591: Allow io.TextIOWrapper to work with raw IO objects (without
9337  a read1() method), and add a *write_through* parameter to mandate
9338  unbuffered writes.
9339
9340- Issue #10883: Fix socket leaks in urllib.request when using FTP.
9341
9342- Issue #12592: Make Python build on OpenBSD 5 (and future major releases).
9343
9344- Issue #12372: POSIX semaphores are broken on AIX: don't use them.
9345
9346- Issue #12551: Provide a get_channel_binding() method on SSL sockets so as
9347  to get channel binding data for the current SSL session (only the
9348  "tls-unique" channel binding is implemented).  This allows the implementation
9349  of certain authentication mechanisms such as SCRAM-SHA-1-PLUS.  Patch by
9350  Jacek Konieczny.
9351
9352- Issue #665194: email.utils now has format_datetime and parsedate_to_datetime
9353  functions, allowing for round tripping of RFC2822 format dates.
9354
9355- Issue #12571: Add a plat-linux3 directory mirroring the plat-linux2
9356  directory, so that "import DLFCN" and other similar imports work on
9357  Linux 3.0.
9358
9359- Issue #7484: smtplib no longer puts <> around addresses in VRFY and EXPN
9360  commands; they aren't required and in fact postfix doesn't support that form.
9361
9362- Issue #12273: Remove ast.__version__. AST changes can be accounted for by
9363  checking sys.version_info or sys._mercurial.
9364
9365- Silence spurious "broken pipe" tracebacks when shutting down a
9366  ProcessPoolExecutor.
9367
9368- Fix potential resource leaks in concurrent.futures.ProcessPoolExecutor
9369  by joining all queues and processes when shutdown() is called.
9370
9371- Issue #11603: Fix a crash when __str__ is rebound as __repr__.  Patch by
9372  Andreas Stührk.
9373
9374- Issue #11321: Fix a crash with multiple imports of the _pickle module when
9375  embedding Python.  Patch by Andreas Stührk.
9376
9377- Issue #6755: Add get_wch() method to curses.window class. Patch by Iñigo
9378  Serna.
9379
9380- Add cgi.closelog() function to close the log file.
9381
9382- Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.
9383
9384- Issue #4376: ctypes now supports nested structures in an endian different than
9385  the parent structure. Patch by Vlad Riscutia.
9386
9387- Raise ValueError when attempting to set the _CHUNK_SIZE attribute of a
9388  TextIOWrapper to a huge value, not TypeError.
9389
9390- Issue #12504: Close file handles in a timely manner in packaging.database.
9391  This fixes a bug with the remove (uninstall) feature on Windows.
9392
9393- Issues #12169 and #10510: Factor out code used by various packaging commands
9394  to make HTTP POST requests, and make sure it uses CRLF.
9395
9396- Issue #12016: Multibyte CJK decoders now resynchronize faster. They only
9397  ignore the first byte of an invalid byte sequence. For example,
9398  b'\xff\n'.decode('gb2312', 'replace') gives '\ufffd\n' instead of '\ufffd'.
9399
9400- Issue #12459: time.sleep() now raises a ValueError if the sleep length is
9401  negative, instead of an infinite sleep on Windows or raising an IOError on
9402  Linux for example, to have the same behaviour on all platforms.
9403
9404- Issue #12451: pydoc: html_getfile() now uses tokenize.open() to support
9405  Python scripts using an encoding different than UTF-8 (read the coding cookie
9406  of the script).
9407
9408- Issue #12493: subprocess: Popen.communicate() now also handles EINTR errors
9409  if the process has only one pipe.
9410
9411- Issue #12467: warnings: fix a race condition if a warning is emitted at
9412  shutdown, if globals()['__file__'] is None.
9413
9414- Issue #12451: pydoc: importfile() now opens the Python script in binary mode,
9415  instead of text mode using the locale encoding, to avoid encoding issues.
9416
9417- Issue #12451: runpy: run_path() now opens the Python script in binary mode,
9418  instead of text mode using the locale encoding, to support other encodings
9419  than UTF-8 (scripts using the coding cookie).
9420
9421- Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
9422  of the text mode (using the locale encoding) to avoid encoding issues.
9423
9424- Issue #12147: Adjust the new-in-3.2 smtplib.send_message method for better
9425  conformance to the RFCs:  correctly handle Sender and Resent- headers.
9426
9427- Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
9428  the garbage collector while the Heap lock is held.
9429
9430- Issue #12462: time.sleep() now immediately calls the (Python) signal handler
9431  if it is interrupted by a signal, instead of having to wait until the next
9432  instruction.
9433
9434- Issue #12442: new shutil.disk_usage function, providing total, used and free
9435  disk space statistics.
9436
9437- Issue #12451: The XInclude default loader of xml.etree now decodes files from
9438  UTF-8 instead of the locale encoding if the encoding is not specified. It now
9439  also opens XML files for the parser in binary mode instead of the text mode
9440  to avoid encoding issues.
9441
9442- Issue #12451: doctest.debug_script() doesn't create a temporary file
9443  anymore to avoid encoding issues.
9444
9445- Issue #12451: pydoc.synopsis() now reads the encoding cookie if available,
9446  to read the Python script from the right encoding.
9447
9448- Issue #12451: distutils now opens the setup script in binary mode to read the
9449  encoding cookie, instead of opening it in UTF-8.
9450
9451- Issue #9516: On Mac OS X, change Distutils to no longer globally attempt to
9452  check or set the MACOSX_DEPLOYMENT_TARGET environment variable for the
9453  interpreter process.  This could cause failures in non-Distutils subprocesses
9454  and was unreliable since tests or user programs could modify the interpreter
9455  environment after Distutils set it.  Instead, have Distutils set the
9456  deployment target only in the environment of each build subprocess.  It is
9457  still possible to globally override the default by setting
9458  MACOSX_DEPLOYMENT_TARGET before launching the interpreter; its value must be
9459  greater or equal to the default value, the value with which the interpreter
9460  was built.  Also, implement the same handling in packaging.
9461
9462- Issue #12422: In the copy module, don't store objects that are their own copy
9463  in the memo dict.
9464
9465- Issue #12303: Add sigwaitinfo() and sigtimedwait() to the signal module.
9466
9467- Issue #12404: Remove C89 incompatible code from mmap module. Patch by Akira
9468  Kitada.
9469
9470- Issue #1874: email now detects and reports as a defect the presence of
9471  any CTE other than 7bit, 8bit, or binary on a multipart.
9472
9473- Issue #12383: Fix subprocess module with env={}: don't copy the environment
9474  variables, start with an empty environment.
9475
9476- Issue #11637: Fix support for importing packaging setup hooks from the
9477  project directory.
9478
9479- Issue #6771: Moved the curses.wrapper function from the single-function
9480  wrapper module into __init__, eliminating the module.  Since __init__ was
9481  already importing the function to curses.wrapper, there is no API change.
9482
9483- Issue #11584: email.header.decode_header no longer fails if the header
9484  passed to it is a Header object, and Header/make_header no longer fail
9485  if given binary unknown-8bit input.
9486
9487- Issue #11700: mailbox proxy object close methods can now be called multiple
9488  times without error.
9489
9490- Issue #11767: Correct file descriptor leak in mailbox's __getitem__ method.
9491
9492- Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP
9493  connection if its getresponse() method fails with a socket error. Patch
9494  written by Ezio Melotti.
9495
9496- Issue #12240: Allow multiple setup hooks in packaging's setup.cfg files.
9497  Original patch by Erik Bray.
9498
9499- Issue #9284: Allow inspect.findsource() to find the source of doctest
9500  functions.
9501
9502- Issue #11595: Fix assorted bugs in packaging.util.cfg_to_args, a
9503  compatibility helper for the distutils-packaging transition.  Original patch
9504  by Erik Bray.
9505
9506- Issue #12287: In ossaudiodev, check that the device isn't closed in several
9507  methods.
9508
9509- Issue #12009: Fixed regression in netrc file comment handling.
9510
9511- Issue #12246: Warn and fail when trying to install a third-party project from
9512  an uninstalled Python (built in a source checkout).  Original patch by
9513  Tshepang Lekhonkhobe.
9514
9515- Issue #10694: zipfile now ignores garbage at the end of a zipfile.
9516
9517- Issue #12283: Fixed regression in smtplib quoting of leading dots in DATA.
9518
9519- Issue #10424: Argparse now includes the names of the missing required
9520  arguments in the missing arguments error message.
9521
9522- Issue #12168: SysLogHandler now allows NUL termination to be controlled using
9523  a new 'append_nul' attribute on the handler.
9524
9525- Issue #11583: Speed up os.path.isdir on Windows by using GetFileAttributes
9526  instead of os.stat.
9527
9528- Issue #12021: Make mmap's read() method argument optional. Patch by Petri
9529  Lehtinen.
9530
9531- Issue #9205: concurrent.futures.ProcessPoolExecutor now detects killed
9532  children and raises BrokenProcessPool in such a situation.  Previously it
9533  would reliably freeze/deadlock.
9534
9535- Issue #12040: Expose a new attribute ``sentinel`` on instances of
9536  ``multiprocessing.Process``.  Also, fix Process.join() to not use polling
9537  anymore, when given a timeout.
9538
9539- Issue #11893: Remove obsolete internal wrapper class ``SSLFakeFile`` in the
9540  smtplib module.  Patch by Catalin Iacob.
9541
9542- Issue #12080: Fix a Decimal.power() case that took an unreasonably long time
9543  to compute.
9544
9545- Issue #12221: Remove __version__ attributes from pyexpat, pickle, tarfile,
9546  pydoc, tkinter, and xml.parsers.expat. This were useless version constants
9547  left over from the Mercurial transition
9548
9549- Named tuples now work correctly with vars().
9550
9551- Issue #12085: Fix an attribute error in subprocess.Popen destructor if the
9552  constructor has failed, e.g. because of an undeclared keyword argument. Patch
9553  written by Oleg Oshmyan.
9554
9555- Issue #12028: Make threading._get_ident() public, rename it to
9556  threading.get_ident() and document it. This function was already used using
9557  _thread.get_ident().
9558
9559- Issue #12171: IncrementalEncoder.reset() of CJK codecs (multibytecodec) calls
9560  encreset() instead of decreset().
9561
9562- Issue #12218: Removed wsgiref.egg-info.
9563
9564- Issue #12196: Add pipe2() to the os module.
9565
9566- Issue #985064: Make plistlib more resilient to faulty input plists.
9567  Patch by Mher Movsisyan.
9568
9569- Issue #1625: BZ2File and bz2.decompress() now support multi-stream files.
9570  Initial patch by Nir Aides.
9571
9572- Issue #12175: BufferedReader.read(-1) now calls raw.readall() if available.
9573
9574- Issue #12175: FileIO.readall() now only reads the file position and size
9575  once.
9576
9577- Issue #12175: RawIOBase.readall() now returns None if read() returns None.
9578
9579- Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError
9580  if the file is closed.
9581
9582- Issue #11109: New service_action method for BaseServer, used by ForkingMixin
9583  class for cleanup. Initial Patch by Justin Warkentin.
9584
9585- Issue #12045: Avoid duplicate execution of command in
9586  ctypes.util._get_soname().  Patch by Sijin Joseph.
9587
9588- Issue #10818: Remove the Tk GUI and the serve() function of the pydoc module,
9589  pydoc -g has been deprecated in Python 3.2 and it has a new enhanced web
9590  server.
9591
9592- Issue #1441530: In imaplib, read the data in one chunk to speed up large
9593  reads and simplify code.
9594
9595- Issue #12070: Fix the Makefile parser of the sysconfig module to handle
9596  correctly references to "bogus variable" (e.g. "prefix=$/opt/python").
9597
9598- Issue #12100: Don't reset incremental encoders of CJK codecs at each call to
9599  their encode() method anymore, but continue to call the reset() method if the
9600  final argument is True.
9601
9602- Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl
9603  module.
9604
9605- Issue #6501: os.device_encoding() returns None on Windows if the application
9606  has no console.
9607
9608- Issue #12105: Add O_CLOEXEC to the os module.
9609
9610- Issue #12079: Decimal('Infinity').fma(Decimal('0'), (3.91224318126786e+19+0j))
9611  now raises TypeError (reflecting the invalid type of the 3rd argument) rather
9612  than Decimal.InvalidOperation.
9613
9614- Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore
9615  to be able to unload the module.
9616
9617- Add the packaging module, an improved fork of distutils (also known as
9618  distutils2).
9619
9620- Issue #12065: connect_ex() on an SSL socket now returns the original errno
9621  when the socket's timeout expires (it used to return None).
9622
9623- Issue #8809: The SMTP_SSL constructor and SMTP.starttls() now support
9624  passing a ``context`` argument pointing to an ssl.SSLContext instance.
9625  Patch by Kasun Herath.
9626
9627- Issue #9516: Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET
9628  is set in shell.
9629
9630- Issue #8650: Make zlib module 64-bit clean. compress(), decompress() and
9631  their incremental counterparts now raise OverflowError if given an input
9632  larger than 4GB, instead of silently truncating the input and returning
9633  an incorrect result.
9634
9635- Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail
9636  attribute when called without a max_length argument.
9637
9638- Issue #12062: Fix a flushing bug when doing a certain type of I/O sequence
9639  on a file opened in read+write mode (namely: reading, seeking a bit forward,
9640  writing, then seeking before the previous write but still within buffered
9641  data, and writing again).
9642
9643- Issue #9971: Write an optimized implementation of BufferedReader.readinto().
9644  Patch by John O'Connor.
9645
9646- Issue #11799: urllib.request Authentication Handlers will raise a ValueError
9647  when presented with an unsupported Authentication Scheme. Patch contributed
9648  by Yuval Greenfield.
9649
9650- Issue #10419, #6011: build_scripts command of distutils handles correctly
9651  non-ASCII path (path to the Python executable). Open and write the script in
9652  binary mode, but ensure that the shebang is decodable from UTF-8 and from the
9653  encoding of the script.
9654
9655- Issue #8498: In socket.accept(), allow specifying 0 as a backlog value in
9656  order to accept exactly one connection.  Patch by Daniel Evers.
9657
9658- Issue #12011: signal.signal() and signal.siginterrupt() raise an OSError,
9659  instead of a RuntimeError: OSError has an errno attribute.
9660
9661- Issue #3709: add a flush_headers method to BaseHTTPRequestHandler, which
9662  manages the sending of headers to output stream and flushing the internal
9663  headers buffer. Patch contribution by Andrew Schaaf
9664
9665- Issue #11743: Rewrite multiprocessing connection classes in pure Python.
9666
9667- Issue #11164: Stop trying to use _xmlplus in the xml module.
9668
9669- Issue #11888: Add log2 function to math module. Patch written by Mark
9670  Dickinson.
9671
9672- Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional.
9673
9674- Issue #8407: The signal handler writes the signal number as a single byte
9675  instead of a nul byte into the wakeup file descriptor. So it is possible to
9676  wait more than one signal and know which signals were raised.
9677
9678- Issue #8407: Add pthread_kill(), sigpending() and sigwait() functions to the
9679  signal module.
9680
9681- Issue #11927: SMTP_SSL now uses port 465 by default as documented.  Patch
9682  by Kasun Herath.
9683
9684- Issue #12002: ftplib's abort() method raises TypeError.
9685
9686- Issue #11916: Add a number of MacOSX specific definitions to the errno module.
9687  Patch by Pierre Carrier.
9688
9689- Issue #11999: fixed sporadic sync failure mailbox.Maildir due to its trying to
9690  detect mtime changes by comparing to the system clock instead of to the
9691  previous value of the mtime.
9692
9693- Issue #11072: added MLSD command (RFC-3659) support to ftplib.
9694
9695- Issue #8808: The IMAP4_SSL constructor now allows passing an SSLContext
9696  parameter to control parameters of the secure channel.  Patch by Sijin
9697  Joseph.
9698
9699- ntpath.samefile failed to notice that "a.txt" and "A.TXT" refer to the same
9700  file on Windows XP. As noticed in issue #10684.
9701
9702- Issue #12000: When a SSL certificate has a subjectAltName without any
9703  dNSName entry, ssl.match_hostname() should use the subject's commonName.
9704  Patch by Nicolas Bareil.
9705
9706- Issue #10775: assertRaises, assertRaisesRegex, assertWarns, and
9707  assertWarnsRegex now accept a keyword argument 'msg' when used as context
9708  managers.  Initial patch by Winston Ewert.
9709
9710- Issue #10684: shutil.move used to delete a folder on case insensitive
9711  filesystems when the source and destination name where the same except
9712  for the case.
9713
9714- Issue #11647: objects created using contextlib.contextmanager now support
9715  more than one call to the function when used as a decorator. Initial patch
9716  by Ysj Ray.
9717
9718- Issue #11930: Removed deprecated time.accept2dyear variable.
9719  Removed year >= 1000 restriction from datetime.strftime.
9720
9721- logging: don't define QueueListener if Python has no thread support.
9722
9723- functools.cmp_to_key() now works with collections.Hashable().
9724
9725- Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get
9726  around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso.
9727
9728- Issue #8407: Add signal.pthread_sigmask() function to fetch and/or change the
9729  signal mask of the calling thread.
9730
9731- Issue #11858: configparser.ExtendedInterpolation expected lower-case section
9732  names.
9733
9734- Issue #11324: ConfigParser(interpolation=None) now works correctly.
9735
9736- Issue #11811: ssl.get_server_certificate() is now IPv6-compatible.  Patch
9737  by Charles-François Natali.
9738
9739- Issue #11763: don't use difflib in TestCase.assertMultiLineEqual if the
9740  strings are too long.
9741
9742- Issue #11236: getpass.getpass responds to ctrl-c or ctrl-z on terminal.
9743
9744- Issue #11856: Speed up parsing of JSON numbers.
9745
9746- Issue #11005: threading.RLock()._release_save() raises a RuntimeError if the
9747  lock was not acquired.
9748
9749- Issue #11258: Speed up ctypes.util.find_library() under Linux by a factor
9750  of 5 to 10.  Initial patch by Jonas H.
9751
9752- Issue #11382: Trivial system calls, such as dup() or pipe(), needn't
9753  release the GIL.  Patch by Charles-François Natali.
9754
9755- Issue #11223: Add threading._info() function providing information about
9756  the thread implementation.
9757
9758- Issue #11731: simplify/enhance email parser/generator API by introducing
9759  policy objects.
9760
9761- Issue #11768: The signal handler of the signal module only calls
9762  Py_AddPendingCall() for the first signal to fix a deadlock on reentrant or
9763  parallel calls. PyErr_SetInterrupt() writes also into the wake up file.
9764
9765- Issue #11492: fix several issues with header folding in the email package.
9766
9767- Issue #11852: Add missing imports and update tests.
9768
9769- Issue #11875: collections.OrderedDict's __reduce__ was temporarily
9770  mutating the object instead of just working on a copy.
9771
9772- Issue #11467: Fix urlparse behavior when handling urls which contains scheme
9773  specific part only digits. Patch by Santoso Wijaya.
9774
9775- collections.Counter().copy() now works correctly for subclasses.
9776
9777- Issue #11474: Fix the bug with url2pathname() handling of '/C|/' on Windows.
9778  Patch by Santoso Wijaya.
9779
9780- Issue #11684: complete email.parser bytes API by adding BytesHeaderParser.
9781
9782- The bz2 module now handles 4GiB+ input buffers correctly.
9783
9784- Issue #9233: Fix json.loads('{}') to return a dict (instead of a list), when
9785  _json is not available.
9786
9787- Issue #11830: Remove unnecessary introspection code in the decimal module.
9788
9789- Issue #11703: urllib2.geturl() does not return correct url when the original
9790  url contains #fragment.
9791
9792- Issue #10019: Fixed regression in json module where an indent of 0 stopped
9793  adding newlines and acted instead like 'None'.
9794
9795- Issue #11186: pydoc ignores a module if its name contains a surrogate
9796  character in the index of modules.
9797
9798- Issue #11815: Use a light-weight SimpleQueue for the result queue in
9799  concurrent.futures.ProcessPoolExecutor.
9800
9801- Issue #5162: Treat services like frozen executables to allow child spawning
9802  from multiprocessing.forking on Windows.
9803
9804- logging.basicConfig now supports an optional 'handlers' argument taking an
9805  iterable of handlers to be added to the root logger. Additional parameter
9806  checks were also added to basicConfig.
9807
9808- Issue #11814: Fix likely typo in multiprocessing.Pool._terminate().
9809
9810- Issue #11747: Fix range formatting in difflib.context_diff() and
9811  difflib.unified_diff().
9812
9813- Issue #8428: Fix a race condition in multiprocessing.Pool when terminating
9814  worker processes: new processes would be spawned while the pool is being
9815  shut down.  Patch by Charles-François Natali.
9816
9817- Issue #2650: re.escape() no longer escapes the '_'.
9818
9819- Issue #11757: select.select() now raises ValueError when a negative timeout
9820  is passed (previously, a select.error with EINVAL would be raised).  Patch
9821  by Charles-François Natali.
9822
9823- Issue #7311: fix html.parser to accept non-ASCII attribute values.
9824
9825- Issue #11605: email.parser.BytesFeedParser was incorrectly converting
9826  multipart subparts with an 8-bit CTE into unicode instead of preserving the
9827  bytes.
9828
9829- Issue #1690608: email.util.formataddr is now RFC 2047 aware:  it now has a
9830  charset parameter that defaults to utf-8 and is used as the charset for RFC
9831  2047 encoding when the realname contains non-ASCII characters.
9832
9833- Issue #10963: Ensure that subprocess.communicate() never raises EPIPE.
9834
9835- Issue #10791: Implement missing method GzipFile.read1(), allowing GzipFile
9836  to be wrapped in a TextIOWrapper.  Patch by Nadeem Vawda.
9837
9838- Issue #11707: Added a fast C version of functools.cmp_to_key().
9839  Patch by Filip Gruszczyński.
9840
9841- Issue #11688: Add sqlite3.Connection.set_trace_callback().  Patch by
9842  Torsten Landschoff.
9843
9844- Issue #11746: Fix SSLContext.load_cert_chain() to accept elliptic curve
9845  private keys.
9846
9847- Issue #5863: Rewrite BZ2File in pure Python, and allow it to accept
9848  file-like objects using a new ``fileobj`` constructor argument.  Patch by
9849  Nadeem Vawda.
9850
9851- unittest.TestCase.assertSameElements has been removed.
9852
9853- sys.getfilesystemencoding() raises a RuntimeError if initfsencoding() was not
9854  called yet: detect bootstrap (startup) issues earlier.
9855
9856- Issue #11393: Add the new faulthandler module.
9857
9858- Issue #11618: Fix the timeout logic in threading.Lock.acquire() under Windows.
9859
9860- Removed the 'strict' argument to email.parser.Parser, which has been
9861  deprecated since Python 2.4.
9862
9863- Issue #11256: Fix inspect.getcallargs on functions that take only keyword
9864  arguments.
9865
9866- Issue #11696: Fix ID generation in msilib.
9867
9868- itertools.accumulate now supports an optional *func* argument for
9869  a user-supplied binary function.
9870
9871- Issue #11692: Remove unnecessary demo functions in subprocess module.
9872
9873- Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when
9874  trying to pack a negative (in-range) integer.
9875
9876- Issue #11675: multiprocessing.[Raw]Array objects created from an integer size
9877  are now zeroed on creation.  This matches the behaviour specified by the
9878  documentation.
9879
9880- Issue #7639: Fix short file name generation in bdist_msi
9881
9882- Issue #11635: Don't use polling in worker threads and processes launched by
9883  concurrent.futures.
9884
9885- Issue #5845: Automatically read readline configuration to enable completion
9886  in interactive mode.
9887
9888- Issue #6811: Allow importlib to change a code object's co_filename attribute
9889  to match the path to where the source code currently is, not where the code
9890  object originally came from.
9891
9892- Issue #8754: Have importlib use the repr of a module name in error messages.
9893
9894- Issue #11591: Prevent "import site" from modifying sys.path when python
9895  was started with -S.
9896
9897- collections.namedtuple() now adds a _source attribute to the generated
9898  class.  This make the source more accessible than the outdated
9899  "verbose" option which prints to stdout but doesn't make the source
9900  string available.
9901
9902- Issue #11371: Mark getopt error messages as localizable.  Patch by Filip
9903  Gruszczyński.
9904
9905- Issue #11333: Add __slots__ to collections ABCs.
9906
9907- Issue #11628: cmp_to_key generated class should use __slots__.
9908
9909- Issue #11666: let help() display named tuple attributes and methods
9910  that start with a leading underscore.
9911
9912- Issue #11662: Make urllib and urllib2 ignore redirections if the
9913  scheme is not HTTP, HTTPS or FTP (CVE-2011-1521).
9914
9915- Issue #5537: Fix time2isoz() and time2netscape() functions of
9916  httplib.cookiejar for expiration year greater than 2038 on 32-bit systems.
9917
9918- Issue #4391: Use proper gettext plural forms in optparse.
9919
9920- Issue #11127: Raise a TypeError when trying to pickle a socket object.
9921
9922- Issue #11563: ``Connection: close`` header is sent by requests using URLOpener
9923  class which helps in closing of sockets after connection is over. Patch
9924  contributions by Jeff McNeil and Nadeem Vawda.
9925
9926- Issue #11459: A ``bufsize`` value of 0 in subprocess.Popen() really creates
9927  unbuffered pipes, such that select() works properly on them.
9928
9929- Issue #5421: Fix misleading error message when one of socket.sendto()'s
9930  arguments has the wrong type.  Patch by Nikita Vetoshkin.
9931
9932- Issue #10812: Add some extra posix functions to the os module.
9933
9934- Issue #10979: unittest stdout buffering now works with class and module
9935  setup and teardown.
9936
9937- Issue #11243: fix the parameter querying methods of Message to work if
9938  the headers contain un-encoded non-ASCII data.
9939
9940- Issue #11401: fix handling of headers with no value; this fixes a regression
9941  relative to Python2 and the result is now the same as it was in Python2.
9942
9943- Issue #9298: base64 bodies weren't being folded to line lengths less than 78,
9944  which was a regression relative to Python2.  Unlike Python2, the last line
9945  of the folded body now ends with a carriage return.
9946
9947- Issue #11560: shutil.unpack_archive now correctly handles the format
9948  parameter. Patch by Evan Dandrea.
9949
9950- Issue #5870: Add `subprocess.DEVNULL` constant.
9951
9952- Issue #11133: fix two cases where inspect.getattr_static can trigger code
9953  execution. Patch by Andreas Stührk.
9954
9955- Issue #11569: use absolute path to the sysctl command in multiprocessing to
9956  ensure that it will be found regardless of the shell PATH. This ensures
9957  that multiprocessing.cpu_count works on default installs of MacOSX.
9958
9959- Issue #11501: distutils.archive_utils.make_zipfile no longer fails if zlib is
9960  not installed. Instead, the zipfile.ZIP_STORED compression is used to create
9961  the ZipFile. Patch by Natalia B. Bidart.
9962
9963- Issue #11289: `smtp.SMTP` class is now a context manager so it can be used
9964  in a `with` statement.  Contributed by Giampaolo Rodola.
9965
9966- Issue #11554: Fixed support for Japanese codecs; previously the body output
9967  encoding was not done if euc-jp or shift-jis was specified as the charset.
9968
9969- Issue #11407: `TestCase.run` returns the result object used or created.
9970  Contributed by Janathan Hartley.
9971
9972- Issue #11500: Fixed a bug in the OS X proxy bypass code for fully qualified
9973  IP addresses in the proxy exception list.
9974
9975- Issue #11491: dbm.error is no longer raised when dbm.open is called with
9976  the "n" as the flag argument and the file exists. The behavior matches
9977  the documentation and general logic.
9978
9979- Issue #1162477: Postel Principle adjustment to email date parsing: handle the
9980  fact that some non-compliant MUAs use '.' instead of ':' in time specs.
9981
9982- Issue #11131: Fix sign of zero in decimal.Decimal plus and minus
9983  operations when the rounding mode is ROUND_FLOOR.
9984
9985- Issue #9935: Speed up pickling of instances of user-defined classes.
9986
9987- Issue #5622: Fix curses.wrapper to raise correct exception if curses
9988  initialization fails.
9989
9990- Issue #11408: In threading.Lock.acquire(), only call gettimeofday() when
9991  really necessary.  Patch by Charles-François Natali.
9992
9993- Issue #11391: Writing to a mmap object created with
9994  ``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a
9995  TypeError.  Patch by Charles-François Natali.
9996
9997- Issue #9795: add context management protocol support for nntplib.NNTP class.
9998
9999- Issue #11306: mailbox in certain cases adapts to an inability to open
10000  certain files in read-write mode.  Previously it detected this by
10001  checking for EACCES, now it also checks for EROFS.
10002
10003- Issue #11265: asyncore now correctly handles EPIPE, EBADF and EAGAIN errors
10004  on accept(), send() and recv().
10005
10006- Issue #11377: Deprecate platform.popen() and reimplement it with os.popen().
10007
10008- Issue #8513: On UNIX, subprocess supports bytes command string.
10009
10010- Issue #10866: Add socket.sethostname().  Initial patch by Ross Lagerwall.
10011
10012- Issue #11140: Lock.release() now raises a RuntimeError when attempting
10013  to release an unacquired lock, as claimed in the threading documentation.
10014  The _thread.error exception is now an alias of RuntimeError.  Patch by
10015  Filip Gruszczyński.  Patch for _dummy_thread by Aymeric Augustin.
10016
10017- Issue #8594: ftplib now provides a source_address parameter to specify which
10018  (address, port) to bind to before connecting.
10019
10020- Issue #11326: Add the missing connect_ex() implementation for SSL sockets,
10021  and make it work for non-blocking connects.
10022
10023- Issue #11297: Add collections.ChainMap().
10024
10025- Issue #10755: Add the posix.flistdir() function.  Patch by Ross Lagerwall.
10026
10027- Issue #4761: Add the ``*at()`` family of functions (openat(), etc.) to the
10028  posix module.  Patch by Ross Lagerwall.
10029
10030- Issue #7322: Trying to read from a socket's file-like object after a timeout
10031  occurred now raises an error instead of silently losing data.
10032
10033- Issue #11291: poplib.POP no longer suppresses errors on quit().
10034
10035- Issue #11177: asyncore's create_socket() arguments can now be omitted.
10036
10037- Issue #6064: Add a ``daemon`` keyword argument to the threading.Thread
10038  and multiprocessing.Process constructors in order to override the
10039  default behaviour of inheriting the daemonic property from the current
10040  thread/process.
10041
10042- Issue #10956: Buffered I/O classes retry reading or writing after a signal
10043  has arrived and the handler returned successfully.
10044
10045- Issue #10784: New os.getpriority() and os.setpriority() functions.
10046
10047- Issue #11114: Fix catastrophic performance of tell() on text files (up
10048  to 1000x faster in some cases).  It is still one to two order of magnitudes
10049  slower than binary tell().
10050
10051- Issue #10882: Add os.sendfile function.
10052
10053- Issue #10868: Allow usage of the register method of an ABC as a class
10054  decorator.
10055
10056- Issue #11224: Fixed a regression in tarfile that affected the file-like
10057  objects returned by TarFile.extractfile() regarding performance, memory
10058  consumption and failures with the stream interface.
10059
10060- Issue #10924: Adding salt and Modular Crypt Format to crypt library.
10061  Moved old C wrapper to _crypt, and added a Python wrapper with
10062  enhanced salt generation and simpler API for password generation.
10063
10064- Issue #11074: Make 'tokenize' so it can be reloaded.
10065
10066- Issue #11085: Moved collections abstract base classes into a separate
10067  module called collections.abc, following the pattern used by importlib.abc.
10068  For backwards compatibility, the names are imported into the collections
10069  module.
10070
10071- Issue #4681: Allow mmap() to work on file sizes and offsets larger than
10072  4GB, even on 32-bit builds.  Initial patch by Ross Lagerwall, adapted for
10073  32-bit Windows.
10074
10075- Issue #11169: compileall module uses repr() to format filenames and paths to
10076  escape surrogate characters and show spaces.
10077
10078- Issue #11089: Fix performance issue limiting the use of ConfigParser()
10079  with large config files.
10080
10081- Issue #10276: Fix the results of zlib.crc32() and zlib.adler32() on buffers
10082  larger than 4GB.  Patch by Nadeem Vawda.
10083
10084- Issue #11388: Added a clear() method to MutableSequence
10085
10086- Issue #11174: Add argparse.MetavarTypeHelpFormatter, which uses type names
10087  for the names of optional and positional arguments in help messages.
10088
10089- Issue #9348: Raise an early error if argparse nargs and metavar don't match.
10090
10091- Issue #9026: Fix order of argparse sub-commands in help messages.
10092
10093- Issue #9347: Fix formatting for tuples in argparse type= error messages.
10094
10095- Issue #12191: Added shutil.chown() to change user and/or group owner of a
10096  given path also specifying their names.
10097
10098- Issue #13988: The _elementtree accelerator is used whenever available.
10099  Now xml.etree.cElementTree becomes a deprecated alias to ElementTree.
10100
10101Build
10102-----
10103
10104- Issue #6807: Run msisupport.mak earlier.
10105
10106- Issue #10580: Minor grammar change in Windows installer.
10107
10108- Issue #13326: Clean __pycache__ directories correctly on OpenBSD.
10109
10110- PEP 393: the configure option --with-wide-unicode is removed.
10111
10112- Issue #12852: Set _XOPEN_SOURCE to 700, instead of 600, to get POSIX 2008
10113  functions on OpenBSD (e.g. fdopendir).
10114
10115- Issue #11863: Remove support for legacy systems deprecated in Python 3.2
10116  (following PEP 11).  These systems are systems using Mach C Threads,
10117  SunOS lightweight processes, GNU pth threads and IRIX threads.
10118
10119- Issue #8746: Correct faulty configure checks so that os.chflags() and
10120  os.lchflags() are once again built on systems that support these
10121  functions (BSD and OS X).  Also add new stat file flags for OS X
10122  (UF_HIDDEN and UF_COMPRESSED).
10123
10124- Issue #10645: Installing Python no longer creates a
10125  Python-X.Y.Z-pyX.Y.egg-info file in the lib-dynload directory.
10126
10127- Do not accidentally include the directory containing sqlite.h twice when
10128  building sqlite3.
10129
10130- Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
10131  ensure "make install" creates symlinks in --prefix bin for the "-32"
10132  files in the framework bin directory like the installer does.
10133
10134- Issue #11347: Use --no-as-needed when linking libpython3.so.
10135
10136- Issue #11411: Fix 'make DESTDIR=' with a relative destination.
10137
10138- Issue #11268: Prevent Mac OS X Installer failure if Documentation
10139  package had previously been installed.
10140
10141- Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2.
10142
10143IDLE
10144----
10145
10146- Issue #14409: IDLE now properly executes commands in the Shell window
10147  when it cannot read the normal config files on startup and
10148  has to use the built-in default key bindings.
10149  There was previously a bug in one of the defaults.
10150
10151- IDLE can be launched as python -m idlelib
10152
10153- Issue #3573: IDLE hangs when passing invalid command line args
10154  (directory(ies) instead of file(s)) (Patch by Guilherme Polo)
10155
10156- Issue #14200: IDLE shell crash on printing non-BMP unicode character.
10157
10158- Issue #5219: Prevent event handler cascade in IDLE.
10159
10160- Issue #964437: Make IDLE help window non-modal.
10161  Patch by Guilherme Polo and Roger Serwy.
10162
10163- Issue #13933: IDLE auto-complete did not work with some imported
10164  module, like hashlib.  (Patch by Roger Serwy)
10165
10166- Issue #13506: Add '' to path for IDLE Shell when started and restarted with Restart Shell.
10167  Original patches by Marco Scataglini and Roger Serwy.
10168
10169- Issue #4625: If IDLE cannot write to its recent file or breakpoint files,
10170  display a message popup and continue rather than crash.  Original patch by
10171  Roger Serwy.
10172
10173- Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
10174  Patch by Tal Einat.
10175
10176- Issue #13296: Fix IDLE to clear compile __future__ flags on shell restart.
10177  (Patch by Roger Serwy)
10178
10179- Issue #9871: Prevent IDLE 3 crash when given byte stings
10180  with invalid hex escape sequences, like b'\x0'.
10181  (Original patch by Claudiu Popa.)
10182
10183- Issue #12636: IDLE reads the coding cookie when executing a Python script.
10184
10185- Issue #12540: Prevent zombie IDLE processes on Windows due to changes
10186  in os.kill().
10187
10188- Issue #12590: IDLE editor window now always displays the first line
10189  when opening a long file.  With Tk 8.5, the first line was hidden.
10190
10191- Issue #11088: don't crash when using F5 to run a script in IDLE on MacOSX
10192  with Tk 8.5.
10193
10194- Issue #1028: Tk returns invalid Unicode null in %A: UnicodeDecodeError.
10195  With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused
10196  IDLE to exit.  Converted to valid Unicode null in PythonCmd().
10197
10198- Issue #11718: IDLE's open module dialog couldn't find the __init__.py
10199  file in a package.
10200
10201Tools/Demos
10202-----------
10203
10204- Issue #14053: patchcheck.py ("make patchcheck") now works with MQ patches.
10205  Patch by Francisco Martín Brugué.
10206
10207- Issue #13930: 2to3 is now able to write its converted output files to another
10208  directory tree as well as copying unchanged files and altering the file
10209  suffix.  See its new -o, -W and --add-suffix options.  This makes it more
10210  useful in many automated code translation workflows.
10211
10212- Issue #13628: python-gdb.py is now able to retrieve more frames in the Python
10213  traceback if Python is optimized.
10214
10215- Issue #11996: libpython (gdb), replace "py-bt" command by "py-bt-full" and
10216  add a smarter "py-bt" command printing a classic Python traceback.
10217
10218- Issue #11179: Make ccbench work under Python 3.1 and 2.7 again.
10219
10220- Issue #10639: reindent.py no longer converts newlines and will raise
10221  an error if attempting to convert a file with mixed newlines.
10222  "--newline" option added to specify new line character.
10223
10224Extension Modules
10225-----------------
10226
10227- Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in
10228  non-pydebug builds. Several extension modules now compile cleanly when
10229  assert()s are enabled in standard builds (-DDEBUG flag).
10230
10231- Issue #13840: The error message produced by ctypes.create_string_buffer
10232  when given a Unicode string has been fixed.
10233
10234- Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
10235  Vilmos Nebehaj.
10236
10237- Issue #7777: socket: Add Reliable Datagram Sockets (PF_RDS) support.
10238
10239- Issue #13159: FileIO and BZ2Compressor/BZ2Decompressor now use a linear-time
10240  buffer growth strategy instead of a quadratic-time one.
10241
10242- Issue #10141: socket: Add SocketCAN (PF_CAN) support. Initial patch by
10243  Matthias Fuchs, updated by Tiago Gonçalves.
10244
10245- Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycle
10246  would be finalized after the reference to its underlying BufferedRWPair's
10247  writer got cleared by the GC.
10248
10249- Issue #12881: ctypes: Fix segfault with large structure field names.
10250
10251- Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by
10252  Thomas Jarosch.
10253
10254- Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype.
10255  Thanks to Suman Saha for finding the bug and providing a patch.
10256
10257- Issue #13022: Fix: _multiprocessing.recvfd() doesn't check that
10258  file descriptor was actually received.
10259
10260- Issue #1172711: Add 'long long' support to the array module.
10261  Initial patch by Oren Tirosh and Hirokazu Yamamoto.
10262
10263- Issue #12483: ctypes: Fix a crash when the destruction of a callback
10264  object triggers the garbage collector.
10265
10266- Issue #12950: Fix passing file descriptors in multiprocessing, under
10267  OpenIndiana/Illumos.
10268
10269- Issue #12764: Fix a crash in ctypes when the name of a Structure field is not
10270  a string.
10271
10272- Issue #11241: subclasses of ctypes.Array can now be subclassed.
10273
10274- Issue #9651: Fix a crash when ctypes.create_string_buffer(0) was passed to
10275  some functions like file.write().
10276
10277- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
10278  signature.  Without this, architectures where sizeof void* != sizeof int are
10279  broken.  Patch given by Hallvard B Furuseth.
10280
10281- Issue #12051: Fix segfault in json.dumps() while encoding highly-nested
10282  objects using the C accelerations.
10283
10284- Issue #12017: Fix segfault in json.loads() while decoding highly-nested
10285  objects using the C accelerations.
10286
10287- Issue #1838: Prevent segfault in ctypes, when _as_parameter_ on a class is set
10288  to an instance of the class.
10289
10290Tests
10291-----
10292
10293- Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode.
10294  Patch by Mikhail Novikov.
10295
10296- Issue #13447: Add a test file to host regression tests for bugs in the
10297  scripts found in the Tools directory.
10298
10299- Issue #10881: Fix test_site failure with OS X framework builds.
10300
10301- Issue #13901: Prevent test_distutils failures on OS X with --enable-shared.
10302
10303- Issue #13862: Fix spurious failure in test_zlib due to runtime/compile time
10304  minor versions not matching.
10305
10306- Issue #12804: Fix test_socket and test_urllib2net failures when running tests
10307  on a system without internet access.
10308
10309- Issue #13726: Fix the ambiguous -S flag in regrtest. It is -o/--slow for slow
10310  tests.
10311
10312- Issue #11659: Fix ResourceWarning in test_subprocess introduced by #11459.
10313  Patch by Ben Hayden.
10314
10315- Issue #11577: fix ResourceWarning triggered by improved binhex test coverage
10316
10317- Issue #11509: Significantly increase test coverage of fileinput.
10318  Patch by Denver Coneybeare at PyCon 2011 Sprints.
10319
10320- Issue #11689: Fix a variable scoping error in an sqlite3 test
10321
10322- Issue #13786: Remove unimplemented 'trace' long option from regrtest.py.
10323
10324- Issue #13725: Fix regrtest to recognize the documented -d flag.
10325  Patch by Erno Tukia.
10326
10327- Issue #13304: Skip test case if user site-packages disabled (-s or
10328  PYTHONNOUSERSITE).  (Patch by Carl Meyer)
10329
10330- Issue #5661: Add a test for ECONNRESET/EPIPE handling to test_asyncore. Patch
10331  by Xavier de Gaye.
10332
10333- Issue #13218: Fix test_ssl failures on Debian/Ubuntu.
10334
10335- Re-enable lib2to3's test_parser.py tests, though with an expected failure
10336  (see issue 13125).
10337
10338- Issue #12656: Add tests for IPv6 and Unix sockets to test_asyncore.
10339
10340- Issue #6484: Add unit tests for mailcap module (patch by Gregory Nofi)
10341
10342- Issue #11651: Improve the Makefile test targets to run more of the test suite
10343  more quickly. The --multiprocess option is now enabled by default, reducing
10344  the amount of time needed to run the tests. "make test" and "make quicktest"
10345  now include some resource-intensive tests, but no longer run the test suite
10346  twice to check for bugs in .pyc generation. Tools/scripts/run_test.py provides
10347  an easy platform-independent way to run test suite with sensible defaults.
10348
10349- Issue #12331: The test suite for the packaging module can now run from an
10350  installed Python.
10351
10352- Issue #12331: The test suite for lib2to3 can now run from an installed
10353  Python.
10354
10355- Issue #12626: In regrtest, allow filtering tests using a glob filter
10356  with the ``-m`` (or ``--match``) option.  This works with all test cases
10357  using the unittest module.  This is useful with long test suites
10358  such as test_io or test_subprocess.
10359
10360- Issue #12624: It is now possible to fail after the first failure when
10361  running in verbose mode (``-v`` or ``-W``), by using the ``--failfast``
10362  (or ``-G``) option to regrtest.  This is useful with long test suites
10363  such as test_io or test_subprocess.
10364
10365- Issue #12587: Correct faulty test file and reference in test_tokenize.
10366  (Patch by Robert Xiao)
10367
10368- Issue #12573: Add resource checks for dangling Thread and Process objects.
10369
10370- Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
10371  as the processor type on some Mac systems.
10372
10373- Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
10374  failure in name resolution.
10375
10376- Issue #11812: Solve transient socket failure to connect to 'localhost'
10377  in test_telnetlib.py.
10378
10379- Solved a potential deadlock in test_telnetlib.py. Related to issue #11812.
10380
10381- Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and
10382  an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder
10383  Web site.
10384
10385- Avoid failing in test_urllibnet.test_bad_address when some overzealous
10386  DNS service (e.g. OpenDNS) resolves a non-existent domain name.  The test
10387  is now skipped instead.
10388
10389- Issue #12440: When testing whether some bits in SSLContext.options can be
10390  reset, check the version of the OpenSSL headers Python was compiled against,
10391  rather than the runtime version of the OpenSSL library.
10392
10393- Issue #11512: Add a test suite for the cgitb module. Patch by Robbie Clemons.
10394
10395- Issue #12497: Install test/data to prevent failures of the various codecmaps
10396  tests.
10397
10398- Issue #12496: Install test/capath directory to prevent test_connect_capath
10399  testcase failure in test_ssl.
10400
10401- Issue #12469: Run wakeup and pending signal tests in a subprocess to run the
10402  test in a fresh process with only one thread and to not change signal
10403  handling of the parent process.
10404
10405- Issue #8716: Avoid crashes caused by Aqua Tk on OSX when attempting to run
10406  test_tk or test_ttk_guionly under a username that is not currently logged
10407  in to the console windowserver (as may be the case under buildbot or ssh).
10408
10409- Issue #12407: Explicitly skip test_capi.EmbeddingTest under Windows.
10410
10411- Issue #12400: regrtest -W doesn't rerun the tests twice anymore, but captures
10412  the output and displays it on failure instead. regrtest -v doesn't print the
10413  error twice anymore if there is only one error.
10414
10415- Issue #12141: Install copies of template C module file so that
10416  test_build_ext of test_distutils and test_command_build_ext of
10417  test_packaging are no longer silently skipped when
10418  run outside of a build directory.
10419
10420- Issue #8746: Add additional tests for os.chflags() and os.lchflags().
10421  Patch by Garrett Cooper.
10422
10423- Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9
10424  2.8 +  on Mac OS X.  (Patch by Ronald Oussoren)
10425
10426- Issue #12057: Add tests for ISO 2022 codecs (iso2022_jp, iso2022_jp_2,
10427  iso2022_kr).
10428
10429- Issue #12096: Fix a race condition in test_threading.test_waitfor(). Patch
10430  written by Charles-François Natali.
10431
10432- Issue #11614: import __hello__ prints "Hello World!". Patch written by
10433  Andreas Stührk.
10434
10435- Issue #5723: Improve json tests to be executed with and without accelerations.
10436
10437- Issue #12041: Make test_wait3 more robust.
10438
10439- Issue #11873: Change regex in test_compileall to fix occasional failures when
10440  the randomly generated temporary path happened to match the regex.
10441
10442- Issue #11958: Fix FTP tests for IPv6, bind to "::1" instead of "localhost".
10443  Patch written by Charles-Francois Natali.
10444
10445- Issue #8407, #11859: Fix tests of test_io using threads and an alarm: use
10446  pthread_sigmask() to ensure that the SIGALRM signal is received by the main
10447  thread.
10448
10449- Issue #11811: Factor out detection of IPv6 support on the current host
10450  and make it available as ``test.support.IPV6_ENABLED``.  Patch by
10451  Charles-François Natali.
10452
10453- Issue #10914: Add a minimal embedding test to test_capi.
10454
10455- Issue #11223: Skip test_lock_acquire_interruption() and
10456  test_rlock_acquire_interruption() of test_threadsignals if a thread lock is
10457  implemented using a POSIX mutex and a POSIX condition variable. A POSIX
10458  condition variable cannot be interrupted by a signal (e.g. on Linux, the
10459  futex system call is restarted).
10460
10461- Issue #11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition.
10462
10463- Fix possible "file already exists" error when running the tests in parallel.
10464
10465- Issue #11719: Fix message about unexpected test_msilib skip on non-Windows
10466  platforms. Patch by Nadeem Vawda.
10467
10468- Issue #11727: Add a --timeout option to regrtest: if a test takes more than
10469  TIMEOUT seconds, dumps the traceback of all threads and exits.
10470
10471- Issue #11653: fix -W with -j in regrtest.
10472
10473- The email test suite now lives in the Lib/test/test_email package.  The test
10474  harness code has also been modernized to allow use of new unittest features.
10475
10476- regrtest now discovers test packages as well as test modules.
10477
10478- Issue #11577: improve test coverage of binhex.py. Patch by Arkady Koplyarov.
10479
10480- New test_crashers added to exercise the scripts in the Lib/test/crashers
10481  directory and confirm they fail as expected
10482
10483- Issue #11578: added test for the timeit module.  Patch by Michael Henry.
10484
10485- Issue #11503: improve test coverage of posixpath.py. Patch by Evan Dandrea.
10486
10487- Issue #11505: improves test coverage of string.py, increases granularity of
10488  string.Formatter tests. Initial patch by Alicia Arlen.
10489
10490- Issue #11548: Improve test coverage of the shutil module. Patch by
10491  Evan Dandrea.
10492
10493- Issue #11554: Reactivated test_email_codecs.
10494
10495- Issue #11505: improves test coverage of string.py. Patch by Alicia
10496  Arlen
10497
10498- Issue #11490: test_subprocess.test_leaking_fds_on_error no longer gives a
10499  false positive if the last directory in the path is inaccessible.
10500
10501- Issue #11223: Fix test_threadsignals to fail, not hang, when the
10502  non-semaphore implementation of locks is used under POSIX.
10503
10504- Issue #10911: Add tests on CGI with non-ASCII characters. Patch written by
10505  Pierre Quentel.
10506
10507- Issue #9931: Fix hangs in GUI tests under Windows in certain conditions.
10508  Patch by Hirokazu Yamamoto.
10509
10510- Issue #10512: Properly close sockets under test.test_cgi.
10511
10512- Issue #10992: Make tests pass under coverage.
10513
10514- Issue #10826: Prevent sporadic failure in test_subprocess on Solaris due
10515  to open door files.
10516
10517- Issue #10990: Prevent tests from clobbering a set trace function.
10518
10519C-API
10520-----
10521
10522- Issue #13452: PyUnicode_EncodeDecimal() doesn't support error handlers
10523  different than "strict" anymore. The caller was unable to compute the
10524  size of the output buffer: it depends on the error handler.
10525
10526- Issue #13560: Add PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize()
10527  and PyUnicode_EncodeLocale() functions to the C API to decode/encode from/to
10528  the current locale encoding.
10529
10530- Issue #10831: PyUnicode_FromFormat() supports %li, %lli and %zi formats.
10531
10532- Issue #11246: Fix PyUnicode_FromFormat("%V") to decode the byte string from
10533  UTF-8 (with replace error handler) instead of ISO-8859-1 (in strict mode).
10534  Patch written by Ray Allen.
10535
10536- Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on
10537  narrow build.
10538
10539- Add PyObject_GenericGetDict and PyObject_GeneriSetDict. They are generic
10540  implementations for the getter and setter of a ``__dict__`` descriptor of C
10541  types.
10542
10543- Issue #13727: Add 3 macros to access PyDateTime_Delta members:
10544  PyDateTime_DELTA_GET_DAYS, PyDateTime_DELTA_GET_SECONDS,
10545  PyDateTime_DELTA_GET_MICROSECONDS.
10546
10547- Issue #10542: Add 4 macros to work with surrogates: Py_UNICODE_IS_SURROGATE,
10548  Py_UNICODE_IS_HIGH_SURROGATE, Py_UNICODE_IS_LOW_SURROGATE,
10549  Py_UNICODE_JOIN_SURROGATES.
10550
10551- Issue #12724: Add Py_RETURN_NOTIMPLEMENTED macro for returning NotImplemented.
10552
10553- PY_PATCHLEVEL_REVISION has been removed, since it's meaningless with
10554  Mercurial.
10555
10556- Issue #12173: The first argument of PyImport_ImportModuleLevel is now `const
10557  char *` instead of `char *`.
10558
10559- Issue #12380: PyArg_ParseTuple now accepts a bytearray for the 'c' format.
10560
10561Documentation
10562-------------
10563
10564- Issue #13989: Document that GzipFile does not support text mode, and give a
10565  more helpful error message when opened with an invalid mode string.
10566
10567- Issue #13921: Undocument and clean up sqlite3.OptimizedUnicode,
10568  which is obsolete in Python 3.x. It's now aliased to str for
10569  backwards compatibility.
10570
10571- Issue #12102: Document that buffered files must be flushed before being used
10572  with mmap. Patch by Steffen Daode Nurpmeso.
10573
10574- Issue #8982: Improve the documentation for the argparse Namespace object.
10575
10576- Issue #9343: Document that argparse parent parsers must be configured before
10577  their children.
10578
10579- Issue #13498: Clarify docs of os.makedirs()'s exist_ok argument.  Done with
10580  great native-speaker help from R. David Murray.
10581
10582- Issues #13491 and #13995: Fix many errors in sqlite3 documentation.
10583  Initial patch for #13491 by Johannes Vogel.
10584
10585- Issue #13402: Document absoluteness of sys.executable.
10586
10587- Issue #13883: PYTHONCASEOK also works on OS X.
10588
10589- Issue #9021: Add an introduction to the copy module documentation.
10590
10591- Issue #6005: Examples in the socket library documentation use sendall, where
10592  relevant, instead send method.
10593
10594- Issue #12798: Updated the mimetypes documentation.
10595
10596- Issue #12949: Document the kwonlyargcount argument for the PyCode_New
10597  C API function.
10598
10599- Issue #13513: Fix io.IOBase documentation to correctly link to the
10600  io.IOBase.readline method instead of the readline module.
10601
10602- Issue #13237: Reorganise subprocess documentation to emphasise convenience
10603  functions and the most commonly needed arguments to Popen.
10604
10605- Issue #13141: Demonstrate recommended style for socketserver examples.
10606
10607- Issue #11818: Fix tempfile examples for Python 3.
10608
10609
10610What's New in Python 3.2?
10611=========================
10612
10613*Release date: 20-Feb-2011*
10614
10615Core and Builtins
10616-----------------
10617
10618- Issue #11249: Fix potential crashes when using the limited API.
10619
10620Build
10621-----
10622
10623- Issue #11222: Fix non-framework shared library build on Mac OS X.
10624
10625- Issue #11184: Fix large-file support on AIX.
10626
10627- Issue #941346: Fix broken shared library build on AIX.
10628
10629Documentation
10630-------------
10631
10632- Issue #10709: Add updated AIX notes in Misc/README.AIX.
10633
10634
10635What's New in Python 3.2 Release Candidate 3?
10636=============================================
10637
10638*Release date: 13-Feb-2011*
10639
10640Core and Builtins
10641-----------------
10642
10643- Issue #11134: Add missing fields to typeslots.h.
10644
10645- Issue #11135: Remove redundant doc field from PyType_Spec.
10646
10647- Issue #11067: Add PyType_GetFlags, to support PyUnicode_Check in the limited
10648  ABI.
10649
10650- Issue #11118: Fix bogus export of None in python3.dll.
10651
10652Library
10653-------
10654
10655- Issue #11116: any error during addition of a message to a mailbox now causes a
10656  rollback, instead of leaving the mailbox partially modified.
10657
10658- Issue #11132: Fix passing of "optimize" parameter when recursing in
10659  compileall.compile_dir().
10660
10661- Issue #11110: Fix a potential decref of a NULL in sqlite3.
10662
10663- Issue #8275: Fix passing of callback arguments with ctypes under Win64.  Patch
10664  by Stan Mihai.
10665
10666Build
10667-----
10668
10669- Issue #11079: The /Applications/Python x.x folder created by the Mac OS X
10670  installers now includes a link to the installed documentation and no longer
10671  includes an Extras directory.  The Tools directory is now installed in the
10672  framework under share/doc.
10673
10674- Issue #11121: Fix building with --enable-shared.
10675
10676Tests
10677-----
10678
10679- Issue #10971: test_zipimport_support is once again compatible with the refleak
10680  hunter feature of test.regrtest.
10681
10682
10683What's New in Python 3.2 Release Candidate 2?
10684=============================================
10685
10686*Release date: 30-Jan-2011*
10687
10688Core and Builtins
10689-----------------
10690
10691- Issue #10451: memoryview objects could allow mutating a readable buffer.
10692  Initial patch by Ross Lagerwall.
10693
10694Library
10695-------
10696
10697- Issue #9124: mailbox now accepts binary input and reads and writes mailbox
10698  files in binary mode, using the email package's binary support to parse
10699  arbitrary email messages.  StringIO and text file input is deprecated,
10700  and string input fails early if non-ASCII characters are used, where
10701  previously it would fail when the email was processed in a later step.
10702
10703- Issue #10845: Mitigate the incompatibility between the multiprocessing
10704  module on Windows and the use of package, zipfile or directory execution
10705  by special casing main modules that actually *are* called __main__.py.
10706
10707- Issue #11045: Protect logging call against None argument.
10708
10709- Issue #11052: Correct IDLE menu accelerators on Mac OS X for Save
10710  commands.
10711
10712- Issue #11053: Fix IDLE "Syntax Error" windows to behave as in 2.x,
10713  preventing a confusing hung appearance on OS X with the windows
10714  obscured.
10715
10716- Issue #10940: Workaround an IDLE hang on Mac OS X 10.6 when using the
10717  menu accelerators for Open Module, Go to Line, and New Indent Width.
10718  The accelerators still work but no longer appear in the menu items.
10719
10720- Issue #10989: Fix a crash on SSLContext.load_verify_locations(None, True).
10721
10722- Issue #11020: Command-line pyclbr was broken because of missing 2-to-3
10723  conversion.
10724
10725- Issue #11019: Fixed BytesGenerator so that it correctly handles a Message
10726  with a None body.
10727
10728- Issue #11014: Make 'filter' argument in tarfile.Tarfile.add() into a
10729  keyword-only argument.  The preceding positional argument was deprecated,
10730  so it made no sense to add filter as a positional argument.
10731
10732- Issue #11004: Repaired edge case in deque.count().
10733
10734- Issue #10974: IDLE no longer crashes if its recent files list includes files
10735  with non-ASCII characters in their path names.
10736
10737- Have hashlib.algorithms_available and hashlib.algorithms_guaranteed both
10738  return sets instead of one returning a tuple and the other a frozenset.
10739
10740- Issue #10987: Fix the recursion limit handling in the _pickle module.
10741
10742- Issue #10983: Fix several bugs making tunnel requests in http.client.
10743
10744- Issue #10955: zipimport uses ASCII encoding instead of cp437 to decode
10745  filenames, at bootstrap, if the codec registry is not ready yet. It is still
10746  possible to have non-ASCII filenames using the Unicode flag (UTF-8 encoding)
10747  for all file entries in the ZIP file.
10748
10749- Issue #10949: Improved robustness of rotating file handlers.
10750
10751- Issue #10955: Fix a potential crash when trying to mmap() a file past its
10752  length.  Initial patch by Ross Lagerwall.
10753
10754- Issue #10898: Allow compiling the posix module when the C library defines
10755  a symbol named FSTAT.
10756
10757- Issue #10980: the HTTP server now encodes headers with iso-8859-1 (latin1)
10758  encoding.  This is the preferred encoding of PEP 3333 and the base encoding
10759  of HTTP 1.1.
10760
10761- To match the behaviour of HTTP server, the HTTP client library now also
10762  encodes headers with iso-8859-1 (latin1) encoding.  It was already doing
10763  that for incoming headers which makes this behaviour now consistent in
10764  both incoming and outgoing direction.
10765
10766- Issue #9509: argparse now properly handles IOErrors raised by
10767  argparse.FileType.
10768
10769- Issue #10961: The new pydoc server now better handles exceptions raised
10770  during request handling.
10771
10772- Issue #10680: Fix mutually exclusive arguments for argument groups in
10773  argparse.
10774
10775Build
10776-----
10777
10778- Issue #11054: Allow Mac OS X installer builds to again work on 10.5 with
10779  the system-provided Python.
10780
10781
10782What's New in Python 3.2 Release Candidate 1
10783============================================
10784
10785*Release date: 16-Jan-2011*
10786
10787Core and Builtins
10788-----------------
10789
10790- Issue #10889: range indexing and slicing now works correctly on ranges with
10791  a length that exceeds sys.maxsize.
10792
10793- Issue #10892: Don't segfault when trying to delete __abstractmethods__ from a
10794  class.
10795
10796- Issue #8020: Avoid a crash where the small objects allocator would read
10797  non-Python managed memory while it is being modified by another thread.  Patch
10798  by Matt Bandy.
10799
10800- Issue #10841: On Windows, set the binary mode on stdin, stdout, stderr and all
10801  io.FileIO objects (to not translate newlines, \r\n <=> \n).  The Python parser
10802  translates newlines (\r\n => \n).
10803
10804- Remove buffer API from stable ABI for now, see #10181.
10805
10806- Issue #8651: PyArg_Parse*() functions raise an OverflowError if the file
10807  doesn't have PY_SSIZE_T_CLEAN define and the size doesn't fit in an int
10808  (length bigger than 2^31-1 bytes).
10809
10810- Issue #9015, #9611: FileIO.readinto(), FileIO.write(), os.write() and
10811  stdprinter.write() clamp the length to INT_MAX on Windows.
10812
10813- Issue #8278: On Windows and with a NTFS filesystem, os.stat() and os.utime()
10814  can now handle dates after 2038.
10815
10816- Issue #10780: PyErr_SetFromWindowsErrWithFilename() and
10817  PyErr_SetExcFromWindowsErrWithFilename() decode the filename from the
10818  filesystem encoding instead of UTF-8.
10819
10820- Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem
10821  encoding instead of UTF-8.
10822
10823- Add sys.flags attribute for the new -q command-line option.
10824
10825- Issue #11506: Trying to assign to a bytes literal should result in a
10826  SyntaxError.
10827
10828Library
10829-------
10830
10831- Issue #10916: mmap should not segfault when a file is mapped using 0 as length
10832  and a non-zero offset, and an attempt to read past the end of file is made
10833  (IndexError is raised instead).  Patch by Ross Lagerwall.
10834
10835- Issue #10154, #10090: change the normalization of UTF-8 to "UTF-8" instead
10836  of "UTF8" in the locale module as the latter is not supported MacOSX and OpenBSD.
10837
10838- Issue #10907: Warn OS X 10.6 IDLE users to use ActiveState Tcl/Tk 8.5, rather
10839  than the currently problematic Apple-supplied one, when running with the
10840  64-/32-bit installer variant.
10841
10842- Issue #4953: cgi.FieldStorage and cgi.parse() parse the request as bytes, not
10843  as unicode, and accept binary files. Add encoding and errors attributes to
10844  cgi.FieldStorage. Patch written by Pierre Quentel (with many inputs by Glenn
10845  Linderman).
10846
10847- Add encoding and errors arguments to urllib.parse_qs() and urllib.parse_qsl().
10848
10849- Issue #10899: No function type annotations in the standard library.  Removed
10850  function type annotations from _pyio.py.
10851
10852- Issue #10875: Update Regular Expression HOWTO; patch by 'SilentGhost'.
10853
10854- Issue #10872: The repr() of TextIOWrapper objects now includes the mode
10855  if available.
10856
10857- Issue #10869: Fixed bug where ast.increment_lineno modified the root node
10858  twice.
10859
10860- Issue #5871: email.header.Header.encode now raises an error if any
10861  continuation line in the formatted value has no leading white space and looks
10862  like a header.  Since Generator uses Header to format all headers, this check
10863  is made for all headers in any serialized message at serialization time.  This
10864  provides protection against header injection attacks.
10865
10866- Issue #10859: Make ``contextlib.GeneratorContextManager`` officially
10867  private by renaming it to ``_GeneratorContextManager``.
10868
10869- Issue #10042: Fixed the total_ordering decorator to handle cross-type
10870  comparisons that could lead to infinite recursion.
10871
10872- Issue #10686: the email package now :rfc:`2047`\ -encodes headers with
10873  non-ASCII bytes (parsed by a BytesParser) when doing conversion to 7bit-clean
10874  presentation, instead of replacing them with ?s.
10875
10876- email.header.Header was incorrectly encoding folding whitespace when
10877  rfc2047-encoding header values with embedded newlines, leaving them without
10878  folding whitespace.  It now uses the continuation_ws, as it does for
10879  continuation lines that it creates itself.
10880
10881- Issue #1777412, #10827: Changed the rules for 2-digit years. The
10882  time.asctime(), time.ctime() and time.strftime() functions will now format
10883  any year when ``time.accept2dyear`` is False and will accept years >= 1000
10884  otherwise. ``time.mktime`` and ``time.strftime`` now accept full range
10885  supported by the OS. With Visual Studio or on Solaris, the year is limited to
10886  the range [1; 9999]. Conversion of 2-digit years to 4-digit is deprecated.
10887
10888- Issue #7858: Raise an error properly when os.utime() fails under Windows
10889  on an existing file.
10890
10891- Issue #3839: wsgiref should not override a Content-Length header set by
10892  the application.  Initial patch by Clovis Fabricio.
10893
10894- Issue #10492: bdb.Bdb.run() only traces the execution of the code, not the
10895  compilation (if the input is a string).
10896
10897- Issue #7995: When calling accept() on a socket with a timeout, the returned
10898  socket is now always blocking, regardless of the operating system.
10899
10900- Issue #10756: atexit normalizes the exception before displaying it. Patch by
10901  Andreas Stührk.
10902
10903- Issue #10790: email.header.Header.append's charset logic now works correctly
10904  for charsets whose output codec is different from its input codec.
10905
10906- Issue #10819: SocketIO.name property returns -1 when its closed, instead of
10907  raising a ValueError, to fix repr().
10908
10909- Issue #8650: zlib.compress() and zlib.decompress() raise an OverflowError if
10910  the input buffer length doesn't fit into an unsigned int (length bigger than
10911  2^32-1 bytes).
10912
10913- Issue #6643: Reinitialize locks held within the threading module after fork to
10914  avoid a potential rare deadlock or crash on some platforms.
10915
10916- Issue #10806, issue #9905: Fix subprocess pipes when some of the standard file
10917  descriptors (0, 1, 2) are closed in the parent process.  Initial patch by Ross
10918  Lagerwall.
10919
10920- `unittest.TestCase` can be instantiated without a method name; for simpler
10921  exploration from the interactive interpreter.
10922
10923- Issue #10798: Reject supporting concurrent.futures if the system has too
10924  few POSIX semaphores.
10925
10926- Issue #10807: Remove base64, bz2, hex, quopri, rot13, uu and zlib codecs from
10927  the codec aliases. They are still accessible via codecs.lookup().
10928
10929- Issue #10801: In zipfile, support different encodings for the header and the
10930  filenames.
10931
10932- Issue #6285: IDLE no longer crashes on missing help file; patch by Scott
10933  David Daniels.
10934
10935- Fix collections.OrderedDict.setdefault() so that it works in subclasses that
10936  define __missing__().
10937
10938- Issue #10786: unittest.TextTestRunner default stream no longer bound at import
10939  time. `sys.stderr` now looked up at instantiation time.  Fix contributed by
10940  Mark Roddy.
10941
10942- Issue #10753: Characters ';', '=' and ',' in the PATH_INFO environment variable
10943  won't be quoted when the URI is constructed by the wsgiref.util's request_uri
10944  method. According to RFC 3986, these characters can be a part of params in
10945  PATH component of URI and need not be quoted.
10946
10947- Issue #10738: Fix webbrowser.Opera.raise_opts.
10948
10949- Issue #9824: SimpleCookie now encodes , and ; in values to cater to how
10950  browsers actually parse cookies.
10951
10952- Issue #9333: os.symlink now available regardless of user privileges.  The
10953  function now raises OSError on Windows >=6.0 when the user is unable to create
10954  symbolic links. XP and 2003 still raise NotImplementedError.
10955
10956- Issue #10783: struct.pack() no longer implicitly encodes unicode to UTF-8.
10957
10958- Issue #10730: Add SVG mime types to mimetypes module.
10959
10960- Issue #10768: Make the Tkinter ScrolledText widget work again.
10961
10962- Issue #10777: Fix "dictionary changed size during iteration" bug in
10963  ElementTree register_namespace().
10964
10965- Issue #10626: test_logging now preserves logger disabled states.
10966
10967- Issue #10774: test_logging now removes temp files created during tests.
10968
10969- Issue #5258/#10642: if site.py encounters a .pth file that generates an error,
10970  it now prints the filename, line number, and traceback to stderr and skips
10971  the rest of that individual file, instead of stopping processing entirely.
10972
10973- Issue #10763: subprocess.communicate() closes stdout and stderr if both are
10974  pipes (bug specific to Windows).
10975
10976- Issue #1693546: fix email.message RFC 2231 parameter encoding to be in better
10977  compliance (no "s around encoded values).
10978
10979- Improved the diff message in the unittest module's assertCountEqual().
10980
10981- Issue #1155362: email.utils.parsedate_tz now handles a missing space before
10982  the '-' of a timezone field as well as before a '+'.
10983
10984- Issue #4871: The zipfile module now gives a more useful error message if
10985  an attempt is made to use a string to specify the archive password.
10986
10987- Issue #10750: The ``raw`` attribute of buffered IO objects is now read-only.
10988
10989- Deprecated assertDictContainsSubset() in the unittest module.
10990
10991C-API
10992-----
10993
10994- PyObject_CallMethod now passes along any underlying AttributeError from
10995  PyObject_GetAttr, instead of replacing it with something less informative
10996
10997- Issue #10913: Deprecate misleading functions PyEval_AcquireLock() and
10998  PyEval_ReleaseLock().  The thread-state aware APIs should be used instead.
10999
11000- Issue #10333: Remove ancient GC API, which has been deprecated since Python
11001  2.2.
11002
11003Build
11004-----
11005
11006- Issue #10843: Update third-party library versions used in OS X 32-bit
11007  installer builds: bzip2 1.0.6, readline 6.1.2, SQLite 3.7.4 (with FTS3/FTS4
11008  and RTREE enabled), and ncursesw 5.5 (wide-char support enabled).
11009
11010- Issue #10820: Fix OS X framework installs to support version-specific
11011  scripts (#10679).
11012
11013- Issue #7716: Under Solaris, don't assume existence of /usr/xpg4/bin/grep in
11014  the configure script but use $GREP instead.  Patch by Fabian Groffen.
11015
11016- Issue #10475: Don't hardcode compilers for LDSHARED/LDCXXSHARED on NetBSD
11017  and DragonFly BSD.  Patch by Nicolas Joly.
11018
11019- Issue #10679: The "idle", "pydoc" and "2to3" scripts are now installed with
11020  a version-specific suffix on "make altinstall".
11021
11022- Issue #10655: Fix the build on PowerPC on Linux with GCC when building with
11023  timestamp profiling (--with-tsc): the preprocessor test for the PowerPC
11024  support now looks for "__powerpc__" as well as "__ppc__": the latter seems to
11025  only be present on OS X; the former is the correct one for Linux with GCC.
11026
11027- Issue #1099: Fix the build on MacOSX when building a framework with pydebug
11028  using GCC 4.0.
11029
11030Tools/Demos
11031-----------
11032
11033- Issue #10843: Install the Tools directory on OS X in the applications Extras
11034  (/Applications/Python 3.n/Extras/) where the Demo directory had previous been
11035  installed.
11036
11037- Issue #7962: The Demo directory is gone.  Most of the old and unmaintained
11038  demos have been removed, others integrated in documentation or a new
11039  Tools/demo subdirectory.
11040
11041- Issue #10502: Addition of the unittestgui tool. Originally by Steve Purcell.
11042  Updated for test discovery by Mark Roddy and Python 3 compatibility by Brian
11043  Curtin.
11044
11045Tests
11046-----
11047
11048- Issue #11910: Fix test_heapq to skip the C tests when _heapq is missing.
11049
11050- Fix test_startfile to wait for child process to terminate before finishing.
11051
11052- Issue #10822: Fix test_posix:test_getgroups failure under Solaris.  Patch
11053  by Ross Lagerwall.
11054
11055- Make the --coverage flag work for test.regrtest.
11056
11057- Issue #1677694: Refactor and improve test_timeout.  Original patch by
11058  Björn Lindqvist.
11059
11060- Issue #5485: Add tests for the UseForeignDTD method of expat parser objects.
11061  Patch by Jean-Paul Calderone and Sandro Tosi.
11062
11063- Issue #6293: Have regrtest.py echo back sys.flags.  This is done by default in
11064  whole runs and enabled selectively using ``--header`` when running an explicit
11065  list of tests.  Original patch by Collin Winter.
11066
11067
11068What's New in Python 3.2 Beta 2?
11069================================
11070
11071*Release date: 19-Dec-2010*
11072
11073Core and Builtins
11074-----------------
11075
11076- Issue #8844: Regular and recursive lock acquisitions can now be interrupted
11077  by signals on platforms using pthreads.  Patch by Reid Kleckner.
11078
11079- Issue #4236: PyModule_Create2 now checks the import machinery directly
11080  rather than the Py_IsInitialized flag, avoiding a Fatal Python
11081  error in certain circumstances when an import is done in __del__.
11082
11083- Issue #5587: add a repr to dict_proxy objects.  Patch by David Stanek and
11084  Daniel Urban.
11085
11086Library
11087-------
11088
11089- Issue #3243:  Support iterable bodies in httplib. Patch Contributions by
11090  Xuanji Li and Chris AtLee.
11091
11092- Issue #10611: SystemExit exception will no longer kill a unittest run.
11093
11094- Issue #9857: It is now possible to skip a test in a setUp, tearDown or clean
11095  up function.
11096
11097- Issue #10573: use actual/expected consistently in unittest methods.
11098  The order of the args of assertCountEqual is also changed.
11099
11100- Issue #9286: email.utils.parseaddr no longer concatenates blank-separated
11101  words in the local part of email addresses, thereby preserving the input.
11102
11103- Issue #6791: Limit header line length (to 65535 bytes) in http.client
11104  and http.server, to avoid denial of services from the other party.
11105
11106- Issue #10404: Use ctl-button-1 on OSX for the context menu in Idle.
11107
11108- Issue #9907: Fix tab handling on OSX when using editline by calling
11109  rl_initialize first, then setting our custom defaults, then reading .editrc.
11110
11111- Issue #4188: Avoid creating dummy thread objects when logging operations
11112  from the threading module (with the internal verbose flag activated).
11113
11114- Issue #10711: Remove HTTP 0.9 support from http.client.  The ``strict``
11115  parameter to HTTPConnection and friends is deprecated.
11116
11117- Issue #9721: Fix the behavior of urljoin when the relative url starts with a
11118  ';' character. Patch by Wes Chow.
11119
11120- Issue #10714: Limit length of incoming request in http.server to 65536 bytes
11121  for security reasons.  Initial patch by Ross Lagerwall.
11122
11123- Issue #9558: Fix distutils.command.build_ext with VS 8.0.
11124
11125- Issue #10667: Fast path for collections.Counter().
11126
11127- Issue #10695: passing the port as a string value to telnetlib no longer
11128  causes debug mode to fail.
11129
11130- Issue #1078919: add_header now automatically RFC2231 encodes parameters
11131  that contain non-ascii values.
11132
11133- Issue #10188 (partial resolution): tempfile.TemporaryDirectory emits
11134  a warning on sys.stderr rather than throwing a misleading exception
11135  if cleanup fails due to nulling out of modules during shutdown.
11136  Also avoids an AttributeError when mkdtemp call fails and issues
11137  a ResourceWarning on implicit cleanup via __del__.
11138
11139- Issue #10107: Warn about unsaved files in IDLE on OSX.
11140
11141- Issue #7213: subprocess.Popen's default for close_fds has been changed.
11142  It is now True in most cases other than on Windows when input, output or
11143  error handles are provided.
11144
11145- Issue #6559: subprocess.Popen has a new pass_fds parameter (actually
11146  added in 3.2beta1) to allow specifying a specific list of file descriptors
11147  to keep open in the child process.
11148
11149- Issue #1731717: Fixed the problem where subprocess.wait() could cause an
11150  OSError exception when The OS had been told to ignore SIGCLD in our process
11151  or otherwise not wait for exiting child processes.
11152
11153Tests
11154-----
11155
11156- Issue #775964: test_grp now skips YP/NIS entries instead of failing when
11157  encountering them.
11158
11159Tools/Demos
11160-----------
11161
11162- Issue #6075: IDLE on Mac OS X now works with both Carbon AquaTk and
11163  Cocoa AquaTk.
11164
11165- Issue #10710: ``Misc/setuid-prog.c`` is removed from the source tree.
11166
11167- Issue #10706: Remove outdated script runtests.sh.  Either ``make test``
11168  or ``python -m test`` should be used instead.
11169
11170Build
11171-----
11172
11173- The Windows build now uses Tcl/Tk 8.5.9 and sqlite3 3.7.4.
11174
11175- Issue #9234: argparse supports alias names for subparsers.
11176
11177
11178What's New in Python 3.2 Beta 1?
11179================================
11180
11181*Release date: 05-Dec-2010*
11182
11183Core and Builtins
11184-----------------
11185
11186- Issue #10630: Return dict views from the dict proxy keys()/values()/items()
11187  methods.
11188
11189- Issue #10596: Fix float.__mod__ to have the same behaviour as float.__divmod__
11190  with respect to signed zeros.  -4.0 % 4.0 should be 0.0, not -0.0.
11191
11192- Issue #1772833: Add the -q command-line option to suppress copyright and
11193  version output in interactive mode.
11194
11195- Provide an *optimize* parameter in the built-in compile() function.
11196
11197- Fixed several corner case issues on Windows in os.stat/os.lstat related to
11198  reparse points.
11199
11200- PEP 384 (Defining a Stable ABI) is implemented.
11201
11202- Issue #2690: Range objects support negative indices and slicing.
11203
11204- Issue #9915: Speed up sorting with a key.
11205
11206- Issue #8685: Speed up set difference ``a - b`` when source set ``a`` is much
11207  larger than operand ``b``.  Patch by Andrew Bennetts.
11208
11209- Issue #10518: Bring back the callable() builtin.
11210
11211- Issue #7094: Added alternate formatting (specified by '#') to ``__format__``
11212  method of float, complex, and Decimal. This allows more precise control over
11213  when decimal points are displayed.
11214
11215- Issue #10474: range.count() should return integers.
11216
11217- Issue #1574217: isinstance now catches only AttributeError, rather than
11218  masking all errors.
11219
11220Library
11221-------
11222
11223- logging: added "handler of last resort". See http://bit.ly/last-resort-handler
11224
11225- test.support: Added TestHandler and Matcher classes for better support of
11226  assertions about logging.
11227
11228- Issue #4391: Use proper plural forms in argparse.
11229
11230- Issue #10601: sys.displayhook uses 'backslashreplace' error handler on
11231  UnicodeEncodeError.
11232
11233- Add the "display" and "undisplay" pdb commands.
11234
11235- Issue #7245: Add a SIGINT handler in pdb that allows breaking a program again
11236  after a "continue" command.
11237
11238- Add the "interact" pdb command.
11239
11240- Issue #7905: Actually respect the keyencoding parameter to shelve.Shelf.
11241
11242- Issue #1569291: Speed up array.repeat().
11243
11244- Provide an interface to set the optimization level of compilation in
11245  py_compile, compileall and zipfile.PyZipFile.
11246
11247- Issue #7904: Changes to urllib.parse.urlsplit to handle schemes as defined by
11248  RFC3986. Anything before :// is considered a scheme and is followed by an
11249  authority (or netloc) and by '/' led path, which is optional.
11250
11251- Issue #6045: dbm.gnu databases now support get() and setdefault() methods.
11252
11253- Issue #10620: `python -m unittest` can accept file paths instead of module
11254  names for running specific tests.
11255
11256- Issue #9424: Deprecate the `unittest.TestCase` methods `assertEquals`,
11257  `assertNotEquals`, `assertAlmostEquals`, `assertNotAlmostEquals` and `assert_`
11258  and replace them with the correct methods in the Python test suite.
11259
11260- Issue #10272: The ssl module now raises socket.timeout instead of a generic
11261  SSLError on socket timeouts.
11262
11263- Issue #10528: Allow translators to reorder placeholders in localizable
11264  messages from argparse.
11265
11266- Issue #10497: Fix incorrect use of gettext in argparse.
11267
11268- Issue #10478: Reentrant calls inside buffered IO objects (for example by
11269  way of a signal handler) now raise a RuntimeError instead of freezing the
11270  current process.
11271
11272- logging: Added getLogRecordFactory/setLogRecordFactory with docs and tests.
11273
11274- Issue #10549: Fix pydoc traceback when text-documenting certain classes.
11275
11276- Issue #2001: New HTML server with enhanced Web page features.  Patch by Ron
11277  Adam.
11278
11279- Issue #10360: In WeakSet, do not raise TypeErrors when testing for membership
11280  of non-weakrefable objects.
11281
11282- Issue #940286: pydoc.Helper.help() ignores input/output init parameters.
11283
11284- Issue #1745035: Add a command size and data size limit to smtpd.py, to prevent
11285  DoS attacks.  Patch by Savio Sena.
11286
11287- Issue #4925: Add filename to error message when executable can't be found in
11288  subprocess.
11289
11290- Issue #10391: Don't dereference invalid memory in error messages in the ast
11291  module.
11292
11293- Issue #10027: st_nlink was not being set on Windows calls to os.stat or
11294  os.lstat. Patch by Hirokazu Yamamoto.
11295
11296- Issue #9333: Expose os.symlink only when the SeCreateSymbolicLinkPrivilege is
11297  held by the user's account, i.e., when the function can actually be used.
11298
11299- Issue #8879: Add os.link support for Windows.
11300
11301- Issue #7911: ``unittest.TestCase.longMessage`` defaults to True for improved
11302  failure messages by default. Patch by Mark Roddy.
11303
11304- Issue #1486713: HTMLParser now has an optional tolerant mode where it tries to
11305  guess at the correct parsing of invalid html.
11306
11307- Issue #10554: Add context management protocol support to subprocess.Popen objects.
11308
11309- Issue #8989: email.utils.make_msgid now has a domain parameter that can
11310  override the domain name used in the generated msgid.
11311
11312- Issue #9299: Add exist_ok parameter to os.makedirs to suppress the 'File
11313  exists' exception when a target directory already exists with the specified
11314  mode. Patch by Ray Allen.
11315
11316- Issue #9573: os.fork() now works correctly when triggered as a side effect of
11317  a module import.
11318
11319- Issue #10464: netrc now correctly handles lines with embedded '#' characters.
11320
11321- Added itertools.accumulate().
11322
11323- Issue #4113: Added custom ``__repr__`` method to ``functools.partial``.
11324  Original patch by Daniel Urban.
11325
11326- Issue #10273: Rename `assertRegexpMatches` and `assertRaisesRegexp` to
11327  `assertRegex` and `assertRaisesRegex`.
11328
11329- Issue #10535: Enable silenced warnings in unittest by default.
11330
11331- Issue #9873: The URL parsing functions in urllib.parse now accept ASCII byte
11332  sequences as input in addition to character strings.
11333
11334- Issue #10586: The statistics API for the new functools.lru_cache has been
11335  changed to a single cache_info() method returning a named tuple.
11336
11337- Issue #10323: itertools.islice() now consumes the minimum number of inputs
11338  before stopping.  Formerly, the final state of the underlying iterator was
11339  undefined.
11340
11341- Issue #10565: The collections.Iterator ABC now checks for both __iter__ and
11342  __next__.
11343
11344- Issue #10242: Fixed implementation of unittest.ItemsEqual and gave it a new
11345  more informative name, unittest.CountEqual.
11346
11347- Issue #10561: In pdb, clear the breakpoints by the breakpoint number.
11348
11349- Issue #2986: difflib.SequenceMatcher gets a new parameter, autojunk, which can
11350  be set to False to turn off the previously undocumented 'popularity'
11351  heuristic. Patch by Terry Reedy and Eli Bendersky.
11352
11353- Issue #10534: in difflib, expose bjunk and bpopular sets; deprecate
11354  undocumented and now redundant isbjunk and isbpopular methods.
11355
11356- Issue #9846: zipfile is now correctly closing underlying file objects.
11357
11358- Issue #10459: Update CJK character names to Unicode 6.0.
11359
11360- Issue #4493: urllib.request adds '/' in front of path components which does not
11361  start with '/. Common behavior exhibited by browsers and other clients.
11362
11363- Issue #6378: idle.bat now runs with the appropriate Python version rather than
11364  the system default. Patch by Sridhar Ratnakumar.
11365
11366- Issue #10470: 'python -m unittest' will now run test discovery by default,
11367  when no extra arguments have been provided.
11368
11369- Issue #3709: BaseHTTPRequestHandler will buffer the headers and write to
11370  output stream only when end_headers is invoked. This is a speedup and an
11371  internal optimization.  Patch by Andrew Shaaf.
11372
11373- Issue #10220: Added inspect.getgeneratorstate. Initial patch by Rodolpho
11374  Eckhardt.
11375
11376- Issue #10453: compileall now uses argparse instead of getopt, and thus
11377  provides clean output when called with '-h'.
11378
11379- Issue #8078: Add constants for higher baud rates in the termios module.  Patch
11380  by Rodolpho Eckhardt.
11381
11382- Issue #10407: Fix two NameErrors in distutils.
11383
11384- Issue #10371: Deprecated undocumented functions in the trace module.
11385
11386- Issue #10467: Fix BytesIO.readinto() after seeking into a position after the
11387  end of the file.
11388
11389- configparser: 100% test coverage.
11390
11391- Issue #10499: configparser supports pluggable interpolation handlers. The
11392  default classic interpolation handler is called BasicInterpolation. Another
11393  interpolation handler added (ExtendedInterpolation) which supports the syntax
11394  used by zc.buildout (e.g. interpolation between sections).
11395
11396- configparser: the SafeConfigParser class has been renamed to ConfigParser.
11397  The legacy ConfigParser class has been removed but its interpolation mechanism
11398  is still available as LegacyInterpolation.
11399
11400- configparser: Usage of RawConfigParser is now discouraged for new projects
11401  in favor of ConfigParser(interpolation=None).
11402
11403- Issue #1682942: configparser supports alternative option/value delimiters.
11404
11405- Issue #5412: configparser supports mapping protocol access.
11406
11407- Issue #9411: configparser supports specifying encoding for read operations.
11408
11409- Issue #9421: configparser's getint(), getfloat() and getboolean() methods
11410  accept vars and default arguments just like get() does.
11411
11412- Issue #9452: configparser supports reading from strings and dictionaries
11413  (thanks to the mapping protocol API, the latter can be used to copy data
11414  between parsers).
11415
11416- configparser: accepted INI file structure is now customizable, including
11417  comment prefixes, name of the DEFAULT section, empty lines in multiline
11418  values, and indentation.
11419
11420- Issue #10326: unittest.TestCase instances can be pickled.
11421
11422- Issue #9926: Wrapped TestSuite subclass does not get __call__ executed.
11423
11424- Issue #9920: Skip tests for cmath.atan and cmath.atanh applied to complex
11425  zeros on systems where the log1p function fails to respect the sign of zero.
11426  This fixes a test failure on AIX.
11427
11428- Issue #9732: Addition of getattr_static to the inspect module.
11429
11430- Issue #10446: Module documentation generated by pydoc now links to a
11431  version-specific online reference manual.
11432
11433- Make the 'No module named' exception message from importlib consistent.
11434
11435- Issue #10443: Add the SSLContext.set_default_verify_paths() method.
11436
11437- Issue #10440: Support RUSAGE_THREAD as a constant in the resource module.
11438  Patch by Robert Collins.
11439
11440- Issue #10429: IMAP.starttls() stored the capabilities as bytes objects, rather
11441  than strings.
11442
11443C-API
11444-----
11445
11446- Issue #10557: Added a new API function, PyUnicode_TransformDecimalToASCII(),
11447  which transforms non-ASCII decimal digits in a Unicode string to their ASCII
11448  equivalents.
11449
11450- Issue #9518: Extend the PyModuleDef_HEAD_INIT macro to explicitly
11451  zero-initialize all fields, fixing compiler warnings seen when building
11452  extension modules with gcc with "-Wmissing-field-initializers" (implied by
11453  "-W").
11454
11455- Issue #10255: Fix reference leak in Py_InitializeEx().  Patch by Neil
11456  Schemenauer.
11457
11458- structseq.h is now included in Python.h.
11459
11460- Loosen PyArg_ValidateKeywordArguments to allow dict subclasses.
11461
11462Tests
11463-----
11464
11465- regrtest.py once again ensures the test directory is removed from sys.path
11466  when it is invoked directly as the __main__ module.
11467
11468- `python -m test` can be used to run the test suite as well as `python -m
11469  test.regrtest`.
11470
11471- Do not fail test_socket when the IP address of the local hostname cannot be
11472  looked up.
11473
11474- Issue #8886: Use context managers throughout test_zipfile. Patch by Eric
11475  Carstensen.
11476
11477Build
11478-----
11479
11480- Issue #10325: Fix two issues in the fallback definitions for PY_ULLONG_MAX and
11481  PY_LLONG_MAX that made them unsuitable for use in preprocessor conditionals.
11482
11483Documentation
11484-------------
11485
11486- Issue #10299: List the built-in functions in a table in functions.rst.
11487
11488
11489What's New in Python 3.2 Alpha 4?
11490=================================
11491
11492*Release date: 13-Nov-2010*
11493
11494Core and Builtins
11495-----------------
11496
11497- Issue #10372: Import the warnings module only after the IO library is
11498  initialized, so as to avoid bootstrap issues with the '-W' option.
11499
11500- Issue #10293: Remove obsolete field in the PyMemoryView structure, unused
11501  undocumented value PyBUF_SHADOW, and strangely-looking code in
11502  PyMemoryView_GetContiguous.
11503
11504- Issue #6081: Add str.format_map(), similar to ``str.format(**mapping)``.
11505
11506- If FileIO.__init__ fails, close the file descriptor.
11507
11508- Issue #10221: dict.pop(k) now has a key error message that includes the
11509  missing key (same message d[k] returns for missing keys).
11510
11511- Issue #5437: A preallocated MemoryError instance should not keep traceback
11512  data (including local variables caught in the stack trace) alive infinitely.
11513
11514- Issue #10186: Fix the SyntaxError caret when the offset is equal to the length
11515  of the offending line.
11516
11517- Issue #10089: Add support for arbitrary -X options on the command line.  They
11518  can be retrieved through a new attribute ``sys._xoptions``.
11519
11520- Issue #4388: On Mac OS X, decode command line arguments from UTF-8, instead of
11521  the locale encoding.  If the LANG (and LC_ALL and LC_CTYPE) environment
11522  variable is not set, the locale encoding is ISO-8859-1, whereas most programs
11523  (including Python) expect UTF-8.  Python already uses UTF-8 for the filesystem
11524  encoding and to encode command line arguments on this OS.
11525
11526- Issue #9713, #10114: Parser functions (e.g. PyParser_ASTFromFile) expect
11527  filenames encoded to the filesystem encoding with the surrogateescape error
11528  handler (to support undecodable bytes), instead of UTF-8 in strict mode.
11529
11530- Issue #9997: Don't let the name "top" have special significance in scope
11531  resolution.
11532
11533- Issue #9862: Compensate for broken PIPE_BUF in AIX by hard coding its value as
11534  the default 512 when compiling on AIX.
11535
11536- Use locale encoding instead of UTF-8 to encode and decode filenames if
11537  Py_FileSystemDefaultEncoding is not set.
11538
11539- Issue #10095: fp_setreadl() doesn't reopen the file, instead reuse the file
11540  descriptor.
11541
11542- Issue #9418: Moved private string methods ``_formatter_parser`` and
11543  ``_formatter_field_name_split`` into a new ``_string`` module.
11544
11545- Issue #9992: Remove PYTHONFSENCODING environment variable.
11546
11547Library
11548-------
11549
11550- Issue #12943: python -m tokenize support has been added to tokenize.
11551
11552- Issue #10465: fix broken delegating of attributes by gzip._PaddedFile.
11553
11554- Issue #10356: Decimal.__hash__(-1) should return -2.
11555
11556- Issue #1553375: logging: Added stack_info kwarg to display stack information.
11557
11558- Issue #5111: IPv6 Host in the Header is wrapped inside [ ]. Patch by Chandru.
11559
11560- Fix Fraction.__hash__ so that Fraction.__hash__(-1) is -2.  (See also issue
11561  #10356.)
11562
11563- Issue #4471: Add the IMAP.starttls() method to enable encryption on standard
11564  IMAP4 connections.  Original patch by Lorenzo M. Catucci.
11565
11566- Issue #1466065: Add 'validate' option to base64.b64decode to raise an error if
11567  there are non-base64 alphabet characters in the input.
11568
11569- Issue #10386: Add __all__ to token module; this simplifies importing in
11570  tokenize module and prevents leaking of private names through ``import *``.
11571
11572- Issue #4471: Properly shutdown socket in IMAP.shutdown().  Patch by Lorenzo
11573  M. Catucci.
11574
11575- Fix IMAP.login() to work properly.
11576
11577- Issue #9244: multiprocessing pool worker processes could terminate
11578  unexpectedly if the return value of a task could not be pickled.  Only the
11579  ``repr`` of such errors are now sent back, wrapped in an
11580  ``MaybeEncodingError`` exception.
11581
11582- Issue #9244: The ``apply_async()`` and ``map_async()`` methods of
11583  ``multiprocessing.Pool`` now accepts an ``error_callback`` argument.  This can
11584  be a callback with the signature ``callback(exc)``, which will be called if
11585  the target raises an exception.
11586
11587- Issue #10022: The dictionary returned by the ``getpeercert()`` method of SSL
11588  sockets now has additional items such as ``issuer`` and ``notBefore``.
11589
11590- ``usenetrc`` is now false by default for NNTP objects.
11591
11592- Issue #1926: Add support for NNTP over SSL on port 563, as well as STARTTLS.
11593  Patch by Andrew Vant.
11594
11595- Issue #10335: Add tokenize.open(), detect the file encoding using
11596  tokenize.detect_encoding() and open it in read only mode.
11597
11598- Issue #10321: Add support for binary data to smtplib.SMTP.sendmail, and a new
11599  method send_message to send an email.message.Message object.
11600
11601- Issue #6011: sysconfig and distutils.sysconfig use the surrogateescape error
11602  handler to parse the Makefile file.  Avoid a UnicodeDecodeError if the source
11603  code directory name contains a non-ASCII character and the locale encoding is
11604  ASCII.
11605
11606- Issue #10329: The trace module writes reports using the input Python script
11607  encoding, instead of the locale encoding.  Patch written by Alexander
11608  Belopolsky.
11609
11610- Issue #10126: Fix distutils' test_build when Python was built with
11611  --enable-shared.
11612
11613- Issue #9281: Prevent race condition with mkdir in distutils.  Patch by
11614  Arfrever.
11615
11616- Issue #10229: Fix caching error in gettext.
11617
11618- Issue #10252: Close file objects in a timely manner in distutils code and
11619  tests.  Patch by Brian Brazil, completed by Éric Araujo.
11620
11621- Issue #10180: Pickling file objects is now explicitly forbidden, since
11622  unpickling them produced nonsensical results.
11623
11624- Issue #10311: The signal module now restores errno before returning from its
11625  low-level signal handler.  Patch by Hallvard B Furuseth.
11626
11627- Issue #10282: Add a ``nntp_implementation`` attribute to NNTP objects.
11628
11629- Issue #10283: Add a ``group_pattern`` argument to NNTP.list().
11630
11631- Issue #10155: Add IISCGIHandler to wsgiref.handlers to support IIS CGI
11632  environment better, and to correct unicode environment values for WSGI 1.0.1.
11633
11634- Issue #10281: nntplib now returns None for absent fields in the OVER/XOVER
11635  response, instead of raising an exception.
11636
11637- wsgiref now implements and validates PEP 3333, rather than an experimental
11638  extension of PEP 333.  (Note: earlier versions of Python 3.x may have
11639  incorrectly validated some non-compliant applications as WSGI compliant; if
11640  your app validates with Python <3.2b1+, but not on this version, it is likely
11641  the case that your app was not compliant.)
11642
11643- Issue #10280: NNTP.nntp_version should reflect the highest version advertised
11644  by the server.
11645
11646- Issue #10184: Touch directories only once when extracting a tarfile.
11647
11648- Issue #10199: New package, ``turtledemo`` now contains selected demo scripts
11649  that were formerly found under Demo/turtle.
11650
11651- Issue #10265: Close file objects explicitly in sunau.  Patch by Brian Brazil.
11652
11653- Issue #10266: uu.decode didn't close in_file explicitly when it was given as a
11654  filename.  Patch by Brian Brazil.
11655
11656- Issue #10110: Queue objects didn't recognize full queues when the maxsize
11657  parameter had been reduced.
11658
11659- Issue #10160: Speed up operator.attrgetter.  Patch by Christos Georgiou.
11660
11661- logging: Added style option to basicConfig() to allow %, {} or $-formatting.
11662
11663- Issue #5729: json.dumps() now supports using a string such as '\t' for
11664  pretty-printing multilevel objects.
11665
11666- Issue #10253: FileIO leaks a file descriptor when trying to open a file for
11667  append that isn't seekable.  Patch by Brian Brazil.
11668
11669- Support context management protocol for file-like objects returned by mailbox
11670  ``get_file()`` methods.
11671
11672- Issue #10246: uu.encode didn't close file objects explicitly when filenames
11673  were given to it.  Patch by Brian Brazil.
11674
11675- Issue #10198: fix duplicate header written to wave files when writeframes() is
11676  called without data.
11677
11678- Close file objects in modulefinder in a timely manner.
11679
11680- Close an io.TextIOWrapper object in email.parser in a timely manner.
11681
11682- Close a file object in distutils.sysconfig in a timely manner.
11683
11684- Close a file object in pkgutil in a timely manner.
11685
11686- Issue #10233: Close file objects in a timely manner in the tarfile module and
11687  its test suite.
11688
11689- Issue #10093: ResourceWarnings are now issued when files and sockets are
11690  deallocated without explicit closing.  These warnings are silenced by default,
11691  except in pydebug mode.
11692
11693- tarfile.py: Add support for all missing variants of the GNU sparse extensions
11694  and create files with holes when extracting sparse members.
11695
11696- Issue #10218: Return timeout status from ``Condition.wait`` in threading.
11697
11698- Issue #7351: Add ``zipfile.BadZipFile`` spelling of the exception name and
11699  deprecate the old name ``zipfile.BadZipfile``.
11700
11701- Issue #5027: The standard ``xml`` namespace is now understood by
11702  xml.sax.saxutils.XMLGenerator as being bound to
11703  http://www.w3.org/XML/1998/namespace.  Patch by Troy J. Farrell.
11704
11705- Issue #5975: Add csv.unix_dialect class.
11706
11707- Issue #7761: telnetlib.interact failures on Windows fixed.
11708
11709- logging: Added style option to Formatter to allow %, {} or $-formatting.
11710
11711- Issue #5178: Added tempfile.TemporaryDirectory class that can be used as a
11712  context manager.
11713
11714- Issue #1349106: Generator (and BytesGenerator) flatten method and Header
11715  encode method now support a 'linesep' argument.
11716
11717- Issue #5639: Add a *server_hostname* argument to ``SSLContext.wrap_socket`` in
11718  order to support the TLS SNI extension.  ``HTTPSConnection`` and ``urlopen()``
11719  also use this argument, so that HTTPS virtual hosts are now supported.
11720
11721- Issue #10166: Avoid recursion in pstats Stats.add() for many stats items.
11722
11723- Issue #10163: Skip unreadable registry keys during mimetypes initialization.
11724
11725- logging: Made StreamHandler terminator configurable.
11726
11727- logging: Allowed filters to be just callables.
11728
11729- logging: Added tests for _logRecordClass changes.
11730
11731- Issue #10092: Properly reset locale in calendar.Locale*Calendar classes.
11732
11733- logging: Added _logRecordClass, getLogRecordClass, setLogRecordClass to
11734  increase flexibility of LogRecord creation.
11735
11736- Issue #5117: Case normalization was needed on ntpath.relpath().  Also fixed
11737  root directory issue on posixpath.relpath().  (Ported working fixes from
11738  ntpath.)
11739
11740- Issue #1343: xml.sax.saxutils.XMLGenerator now has an option
11741  short_empty_elements to direct it to use self-closing tags when appropriate.
11742
11743- Issue #9807 (part 1): Expose the ABI flags in sys.abiflags.  Add --abiflags
11744  switch to python-config for command line access.
11745
11746- Issue #6098: Don't claim DOM level 3 conformance in minidom.
11747
11748- Issue #5762: Fix AttributeError raised by ``xml.dom.minidom`` when an empty
11749  XML namespace attribute is encountered.
11750
11751- Issue #2830: Add the ``html.escape()`` function, which quotes all problematic
11752  characters by default.  Deprecate ``cgi.escape()``.
11753
11754- Issue #9409: Fix the regex to match all kind of filenames, for interactive
11755  debugging in doctests.
11756
11757- Issue #9183: ``datetime.timezone(datetime.timedelta(0))`` will now return the
11758  same instance as ``datetime.timezone.utc``.
11759
11760- Issue #7523: Add SOCK_CLOEXEC and SOCK_NONBLOCK to the socket module, where
11761  supported by the system.  Patch by Nikita Vetoshkin.
11762
11763- Issue #10063: file:// scheme will stop accessing remote hosts via ftp
11764  protocol. file:// urls had fallback to access remote hosts via ftp. This was
11765  not correct, change is made to raise a URLError when a remote host is tried to
11766  access via file:// scheme.
11767
11768- Issue #1710703: Write structures for an empty ZIP archive when a ZipFile is
11769  created in modes 'a' or 'w' and then closed without adding any files. Raise
11770  BadZipfile (rather than IOError) when opening small non-ZIP files.
11771
11772- Issue #10041: The signature of optional arguments in socket.makefile() didn't
11773  match that of io.open(), and they also didn't get forwarded properly to
11774  TextIOWrapper in text mode.  Patch by Kai Zhu.
11775
11776- Issue #9003: http.client.HTTPSConnection, urllib.request.HTTPSHandler and
11777  urllib.request.urlopen now take optional arguments to allow for server
11778  certificate checking, as recommended in public uses of HTTPS.
11779
11780- Issue #6612: Fix site and sysconfig to catch os.getcwd() error, eg. if the
11781  current directory was deleted. Patch written by W. Trevor King.
11782
11783- Issue #3873: Speed up unpickling from file objects that have a peek() method.
11784
11785- Issue #10075: Add a session_stats() method to SSLContext objects.
11786
11787- Issue #9948: Fixed problem of losing filename case information.
11788
11789Extension Modules
11790-----------------
11791
11792- Issue #5109: array.array constructor will now use fast code when
11793  initial data is provided in an array object with correct type.
11794
11795- Issue #6317: Now winsound.PlaySound only accepts unicode.
11796
11797- Issue #6317: Now winsound.PlaySound can accept non ascii filename.
11798
11799- Issue #9377: Use Unicode API for gethostname on Windows.
11800
11801- Issue #10143: Update "os.pathconf" values.
11802
11803- Issue #6518: Support context management protocol for ossaudiodev types.
11804
11805- Issue #678250: Make mmap flush a noop on ACCESS_READ and ACCESS_COPY.
11806
11807- Issue #9054: Fix a crash occurring when using the pyexpat module with expat
11808  version 2.0.1.
11809
11810- Issue #5355: Provide mappings from Expat error numbers to string descriptions
11811  and backwards, in order to actually make it possible to analyze error codes
11812  provided by ExpatError.
11813
11814- The Unicode database was updated to 6.0.0.
11815
11816C-API
11817-----
11818
11819- Issue #10288: The deprecated family of "char"-handling macros
11820  (ISLOWER()/ISUPPER()/etc) have now been removed: use Py_ISLOWER() etc instead.
11821
11822- Issue #9778: Hash values are now always the size of pointers. A new Py_hash_t
11823  type has been introduced.
11824
11825Tools/Demos
11826-----------
11827
11828- Issue #10117: Tools/scripts/reindent.py now accepts source files that use
11829  encoding other than ASCII or UTF-8.  Source encoding is preserved when
11830  reindented code is written to a file.
11831
11832- Issue #7287: Demo/imputil/knee.py was removed.
11833
11834Tests
11835-----
11836
11837- Issue #3699: Fix test_bigaddrspace and extend it to test bytestrings as well
11838  as unicode strings.  Initial patch by Sandro Tosi.
11839
11840- Issue #10294: Remove dead code form test_unicode_file.
11841
11842- Issue #10123: Don't use non-ascii filenames in test_doctest tests. Add a new
11843  test specific to unicode (non-ascii name and filename).
11844
11845Build
11846-----
11847
11848- Issue #10268: Add a --enable-loadable-sqlite-extensions option to configure.
11849
11850- Issue #8852: Allow the socket module to build on OpenSolaris.
11851
11852- Drop -OPT:Olimit compiler option.
11853
11854- Issue #10094: Use versioned .so files on GNU/kfreeBSD and the GNU Hurd.
11855
11856- Accept Oracle Berkeley DB 5.0 and 5.1 as backend for the dbm extension.
11857
11858- Issue #7473: avoid link errors when building a framework with a different set
11859  of architectures than the one that is currently installed.
11860
11861
11862What's New in Python 3.2 Alpha 3?
11863=================================
11864
11865*Release date: 09-Oct-2010*
11866
11867Core and Builtins
11868-----------------
11869
11870- Issue #10068: Global objects which have reference cycles with their module's
11871  dict are now cleared again. This causes issue #7140 to appear again.
11872
11873- Issue #9738: Document PyErr_SetString() and PyErr_SetFromErrnoWithFilename()
11874  encodings.
11875
11876- ast.literal_eval() can now handle negative numbers.  It is also a little more
11877  liberal in what it accepts without compromising the safety of the evaluation.
11878  For example, 3j+4 and 3+4+5 are both accepted.
11879
11880- Issue #10006: type.__abstractmethods__ now raises an AttributeError.  As a
11881  result metaclasses can now be ABCs (see #9533).
11882
11883- Issue #8670: ctypes.c_wchar supports non-BMP characters with 32 bits wchar_t.
11884
11885- Issue #8670: PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() replace
11886  UTF-16 surrogate pairs by single non-BMP characters for 16 bits Py_UNICODE and
11887  32 bits wchar_t (eg. Linux in narrow build).
11888
11889- Issue #10003: Allow handling of SIGBREAK on Windows. Fixes a regression
11890  introduced by issue #9324.
11891
11892- Issue #9979: Create function PyUnicode_AsWideCharString().
11893
11894- Issue #7397: Mention that importlib.import_module() is probably what someone
11895  really wants to be using in __import__'s docstring.
11896
11897- Issue #8521: Allow CreateKeyEx, OpenKeyEx, and DeleteKeyEx functions of winreg
11898  to use named arguments.
11899
11900- Issue #9930: Remove bogus subtype check that was causing (e.g.)
11901  float.__rdiv__(2.0, 3) to return NotImplemented instead of the expected 1.5.
11902
11903- Issue #9808: Implement os.getlogin for Windows. Patch by Jon Anglin.
11904
11905- Issue #9901: Destroying the GIL in Py_Finalize() can fail if some other
11906  threads are still running.  Instead, reinitialize the GIL on a second call to
11907  Py_Initialize().
11908
11909- All SyntaxErrors now have a column offset and therefore a caret when the error
11910  is printed.
11911
11912- Issue #9252: PyImport_Import no longer uses a fromlist hack to return the
11913  module that was imported, but instead gets the module from sys.modules.
11914
11915- Issue #9213: The range type_items now provides index() and count() methods, to
11916  conform to the Sequence ABC.  Patch by Daniel Urban and Daniel Stutzbach.
11917
11918- Issue #7994: Issue a PendingDeprecationWarning if object.__format__ is called
11919  with a non-empty format string.  This is an effort to future-proof user
11920  code. If a derived class does not currently implement __format__ but later
11921  adds its own __format__, it would most likely break user code that had
11922  supplied a format string.  This will be changed to a DeprecationWaring in
11923  Python 3.3 and it will be an error in Python 3.4.
11924
11925- Issue #9828: Destroy the GIL in Py_Finalize(), so that it gets properly
11926  re-created on a subsequent call to Py_Initialize().  The problem (a crash)
11927  wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
11928
11929- Issue #9210: Configure option --with-wctype-functions was removed.  Using the
11930  functions from the libc caused the methods .upper() and lower() to become
11931  locale aware and created subtly wrong results.
11932
11933- Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error on a
11934  non-ASCII byte in the format string.
11935
11936- Issue #4617: Previously it was illegal to delete a name from the local
11937  namespace if it occurs as a free variable in a nested block.  This limitation
11938  of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF).
11939
11940- Issue #9804: ascii() now always represents unicode surrogate pairs as a single
11941  ``\UXXXXXXXX``, regardless of whether the character is printable or not.
11942  Also, the "backslashreplace" error handler now joins surrogate pairs into a
11943  single character on UCS-2 builds.
11944
11945- Issue #9757: memoryview objects get a release() method to release the
11946  underlying buffer (previously this was only done when deallocating the
11947  memoryview), and gain support for the context management protocol.
11948
11949- Issue #9797: pystate.c wrongly assumed that zero couldn't be a valid
11950  thread-local storage key.
11951
11952Library
11953-------
11954
11955- Issue #2236: distutils' mkpath ignored the mode parameter.
11956
11957- Fix typo in one sdist option (medata-check).
11958
11959- Issue #9199: Fix incorrect use of distutils.cmd.Command.announce.
11960
11961- Issue #1718574: Fix options that were supposed to accept arguments but did
11962  not in build_clib.
11963
11964- Issue #9437: Fix building C extensions with non-default LDFLAGS.
11965
11966- Issue #4661: email can now parse bytes input and generate either converted
11967  7bit output or bytes output.  Email version bumped to 5.1.0.
11968
11969- Issue #1589: Add ssl.match_hostname(), to help implement server identity
11970  verification for higher-level protocols.
11971
11972- Issue #9759: GzipFile now raises ValueError when an operation is attempted
11973  after the file is closed.  Patch by Jeffrey Finkelstein.
11974
11975- Issue #9042: Fix interaction of custom translation classes and caching in
11976  gettext.
11977
11978- Issue #6706: asyncore.dispatcher now provides a handle_accepted() method
11979  returning a (sock, addr) pair which is called when a connection has been
11980  established with a new remote endpoint.  This is supposed to be used as a
11981  replacement for old handle_accept() and avoids the user to call accept()
11982  directly.
11983
11984- Issue #9065: tarfile no longer uses "root" as the default for the uname and
11985  gname field.
11986
11987- Issue #8980: Fixed a failure in distutils.command check that was shadowed by
11988  an environment that does not have docutils.  Patch by Arfrever.
11989
11990- Issue #1050268: parseaddr now correctly quotes double quote and backslash
11991  characters that appear inside quoted strings in email addresses.
11992
11993- Issue #10004: quoprimime no longer generates a traceback when confronted with
11994  invalid characters after '=' in a Q-encoded word.
11995
11996- Issue #1491: BaseHTTPServer nows send a ``100 Continue`` response before
11997  sending a 200 OK for the Expect: 100-continue request header.
11998
11999- Issue #9360: Cleanup and improvements to the nntplib module.  The API now
12000  conforms to the philosophy of bytes and unicode separation in Python 3.  A
12001  test suite has also been added.
12002
12003- Issue #9962: GzipFile now has the peek() method.
12004
12005- Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
12006  retry the select() loop instead of bailing out.  This is because select() can
12007  incorrectly report a socket as ready for reading (for example, if it received
12008  some data with an invalid checksum).
12009
12010- Issue #3612: Added new types to ctypes.wintypes. (CHAR and pointers)
12011
12012- Issue #9950: Fix socket.sendall() crash or misbehaviour when a signal is
12013  received.  Now sendall() properly calls signal handlers if necessary, and
12014  retries sending if these returned successfully, including on sockets with a
12015  timeout.
12016
12017- Issue #9947: logging: Fixed locking bug in stopListening.
12018
12019- Issue #9945: logging: Fixed locking bugs in addHandler/removeHandler.
12020
12021- Issue #9936: Fixed executable lines' search in the trace module.
12022
12023- Issue #9790: Rework imports necessary for samefile and sameopenfile
12024  in ntpath.
12025
12026- Issue #9928: Properly initialize the types exported by the bz2 module.
12027
12028- Issue #1675951: Allow GzipFile to work with unseekable file objects.  Patch by
12029  Florian Festi.
12030
12031- Logging: Added QueueListener class to facilitate logging usage for
12032  performance-critical threads.
12033
12034- Issue #9916: Add some missing errno symbols.
12035
12036- Issue #9877: Expose sysconfig.get_makefile_filename()
12037
12038- logging: Added hasHandlers() method to Logger and LoggerAdapter.
12039
12040- Issue #9908: Fix os.stat() on bytes paths under Windows 7.
12041
12042- Issue #2643: msync() is not called anymore when deallocating an open mmap
12043  object, only munmap().
12044
12045- logging: Changed LoggerAdapter implementation internally, to make it easier to
12046  subclass in a useful way.
12047
12048- logging: hasHandlers method was added to Logger, and isEnabledFor,
12049  getEffectiveLevel, hasHandlers and setLevel were added to LoggerAdapter.
12050  LoggerAdapter was introduced into the unit tests for logging.
12051
12052- Issue #1686: Fix string.Template when overriding the pattern attribute.
12053
12054- Issue #9854: SocketIO objects now observe the RawIOBase interface in
12055  non-blocking mode: they return None when an operation would block (instead of
12056  raising an exception).
12057
12058- Issue #1730136: Fix the comparison between a tk.font.Font and an object of
12059  another kind.
12060
12061- Issue #9441: logging has better coverage for rotating file handlers.
12062
12063- Issue #9865: collections.OrderedDict now has a __sizeof__ method.
12064
12065- Issue #9854: The default read() implementation in io.RawIOBase now handles
12066  non-blocking readinto() returning None correctly.
12067
12068- Issue #1552: socket.socketpair() now returns regular socket.socket objects
12069  supporting the whole socket API (rather than the "raw" _socket.socket
12070  objects).
12071
12072- Issue #9853: Fix the signature of SSLSocket.recvfrom() and SSLSocket.sendto()
12073  to match the corresponding socket methods.
12074
12075- Issue #9840: Added a decorator to reprlib for wrapping __repr__ methods to make
12076  them handle recursive calls within the same thread.
12077
12078- logging: Enhanced HTTPHandler with secure and credentials initializers.
12079
12080- Issue #767645: Set os.path.supports_unicode_filenames to True on Mac OS X.
12081
12082- Issue #9837: The read() method of ZipExtFile objects (as returned by
12083  ZipFile.open()) could return more bytes than requested.
12084
12085- Issue #9826: OrderedDict.__repr__ can now handle self-referential values:
12086  d['x'] = d.
12087
12088- Issue #9825: Using __del__ in the definition of collections.OrderedDict made
12089  it possible for the user to create self-referencing ordered dictionaries which
12090  become permanently uncollectable GC garbage.  Reinstated the Python 3.1
12091  approach of using weakref proxies so that reference cycles never get created
12092  in the first place.
12093
12094- Issue #9579, #9580: Fix os.confstr() for value longer than 255 bytes and
12095  encode the value with filesystem encoding and surrogateescape (instead of
12096  utf-8 in strict mode) . Patch written by David Watson.
12097
12098- Issue #9632: Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING
12099  environment variable to set the filesystem encoding at Python startup.
12100  sys.setfilesystemencoding() creates inconsistencies because it is unable to
12101  reencode all filenames in all objects.
12102
12103- Issue #9410: Various optimizations to the pickle module, leading to speedups
12104  up to 4x (depending on the benchmark).  Mostly ported from Unladen Swallow;
12105  initial patch by Alexandre Vassalotti.
12106
12107- The pprint module now supports printing OrderedDicts in their given order
12108  (formerly, it would sort the keys).
12109
12110- Logging: Added QueueHandler class to facilitate logging usage with
12111  multiprocessing.
12112
12113- Issue #9707: Rewritten reference implementation of threading.local which is
12114  friendlier towards reference cycles.  This change is not normally visible
12115  since an optimized C implementation (_thread._local) is used instead.
12116
12117- Issue #6394: os.getppid() is now supported on Windows.  Note that it will
12118  still return the id of the parent process after it has exited.  This process
12119  id may even have been reused by another unrelated process.
12120
12121- Issue #9792: In case of connection failure, socket.create_connection() would
12122  swallow the exception and raise a new one, making it impossible to fetch the
12123  original errno, or to filter timeout errors.  Now the original error is
12124  re-raised.
12125
12126- Issue #9758: When fcntl.ioctl() was called with mutable_flag set to True, and
12127  the passed buffer was exactly 1024 bytes long, the buffer wouldn't be updated
12128  back after the system call.  Original patch by Brian Brazil.
12129
12130- Updates to the random module:
12131
12132  * Document which parts of the module are guaranteed to stay the same across
12133    versions and which parts are subject to change.
12134
12135  * Update the seed() method to use all of the bits in a string instead of just
12136    the hash value.  This makes better use of the seed value and assures the
12137    seeding is platform independent.  Issue #7889.
12138
12139  * Improved the random()-->integer algorithm used in choice(), shuffle(),
12140    sample(), randrange(), and randint().  Formerly, it used int(n*random())
12141    which has a slight bias whenever n is not a power of two.  Issue #9025.
12142
12143  * Improved documentation of arguments to randrange().  Issue #9379.
12144
12145- collections.OrderedDict now supports a new method for repositioning keys to
12146  either end.
12147
12148- Issue #9754: Similarly to assertRaises and assertRaisesRegexp, unittest test
12149  cases now also have assertWarns and assertWarnsRegexp methods to check that a
12150  given warning type was triggered by the code under test.
12151
12152- Issue #5506: BytesIO objects now have a getbuffer() method exporting a view of
12153  their contents without duplicating them.  The view is both readable and
12154  writable.
12155
12156- Issue #7566: Implement os.path.sameopenfile for Windows.
12157
12158- Issue #9293: I/O streams now raise ``io.UnsupportedOperation`` when an
12159  unsupported operation is attempted (for example, writing to a file open only
12160  for reading).
12161
12162- hashlib has two new constant attributes: algorithms_guaranteed and
12163  algorithms_available that respectively list the names of hash algorithms
12164  guaranteed to exist in all Python implementations and the names of hash
12165  algorithms available in the current process.
12166
12167- A new package ``concurrent.futures`` as defined by PEP 3148.
12168
12169C-API
12170-----
12171
12172- Add PyErr_SyntaxLocationEx, which supports passing a column offset.
12173
12174- Issue #9834: Don't segfault in PySequence_GetSlice, PySequence_SetSlice, or
12175  PySequence_DelSlice when the object doesn't have any mapping operations
12176  defined.
12177
12178Tools/Demos
12179-----------
12180
12181- Issue #9188: The gdb extension now handles correctly narrow (UCS2) as well as
12182  wide (UCS4) unicode builds for both the host interpreter (embedded inside gdb)
12183  and the interpreter under test.
12184
12185Tests
12186-----
12187
12188- Issue #9308: Added tests for importing encoded modules that do not
12189  depend on specific stdlib modules being encoded in a certain way.
12190
12191- Issue #1051: Add a script (Lib/test/make_ssl_certs.py) to generate the custom
12192  certificate and private key files used by SSL-related certs.
12193
12194- Issue #9978: Wait until subprocess completes initialization. (Win32KillTests
12195  in test_os)
12196
12197- Issue #7110: regrtest now sends test failure reports and single-failure
12198  tracebacks to stderr rather than stdout.
12199
12200- Issue #9628: fix runtests.sh -x option so more than one test can be excluded.
12201
12202- Issue #9899: Fix test_tkinter.test_font on various platforms.  Patch by Ned
12203  Deily.
12204
12205- Issue #9894: Do not hardcode ENOENT in test_subprocess.
12206
12207- Issue #9315: Added tests for the trace module.  Patch by Eli Bendersky.
12208
12209- Issue #9323: Make test.regrtest.__file__ absolute, this was not always the
12210  case when running profile or trace, for example.
12211
12212- Issue #9568: Fix test_urllib2_localnet on OS X 10.3.
12213
12214Build
12215-----
12216
12217- Issue #10062: Allow building on platforms which do not have sem_timedwait.
12218
12219- Issue #10054: Some platforms provide uintptr_t in inttypes.h.  Patch by Akira
12220  Kitada.
12221
12222- Issue #10055: Make json C89-compliant in UCS4 mode.
12223
12224- Issue #9552: Avoid unnecessary rebuild of OpenSSL. (Windows)
12225
12226- Issue #1633863: Don't ignore $CC under AIX.
12227
12228- Issue #9810: Compile bzip2 source files in Python's project file directly. It
12229  used to be built with bzip2's makefile.
12230
12231- Issue #9848: Stopping trying to build _weakref in setup.py as it is a built-in
12232  module.
12233
12234- Issue #9806: python-config now has an ``--extension-suffix`` option that
12235  outputs the suffix for dynamic libraries including the ABI version name
12236  defined by PEP 3149.
12237
12238- Issue #941346: Improve the build process under AIX and allow Python to be
12239  built as a shared library.  Patch by Sébastien Sablé.
12240
12241- Issue #4026: Make the fcntl extension build under AIX.  Patch by Sébastien
12242  Sablé.
12243
12244- Issue #9701: The MacOSX installer can patch the shell profile to ensure that
12245  the "bin" directory inside the framework is on the shell's search path. This
12246  feature now also supports the ZSH shell.
12247
12248
12249What's New in Python 3.2 Alpha 2?
12250=================================
12251
12252*Release date: 05-Sep-2010*
12253
12254Core and Builtins
12255-----------------
12256
12257- Issue #9225: Remove the ROT_FOUR and DUP_TOPX opcode, the latter replaced by
12258  the new (and simpler) DUP_TOP_TWO.  Performance isn't changed, but our
12259  bytecode is a bit simplified.  Patch by Demur Rumed.
12260
12261- Issue #9766: Rename poorly named variables exposed by _warnings to prevent
12262  confusion with the proper variables names from 'warnings' itself.
12263
12264- Issue #9212: dict_keys and dict_items now provide the isdisjoint() method, to
12265  conform to the Set ABC.  Patch by Daniel Urban.
12266
12267- Issue #9737: Fix a crash when trying to delete a slice or an item from a
12268  memoryview object.
12269
12270- Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding() are
12271  now removed, since their effect was inexistent in 3.x (the default encoding is
12272  hardcoded to utf-8 and cannot be changed).
12273
12274- Issue #7415: PyUnicode_FromEncodedObject() now uses the new buffer API
12275  properly.  Patch by Stefan Behnel.
12276
12277- Issue #5553: The Py_LOCAL_INLINE macro now results in inlining on most
12278  platforms.  Previously, it inlined only when using Microsoft Visual C.
12279
12280- Issue #9712: Fix tokenize on identifiers that start with non-ascii names.
12281
12282- Issue #9688: __basicsize__ and __itemsize__ must be accessed as Py_ssize_t.
12283
12284- Issue #9684: Added a definition for SIZEOF_WCHAR_T to PC/pyconfig.h, to match
12285  the pyconfig.h generated by configure on other systems.
12286
12287- Issue #9666: Only catch AttributeError in hasattr(). All other exceptions that
12288  occur during attribute lookup are now propagated to the caller.
12289
12290- Issue #8622: Add PYTHONFSENCODING environment variable to override the
12291  filesystem encoding.
12292
12293- Issue #5127: The C functions that access the Unicode Database now accept and
12294  return characters from the full Unicode range, even on narrow unicode builds
12295  (Py_UNICODE_TOLOWER, Py_UNICODE_ISDECIMAL, and others).  A visible difference
12296  in Python is that unicodedata.numeric() now returns the correct value for
12297  large code points, and repr() may consider more characters as printable.
12298
12299- Issue #9425: Create PyModule_GetFilenameObject() function to get the filename
12300  as a unicode object, instead of a byte string. Function needed to support
12301  unencodable filenames. Deprecate PyModule_GetFilename() in favor on the new
12302  function.
12303
12304- Issue #8063: Call _PyGILState_Init() earlier in Py_InitializeEx().
12305
12306- Issue #9612: The set object is now 64-bit clean under Windows.
12307
12308- Issue #8202: sys.argv[0] is now set to '-m' instead of '-c' when searching for
12309  the module file to be executed with the -m command line option.
12310
12311- Issue #9599: Create PySys_FormatStdout() and PySys_FormatStderr() functions to
12312  write a message formatted by PyUnicode_FromFormatV() to sys.stdout and
12313  sys.stderr.
12314
12315- Issue #9542: Create PyUnicode_FSDecoder() function, a ParseTuple converter:
12316  decode bytes objects to unicode using PyUnicode_DecodeFSDefaultAndSize(); str
12317  objects are output as-is.
12318
12319- Issue #9203: Computed gotos are now enabled by default on supported compilers
12320  (which are detected by the configure script).  They can still be disable
12321  selectively by specifying --without-computed-gotos.
12322
12323- Issue #9425: Create PyErr_WarnFormat() function, similar to PyErr_WarnEx() but
12324  use PyUnicode_FromFormatV() to format the warning message.
12325
12326- Issue #8530: Prevent stringlib fastsearch from reading beyond the front of an
12327  array.
12328
12329- Issue #5319: Print an error if flushing stdout fails at interpreter shutdown.
12330
12331- Issue #9337: The str() of a float or complex number is now identical to its
12332  repr().
12333
12334- Issue #9416: Fix some issues with complex formatting where the output with no
12335  type specifier failed to match the str output:
12336
12337    - format(complex(-0.0, 2.0), '-') omitted the real part from the output,
12338    - format(complex(0.0, 2.0), '-') included a sign and parentheses.
12339
12340Extension Modules
12341-----------------
12342
12343- Issue #8013: time.asctime and time.ctime no longer call system
12344  asctime and ctime functions.  The year range for time.asctime is now
12345  1900 through maxint.  The range for time.ctime is the same as for
12346  time.localtime.  The string produced by these functions is longer
12347  than 24 characters when year is greater than 9999.
12348
12349- Issue #6608: time.asctime is now checking struct tm fields its input
12350  before passing it to the system asctime.  Patch by MunSic Jeong.
12351
12352- Issue #8734: Avoid crash in msvcrt.get_osfhandle() when an invalid file
12353  descriptor is provided.  Patch by Pascal Chambon.
12354
12355- Issue #7736: Release the GIL around calls to opendir() and closedir() in the
12356  posix module.  Patch by Marcin Bachry.
12357
12358- Issue #4835: make PyLong_FromSocket_t() and PyLong_AsSocket_t() private to the
12359  socket module, and fix the width of socket descriptors to be correctly
12360  detected under 64-bit Windows.
12361
12362- Issue #1027206: Support IDNA in gethostbyname, gethostbyname_ex, getaddrinfo
12363  and gethostbyaddr.  getnameinfo is now restricted to numeric addresses as
12364  input.
12365
12366- Issue #9214: Set operations on a KeysView or ItemsView in collections now
12367  correctly return a set.  Patch by Eli Bendersky.
12368
12369- Issue #5737: Add Solaris-specific mnemonics in the errno module.  Patch by
12370  Matthew Ahrens.
12371
12372- Restore GIL in nis_cat in case of error. Decode NIS data to fs encoding, using
12373  the surrogate error handler.
12374
12375- Issue #665761: ``functools.reduce()`` will no longer mask exceptions other
12376  than ``TypeError`` raised by the iterator argument.
12377
12378- Issue #9570: Use PEP 383 decoding in os.mknod and os.mkfifo.
12379
12380- Issue #6915: Under Windows, os.listdir() didn't release the Global Interpreter
12381  Lock around all system calls.  Original patch by Ryan Kelly.
12382
12383- Issue #8524: Add a detach() method to socket objects, so as to put the socket
12384  into the closed state without closing the underlying file descriptor.
12385
12386- Issue #477863: Emit a ResourceWarning at shutdown if gc.garbage is not empty.
12387
12388- Issue #6869: Fix a refcount problem in the _ctypes extension.
12389
12390- Issue #5504: ctypes should now work with systems where mmap can't be
12391  PROT_WRITE and PROT_EXEC.
12392
12393- Issue #9507: Named tuple repr will now automatically display the right name in
12394  a tuple subclass.
12395
12396- Issue #9324: Add parameter validation to signal.signal on Windows in order to
12397  prevent crashes.
12398
12399- Issue #9526: Remove some outdated (int) casts that were preventing the array
12400  module from working correctly with arrays of more than 2**31 elements.
12401
12402- Fix memory leak in ssl._ssl._test_decode_cert.
12403
12404- Issue #8065: Fix memory leak in readline module (from failure to free the
12405  result of history_get_history_state()).
12406
12407- Issue #9450: Fix memory leak in readline.replace_history_item and
12408  readline.remove_history_item for readline version >= 5.0.
12409
12410- Issue #8105: Validate file descriptor passed to mmap.mmap on Windows.
12411
12412- Issue #8046: Add context management protocol support and .closed property to mmap
12413  objects.
12414
12415Library
12416-------
12417
12418- Issue #7451: Improve decoding performance of JSON objects, and reduce the
12419  memory consumption of said decoded objects when they use the same strings as
12420  keys.
12421
12422- Issue #1100562: Fix deep-copying of objects derived from the list and dict
12423  types.  Patch by Michele Orrù and Björn Lindqvist.
12424
12425- Issue #9753: Fixed socket.dup, which did not always work correctly on Windows.
12426
12427- Issue #9421: Made the get<type> methods consistently accept the vars and
12428  default arguments on all parser classes.
12429
12430- Issue #7005: Fixed output of None values for RawConfigParser.write and
12431  ConfigParser.write.
12432
12433- Issue #8990: array.fromstring() and array.tostring() get renamed to
12434  frombytes() and tobytes(), respectively, to avoid confusion.  Furthermore,
12435  array.frombytes(), array.extend() as well as the array.array() constructor now
12436  accept bytearray objects.  Patch by Thomas Jollans.
12437
12438- Issue #808164: Fixed socket.close to avoid references to globals, to avoid
12439  issues when socket.close is called from a __del__ method.
12440
12441- Issue #9706: ssl module provides a better error handling in various
12442  circumstances.
12443
12444- Issue #1868: Eliminate subtle timing issues in thread-local objects by getting
12445  rid of the cached copy of thread-local attribute dictionary.
12446
12447- Issue #1512791: In setframerate() in the wave module, non-integral frame rates
12448  are rounded to the nearest integer.
12449
12450- Issue #8797: urllib2 does a retry for Basic Authentication failure instead of
12451  falling into recursion.
12452
12453- Issue #1194222: email.utils.parsedate now returns RFC2822 compliant four
12454  character years even if the message contains RFC822 two character years.
12455
12456- Issue #8750: Fixed MutableSet's methods to correctly handle reflexive
12457  operations on its self, namely x -= x and x ^= x.
12458
12459- Issue #9129: smtpd.py is vulnerable to DoS attacks deriving from missing error
12460  handling when accepting a new connection.
12461
12462- Issue #9601: ftplib now provides a workaround for non-compliant
12463  implementations such as IIS shipped with Windows server 2003 returning invalid
12464  response codes for MKD and PWD commands.
12465
12466- Issue #658749: asyncore's connect() method now correctly interprets winsock
12467  errors.
12468
12469- Issue #9501: Fixed logging regressions in cleanup code.
12470
12471- Fix functools.total_ordering() to skip methods inherited from object.
12472
12473- Issue #9572: Importlib should not raise an exception if a directory it thought
12474  it needed to create was done concurrently by another process.
12475
12476- Issue #9617: Signals received during a low-level write operation aren't
12477  ignored by the buffered IO layer anymore.
12478
12479- Issue #843590: Make "macintosh" an alias to the "mac_roman" encoding.
12480
12481- Create os.fsdecode(): decode from the filesystem encoding with surrogateescape
12482  error handler, or strict error handler on Windows.
12483
12484- Issue #3488: Provide convenient shorthand functions ``gzip.compress`` and
12485  ``gzip.decompress``.  Original patch by Anand B. Pillai.
12486
12487- Issue #8807: poplib.POP3_SSL class now accepts a context parameter, which is a
12488  ssl.SSLContext object allowing bundling SSL configuration options,
12489  certificates and private keys into a single (potentially long-lived)
12490  structure.
12491
12492- Issue #8866: parameters passed to socket.getaddrinfo can now be specified as
12493  single keyword arguments.
12494
12495- Address XXX comment in dis.py by having inspect.py prefer to reuse the dis.py
12496  compiler flag values over defining its own.
12497
12498- Issue #9147: Added dis.code_info() which is similar to show_code() but returns
12499  formatted code information in a string rather than displaying on screen.
12500
12501- Issue #9567: functools.update_wrapper now adds a __wrapped__ attribute
12502  pointing to the original callable.
12503
12504- Issue #3445: functools.update_wrapper now tolerates missing attributes on
12505  wrapped callables.
12506
12507- Issue #5867: Add abc.abstractclassmethod and abc.abstractstaticmethod.
12508
12509- Issue #9605: posix.getlogin() decodes the username with file filesystem
12510  encoding and surrogateescape error handler. Patch written by David Watson.
12511
12512- Issue #9604: posix.initgroups() encodes the username using the fileystem
12513  encoding and surrogateescape error handler. Patch written by David Watson.
12514
12515- Issue #9603: posix.ttyname() and posix.ctermid() decode the terminal name
12516  using the filesystem encoding and surrogateescape error handler. Patch written
12517  by David Watson.
12518
12519- Issue #7647: The posix module now has the ST_RDONLY and ST_NOSUID constants,
12520  for use with the statvfs() function.  Patch by Adam Jackson.
12521
12522- Issue #8688: MANIFEST files created by distutils now include a magic comment
12523  indicating they are generated.  Manually maintained MANIFESTs without this
12524  marker will not be overwritten or removed.
12525
12526- Issue #7467: when reading a file from a ZIP archive, its CRC is checked and a
12527  BadZipfile error is raised if it doesn't match (as used to be the case in
12528  Python 2.5 and earlier).
12529
12530- Issue #9550: a BufferedReader could issue an additional read when the original
12531  read request had been satisfied, which could block indefinitely when the
12532  underlying raw IO channel was e.g. a socket.  Report and original patch by
12533  Jason V. Miller.
12534
12535- Issue #3757: thread-local objects now support cyclic garbage collection.
12536  Thread-local objects involved in reference cycles will be deallocated timely
12537  by the cyclic GC, even if the underlying thread is still running.
12538
12539- Issue #9452: Add read_file, read_string, and read_dict to the configparser
12540  API; new source attribute to exceptions.
12541
12542- Issue #6231: Fix xml.etree.ElementInclude to include the tail of the current
12543  node.
12544
12545- Issue #8047: Fix the xml.etree serializer to return bytes by default.  Use
12546  ``encoding="unicode"`` to generate a Unicode string.
12547
12548- Issue #8280: urllib2's Request method will remove fragments in the url.  This
12549  is how it is supposed to work, wget and curl do the same.  Previous behavior
12550  was wrong.
12551
12552- Issue #6683: For SMTP logins we now try all authentication methods advertised
12553  by the server.  Many servers are buggy and advertise authentication methods
12554  they do not support in reality.
12555
12556- Issue #8814: function annotations (the ``__annotations__`` attribute) are now
12557  included in the set of attributes copied by default by functools.wraps and
12558  functools.update_wrapper.  Patch by Terrence Cole.
12559
12560- Issue #2944: asyncore doesn't handle connection refused correctly.
12561
12562- Issue #4184: Private attributes on smtpd.SMTPChannel made public and deprecate
12563  the private attributes. Add tests for smtpd module.
12564
12565- Issue #3196: email header decoding is now forgiving if an RFC2047 encoded word
12566  encoded in base64 is lacking padding.
12567
12568- Issue #9444: Argparse now uses the first element of prefix_chars as the option
12569  character for the added 'h/help' option if prefix_chars does not contain a
12570  '-', instead of raising an error.
12571
12572- Issue #7372: Fix pstats regression when stripping paths from profile data
12573  generated with the profile module.
12574
12575- Issue #9428: Fix running scripts with the profile/cProfile modules from the
12576  command line.
12577
12578- Issue #7781: Fix restricting stats by entry counts in the pstats interactive
12579  browser.
12580
12581- Issue #9209: Do not crash in the pstats interactive browser on invalid regular
12582  expressions.
12583
12584- Update collections.OrderedDict to match the implementation in Py2.7 (based on
12585  lists instead of weakly referenced Link objects).
12586
12587- Issue #8397: Raise an error when attempting to mix iteration and regular reads
12588  on a BZ2File object, rather than returning incorrect results.
12589
12590- Issue #9448: Fix a leak of OS resources (mutexes or semaphores) when
12591  re-initializing a buffered IO object by calling its ``__init__`` method.
12592
12593- Issue #1713: Fix os.path.ismount(), which returned true for symbolic links
12594  across devices.
12595
12596- Issue #8826: Properly load old-style "expires" attribute in http.cookies.
12597
12598- Issue #1690103: Fix initial namespace for code run with trace.main().
12599
12600- Issue #7395: Fix tracebacks in pstats interactive browser.
12601
12602- Issue #8230: Fix Lib/test/sortperf.py.
12603
12604- Issue #8620: when a cmd.Cmd() is fed input that reaches EOF without a final
12605  newline, it no longer truncates the last character of the last command line.
12606
12607- Issue #5146: Handle UID THREAD command correctly in imaplib.
12608
12609- Issue #5147: Fix the header generated for cookie files written by
12610  http.cookiejar.MozillaCookieJar.
12611
12612- Issue #8198: In pydoc, output all help text to the correct stream when
12613  sys.stdout is reassigned.
12614
12615- Issue #7909: Do not touch paths with the special prefixes ``\\.\`` or ``\\?\``
12616  in ntpath.normpath().
12617
12618- Issue #1286: Allow using fileinput.FileInput as a context manager.
12619
12620- Add lru_cache() decorator to the functools module.
12621
12622Tools/Demos
12623-----------
12624
12625- Fix ``Tools/scripts/checkpyc.py`` after PEP 3147.
12626
12627- Issue #8867: Fix ``Tools/scripts/serve.py`` to work with files containing
12628  non-ASCII content.
12629
12630Tests
12631-----
12632
12633- Issue #9601: Provide a test case for ftplib.parse257.
12634
12635- Issue #8857: Provide a test case for socket.getaddrinfo.
12636
12637- Issue #7564: Skip test_ioctl if another process is attached to /dev/tty.
12638
12639- Issue #8433: Fix test_curses failure with newer versions of ncurses.
12640
12641- Issue #9496: Provide a test suite for the rlcompleter module.  Patch by
12642  Michele Orrù.
12643
12644- Issue #8687: provide a test suite for sched.py module.
12645
12646Build
12647-----
12648
12649- Issue #1303434: Generate ZIP file containing all PDBs.
12650
12651- Issue #9193: PEP 3149 is accepted.
12652
12653- Issue #3101: Helper functions _add_one_to_index_C() and _add_one_to_index_F()
12654  become _Py_add_one_to_index_C() and _Py_add_one_to_index_F(), respectively.
12655
12656- Issue #9700: define HAVE_BROKEN_POSIX_SEMAPHORES under AIX 6.x.  Patch by
12657  Sébastien Sablé.
12658
12659- Don't run pgen twice when using make -j.
12660
12661
12662What's New in Python 3.2 Alpha 1?
12663=================================
12664
12665*Release date: 01-Aug-2010*
12666
12667Core and Builtins
12668-----------------
12669
12670- Issue #8991: convertbuffer() rejects discontigious buffers.
12671
12672- Issue #7616: Fix copying of overlapping memoryview slices with the Intel
12673  compiler.
12674
12675- Issue #8413: structsequence now subclasses tuple.
12676
12677- Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the
12678  start byte and the continuation byte(s) are now considered invalid, instead of
12679  the number of bytes specified by the start byte.  E.g.:
12680  '\xf1\x80AB'.decode('utf-8', 'replace') now returns u'\ufffdAB' and replaces
12681  with U+FFFD only the start byte ('\xf1') and the continuation byte ('\x80')
12682  even if '\xf1' is the start byte of a 4-bytes sequence.  Previous versions
12683  returned a single u'\ufffd'.
12684
12685- Issue #9011: A negated imaginary literal (e.g., "-7j") now has real part -0.0
12686  rather than 0.0.  So "-7j" is now exactly equivalent to "-(7j)".
12687
12688- Be more specific in error messages about positional arguments.
12689
12690- Issue #8949: "z" format of PyArg_Parse*() functions doesn't accept bytes
12691  objects, as described in the documentation.
12692
12693- Issue #6543: Write the traceback in the terminal encoding instead of utf-8.
12694  Fix the encoding of the modules filename.  Patch written by Amaury Forgeot
12695  d'Arc.
12696
12697- Issue #9011: Remove buggy and unnecessary (in 3.x) ST->AST compilation code
12698  dealing with unary minus applied to a constant.  The removed code was mutating
12699  the ST, causing a second compilation to fail.
12700
12701- Issue #850997: mbcs encoding (Windows only) handles errors argument: strict
12702  mode raises unicode errors.  The encoder only supports "strict" and "replace"
12703  error handlers, the decoder only supports "strict" and "ignore" error
12704  handlers.  Patch written by Mark Hammond.
12705
12706- Issue #8850: Remove "w" and "w#" formats from PyArg_Parse*() functions, use
12707  "w*" format instead. Add tests for "w*" format.
12708
12709- Issue #8592: PyArg_Parse*() functions raise a TypeError for "y", "u" and "Z"
12710  formats if the string contains a null byte/character.  Write unit tests for
12711  string formats.
12712
12713- Issue #7490: To facilitate sharing of doctests between 2.x and 3.x test
12714  suites, the IGNORE_EXCEPTION_DETAIL directive now also ignores the module
12715  location of the raised exception.
12716
12717- Issue #8969: On Windows, use mbcs codec in strict mode to encode and decode
12718  filenames and enable os.fsencode().
12719
12720- Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError.
12721
12722- Issue #8941: Decoding big endian UTF-32 data in UCS-2 builds could crash the
12723  interpreter with characters outside the Basic Multilingual Plane (higher than
12724  0x10000).
12725
12726- Issue #8950: (See also issue #5080).  Py_ArgParse*() functions now raise
12727  TypeError instead of giving a DeprecationWarning when a float is parsed using
12728  the 'L' code (for long long).  (All other integer codes already raise
12729  TypeError in this case.)
12730
12731- Issue #8922: Normalize the encoding name in PyUnicode_AsEncodedString() to
12732  enable shortcuts for upper case encoding name. Add also a shortcut for
12733  "iso-8859-1" in PyUnicode_AsEncodedString() and PyUnicode_Decode().
12734
12735- Issue #8838: Remove codecs.charbuffer_encode() function.  The buffer protocol
12736  doesn't support "char buffer" anymore in Python 3.
12737
12738- Issue #8339: Remove "t#" format of PyArg_Parse*() functions, use "s#" or "s*"
12739  instead.  codecs.charbuffer_encode() now accepts modifiable buffer objects
12740  like bytearray.
12741
12742- Issue #8837: Remove "O?" format of PyArg_Parse*() functions.  The format is no
12743  used anymore and it was never documented.
12744
12745- In str.format(), raise a ValueError when indexes to arguments are too large.
12746
12747- Issue #2844: Make int('42', n) consistently raise ValueError for invalid
12748  integers n (including n = -909).
12749
12750- Issue #8188: Introduce a new scheme for computing hashes of numbers (instances
12751  of int, float, complex, decimal.Decimal and fractions.Fraction) that makes it
12752  easy to maintain the invariant that hash(x) == hash(y) whenever x and y have
12753  equal value.
12754
12755- Issue #8748: Fix two issues with comparisons between complex and integer
12756  objects.  (1) The comparison could incorrectly return True in some cases
12757  (2**53+1 == complex(2**53) == 2**53), breaking transitivity of equality.
12758  (2) The comparison raised an OverflowError for large integers, leading to
12759  unpredictable exceptions when combining integers and complex objects in sets
12760  or dicts.
12761
12762- Issue #8766: Initialize _warnings module before importing the first module.
12763  Fix a crash if an empty directory called "encodings" exists in sys.path.
12764
12765- Issue #8589: Decode PYTHONWARNINGS environment variable with the file system
12766  encoding and surrogateescape error handler instead of the locale encoding to
12767  be consistent with os.environ.  Add PySys_AddWarnOptionUnicode() function.
12768
12769- PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (instead
12770  of strict) error handler to escape surrogates.
12771
12772- Issue #8715: Create PyUnicode_EncodeFSDefault() function: Encode a Unicode
12773  object to Py_FileSystemDefaultEncoding with the "surrogateescape" error
12774  handler, and return bytes.  If Py_FileSystemDefaultEncoding is not set, fall
12775  back to UTF-8.
12776
12777- Enable shortcuts for common encodings in PyUnicode_AsEncodedString() for any
12778  error handler, not only the default error handler (strict).
12779
12780- Issue #8610: Load file system codec at startup, and display a fatal error on
12781  failure.  Set the file system encoding to utf-8 (instead of None) if getting
12782  the locale encoding failed, or if nl_langinfo(CODESET) function is missing.
12783
12784- PyFile_FromFd() uses PyUnicode_DecodeFSDefault() instead of
12785  PyUnicode_FromString() to support surrogates in the filename and use the right
12786  encoding.
12787
12788- Issue #7507: Quote "!" in pipes.quote(); it is special to some shells.
12789
12790- PyUnicode_DecodeFSDefaultAndSize() uses surrogateescape error handler.
12791
12792- Issue #8419: Prevent the dict constructor from accepting non-string keyword
12793  arguments.
12794
12795- Issue #8124: PySys_WriteStdout() and PySys_WriteStderr() don't execute
12796  indirectly Python signal handlers anymore because mywrite() ignores exceptions
12797  (KeyboardInterrupt).
12798
12799- Issue #8092: Fix PyUnicode_EncodeUTF8() to support error handler producing
12800  unicode string (eg. backslashreplace).
12801
12802- Issue #8485: PyUnicode_FSConverter() doesn't accept byteearray objects
12803  anymore, you have to convert your bytearray filenames to bytes.
12804
12805- Issue #7332: Remove the 16KB stack-based buffer in
12806  PyMarshal_ReadLastObjectFromFile, which doesn't bring any noticeable benefit
12807  compared to the dynamic memory allocation fallback.  Patch by Charles-François
12808  Natali.
12809
12810- Issue #8417: Raise an OverflowError when an integer larger than sys.maxsize is
12811  passed to bytes or bytearray.
12812
12813- Issue #7301: Add environment variable $PYTHONWARNINGS.
12814
12815- Issue #8329: Don't return the same lists from select.select when no fds are
12816  changed.
12817
12818- Issue #8259: 1L << (2**31) no longer produces an 'outrageous shift error' on
12819  64-bit machines.  The shift count for either left or right shift is permitted
12820  to be up to sys.maxsize.
12821
12822- Ensure that tokenization of identifiers is not affected by locale.
12823
12824- Issue #1222585: Added LDCXXSHARED for C++ support. Patch by Arfrever.
12825
12826- Raise a TypeError when trying to delete a T_STRING_INPLACE struct member.
12827
12828- Issue #8211: Save/restore CFLAGS around AC_PROG_CC in configure.in, in case it
12829  is set.
12830
12831- Issue #8226: sys.setfilesystemencoding() raises a LookupError if the encoding
12832  is unknown.
12833
12834- Issue #1583863: A str subclass can now override the __str__ method.
12835
12836- Issue #8014: Setting a T_UINT or T_PYSSIZET attribute of an object with
12837  PyMemberDefs could produce an internal error; raise TypeError instead.
12838
12839- Issue #7845: Rich comparison methods on the complex type now return
12840  NotImplemented rather than raising a TypeError when comparing with an
12841  incompatible type; this allows user-defined classes to implement their own
12842  comparisons with complex.
12843
12844- Issue #3137: Don't ignore errors at startup, especially a keyboard interrupt
12845  (SIGINT). If an error occurs while importing the site module, the error is
12846  printed and Python exits. Initialize the GIL before importing the site module.
12847
12848- Issue #7173: Generator finalization could invalidate sys.exc_info().
12849
12850- Issue #7544: Preallocate thread memory before creating the thread to avoid a
12851  fatal error in low memory condition.
12852
12853- Issue #7820: The parser tokenizer restores all bytes in the right if the BOM
12854  check fails.
12855
12856- Handle errors from looking up __prepare__ correctly.
12857
12858- Issue #5939: Add additional runtime checking to ensure a valid capsule in
12859  Modules/_ctypes/callproc.c.
12860
12861- Issue #7309: Fix unchecked attribute access when converting
12862  UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings.
12863
12864- Issue #6902: Fix problem with built-in types format incorrectly with 0
12865  padding.
12866
12867- Issue #7988: Fix default alignment to be right aligned for complex.__format__.
12868  Now it matches other numeric types.
12869
12870- Issue #5988: Remove deprecated functions PyOS_ascii_formatd,
12871  PyOS_ascii_strtod, and PyOS_ascii_atof.  Use PyOS_double_to_string and
12872  PyOS_string_to_double instead.  See issue #5835 for the original deprecations.
12873
12874- Issue #7385: Fix a crash in `MemoryView_FromObject` when `PyObject_GetBuffer`
12875  fails.  Patch by Florent Xicluna.
12876
12877- Issue #7788: Fix an interpreter crash produced by deleting a list slice with
12878  very large step value.
12879
12880- Issue #7766: Change sys.getwindowsversion() return value to a named tuple and
12881  add the additional members returned in an OSVERSIONINFOEX structure.  The new
12882  members are service_pack_major, service_pack_minor, suite_mask, and
12883  product_type.
12884
12885- Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`) could
12886  crash in many places because of the PyByteArray_AS_STRING() macro returning
12887  NULL.  The macro now returns a statically allocated empty string instead.
12888
12889- Issue #6690: Optimize the bytecode for expressions such as `x in {1, 2, 3}`,
12890  where the right hand operand is a set of constants, by turning the set into a
12891  frozenset and pre-building it as a constant.  The comparison operation is made
12892  against the constant instead of building a new set each time it is executed (a
12893  similar optimization already existed which turned a list of constants into a
12894  pre-built tuple).  Patch and additional tests by Dave Malcolm.
12895
12896- Issue #7622: Improve the split(), rsplit(), splitlines() and replace() methods
12897  of bytes, bytearray and unicode objects by using a common implementation based
12898  on stringlib's fast search.  Patch by Florent Xicluna.
12899
12900- Issue #7632: Fix various str -> float conversion bugs present in 2.7 alpha 2,
12901  including: (1) a serious 'wrong output' bug that could occur for long (> 40
12902  digit) input strings, (2) a crash in dtoa.c that occurred in debug builds when
12903  parsing certain long numeric strings corresponding to subnormal values, (3) a
12904  memory leak for some values large enough to cause overflow, and (4) a number
12905  of flaws that could lead to incorrectly rounded results.
12906
12907- The __complex__ method is now looked up on the class of instances to make it
12908  consistent with other special methods.
12909
12910- Issue #7462: Implement the stringlib fast search algorithm for the `rfind`,
12911  `rindex`, `rsplit` and `rpartition` methods.  Patch by Florent Xicluna.
12912
12913- Issue #7604: Deleting an unset slotted attribute did not raise an
12914  AttributeError.
12915
12916- Issue #7534: Fix handling of IEEE specials (infinities, nans, negative zero)
12917  in ** operator.  The behaviour now conforms to that described in C99 Annex F.
12918
12919- Issue #1811: improve accuracy and cross-platform consistency for true division
12920  of integers: the result of a/b is now correctly rounded for ints a and b (at
12921  least on IEEE 754 platforms), and in particular does not depend on the
12922  internal representation of an int.
12923
12924- Issue #6834: replace the implementation for the 'python' and 'pythonw'
12925  executables on OSX.
12926
12927  These executables now work properly with the arch(1) command: ``arch -ppc
12928  python`` will start a universal binary version of python in PPC mode (unlike
12929  previous releases).
12930
12931- Issue #7466: Segmentation fault when the garbage collector is called in the
12932  middle of populating a tuple.  Patch by Florent Xicluna.
12933
12934- Issue #7419: setlocale() could crash the interpreter on Windows when called
12935  with invalid values.
12936
12937- Issue #6077: On Windows, files opened with tempfile.TemporaryFile in "wt+"
12938  mode would appear truncated on the first '0x1a' byte (aka. Ctrl+Z).
12939
12940- Issue #7085: Fix crash when importing some extensions in a thread on MacOSX
12941  10.6.
12942
12943- Issue #1757126: Fix the cyrillic-asian alias for the ptcp154 encoding.
12944
12945- Issue #6970: Remove redundant calls when comparing objects that don't
12946  implement the relevant rich comparison methods.
12947
12948- Issue #7298: Fixes for range and reversed(range(...)).  Iteration over
12949  range(a, b, c) incorrectly gave an empty iterator when a, b and c fit in C
12950  long but the length of the range did not.  Also fix several cases where
12951  reversed(range(a, b, c)) gave wrong results, and fix a refleak for
12952  reversed(range(a, b, c)) with large arguments.
12953
12954- Issue #7244: itertools.izip_longest() no longer ignores exceptions raised
12955  during the formation of an output tuple.
12956
12957- Issue #3297: On wide unicode builds, do not split unicode characters into
12958  surrogates.
12959
12960- Remove length limitation when constructing a complex number from a string.
12961
12962- Issue #1087418: Boost performance of bitwise operations for longs.
12963
12964- Support for AtheOS has been completely removed from the code base. It was
12965  disabled since Python 3.0.
12966
12967- Support for several legacy threading libraries has been disabled. These
12968  libraries are: Mach C threads, SunOS LWP, GNU pth, Irix threads. Support code
12969  will be entirely removed in 3.3.
12970
12971- Support for OSF* has been disabled. If nobody stands up, support will be
12972  removed in 3.3. See <http://bugs.python.org/issue8606>.
12973
12974- Peephole constant folding had missed UNARY_POSITIVE.
12975
12976- Issue #1722344: threading._shutdown() is now called in Py_Finalize(), which
12977  fixes the problem of some exceptions being thrown at shutdown when the
12978  interpreter is killed. Patch by Adam Olsen.
12979
12980- Issue #7147: Remove support for compiling Python without complex number
12981  support.
12982
12983- Issue #7120: logging: Removed import of multiprocessing which is causing crash
12984  in GAE.
12985
12986- Issue #1754094: Improve the stack depth calculation in the compiler.  There
12987  should be no other effect than a small decrease in memory use.  Patch by
12988  Christopher Tur Lesniewski-Laas.
12989
12990- Issue #7065: Fix a crash in bytes.maketrans and bytearray.maketrans when using
12991  byte values greater than 127.  Patch by Derk Drukker.
12992
12993- Issue #1571184: The Unicode database contains properties for more characters.
12994  The tables for code points representing numeric values, white spaces or line
12995  breaks are now generated from the official Unicode Character Database files,
12996  and include information from the Unihan.txt file.
12997
12998- Issue #7019: Raise ValueError when unmarshalling bad long data, instead of
12999  producing internally inconsistent Python longs.
13000
13001- Issue #6990: Fix threading.local subclasses leaving old state around after a
13002  reference cycle GC which could be recycled by new locals.
13003
13004- Issue #5460: Fix an ambiguity in the grammar.
13005
13006- Issue #1766304: Improve performance of membership tests on range objects.
13007
13008- Issue #6713: Improve performance of integer -> string conversions.
13009
13010- Issue #6846: Fix bug where bytearray.pop() returns negative integers.
13011
13012- Issue #6750: A text file opened with io.open() could duplicate its output when
13013  writing from multiple threads at the same time.
13014
13015- Issue #6707: dir() on an uninitialized module caused a crash.
13016
13017- Issue #6540: Fixed crash for bytearray.translate() with invalid parameters.
13018
13019- Issue #6573: set.union() stopped processing inputs if an instance of self
13020  occurred in the argument chain.
13021
13022- Issue #6070: On posix platforms import no longer copies the execute bit from
13023  the .py file to the .pyc file if it is set.
13024
13025- Issue #1616979: Added the cp720 (Arabic DOS) encoding.
13026
13027- Issue #6428: Since Python 3.0, the __bool__ method must return a bool object,
13028  and not an int.  Fix the corresponding error message, and the documentation.
13029
13030- The deprecated PyCObject has been removed.
13031
13032- Issue #6347: Include inttypes.h as well as stdint.h in pyport.h.  This fixes a
13033  build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead
13034  of stdint.h on that platform.
13035
13036- Issue #6373: Fixed a SystemError when encoding with the latin-1 codec and the
13037  'surrogateescape' error handler, a string which contains unpaired surrogates.
13038
13039- Issue #4856: Remove checks for win NT.
13040
13041- Issue #6687: PyBytes_FromObject() no longer accepts an integer as its argument
13042  to construct a null-initialized bytes object.
13043
13044- Issue #1023290: Add from_bytes() and to_bytes() methods to integers.  These
13045  methods allow the conversion of integers to bytes, and vice-versa.
13046
13047- Issue #7382: Fix bug in bytes.__getnewargs__ that prevented bytes instances
13048  from being copied with copy.copy(), and bytes subclasses from being pickled
13049  properly.
13050
13051- Code objects now support weak references.
13052
13053- Issue #7072: isspace(0xa0) is true on Mac OS X.
13054
13055- Issue #8084: PEP 370 now conforms to system conventions for framework builds
13056  on MacOS X. That is, "python setup.py install --user" will install into
13057  "~/Library/Python/2.7" instead of "~/.local".
13058
13059C-API
13060-----
13061
13062- Issue #2443: A new macro, `Py_VA_COPY`, copies the state of the
13063  variable argument list.  `Py_VA_COPY` is equivalent to C99
13064  `va_copy`, but available on all python platforms.
13065
13066- PySlice_GetIndicesEx now clips the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX]
13067  instead of [-PY_SSIZE_T_MAX-1, PY_SSIZE_T_MAX].  This makes it safe to do
13068  "step = -step" when reversing a slice.
13069
13070- Issue #5753: A new C API function, `PySys_SetArgvEx`, allows embedders of the
13071  interpreter to set sys.argv without also modifying sys.path.  This helps fix
13072  `CVE-2008-5983
13073  <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
13074
13075- Add PyArg_ValidateKeywordArguments, which checks if all keyword arguments are
13076  strings in an efficient manner.
13077
13078- Issue #8276: PyEval_CallObject() is now only available in macro form.  The
13079  function declaration, which was kept for backwards compatibility reasons, is
13080  now removed (the macro was introduced in 1997!).
13081
13082- Issue #7767: New function PyLong_AsLongLongAndOverflow added, analogous to
13083  PyLong_AsLongAndOverflow.
13084
13085- Make PyUnicode_CompareWithASCIIString return not equal if the Python string
13086  has '\0' at the end.
13087
13088- Issue #5080: The argument parsing functions PyArg_ParseTuple,
13089  PyArg_ParseTupleAndKeywords, PyArg_VaParse, PyArg_VaParseTupleAndKeywords and
13090  PyArg_Parse now raise a DeprecationWarning for float arguments passed with the
13091  'L' format code.  This will become a TypeError in a future version of Python,
13092  to match the behaviour of the other integer format codes.
13093
13094- Issue #7033: Function ``PyErr_NewExceptionWithDoc()`` added.
13095
13096- Issue #7414: 'C' code wasn't being skipped properly (for keyword arguments) in
13097  PyArg_ParseTupleAndKeywords.
13098
13099- Issue #7228: Add '%lld' and '%llu' support to PyString_FromFormat(V) and
13100  PyErr_Format, on machines with HAVE_LONG_LONG defined.
13101
13102- Issue #6151: Made PyDescr_COMMON conform to standard C (like PyObject_HEAD in
13103  PEP 3123).  The PyDescr_TYPE and PyDescr_NAME macros should be used for
13104  accessing the d_type and d_name members of structures using PyDescr_COMMON.
13105
13106- Issue #6405: Remove duplicate type declarations in descrobject.h.
13107
13108- The code flags for old __future__ features are now available again.
13109
13110- Issue #5954: Add a PyFrame_GetLineNumber() function to replace most uses of
13111  PyCode_Addr2Line().
13112
13113- Issue #5959: Add a PyCode_NewEmpty() function to create a new empty code
13114  object at a specified file, function, and line number.
13115
13116- Issue #1419652: Change the first argument to PyImport_AppendInittab() to
13117  ``const char *`` as the string is stored beyond the call.
13118
13119- Issue #2422: When compiled with the ``--with-valgrind`` option, the pymalloc
13120  allocator will be automatically disabled when running under Valgrind.  This
13121  gives improved memory leak detection when running under Valgrind, while taking
13122  advantage of pymalloc at other times.
13123
13124Library
13125-------
13126
13127- In pdb, when Ctrl-C is entered while defining commands for a breakpoint, the
13128  old commands are restored.
13129
13130- For traceback debugging, the pdb listing now also shows the locations where
13131  the exception was originally (re)raised, if it differs from the last line
13132  executed (e.g. in case of finally clauses).
13133
13134- The pdb command "source" has been added.  It displays the source code for a
13135  given object, if possible.
13136
13137- The pdb command "longlist" has been added.  It displays the whole source code
13138  for the current function.
13139
13140- Issue #1503502: Make pdb.Pdb easier to subclass by putting message and error
13141  output into methods.
13142
13143- Issue #809887: Make the output of pdb's breakpoint deletions more consistent;
13144  emit a message when a breakpoint is enabled or disabled.
13145
13146- Issue #5294: Fix the behavior of pdb's "continue" command when called in the
13147  top-level debugged frame.
13148
13149- Issue #5727: Restore the ability to use readline when calling into pdb in
13150  doctests.
13151
13152- Issue #6719: In pdb, do not stop somewhere in the encodings machinery if the
13153  source file to be debugged is in a non-builtin encoding.
13154
13155- Issue #8048: Prevent doctests from failing when sys.displayhook has been
13156  reassigned.
13157
13158- Issue #8015: In pdb, do not crash when an empty line is entered as a
13159  breakpoint command.
13160
13161- In pdb, allow giving a line number to the "until" command.
13162
13163- Issue #1437051: For pdb, allow "continue" and related commands in .pdbrc
13164  files.  Also, add a command-line option "-c" that runs a command as if given
13165  in .pdbrc.
13166
13167- Issue #4179: In pdb, allow "list ." as a command to return to the currently
13168  debugged line.
13169
13170- Issue #4108: In urllib.robotparser, if there are multiple ``User-agent: *``
13171  entries, consider the first one.
13172
13173- Issue #6630: Allow customizing regex flags when subclassing the
13174  string.Template class.
13175
13176- Issue #9411: Allow specifying an encoding for config files in the configparser
13177  module.
13178
13179- Issue #1682942: Improvements to configparser: support alternate delimiters,
13180  alternate comment prefixes and empty lines in values.
13181
13182- Issue #9354: Provide getsockopt() in asyncore's file_wrapper.
13183
13184- Issue #8966: ctypes: Remove implicit bytes-unicode conversion.
13185
13186- Issue #9378: python -m pickle <pickle file> will now load and display the
13187  first object in the pickle file.
13188
13189- Issue #4770: Restrict binascii module to accept only bytes (as specified).
13190  And fix the email package to encode to ASCII instead of ``raw-unicode-escape``
13191  before ASCII-to-binary decoding.
13192
13193- Issue #9384: ``python -m tkinter`` will now display a simple demo applet.
13194
13195- The default size of the re module's compiled regular expression cache has been
13196  increased from 100 to 500 and the cache replacement policy has changed from
13197  simply clearing the entire cache on overflow to forgetting the least recently
13198  used cached compiled regular expressions.  This is a performance win for
13199  applications that use a lot of regular expressions and limits the impact of
13200  the performance hit anytime the cache is exceeded.
13201
13202- Issue #7113: Speed up loading in configparser. Patch by Łukasz Langa.
13203
13204- Issue #9032: XML-RPC client retries the request on EPIPE error.  The EPIPE
13205  error occurs when the server closes the socket and the client sends a big
13206  XML-RPC request.
13207
13208- Issue #4629: getopt raises an error if an argument ends with "=", whereas
13209  getopt doesn't accept a value (eg. --help= is rejected if getopt uses
13210  ['help='] long options).
13211
13212- Issue #7989: Added pure python implementation of the `datetime` module.  The C
13213  module is renamed to `_datetime` and if available, overrides all classes
13214  defined in datetime with fast C impementation.  Python implementation is based
13215  on the original python prototype for the datetime module by Tim Peters with
13216  minor modifications by the PyPy project.  The test suite now tests `datetime`
13217  module with and without `_datetime` acceleration using the same test cases.
13218
13219- Issue #7895: platform.mac_ver() no longer crashes after calling os.fork().
13220
13221- Issue #9323: Fixed a bug in trace.py that resulted in losing the name of the
13222  script being traced.  Patch by Eli Bendersky.
13223
13224- Issue #9282: Fixed --listfuncs option of trace.py.  Thanks Eli Bendersky for
13225  the patch.
13226
13227- Issue #3704: http.cookiejar was not properly handling URLs with a / in the
13228  parameters.
13229
13230- Issue #9268: ``pickletools.dis()`` now has an optional *annotate* argument
13231  which controls printing of opcode descriptions in ``dis()`` output.
13232
13233- Issue #1555570: email no longer inserts extra blank lines when a \r\n combo
13234  crosses an 8192 byte boundary.
13235
13236- Issue #9243: Fix sndhdr module and add unit tests, contributed by James Lee.
13237
13238- ``ast.literal_eval()`` now allows byte literals.
13239
13240- Issue #9137: Fix issue in MutableMapping.update, which incorrectly treated
13241  keyword arguments called 'self' or 'other' specially.
13242
13243- ``ast.literal_eval()`` now allows set literals.
13244
13245- Issue #9164: Ensure that sysconfig handles duplicate -arch flags in CFLAGS.
13246
13247- Issue #7646: The fnmatch pattern cache no longer grows without bound.
13248
13249- Issue #9136: Fix 'dictionary changed size during iteration' RuntimeError
13250  produced when profiling the decimal module.  This was due to a dangerous
13251  iteration over 'locals()' in Context.__init__.
13252
13253- Fix extreme speed issue in Decimal.pow when the base is an exact power of 10
13254  and the exponent is tiny (for example, ``Decimal(10) **
13255  Decimal('1e-999999999')``).
13256
13257- Issue #9186: Fix math.log1p(-1.0) to raise ValueError, not OverflowError.
13258
13259- Issue #9130: Fix validation of relative imports in parser module.
13260
13261- Issue #9128: Fix validation of class decorators in parser module.
13262
13263- Issue #9094: python -m pickletools will now disassemble pickle files listed in
13264  the command line arguments.  See output of python -m pickletools -h for more
13265  details.
13266
13267- Issue #5468: urlencode to handle bytes type and other encodings in its query
13268  parameter. Patch by Dan Mahn.
13269
13270- Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module,
13271  ensure that the input string length is a multiple of the frame size.
13272
13273- Issue #6507: Accept source strings in dis.dis().  Original patch by Daniel
13274  Urban.
13275
13276- Issue #7829: Clearly document that the dis module is exposing an
13277  implementation detail that is not stable between Python VMs or releases.
13278
13279- Issue #6589: cleanup asyncore.socket_map in case smtpd.SMTPServer constructor
13280  raises an exception.
13281
13282- Issue #9110: Addition of ContextDecorator to contextlib, for creating APIs
13283  that act as both context managers and decorators. contextmanager changes to
13284  use ContextDecorator.
13285
13286- Implement importlib.abc.SourceLoader and deprecate PyLoader and PyPycLoader
13287  for removal in Python 3.4.
13288
13289- Issue #9064: pdb's "up" and "down" commands now accept an optional argument
13290  giving the number of frames to go.
13291
13292- Issue #9018: os.path.normcase() now raises a TypeError if the argument is not
13293  ``str`` or ``bytes``.
13294
13295- Issue #9075: In the ssl module, remove the setting of a ``debug`` flag on an
13296  OpenSSL structure.
13297
13298- Issue #8682: The ssl module now temporary increments the reference count of a
13299  socket object got through ``PyWeakref_GetObject``, so as to avoid possible
13300  deallocation while the object is still being used.
13301
13302- Issue #1368368: FancyURLOpener class changed to throw an Exception on wrong
13303  password instead of presenting an interactive prompt.  Older behavior can be
13304  obtained by passing retry=True to http_error_xxx methods of FancyURLOpener.
13305
13306- Issue #8720: Fix regression caused by fix for #4050 by making getsourcefile
13307  smart enough to find source files in the linecache.
13308
13309- Issue #5610: feedparser no longer eats extra characters at the end of a body
13310  part if the body part ends with a ``\r\n``.
13311
13312- Issue #8986: math.erfc was incorrectly raising OverflowError for values
13313  between -27.3 and -30.0 on some platforms.
13314
13315- Issue #8784: Set tarfile default encoding to 'utf-8' on Windows.
13316
13317- Issue #8966: If a ctypes structure field is an array of c_char, convert its
13318  value to bytes instead of str (as done for c_char and c_char_p).
13319
13320- Issue #8188: Comparisons between Decimal and Fraction objects are now
13321  permitted, returning a result based on the exact numerical values of the
13322  operands.  This builds on issue #2531, which allowed Decimal-to-float
13323  comparisons; all comparisons involving numeric types (bool, int, float,
13324  complex, Decimal, Fraction) should now act as expected.
13325
13326- Issue #8897: Fix sunau module, use bytes to write the header. Patch written by
13327  Thomas Jollans.
13328
13329- Issue #8899: time.struct_time now has class and attribute docstrings.
13330
13331- Issue #6470: Drop UNC prefix in FixTk.
13332
13333- Issue #4768: base64 encoded email body parts were incorrectly stored as binary
13334  strings.  They are now correctly converted to strings.
13335
13336- Issue #8833: tarfile created hard link entries with a size field != 0 by
13337  mistake.
13338
13339- Charset.body_encode now correctly handles base64 encoding by encoding with the
13340  output_charset before calling base64mime.encode.  Passes the tests from 2.x
13341  issue #1368247.
13342
13343- Issue #8845: sqlite3 Connection objects now have a read-only in_transaction
13344  attribute that is True iff there are uncommitted changes.
13345
13346- Issue #1289118: datetime.timedelta objects can now be multiplied by float and
13347  divided by float and int objects.  Results are rounded to the nearest multiple
13348  of timedelta.resolution with ties resolved using round-half-to-even method.
13349
13350- Issue #7150: Raise OverflowError if the result of adding or subtracting
13351  timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range.
13352
13353- Issue #8806: add SSL contexts support to ftplib.
13354
13355- Issue #4769: Fix main() function of the base64 module, use sys.stdin.buffer
13356  and sys.stdout.buffer (instead of sys.stdin and sys.stdout) to use the bytes
13357  API.
13358
13359- Issue #8770: Now sysconfig displays information when it's called as a script.
13360  Initial idea by Sridhar Ratnakumar.
13361
13362- Issue #6662: Fix parsing of malformatted charref (&#bad;), patch written by
13363  Fredrik Håård.
13364
13365- Issue #8540: Decimal module: rename the Context._clamp attribute to
13366  Context.clamp and make it public.  This is useful in creating contexts that
13367  correspond to the decimal interchange formats specified in IEEE 754.
13368
13369- Issue #6268: Fix seek() method of codecs.open(), don't read or write the BOM
13370  twice after seek(0). Fix also reset() method of codecs, UTF-16, UTF-32 and
13371  StreamWriter classes.
13372
13373- Issue #3798: sys.exit(message) writes the message to sys.stderr file, instead
13374  of the C file stderr, to use stderr encoding and error handler.
13375
13376- Issue #8782: Add a trailing newline in linecache.updatecache to the last line
13377  of files without one.
13378
13379- Issue #8729: Return NotImplemented from collections.Mapping.__eq__ when
13380  comparing to a non-mapping.
13381
13382- Issue #8774: tabnanny uses the encoding cookie (#coding:...) to use the
13383  correct encoding.
13384
13385- Issue #4870: Add an `options` attribute to SSL contexts, as well as several
13386  ``OP_*`` constants to the `ssl` module.  This allows selectively disabling
13387  protocol versions, when used in combination with `PROTOCOL_SSLv23`.
13388
13389- Issue #8759: Fixed user paths in sysconfig for posix and os2 schemes.
13390
13391- Issue #8663: distutils.log emulates backslashreplace error handler. Fix
13392  compilation in a non-ASCII directory if stdout encoding is ASCII (eg. if
13393  stdout is not a TTY).
13394
13395- Issue #8513: os.get_exec_path() supports b'PATH' key and bytes value.
13396  subprocess.Popen() and os._execvpe() support bytes program name. Add
13397  os.supports_bytes_environ flag: True if the native OS type of the environment
13398  is bytes (eg. False on Windows).
13399
13400- Issue #8633: tarfile is now able to read and write archives with "raw" binary
13401  pax headers as described in POSIX.1-2008.
13402
13403- Issue #1285086: Speed up urllib.parse functions: quote, quote_from_bytes,
13404  unquote, unquote_to_bytes.
13405
13406- Issue #8688: Distutils now recalculates MANIFEST every time.
13407
13408- Issue #8477: ssl.RAND_egd() and ssl._test_decode_cert() support str with
13409  surrogates and bytes for the filename.
13410
13411- Issue #8550: Add first class ``SSLContext`` objects to the ssl module.
13412
13413- Issue #8681: Make the zlib module's error messages more informative when the
13414  zlib itself doesn't give any detailed explanation.
13415
13416- The audioop module now supports sound fragments of length greater than 2**31
13417  bytes on 64-bit machines, and is PY_SSIZE_T_CLEAN.
13418
13419- Issue #4972: Add support for the context management protocol to the ftplib.FTP
13420  class.
13421
13422- Issue #8664: In py_compile, create __pycache__ when the compiled path is
13423  given.
13424
13425- Issue #8514: Add os.fsencode() function (Unix only): encode a string to bytes
13426  for use in the file system, environment variables or the command line.
13427
13428- Issue #8571: Fix an internal error when compressing or decompressing a chunk
13429  larger than 1GB with the zlib module's compressor and decompressor objects.
13430
13431- Issue #8603: Support bytes environmental variables on Unix: Add os.environb
13432  mapping and os.getenvb() function. os.unsetenv() encodes str argument to the
13433  file system encoding with the surrogateescape error handler (instead of
13434  utf8/strict) and accepts bytes. posix.environ keys and values are now bytes.
13435
13436- Issue #8573: asyncore _strerror() function might throw ValueError.
13437
13438- Issue #8483: asyncore.dispatcher's __getattr__ method produced confusing error
13439  messages when accessing undefined class attributes because of the cheap
13440  inheritance with the underlying socket object.  The cheap inheritance has been
13441  deprecated.
13442
13443- Issue #4265: shutil.copyfile() was leaking file descriptors when disk fills.
13444  Patch by Tres Seaver.
13445
13446- Issue #8390: tarfile uses surrogateescape as the default error handler
13447  (instead of replace in read mode or strict in write mode).
13448
13449- Issue #7755: Use an unencumbered audio file for tests.
13450
13451- Issue #8621: uuid.uuid4() returned the same sequence of values in the parent
13452  and any children created using ``os.fork`` on MacOS X 10.6.
13453
13454- Issue #8567: Fix precedence of signals in Decimal module: when a Decimal
13455  operation raises multiple signals and more than one of those signals is
13456  trapped, the specification determines the order in which the signals should be
13457  handled.  In many cases this order wasn't being followed, leading to the wrong
13458  Python exception being raised.
13459
13460- Issue #7865: The close() method of ``io`` objects should not swallow
13461  exceptions raised by the implicit flush().  Also qensure that calling close()
13462  several times is supported.  Patch by Pascal Chambon.
13463
13464- Issue #4687: Fix accuracy of garbage collection runtimes displayed with
13465  gc.DEBUG_STATS.
13466
13467- Issue #8354: The siginterrupt setting is now preserved for all signals, not
13468  just SIGCHLD.
13469
13470- Issue #7192: webbrowser.get("firefox") now works on Mac OS X, as does
13471  webbrowser.get("safari").
13472
13473- Issue #8464: tarfile no longer creates files with execute permissions set when
13474  mode="w|" is used.
13475
13476- Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions of
13477  the Linux kernel.  Patch by Yaniv Aknin.
13478
13479- Issue #8295: Added shutil.unpack_archive.
13480
13481- Issue #6312: Fixed http HEAD request when the transfer encoding is chunked.
13482  It should correctly return an empty response now.
13483
13484- Issue #8546: Reject None given as the buffering argument to _pyio.open.
13485
13486- Issue #8549: Fix compiling the _ssl extension under AIX.  Patch by
13487  Sridhar Ratnakumar.
13488
13489- Issue #6656: fix locale.format_string to handle escaped percents
13490  and mappings.
13491
13492- Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown, where
13493  the method could block indefinitely if called just before the event loop
13494  started running.  This also fixes the occasional freezes witnessed in
13495  test_httpservers.
13496
13497- Issue #8524: When creating an SSL socket, the timeout value of the original
13498  socket wasn't retained (instead, a socket with a positive timeout would be
13499  turned into a non-blocking SSL socket).
13500
13501- Issue #5103: SSL handshake would ignore the socket timeout and block
13502  indefinitely if the other end didn't respond.
13503
13504- The do_handshake() method of SSL objects now adjusts the blocking mode of the
13505  SSL structure if necessary (as other methods already do).
13506
13507- Issue #8391: os.execvpe() and os.getenv() supports unicode with surrogates and
13508  bytes strings for environment keys and values.
13509
13510- Issue #8467: Pure Python implementation of subprocess encodes the error
13511  message using surrogatepass error handler to support surrogates in the
13512  message.
13513
13514- Issue #8468: bz2.BZ2File() accepts str with surrogates and bytes filenames.
13515
13516- Issue #8451: Syslog module now uses basename(sys.argv[0]) instead of the
13517  string "python" as the *ident*.  openlog() arguments are all optional and
13518  keywords.
13519
13520- Issue #8108: Fix the unwrap() method of SSL objects when the socket has a
13521  non-infinite timeout.  Also make that method friendlier with applications
13522  wanting to continue using the socket in clear-text mode, by disabling
13523  OpenSSL's internal readahead.  Thanks to Darryl Miles for guidance.
13524
13525- Issue #8496: make mailcap.lookup() always return a list, rather than an
13526  iterator.  Patch by Gregory Nofi.
13527
13528- Issue #8195: Fix a crash in sqlite Connection.create_collation() if the
13529  collation name contains a surrogate character.
13530
13531- Issue #8484: Load all ciphers and digest algorithms when initializing the _ssl
13532  extension, such that verification of some SSL certificates doesn't fail
13533  because of an "unknown algorithm".
13534
13535- Issue #6547: Added the ignore_dangling_symlinks option to shutil.copytree.
13536
13537- Issue #1540112: Now allowing the choice of a copy function in shutil.copytree.
13538
13539- Issue #4814: timeout parameter is now applied also for connections resulting
13540  from PORT/EPRT commands.
13541
13542- Issue #8463: added missing reference to bztar in shutil's documentation.
13543
13544- Issue #7154: urllib.request can now detect the proxy settings on OSX 10.6 (as
13545  long as the user didn't specify 'automatic proxy configuration').
13546
13547- Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response code
13548  as stated in RFC-959 at chapter 5.4.
13549
13550- Issue #8394: _ctypes.dlopen() accepts bytes, bytearray and str with
13551  surrogates.
13552
13553- Issue #850728: Add a *timeout* parameter to the `acquire()` method of
13554  `threading.Semaphore` objects.  Original patch by Torsten Landschoff.
13555
13556- Issue #8322: Add a *ciphers* argument to SSL sockets, so as to change the
13557  available cipher list.  Helps fix test_ssl with OpenSSL 1.0.0.
13558
13559- Issue #8393: subprocess accepts bytes, bytearray and str with surrogates for
13560  the current working directory.
13561
13562- Issue #7606: XML-RPC traceback stored in X-traceback is now encoded to ASCII
13563  using backslashreplace error handler.
13564
13565- Issue #8412: os.system() now accepts bytes, bytearray and str with surrogates.
13566
13567- Issue #2987: RFC2732 support for urlparse (IPv6 addresses). Patch by Tony
13568  Locke and Hans Ulrich Niedermann.
13569
13570- Issue #5277: Fix quote counting when parsing RFC 2231 encoded parameters.
13571
13572- Issue #7316: The acquire() method of lock objects in the ``threading``
13573  module now takes an optional timeout argument in seconds.  Timeout support
13574  relies on the system threading library, so as to avoid a semi-busy wait loop.
13575
13576- Issue #8383: pickle and pickletools use surrogatepass error handler when
13577  encoding unicode as utf8 to support lone surrogates and stay compatible with
13578  Python 2.x and 3.x.
13579
13580- Issue #7585: difflib context and unified diffs now place a tab between
13581  filename and date, conforming to the 'standards' they were originally designed
13582  to follow.  This improves compatibility with patch tools.
13583
13584- Issue #7472: Fixed typo in email.encoders module; messages using ISO-2022
13585  character sets will now consistently use a Content-Transfer-Encoding of 7bit
13586  rather than sometimes being marked as 8bit.
13587
13588- Issue #8375: test_distutils now checks if the temporary directory are still
13589  present before it cleans them.
13590
13591- Issue #8374: Update the internal alias table in the ``locale`` module to
13592  cover recent locale changes and additions.
13593
13594- Issue #8321: Give access to OpenSSL version numbers from the `ssl` module,
13595  using the new attributes `ssl.OPENSSL_VERSION`, `ssl.OPENSSL_VERSION_INFO` and
13596  `ssl.OPENSSL_VERSION_NUMBER`.
13597
13598- Add functools.total_ordering() and functools.cmp_to_key().
13599
13600- Issue #8257: The Decimal construct now accepts a float instance directly,
13601  converting that float to a Decimal of equal value:
13602
13603     >>> Decimal(1.1)
13604     Decimal('1.100000000000000088817841970012523233890533447265625')
13605
13606- Issue #8294: The Fraction constructor now accepts Decimal and float instances
13607  directly.
13608
13609- Issue #7279: Comparisons involving a Decimal signaling NaN now signal
13610  InvalidOperation instead of returning False.  (Comparisons involving a quiet
13611  NaN are unchanged.)  Also, Decimal quiet NaNs are now hashable; Decimal
13612  signaling NaNs remain unhashable.
13613
13614- Issue #2531: Comparison operations between floats and Decimal instances now
13615  return a result based on the numeric values of the operands; previously they
13616  returned an arbitrary result based on the relative ordering of id(float) and
13617  id(Decimal).  See also issue #8188, which adds Decimal-to-Fraction
13618  comparisons.
13619
13620- Added a subtract() method to collections.Counter().
13621
13622- Issue #8233: When run as a script, py_compile.py optionally takes a single
13623  argument `-` which tells it to read files to compile from stdin.  Each line is
13624  read on demand and the named file is compiled immediately.  (Original patch by
13625  Piotr Ożarowski).
13626
13627- Backwards incompatible change: Unicode codepoints line tabulation (0x0B) and
13628  form feed (0x0C) are now considered linebreaks, as specified in Unicode
13629  Standard Annex #14.  See issue #7643.  http://www.unicode.org/reports/tr14/
13630
13631- Comparisons using one of <, <=, >, >= between a complex instance and a
13632  Fractions instance now raise TypeError instead of returning True/False.  This
13633  makes Fraction <=> complex comparisons consistent with int <=> complex, float
13634  <=> complex, and complex <=> complex comparisons.
13635
13636- Issue #8139: ossaudiodev didn't initialize its types properly, therefore some
13637  methods (such as oss_mixer_device.fileno()) were not available.  Initial patch
13638  by Bertrand Janin.
13639
13640- Issue #8205: Remove the "Modules" directory from sys.path when Python is
13641  running from the build directory (POSIX only).
13642
13643- Issue #7512: shutil.copystat() could raise an OSError when the filesystem
13644  didn't support chflags() (for example ZFS under FreeBSD).  The error is now
13645  silenced.
13646
13647- Issue #7860: platform.uname now reports the correct 'machine' type when Python
13648  is running in WOW64 mode on 64 bit Windows.
13649
13650- Issue #3890, #8222: Fix recv() and recv_into() on non-blocking SSL sockets.
13651  Also, enable the SSL_MODE_AUTO_RETRY flag on SSL sockets, so that blocking
13652  reads and writes are always retried by OpenSSL itself.
13653
13654- Issue #4282: Fix the main function of the profile module for a non-ASCII
13655  script, open the file in binary mode and not in text mode with the default
13656  (utf8) encoding.
13657
13658- Issue #8179: Fix macpath.realpath() on a non-existing path.
13659
13660- Issue #8024: Update the Unicode database to 5.2.
13661
13662- Issue #8168: py_compile now handles files with utf-8 BOMS.
13663
13664- ``tokenize.detect_encoding`` now returns ``'utf-8-sig'`` when a UTF-8 BOM is
13665  detected.
13666
13667- Issue #6716/2: Backslash-replace error output in compilall.
13668
13669- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox
13670  with Tcl/Tk-8.5.
13671
13672- Issue #8140: extend compileall to compile single files.  Add -i option.
13673
13674- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of the
13675  locale.
13676
13677- The internals of the subprocess module on POSIX systems have been replaced by
13678  an extension module (_posixsubprocess) so that the fork()+exec() can be done
13679  safely without the possibility of deadlock in multithreaded applications.
13680
13681- subprocess.Popen now has restore_signals and start_new_session features.  The
13682  default of restore_signals=True is a new behavior compared to earlier Python
13683  versions.  This means that signals such as SIGPIPE are not ignored by default
13684  in subprocesses launched by Python (Issue #1652).
13685
13686- Issue #6472: The xml.etree package is updated to ElementTree 1.3.  The
13687  cElementTree module is updated too.
13688
13689- Issue #7774: Set sys.executable to an empty string if argv[0] has been set to
13690  a non existent program name and Python is unable to retrieve the real program
13691  name.
13692
13693- Issue #7880: Fix sysconfig when the python executable is a symbolic link.
13694
13695- Issue #6509: fix re.sub to work properly when the pattern, the string, and the
13696  replacement were all bytes.  Patch by Antoine Pitrou.
13697
13698- The sqlite3 module was updated to pysqlite 2.6.0. This fixes several obscure
13699  bugs and allows loading SQLite extensions from shared libraries.
13700
13701- Issue #1054943: Fix ``unicodedata.normalize('NFC', text)`` for the Public
13702  Review Issue #29 (http://unicode.org/review/pr-29.html).
13703
13704- Issue #7494: fix a crash in _lsprof (cProfile) after clearing the profiler,
13705  reset also the pointer to the current pointer context.
13706
13707- Issue #7232: Add support for the context management protocol to the TarFile
13708  class.
13709
13710- Issue #7250: Fix info leak of os.environ across multi-run uses of
13711  wsgiref.handlers.CGIHandler.
13712
13713- Issue #1729305: Fix doctest to handle encode error with "backslashreplace".
13714
13715- Issue #691291: codecs.open() should not convert end of lines on reading and
13716  writing.
13717
13718- Issue #7869: logging: improved diagnostic for format-time errors.
13719
13720- Issue #7868: logging: added loggerClass attribute to Manager.
13721
13722- logging: Implemented PEP 391.
13723
13724- Issue #1537721: Add a writeheader() method to csv.DictWriter.
13725
13726- Issue #7959: ctypes callback functions are now registered correctly with the
13727  cycle garbage collector.
13728
13729- Issue #5801: removed spurious empty lines in wsgiref.
13730
13731- Issue #6666: fix bug in trace.py that applied the list of directories to be
13732  ignored only to the first file.  Noted by Bogdan Opanchuk.
13733
13734- Issue #7597: curses.use_env() can now be called before initscr().  Noted by
13735  Kan-Ru Chen.
13736
13737- Issue #7310: fix the __repr__ of os.environ to show the environment variables.
13738
13739- Issue #7970: email.Generator.flatten now correctly flattens message/rfc822
13740  messages parsed by email.Parser.HeaderParser.
13741
13742- Issue #7361: Importlib was not properly checking the number of bytes in
13743  bytecode file when it was less than 8 bytes.
13744
13745- Issue #7633: In the decimal module, Context class methods (with the exception
13746  of canonical and is_canonical) now accept instances of int and long wherever a
13747  Decimal instance is accepted, and implicitly convert that argument to Decimal.
13748  Previously only some arguments were converted.
13749
13750- Issue #7835: shelve should no longer produce mysterious warnings during
13751  interpreter shutdown.
13752
13753- Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">") in XML
13754  processing instructions and comments.  These raw characters are allowed by the
13755  XML specification, and are necessary when outputting e.g.  PHP code in a
13756  processing instruction.  Patch by Neil Muller.
13757
13758- Issue #6233: ElementTree failed converting unicode characters to XML entities
13759  when they could't be represented in the requested output encoding.  Patch by
13760  Jerry Chen.
13761
13762- Issue #6003: add an argument to ``zipfile.Zipfile.writestr`` to specify the
13763  compression type.
13764
13765- Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is
13766  specified, rather than fall through to AF_PACKET (in the `socket` module).
13767  Also, raise ValueError rather than TypeError when an unknown TIPC address type
13768  is specified.  Patch by Brian Curtin.
13769
13770- Issue #6939: Fix file I/O objects in the `io` module to keep the original file
13771  position when calling `truncate()`.  It would previously change the file
13772  position to the given argument, which goes against the tradition of
13773  ftruncate() and other truncation APIs.  Patch by Pascal Chambon.
13774
13775- Issue #7610: Reworked implementation of the internal
13776  ``zipfile.ZipExtFile`` class used to represent files stored inside an
13777  archive.  The new implementation is significantly faster and can be wrapped in
13778  an ``io.BufferedReader`` object for more speedups.  It also solves an
13779  issue where interleaved calls to `read()` and `readline()` give wrong results.
13780  Patch by Nir Aides.
13781
13782- Issue #6963: Added "maxtasksperchild" argument to multiprocessing.Pool,
13783  allowing for a maximum number of tasks within the pool to be completed by the
13784  worker before that worker is terminated, and a new one created to replace it.
13785
13786- Issue #7792: Registering non-classes to ABCs raised an obscure error.
13787
13788- Issue #7785: Don't accept bytes in FileIO.write().
13789
13790- Removed the functions 'verify' and 'vereq' from Lib/test/support.py.
13791
13792- Issue #7773: Fix an UnboundLocalError in platform.linux_distribution() when
13793  the release file is empty.
13794
13795- Issue #7561: Fix crashes when using bytearray objects with the posix
13796  module.
13797
13798- Issue #1670765: Prevent email.generator.Generator from re-wrapping headers in
13799  multipart/signed MIME parts, which fixes one of the sources of invalid
13800  modifications to such parts by Generator.
13801
13802- Issue #7703: Add support for the new buffer API to `binascii.a2bhqx`.  Patch
13803  by Florent Xicluna, along with some additional tests.
13804
13805- Issue #7701: Fix crash in binascii.b2a_uu() in debug mode when given a 1-byte
13806  argument.  Patch by Victor Stinner.
13807
13808- Issue #3299: Fix possible crash in the _sre module when given bad argument
13809  values in debug mode.  Patch by Victor Stinner.
13810
13811- Issue #2846: Add support for gzip.GzipFile reading zero-padded files.  Patch
13812  by Brian Curtin.
13813
13814- Issue #7681: Use floor division in appropriate places in the wave module.
13815
13816- Issue #5372: Drop the reuse of .o files in Distutils' ccompiler (since
13817  Extension extra options may change the output without changing the .c
13818  file). Initial patch by Collin Winter.
13819
13820- Issue #7617: Make sure distutils.unixccompiler.UnixCCompiler recognizes gcc
13821  when it has a fully qualified configuration prefix. Initial patch by Arfrever.
13822
13823- Issue #7105: Make WeakKeyDictionary and WeakValueDictionary robust against the
13824  destruction of weakref'ed objects while iterating.
13825
13826- Issue #7455: Fix possible crash in cPickle on invalid input.  Patch by Victor
13827  Stinner.
13828
13829- Issue #1628205: Socket file objects returned by socket.socket.makefile() now
13830  properly handles EINTR within the read, readline, write & flush methods.  The
13831  socket.sendall() method now properly handles interrupted system calls.
13832
13833- Issue #7471: Improve the performance of GzipFile's buffering mechanism, and
13834  make it implement the `io.BufferedIOBase` ABC to allow for further speedups by
13835  wrapping it in an `io.BufferedReader`.  Patch by Nir Aides.
13836
13837- Issue #3972: http.client.HTTPConnection now accepts an optional source_address
13838  parameter to allow specifying where your connections come from.
13839
13840- socket.create_connection now accepts an optional source_address parameter.
13841
13842- Issue #5511: now zipfile.ZipFile can be used as a context manager.  Initial
13843  patch by Brian Curtin.
13844
13845- Issue #7556: Make sure Distutils' msvc9compile reads and writes the MSVC XML
13846  Manifest file in text mode so string patterns can be used in regular
13847  expressions.
13848
13849- Issue #7552: Removed line feed in the base64 Authorization header in the
13850  Distutils upload command to avoid an error when PyPI reads it.  This occurs on
13851  long passwords. Initial patch by JP St. Pierre.
13852
13853- Issue #7231: urllib2 cannot handle https with proxy requiring auth.  Patch by
13854  Tatsuhiro Tsujikawa.
13855
13856- Issue #4757: `zlib.compress` and other methods in the zlib module now raise a
13857  TypeError when given an `str` object (rather than a `bytes`-like object).
13858  Patch by Victor Stinner and Florent Xicluna.
13859
13860- Issue #7349: Make methods of file objects in the io module accept None as an
13861  argument where file-like objects (ie StringIO and BytesIO) accept them to mean
13862  the same as passing no argument.
13863
13864- Issue #7357: tarfile no longer suppresses fatal extraction errors by default.
13865
13866- Issue #5949: added check for correct lineends in input from IMAP server in
13867  imaplib.
13868
13869- Add count() and reverse() methods to collections.deque().
13870
13871- Fix variations of extending deques:  d.extend(d)  d.extendleft(d)  d+=d
13872
13873- Issue #6986: Fix crash in the JSON C accelerator when called with the wrong
13874  parameter types.  Patch by Victor Stinner.
13875
13876- Issue #7457: added a read_pkg_file method to
13877  distutils.dist.DistributionMetadata.
13878
13879- logging: Added optional `secure` parameter to SMTPHandler, to enable use of
13880  TLS with authentication credentials.
13881
13882- Issue #1923: Fixed the removal of meaningful spaces when PKG-INFO is generated
13883  in Distutils.  Patch by Stephen Emslie.
13884
13885- Issue #4120: Drop reference to CRT from manifest when building extensions with
13886  msvc9compiler.
13887
13888- Issue #7333: The `posix` module gains an `initgroups()` function providing
13889  access to the initgroups(3) C library call on Unix systems which implement it.
13890  Patch by Jean-Paul Calderone.
13891
13892- Issue #7408: Fixed distutils.tests.sdist so it doesn't check for group
13893  ownership when the group is not forced, because the group may be different
13894  from the user's group and inherit from its container when the test is run.
13895
13896- Issue #4486: When an exception has an explicit cause, do not print its
13897  implicit context too.  This affects the `traceback` module as well as built-in
13898  exception printing.
13899
13900- Issue #1515: Enable use of deepcopy() with instance methods.  Patch by Robert
13901  Collins.
13902
13903- Issue #7403: logging: Fixed possible race condition in lock creation.
13904
13905- Issue #6845: Add restart support for binary upload in ftplib.  The
13906  `storbinary()` method of FTP and FTP_TLS objects gains an optional `rest`
13907  argument.  Patch by Pablo Mouzo.
13908
13909- Issue #5788: `datetime.timedelta` objects get a new `total_seconds()` method
13910  returning the total number of seconds in the duration.  Patch by Brian
13911  Quinlan.
13912
13913- Issue #7133: SSL objects now support the new buffer API.
13914
13915- Issue #1488943: difflib.Differ() doesn't always add hints for tab characters.
13916
13917- Issue #6123: tarfile now opens empty archives correctly and consistently
13918  raises ReadError on empty files.
13919
13920- Issue #7354: distutils.tests.test_msvc9compiler - dragfullwindows can be 2.
13921
13922- Issue #5037: Proxy the __bytes__ special method instead to __bytes__ instead
13923  of __str__.
13924
13925- Issue #7341: Close the internal file object in the TarFile constructor in case
13926  of an error.
13927
13928- Issue #7293: distutils.test_msvc9compiler is fixed to work on any fresh
13929  Windows box. Help provided by David Bolen.
13930
13931- Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP using TLS
13932  or SSL.  Patch by Giampaolo Rodola'.
13933
13934- Issue #7328: pydoc no longer corrupts sys.path when run with the '-m' switch.
13935
13936- Issue #4969: The mimetypes module now reads the MIME database from the
13937  registry under Windows.  Patch by Gabriel Genellina.
13938
13939- Issue #6816: runpy now provides a run_path function that allows Python code to
13940  execute file paths that refer to source or compiled Python files as well as
13941  zipfiles, directories and other valid sys.path entries that contain a
13942  __main__.py file.  This allows applications that run other Python scripts to
13943  support the same flexibility as the CPython command line itself.
13944
13945- Issue #7318: multiprocessing now uses a timeout when it fails to establish a
13946  connection with another process, rather than looping endlessly.  The default
13947  timeout is 20 seconds, which should be amply sufficient for local connections.
13948
13949- Issue #7197: Allow unittest.TextTestRunner objects to be pickled and
13950  unpickled.  This fixes crashes under Windows when trying to run
13951  test_multiprocessing in verbose mode.
13952
13953- Issue #7893: ``unittest.TextTestResult`` is made public and a ``resultclass``
13954  argument added to the TextTestRunner constructor allowing a different result
13955  class to be used without having to subclass.
13956
13957- Issue #7588: ``unittest.TextTestResult.getDescription`` now includes the test
13958  name in failure reports even if the test has a docstring.
13959
13960- Issue #3001: Add a C implementation of recursive locks which is used by
13961  default when instantiating a `threading.RLock` object. This makes recursive
13962  locks as fast as regular non-recursive locks (previously, they were slower by
13963  10x to 15x).
13964
13965- Issue #7282: Fix a memory leak when an RLock was used in a thread other than
13966  those started through `threading.Thread` (for example, using
13967  `_thread.start_new_thread()`).
13968
13969- Issue #7187: Importlib would not silence the IOError raised when trying to
13970  write new bytecode when it was made read-only.
13971
13972- Issue #7264: Fix a possible deadlock when deallocating thread-local objects
13973  which are part of a reference cycle.
13974
13975- Issue #7211: Allow 64-bit values for the `ident` and `data` fields of kevent
13976  objects on 64-bit systems.  Patch by Michael Broghton.
13977
13978- Issue #6896: mailbox.Maildir now invalidates its internal cache each time a
13979  modification is done through it.  This fixes inconsistencies and test failures
13980  on systems with slightly bogus mtime behaviour.
13981
13982- Issue #7246 & Issue #7208: getpass now properly flushes input before reading
13983  from stdin so that existing input does not confuse it and lead to incorrect
13984  entry or an IOError.  It also properly flushes it afterwards to avoid the
13985  terminal echoing the input afterwards on OSes such as Solaris.
13986
13987- Issue #7233: Fix a number of two-argument Decimal methods to make sure that
13988  they accept an int or long as the second argument.  Also fix buggy handling of
13989  large arguments (those with coefficient longer than the current precision) in
13990  shift and rotate.
13991
13992- Issue #4750: Store the basename of the original filename in the gzip FNAME
13993  header as required by RFC 1952.
13994
13995- Issue #1180: Added a new global option to ignore ~/.pydistutils.cfg in
13996  Distutils.
13997
13998- Issue #7218: Fix test_site for win32, the directory comparison was done with
13999  an uppercase.
14000
14001- Issue #7205: Fix a possible deadlock when using a BZ2File object from
14002  several threads at once.
14003
14004- Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424.
14005
14006- Issue #7099: Decimal.is_normal now returns True for numbers with exponent
14007  larger than emax.
14008
14009- Issue #7080: locale.strxfrm() raises a MemoryError on 64-bit non-Windows
14010  platforms, and assorted locale fixes by Derk Drukker.
14011
14012- Issue #5833: Fix extra space character in readline completion with the GNU
14013  readline library version 6.0.
14014
14015- Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment.
14016
14017- Issue #7086: Added TCP support to SysLogHandler, and tidied up some
14018  anachronisms in the code which were a relic of 1.5.2 compatibility.
14019
14020- Issue #7082: When falling back to the MIME 'name' parameter, the correct place
14021  to look for it is the Content-Type header.
14022
14023- Make tokenize.detect_coding() normalize utf-8 and iso-8859-1 variants like the
14024  builtin tokenizer.
14025
14026- Issue #7048: Force Decimal.logb to round its result when that result is too
14027  large to fit in the current precision.
14028
14029- Issue #6236, #6348: Fix various failures in the I/O library under AIX and
14030  other platforms, when using a non-gcc compiler. Patch by Derk Drukker.
14031
14032- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...)  does now
14033  always result in NULL.
14034
14035- Issue #5042: Structure sub-subclass does now initialize correctly with base
14036  class positional arguments.
14037
14038- Issue #6882: Import uuid creates zombies processes.
14039
14040- Issue #6635: Fix profiler printing usage message.
14041
14042- Issue #6856: Add a filter keyword argument to TarFile.add().
14043
14044- Issue #6888: pdb's alias command was broken when no arguments were given.
14045
14046- Issue #6857: Default format() alignment should be '>' for Decimal instances.
14047
14048- Issue #6795: int(Decimal('nan')) now raises ValueError instead of returning
14049  NaN or raising InvalidContext.  Also, fix infinite recursion in
14050  long(Decimal('nan')).
14051
14052- Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no
14053  type specifier.
14054
14055- Issue #6239: ctypes.c_char_p return value must return bytes.
14056
14057- Issue #6838: Use a list to accumulate the value instead of repeatedly
14058  concatenating strings in http.client's HTTPResponse._read_chunked providing a
14059  significant speed increase when downloading large files servend with a
14060  Transfer-Encoding of 'chunked'.
14061
14062- Trying to import a submodule from a module that is not a package, ImportError
14063  should be raised, not AttributeError.
14064
14065- When the globals past to importlib.__import__() has __package__ set to None,
14066  fall back to computing what __package__ should be instead of giving up.
14067
14068- Raise a TypeError when the name of a module to be imported for
14069  importlib.__import__ is not a string (was raising an AttributeError before).
14070
14071- Allow the fromlist passed into importlib.__import__ to be any iterable.
14072
14073- Have importlib raise ImportError if None is found in sys.modules.
14074
14075- Issue #6054: Do not normalize stored pathnames in tarfile.
14076
14077- Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN
14078  payloads are now ordered by integer value rather than lexicographically.
14079
14080- Issue #1356969: Add missing info methods in tix.HList.
14081
14082- Issue #1522587: New constants and methods for the tix.Grid widget.
14083
14084- Issue #1250469: Fix the return value of tix.PanedWindow.panes.
14085
14086- Issue #1119673: Do not override tkinter.Text methods when creating a
14087  ScrolledText.
14088
14089- Issue #6665: Fix fnmatch to properly match filenames with newlines in them.
14090
14091- Issue #1135: Add the XView and YView mix-ins to avoid duplicating the xview*
14092  and yview* methods.
14093
14094- Issue #6629: Fix a data corruption issue in the new I/O library, which could
14095  occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or
14096  "wb+" mode) after having buffered a certain amount of data for reading. This
14097  bug was not present in the pure Python implementation.
14098
14099- Issue #6622: Fix "local variable 'secret' referenced before assignment" bug in
14100  POP3.apop.
14101
14102- Issue #2715: Remove remnants of Carbon.File from binhex module.
14103
14104- Issue #6595: The Decimal constructor now allows arbitrary Unicode decimal
14105  digits in input, as recommended by the standard.  Previously it was restricted
14106  to accepting [0-9].
14107
14108- Issue #6106: telnetlib.Telnet.process_rawq doesn't handle default WILL/WONT
14109  DO/DONT correctly.
14110
14111- Issue #1424152: Fix for http.client, urllib.request to support SSL while
14112  working through proxy.  Original patch by Christopher Li, changes made by
14113  Senthil Kumaran.
14114
14115- Add importlib.abc.ExecutionLoader to represent the PEP 302 protocol for
14116  loaders that allow for modules to be executed. Both importlib.abc.PyLoader and
14117  PyPycLoader inherit from this class and provide implementations in relation to
14118  other methods required by the ABCs.
14119
14120- importlib.abc.PyLoader did not inherit from importlib.abc.ResourceLoader like
14121  the documentation said it did even though the code in PyLoader relied on the
14122  abstract method required by ResourceLoader.
14123
14124- Issue #6431: Make Fraction type return NotImplemented when it doesn't know how
14125  to handle a comparison without loss of precision.  Also add correct handling
14126  of infinities and nans for comparisons with float.
14127
14128- Issue #6415: Fixed warnings.warn segfault on bad formatted string.
14129
14130- Issue #6358: The exit status of a command started with os.popen() was reported
14131  differently than it did with python 2.x.
14132
14133- Issue #6323: The pdb debugger did not exit when running a script with a syntax
14134  error.
14135
14136- Issue #3392: The subprocess communicate() method no longer fails in select()
14137  when file descriptors are large; communicate() now uses poll() when possible.
14138
14139- Issue #6369: Fix an RLE decompression bug in the binhex module.
14140
14141- Issue #6344: Fixed a crash of mmap.read() when passed a negative argument.
14142
14143- The deprecated function string.maketrans has been removed.
14144
14145- Issue #4005: Fixed a crash of pydoc when there was a zip file present in
14146  sys.path.
14147
14148- Issue #6218: io.StringIO and io.BytesIO instances are now picklable.
14149
14150- The os.get_exec_path() function to return the list of directories that will be
14151  searched for an executable when launching a subprocess was added.
14152
14153- Issue #7481: When a threading.Thread failed to start it would leave the
14154  instance stuck in initial state and present in threading.enumerate().
14155
14156- Issue #1068268: The subprocess module now handles EINTR in internal os.waitpid
14157  and os.read system calls where appropriate.
14158
14159- Issue #6729: Added ctypes.c_ssize_t to represent ssize_t.
14160
14161- Issue #6247: The argparse module has been added to the standard library.
14162
14163- Issue #8235: _socket: Add the constant ``SO_SETFIB``.  SO_SETFIB is a socket
14164  option available on FreeBSD 7.1 and newer.
14165
14166- Issue #9315: Fix for the trace module to record correct class name
14167  for tracing methods.
14168
14169Extension Modules
14170-----------------
14171
14172- Issue #9959: Tweak formula used for computing math.log of an integer,
14173  making it marginally more accurate for exact powers of 2.
14174
14175- Issue #9422: Fix memory leak when re-initializing a struct.Struct object.
14176
14177- Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly
14178  compared to other unix systems. In particular, os.getgroups() does not reflect
14179  any changes made using os.setgroups() but basically always returns the same
14180  information as the id command. os.getgroups() can now return more than 16
14181  groups on MacOSX.
14182
14183- Issue #6095: Make directory argument to os.listdir optional.
14184
14185- Issue #9277: Fix bug in struct.pack for bools in standard mode (e.g.,
14186  struct.pack('>?')): if conversion to bool raised an exception then that
14187  exception wasn't properly propagated on machines where char is unsigned.
14188
14189- Issue #5180: Fixed a bug that prevented loading 2.x pickles in 3.x python when
14190  they contain instances of old-style classes.
14191
14192- Issue #9165: Add new functions math.isfinite and cmath.isfinite, to accompany
14193  existing isinf and isnan functions.
14194
14195- Issue #1578269: Implement os.symlink for Windows 6.0+.  Patch by Jason
14196  R. Coombs.
14197
14198- In struct.pack, correctly propagate exceptions from computing the truth of an
14199  object in the '?' format.
14200
14201- Issue #9000: datetime.timezone objects now have eval-friendly repr.
14202
14203- In the math module, correctly lookup __trunc__, __ceil__, and __floor__ as
14204  special methods.
14205
14206- Issue #9005: Prevent utctimetuple() from producing year 0 or year 10,000.
14207  Prior to this change, timezone adjustment in utctimetuple() could produce
14208  tm_year value of 0 or 10,000.  Now an OverflowError is raised in these edge
14209  cases.
14210
14211- Issue #6641: The ``datetime.strptime`` method now supports the ``%z``
14212  directive.  When the ``%z`` directive is present in the format string, an
14213  aware ``datetime`` object is returned with ``tzinfo`` bound to a
14214  ``datetime.timezone`` instance constructed from the parsed offset.  If both
14215  ``%z`` and ``%Z`` are present, the data in ``%Z`` field is used for timezone
14216  name, but ``%Z`` data without ``%z`` is discarded.
14217
14218- Issue #5094: The ``datetime`` module now has a simple concrete class
14219  implementing ``datetime.tzinfo`` interface.  Instances of the new class,
14220  ``datetime.timezone``, return fixed name and UTC offset from their
14221  ``tzname(dt)`` and ``utcoffset(dt)`` methods.  The ``dst(dt)`` method always
14222  returns ``None``.  A class attribute, ``utc`` contains an instance
14223  representing the UTC timezone.  Original patch by Rafe Kaplan.
14224
14225- Issue #8973: Add __all__ to struct module; this ensures that help(struct)
14226  includes documentation for the struct.Struct class.
14227
14228- Issue #3129: Trailing digits in struct format string are no longer ignored.
14229  For example, "1" or "ilib123" are now invalid formats and cause
14230  ``struct.error`` to be raised.  Patch by Caleb Deveraux.
14231
14232- Issue #7384: If the system readline library is linked against ncurses, the
14233  curses module must be linked against ncurses as well. Otherwise it is not safe
14234  to load both the readline and curses modules in an application.
14235
14236- Issue #2810: Fix cases where the Windows registry API returns ERROR_MORE_DATA,
14237  requiring a re-try in order to get the complete result.
14238
14239- Issue #8692: Optimize math.factorial: replace the previous naive algorithm
14240  with an improved 'binary-split' algorithm that uses fewer multiplications and
14241  allows many of the multiplications to be performed using plain C integer
14242  arithmetic instead of PyLong arithmetic.  Also uses a lookup table for small
14243  arguments.
14244
14245- Issue #8674: Fixed a number of incorrect or undefined-behaviour-inducing
14246  overflow checks in the audioop module.
14247
14248- Issue #8644: The accuracy of td.total_seconds() has been improved (by
14249  calculating with integer arithmetic instead of float arithmetic internally):
14250  the result is now always correctly rounded, and is equivalent to ``td /
14251  timedelta(seconds=1)``.
14252
14253- Issue #2706: Allow division of a timedelta by another timedelta: timedelta /
14254  timedelta, timedelta % timedelta, timedelta // timedelta and divmod(timedelta,
14255  timedelta) are all supported.
14256
14257- Issue #8314: Fix unsigned long long bug in libffi on Sparc v8.
14258
14259- Issue #8300: When passing a non-integer argument to struct.pack with any
14260  integer format code, struct.pack first attempts to convert the non-integer
14261  using its __index__ method.  If that method is non-existent or raises
14262  TypeError it goes on to try the __int__ method, as described below.
14263
14264- Issue #8142: Update libffi to the 3.0.9 release.
14265
14266- Issue #6949: Allow the _dbm extension to be built with db 4.8.x.
14267
14268- Issue #6544: Fix a reference leak in the kqueue implementation's error
14269  handling.
14270
14271- Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as
14272  msvcr100.dll is not a platform assembly anymore.
14273
14274- Issue #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}.
14275
14276- Issue #7078: Set struct.__doc__ from _struct.__doc__.
14277
14278- Issue #3366: Add erf, erfc, expm1, gamma, lgamma functions to math module.
14279
14280- Issue #6877: It is now possible to link the readline extension to the libedit
14281  readline emulation on OSX 10.5 or later.
14282
14283- Issue #6848: Fix curses module build failure on OS X 10.6.
14284
14285- Fix a segfault that could be triggered by expat with specially formed input.
14286
14287- Issue #6561: '\d' in a regex now matches only characters with Unicode category
14288  'Nd' (Number, Decimal Digit).  Previously it also matched characters with
14289  category 'No'.
14290
14291- Issue #4509: Array objects are no longer modified after an operation failing
14292  due to the resize restriction in-place when the object has exported buffers.
14293
14294- Issue #2389: Array objects are now pickled in a portable manner.
14295
14296- Expat: Fix DoS via XML document with malformed UTF-8 sequences
14297  (CVE_2009_3560).
14298
14299- Issue #7242: On Solaris 9 and earlier calling os.fork() from within a thread
14300  could raise an incorrect RuntimeError about not holding the import lock.  The
14301  import lock is now reinitialized after fork.
14302
14303- Issue #7999: os.setreuid() and os.setregid() would refuse to accept a -1
14304  parameter on some platforms such as OS X.
14305
14306- Build the ossaudio extension on GNU/kFreeBSD.
14307
14308- Issue #7347: winreg: Add CreateKeyEx and DeleteKeyEx, as well as fix a bug in
14309  the return value of QueryReflectionKey.
14310
14311- Issue #7567: PyCurses_setupterm: Don't call ``setupterm`` twice.
14312
14313Build
14314-----
14315
14316- Use OpenSSL 1.0.0a on Windows.
14317
14318- Issue #9280: Make sharedinstall depend on sharedmods.
14319
14320- Issue #9189: Make a user-specified CFLAGS, CPPFLAGS, or LDFLAGS setting
14321  override the configure and makefile defaults, without deleting options the
14322  user didn't intend to override.  Developers should no longer need to specify
14323  OPT or EXTRA_CFLAGS, although those variables are still present for
14324  backward-compatibility.
14325
14326- Issue #8854: Fix finding Visual Studio 2008 on Windows x64.
14327
14328- Issue #1759169, #8864: Drop _XOPEN_SOURCE on Solaris, define it for
14329  multiprocessing only.
14330
14331- Issue #8625: Turn off optimization in --with-pydebug builds with gcc.
14332  (Optimization was unintentionally turned on in gcc --with-pydebug builds as a
14333  result of the issue #1628484 fix, combined with autoconf's strange choice of
14334  default CFLAGS produced by AC_PROG_CC for gcc.)
14335
14336- Issue #3646: It is now easily possible to install a Python framework into your
14337  home directory on MacOSX, see Mac/README for more information.
14338
14339- Issue #3928: os.mknod() now available in Solaris, also.
14340
14341- Issue #3326: Build Python without -fno-strict-aliasing when the gcc does not
14342  give false warnings.
14343
14344- Issue #1628484: The Makefile doesn't ignore the CFLAGS environment variable
14345  anymore.  It also forwards the LDFLAGS settings to the linker when building a
14346  shared library.
14347
14348- Issue #6716: Quote -x arguments of compileall in MSI installer.  Exclude 2to3
14349  tests from compileall.
14350
14351- Issue #3920, #7903: Define _BSD_SOURCE on OpenBSD 4.4 through 4.9.
14352
14353- Issue #7632: When Py_USING_MEMORY_DEBUGGER is defined, disable the private
14354  memory allocation scheme in dtoa.c and use PyMem_Malloc and PyMem_Free
14355  instead.  Also disable caching of powers of 5.
14356
14357- Issue #6491: Allow --with-dbmliborder to specify that no dbms will be built.
14358
14359- Issue #6943: Use pkg-config to find the libffi headers when the
14360  --with-system-ffi flag is used.
14361
14362- Issue #7609: Add a --with-system-expat option that causes the system's expat
14363  library to be used for the pyexpat module instead of the one included with
14364  Python.
14365
14366- Issue #7589: Only build the nis module when the correct header files are
14367  found.
14368
14369- Switch to OpenSSL 0.9.8l and sqlite 3.6.21 on Windows.
14370
14371- Issue #5792: Extend the short float repr support to x86 systems using
14372  icc or suncc.
14373
14374- Issue #6603: Change READ_TIMESTAMP macro in ceval.c so that it compiles
14375  correctly under gcc on x86-64.  This fixes a reported problem with the
14376  --with-tsc build on x86-64.
14377
14378- Issue #6802: Fix build issues on MacOSX 10.6.
14379
14380- Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6.
14381
14382- Issue #4601: 'make install' did not set the appropriate permissions on
14383  directories.
14384
14385- Issue #5390: Add uninstall icon independent of whether file extensions are
14386  installed.
14387
14388- Issue #7541: When using ``python-config`` with a framework install the
14389  compiler might use the wrong library.
14390
14391- python-config now supports multiple options on the same command line.
14392
14393- Issue #8509: Fix quoting in help strings and code snippets in configure.in.
14394
14395- Issue #8510: Update to autoconf2.65.
14396
14397Documentation
14398-------------
14399
14400- Issue #9817: Add expat COPYING file; add expat, libffi and expat licenses
14401  to Doc/license.rst.
14402
14403- Issue #9524: Document that two CTRL* signals are meant for use only
14404  with os.kill.
14405
14406- Issue #9255: Document that the 'test' package is meant for internal Python use
14407  only.
14408
14409- A small WSGI server was added as Tools/scripts/serve.py, and is used to
14410  implement a local documentation server via 'make serve' in the doc directory.
14411
14412- Updating `Using Python` documentation to include description of CPython's -J
14413  and -X options.
14414
14415- Document that importing a module that has None in sys.modules triggers an
14416  ImportError.
14417
14418- Issue #6556: Fixed the Distutils configuration files location explanation for
14419  Windows.
14420
14421- Update python manual page (options -B, -O0, -s, environment variables
14422  PYTHONDONTWRITEBYTECODE, PYTHONNOUSERSITE).
14423
14424- Issue #8909: Added the size of the bitmap used in the installer created by
14425  distutils' bdist_wininst. Patch by Anatoly Techtonik.
14426
14427Tests
14428-----
14429
14430- Issue #9251: test_threaded_import didn't fail when run through regrtest if the
14431  import lock was disabled.
14432
14433- Issue #8605: Skip test_gdb if Python is compiled with optimizations.
14434
14435- Issue #7449: Skip test_socketserver if threading support is disabled.
14436
14437- Issue #8672: Add a zlib test ensuring that an incomplete stream can be handled
14438  by a decompressor object without errors (it returns incomplete uncompressed
14439  data).
14440
14441- Issue #8533: regrtest uses backslashreplace error handler for stdout to avoid
14442  UnicodeEncodeError (write non-ASCII character to stdout using ASCII encoding).
14443
14444- Issue #8576: Remove use of find_unused_port() in test_smtplib and
14445  test_multiprocessing.  Patch by Paul Moore.
14446
14447- Issue #7449: Fix many tests to support Python compiled without thread
14448  support. Patches written by Jerry Seutter.
14449
14450- Issue #8108: test_ftplib's non-blocking SSL server now has proper handling of
14451  SSL shutdowns.
14452
14453- Issues #8279, #8330, #8437, #8480, #8495: Fix test_gdb failures, patch written
14454  by Dave Malcolm.
14455
14456- Issue #3864: Skip three test_signal tests on freebsd6 because they fail if any
14457  thread was previously started, most likely due to a platform bug.
14458
14459- Issue #8193: Fix test_zlib failure with zlib 1.2.4.
14460
14461- Issue #8248: Add some tests for the bool type.  Patch by Gregory Nofi.
14462
14463- Issue #8263: Now regrtest.py will report a failure if it receives a
14464  KeyboardInterrupt (SIGINT).
14465
14466- Issue #8180 and #8207: Fix test_pep277 on OS X and add more tests for special
14467  Unicode normalization cases.
14468
14469- Issue #7783: test.support.open_urlresource invalidates the outdated files from
14470  the local cache.
14471
14472- Issue #7849: Now the utility ``check_warnings`` verifies if the warnings are
14473  effectively raised.
14474
14475- The four path modules (genericpath, macpath, ntpath, posixpath) share a common
14476  TestCase for some tests: test_genericpath.CommonTest.
14477
14478- Print platform information when running the whole test suite, or using the
14479  --verbose flag.
14480
14481- Issue #767675: enable test_pep277 on POSIX platforms with Unicode-friendly
14482  filesystem encoding.
14483
14484- Issue #6292: for the moment at least, the test suite runs cleanly if python is
14485  run with the -OO flag.  Tests requiring docstrings are skipped.
14486
14487- Issue #7712: test.support gained a new `temp_cwd` context manager which is now
14488  also used by regrtest to run all the tests in a temporary directory.  The
14489  original CWD is saved in `support.SAVEDCWD`.  Thanks to Florent Xicluna who
14490  helped with the patch.
14491
14492- Issue #7924: Fix an intermittent 'XXX undetected error' failure in test_capi
14493  (only seen so far on platforms where the curses module wasn't built), due to
14494  an uncleared exception.
14495
14496- Issue #7728: test_timeout was changed to use support.bind_port instead of a
14497  hard coded port.
14498
14499- Issue #7376: Instead of running a self-test (which was failing) when called
14500  with no arguments, doctest.py now gives a usage message.
14501
14502- Issue #7396: fix regrtest -s, which was broken by the -j enhancement.
14503
14504- Issue #7498: test_multiprocessing now uses test.support.find_unused_port
14505  instead of a hardcoded port number in test_rapid_restart.
14506
14507- Issue #7431: Use TESTFN in test_linecache instead of trying to create a file
14508  in the Lib/test directory, which might be read-only for the user running the
14509  tests.
14510
14511- Issue #7324: Add a sanity check to regrtest argument parsing to catch the case
14512  of an option with no handler.
14513
14514- Issue #7312: Add a -F flag to run the selected tests in a loop until a test
14515  fails.  Can be combined with -j.
14516
14517- Issue #6551: test_zipimport could import and then destroy some modules of the
14518  encodings package, which would make other tests fail further down the road
14519  because the internally cached encoders and decoders would point to empty
14520  global variables.
14521
14522- Issue #7295: Do not use a hardcoded file name in test_tarfile.
14523
14524- Issue #7270: Add some dedicated unit tests for multi-thread synchronization
14525  primitives such as Lock, RLock, Condition, Event and Semaphore.
14526
14527- Issue #7248 (part 2): Use a unique temporary directory for importlib source
14528  tests instead of tempfile.tempdir. This prevents the tests from sharing state
14529  between concurrent executions on the same system.
14530
14531- Issue #7248: In importlib.test.source.util a try/finally block did not make
14532  sure that some referenced objects actually were created in the block before
14533  calling methods on the object.
14534
14535- Issue #7222: Make thread "reaping" more reliable so that reference
14536  leak-chasing test runs give sensible results.  The previous method of reaping
14537  threads could return successfully while some Thread objects were still
14538  referenced.  This also introduces a new private function:
14539  ``_thread._count()``.
14540
14541- Issue #7151: Fixed regrtest -j so that output to stderr from a test no longer
14542  runs the risk of causing the worker thread to fail.
14543
14544- Issue #7055: test___all__ now greedily detects all modules which have an
14545  __all__ attribute, rather than using a hardcoded and incomplete list.
14546
14547- Issue #7058: Added save/restore for things like sys.argv and cwd to
14548  runtest_inner in regrtest, with warnings if the called test modifies them, and
14549  a new section in the summary report at the end.
14550
14551- Issue #7042: Fix test_signal (test_itimer_virtual) failure on OS X 10.6.
14552
14553- Fixed tests in importlib.test.source.test_abc_loader that were masking the
14554  proper exceptions that should be raised for missing or improper code object
14555  bytecode.
14556
14557- Removed importlib's custom test discovery code and switched to
14558  unittest.TestLoader.discover().
14559
14560Tools/Demos
14561-----------
14562
14563- Issue #5464, #8974: Implement plural forms in msgfmt.py.
14564
14565- iobench (a file I/O benchmark) and ccbench (a concurrency benchmark) were
14566  added to the `Tools/` directory.  They were previously living in the sandbox.
14567
14568
14569What's New in Python 3.1?
14570=========================
14571
14572*Release date: 27-June-2009*
14573
14574Core and Builtins
14575-----------------
14576
14577- Issue #6334: Fix bug in range length calculation for ranges with
14578  large arguments.
14579
14580- Issue #6329: Fixed iteration for memoryview objects (it was being blocked
14581  because it wasn't recognized as a sequence).
14582
14583Library
14584-------
14585
14586- Issue #6126: Fixed pdb command-line usage.
14587
14588- Issue #6314: logging: performs extra checks on the "level" argument.
14589
14590- Issue #6274: Fixed possible file descriptors leak in subprocess.py
14591
14592- Accessing io.StringIO.buffer now raises an AttributeError instead of
14593  io.UnsupportedOperation.
14594
14595- Issue #6271: mmap tried to close invalid file handle (-1) when anonymous.
14596  (On Unix)
14597
14598- Issue #1202: zipfile module would cause a struct.error when attempting to
14599  store files with a CRC32 > 2**31-1.
14600
14601Extension Modules
14602-----------------
14603
14604- Issue #5590: Remove unused global variable in pyexpat extension.
14605
14606
14607What's New in Python 3.1 Release Candidate 2?
14608=============================================
14609
14610*Release date: 13-June-2009*
14611
14612Core and Builtins
14613-----------------
14614
14615- Fixed SystemError triggered by "range([], 1, -1)".
14616
14617- Issue #5924: On Windows, a large PYTHONPATH environment variable
14618  (more than 255 characters) would be completely ignored.
14619
14620- Issue #4547: When debugging a very large function, it was not always
14621  possible to update the lineno attribute of the current frame.
14622
14623- Issue #5330: C functions called with keyword arguments were not reported by
14624  the various profiling modules (profile, cProfile). Patch by Hagen Fürstenau.
14625
14626Library
14627-------
14628
14629- Issue #6438: Fixed distutils.cygwinccompiler.get_versions : the regular
14630  expression string pattern was trying to match against a bytes returned by
14631  Popen. Tested under win32 to build the py-postgresql project.
14632
14633- Issue #6258: Support AMD64 in bdist_msi.
14634
14635- Issue #6195: fixed doctest to no longer try to read 'source' data from
14636  binary files.
14637
14638- Issue #5262: Fixed bug in next rollover time computation in
14639  TimedRotatingFileHandler.
14640
14641- Issue #6217: The C implementation of io.TextIOWrapper didn't include the
14642  errors property.  Additionally, the errors and encoding properties of StringIO
14643  are always None now.
14644
14645- Issue #6137: The pickle module now translates module names when loading
14646  or dumping pickles with a 2.x-compatible protocol, in order to make data
14647  sharing and migration easier. This behaviour can be disabled using the
14648  new `fix_imports` optional argument.
14649
14650- Removed the ipaddr module.
14651
14652- Issue #3613: base64.{encode,decode}string are now called
14653  base64.{encode,decode}bytes which reflects what type they accept and return.
14654  The old names are still there as deprecated aliases.
14655
14656- Issue #5767: Remove sgmlop support from xmlrpc.client.
14657
14658- Issue #6150: Fix test_unicode on wide-unicode builds.
14659
14660- Issue #6149: Fix initialization of WeakValueDictionary objects from non-empty
14661  parameters.
14662
14663Windows
14664-------
14665
14666- Issue #6221: Delete test registry key before running the test.
14667
14668- Issue #6158: Package Sine-1000Hz-300ms.aif in MSI file.
14669
14670C-API
14671-----
14672
14673- Issue #5735: Python compiled with --with-pydebug should throw an
14674  ImportError when trying to import modules compiled without
14675  --with-pydebug, and vice-versa.
14676
14677
14678Build
14679-----
14680
14681- Issue #6154: Make sure the intl library is added to LIBS if needed. Also
14682  added LIBS to OS X framework builds.
14683
14684- Issue #5809: Specifying both --enable-framework and --enable-shared is
14685  an error. Configure now explicitly tells you about this.
14686
14687
14688
14689What's New in Python 3.1 release candidate 1?
14690=============================================
14691
14692*Release date: 2009-05-30*
14693
14694Core and Builtins
14695-----------------
14696
14697- Issue #6097: Escape UTF-8 surrogates resulting from mbstocs conversion
14698  of the command line.
14699
14700- Issue #6012: Add cleanup support to O& argument parsing.
14701
14702- Issue #6089: Fixed str.format with certain invalid field specifiers
14703  that would raise SystemError.
14704
14705- Issue #5982: staticmethod and classmethod now expose the wrapped
14706  function with __func__.
14707
14708- Added support for multiple context managers in the same with-statement.
14709  Deprecated contextlib.nested() which is no longer needed.
14710
14711- Issue #5829: complex("1e500") no longer raises OverflowError.  This
14712  makes it consistent with float("1e500") and interpretation of real
14713  and imaginary literals.
14714
14715- Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more.
14716
14717- Issue #5994: the marshal module now has docstrings.
14718
14719- Issue #5981: Fix three minor inf/nan issues in float.fromhex:
14720  (1) inf and nan strings with trailing whitespace were incorrectly
14721  rejected;  (2) parsing of strings representing infinities and nans
14722  was locale aware; and (3) the interpretation of fromhex('-nan')
14723  didn't match that of float('-nan').
14724
14725Library
14726-------
14727
14728- Issue #4859: Implement PEP 383 for pwd, spwd, and grp.
14729
14730- smtplib 'login' and 'cram-md5' login are also fixed (see Issue #5259).
14731
14732- Issue #6121: pydoc now ignores leading and trailing spaces in the
14733  argument to the 'help' function.
14734
14735- Issue #6118: urllib.parse.quote_plus ignored the encoding and errors
14736  arguments for strings with a space in them.
14737
14738- collections.namedtuple() was not working with the following field
14739  names:  cls, self, tuple, itemgetter, and property.
14740
14741- In unittest, using a skipping decorator on a class is now equivalent to
14742  skipping every test on the class.  The ClassTestSuite class has been removed.
14743
14744- Issue #6050: Don't fail extracting a directory from a zipfile if
14745  the directory already exists.
14746
14747- Issue #1309352: fcntl now converts its third arguments to a C `long` rather
14748  than an int, which makes some operations possible under 64-bit Linux (e.g.
14749  DN_MULTISHOT with F_NOTIFY).
14750
14751- Issue #5761: Add the name of the underlying file to the repr() of various
14752  IO objects.
14753
14754- Issue #5259: smtplib plain auth login no longer gives a traceback.  Fix
14755  by Musashi Tamura, tests by Marcin Bachry.
14756
14757- Issue #1983: Fix functions taking or returning a process identifier to use
14758  the dedicated C type ``pid_t`` instead of a C ``int``. Some platforms have
14759  a process identifier type wider than the standard C integer type.
14760
14761- Issue #4066: smtplib.SMTP_SSL._get_socket now correctly returns the socket.
14762  Patch by Farhan Ahmad, test by Marcin Bachry.
14763
14764- Issue #2116: Weak references and weak dictionaries now support copy()ing and
14765  deepcopy()ing.
14766
14767- Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr.
14768
14769- Issue #5918: Fix a crash in the parser module.
14770
14771- Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.
14772
14773- Issue #5006: Better handling of unicode byte-order marks (BOM) in the io
14774  library. This means, for example, that opening a UTF-16 text file in
14775  append mode doesn't add a BOM at the end of the file if the file isn't
14776  empty.
14777
14778- Issue #4050: inspect.findsource/getsource now raise an IOError if the 'source'
14779  file is a binary.  Patch by Brodie Rao, tests by Daniel Diniz.  This fix
14780  corrects a pydoc regression.
14781
14782- Issue #5955: aifc's close method did not close the file it wrapped,
14783  now it does.  This also means getfp method now returns the real fp.
14784
14785Installation
14786------------
14787
14788- Issue #6047: fullinstall has been removed because Python 3's executable will
14789  now be known as python3.
14790
14791- Lib/smtpd.py is no longer installed as a script.
14792
14793Extension Modules
14794-----------------
14795
14796- Issue #3061: Use wcsftime for time.strftime where available.
14797
14798- Issue #4873: Fix resource leaks in error cases of pwd and grp.
14799
14800- Issue #6093: Fix off-by-one error in locale.strxfrm.
14801
14802- The _functools and _locale modules are now built into the libpython shared
14803  library instead of as extension modules.
14804
14805Build
14806-----
14807
14808- Issue #3585: Add pkg-config support. It creates a python-2.7.pc file
14809  and a python3.pc symlink in the $(LIBDIR)/pkgconfig directory. Patch by
14810  Clinton Roy.
14811
14812Tests
14813-----
14814
14815- Issue #5442: Tests for importlib were not properly skipping case-sensitivity
14816  tests on darwin even when the OS was installed on a case-sensitive
14817  filesystem. Also fixed tests that should not be run when
14818  sys.dont_write_bytecode is true.
14819
14820
14821What's New in Python 3.1 beta 1?
14822================================
14823
14824*Release date: 2009-05-06*
14825
14826Core and Builtins
14827-----------------
14828
14829- Issue #5914: Add new C API function PyOS_string_to_double, and
14830  deprecate PyOS_ascii_strtod and PyOS_ascii_atof.
14831
14832- Issue #3382: float.__format__, complex.__format__, and %-formatting
14833  no longer map 'F' to 'f'. Because of issue #5859 (below), this only
14834  affects nan -> NAN and inf -> INF.
14835
14836- Issue #5799: ntpath (ie, os.path on Windows) fully supports UNC pathnames
14837  in all operations, including splitdrive, split, etc.  splitunc() now issues
14838  a PendingDeprecation warning.
14839
14840- Issue #5920: For float.__format__, change the behavior with the
14841  empty presentation type (that is, not one of 'e', 'f', 'g', or 'n')
14842  to be like 'g' but with at least one decimal point and with a
14843  default precision of 12. Previously, the behavior the same but with
14844  a default precision of 6.  This more closely matches str(), and
14845  reduces surprises when adding alignment flags to the empty
14846  presentation type. This also affects the new complex.__format__ in
14847  the same way.
14848
14849- Implement PEP 383, Non-decodable Bytes in System Character Interfaces.
14850
14851- Issue #5890: in subclasses of 'property' the __doc__ attribute was
14852  shadowed by classtype's, even if it was None.  property now
14853  inserts the __doc__ into the subclass instance __dict__.
14854
14855- Issue #4426: The UTF-7 decoder was too strict and didn't accept some legal
14856  sequences. Patch by Nick Barnes and Victor Stinner.
14857
14858- Issue #3672: Reject surrogates in utf-8 codec; add surrogatepass error handler.
14859
14860- Issue #5883: In the io module, the BufferedIOBase and TextIOBase ABCs have
14861  received a new method, detach().  detach() disconnects the underlying stream
14862  from the buffer or text IO and returns it.
14863
14864- Issue #5859: Remove switch from '%f' to '%g'-style formatting for
14865  floats with absolute value over 1e50.  Also remove length
14866  restrictions for float formatting: '%.67f' % 12.34 and '%.120e' %
14867  12.34 no longer raise an exception.
14868
14869- Issue #1588: Add complex.__format__. For example,
14870  format(complex(1, 2./3), '.5') now produces a sensible result.
14871
14872- Issue #5864: Fix empty format code formatting for floats so that it
14873  never gives more than the requested number of significant digits.
14874
14875- Issue #5793: Rationalize isdigit / isalpha / tolower, etc. Includes
14876  new Py_ISDIGIT / Py_ISALPHA / Py_TOLOWER, etc. in pctypes.h.
14877
14878- Issue #5835: Deprecate PyOS_ascii_formatd.
14879
14880- Issue #4971: Fix titlecase for characters that are their own
14881  titlecase, but not their own uppercase.
14882
14883- Issue #5283: Setting __class__ in __del__ caused a segfault.
14884
14885- Issue #5816: complex(repr(z)) now recovers z exactly, even when
14886  z involves nans, infs or negative zeros.
14887
14888- Issue #3166: Make int -> float conversions correctly rounded.
14889
14890- Issue #1869 (and many duplicates): make round(x, n) correctly
14891  rounded for a float x, by using the decimal <-> binary conversions
14892  from Python/dtoa.c.  As a consequence, (e.g.) round(x, 2) now
14893  consistently agrees with format(x, '.2f').
14894
14895- Issue #5787: object.__getattribute__(some_type, "__bases__") segfaulted on
14896  some builtin types.
14897
14898- Issue #5772: format(1e100, '<') produces '1e+100', not '1.0e+100'.
14899
14900- Issue #5515: str.format() type 'n' combined with commas and leading
14901  zeros no longer gives odd results with ints and floats.
14902
14903- Implement PEP 378, Format Specifier for Thousands Separator, for
14904  floats.
14905
14906- The str function switches to exponential notation at
14907  1e11, not 1e12.  This avoids printing 13 significant digits in
14908  situations where only 12 of them are correct.  Example problem
14909  value: str(1e11 + 0.5).  (This minor issue has existed in 2.x for a
14910  long time.)
14911
14912- Issue #1580: On most platforms, use a 'short' float repr: for a
14913  finite float x, repr(x) now outputs a string based on the shortest
14914  sequence of decimal digits that rounds to x.  Previous behaviour was
14915  to output 17 significant digits and then strip trailing zeros.
14916  Another minor difference is that the new repr switches to
14917  exponential notation at 1e16 instead of the previous 1e17; this
14918  avoids misleading output in some cases.
14919
14920  There's a new sys attribute sys.float_repr_style, which takes
14921  the value 'short' to indicate that we're using short float repr,
14922  and 'legacy' if the short float repr isn't available for one
14923  reason or another.
14924
14925  The float repr change involves incorporating David Gay's 'perfect
14926  rounding' code into the Python core (it's in Python/dtoa.c).  As a
14927  secondary consequence, all string-to-float and float-to-string
14928  conversions (including all float formatting operations) will be
14929  correctly rounded on these platforms.
14930
14931  See issue #1580 discussions for details of platforms for which
14932  this change does not apply.
14933
14934- Issue #5759: float() didn't call __float__ on str subclasses.
14935
14936- The string.maketrans() function is deprecated; there is a new static method
14937  maketrans() on the bytes and bytearray classes.  This removes confusion about
14938  the types string.maketrans() is supposed to work with, and mirrors the
14939  methods available on the str class.
14940
14941- Issue #2170: refactored xml.dom.minidom.normalize, increasing both
14942  its clarity and its speed.
14943
14944- Issue #1113244: Py_XINCREF, Py_DECREF, Py_XDECREF: Add ``do { ... } while (0)``
14945  to avoid compiler warnings.
14946
14947- Issue #3739: The unicode-internal encoder now reports the number of characters
14948  consumed like any other encoder (instead of the number of bytes).
14949
14950Installation
14951------------
14952
14953- Issue #5756: Install idle and pydoc with a 3 suffix.
14954
14955Library
14956-------
14957
14958- Issue #8203: Fix IDLE Credits dialog: view_file() uses its encoding argument.
14959
14960- Issue #5311: bdist_msi can now build packages that do not depend on a
14961  specific Python version.
14962
14963- Issue #5150: IDLE's format menu now has an option to strip trailing
14964  whitespace.
14965
14966- Issue #5940: distutils.command.build_clib.check_library_list was not doing
14967  the right type checkings anymore.
14968
14969- Issue #4875: On win32, ctypes.util.find_library does no longer
14970  return directories.
14971
14972- Issue #5142: Add the ability to skip modules while stepping to pdb.
14973
14974- Issue #1309567: Fix linecache behavior of stripping subdirectories when
14975  looking for files given by a relative filename.
14976
14977- Issue #5923: Update the ``turtle`` module to version 1.1, add two new
14978  turtle demos in Demo/turtle.
14979
14980- Issue #5692: In ``zipfile.Zipfile``, fix wrong path calculation when
14981  extracting a file to the root directory.
14982
14983- Issue #5913: os.listdir() should fail for empty path on windows.
14984
14985- Issue #5084: unpickling now interns the attribute names of pickled objects,
14986  saving memory and avoiding growth in size of subsequent pickles. Proposal
14987  and original patch by Jake McGuire.
14988
14989- The json module now works exclusively with str and not bytes.
14990
14991- Issue #3959: The ipaddr module has been added to the standard library.
14992  Contributed by Google.
14993
14994- Issue #3002: ``shutil.copyfile()`` and ``shutil.copytree()`` now raise an
14995  error when a named pipe is encountered, rather than blocking infinitely.
14996
14997- Issue #5857: tokenize.tokenize() now returns named tuples.
14998
14999- Issue #4305: ctypes should now build again on mipsel-linux-gnu
15000
15001- Issue #1734234: Massively speedup ``unicodedata.normalize()`` when the
15002  string is already in normalized form, by performing a quick check beforehand.
15003  Original patch by Rauli Ruohonen.
15004
15005- Issue #5853: calling a function of the mimetypes module from several threads
15006  at once could hit the recursion limit if the mimetypes database hadn't been
15007  initialized before.
15008
15009- Issue #5854: Updated __all__ to include some missing names and remove some
15010  names which should not be exported.
15011
15012- Issue #3102:  All global symbols that the _ctypes extension defines
15013  are now prefixed with 'Py' or '_ctypes'.
15014
15015- Issue #5041: ctypes does now allow pickling wide character.
15016
15017- Issue #5812: For the two-argument form of the Fraction constructor,
15018  Fraction(m, n), m and n are permitted to be arbitrary Rational
15019  instances.
15020
15021- Issue #5812: Fraction('1e6') is valid: more generally, any string
15022  that's valid for float() is now valid for Fraction(), with the
15023  exception of strings representing NaNs and infinities.
15024
15025- Issue #5734: BufferedRWPair was poorly tested and had several glaring
15026  bugs. Patch by Brian Quinlan.
15027
15028- Issue #1161031: fix readwrite select flag handling: POLLPRI now
15029  results in a handle_expt_event call, not handle_read_event, and POLLERR
15030  and POLLNVAL now call handle_close, not handle_expt_event.  Also,
15031  dispatcher now has an 'ignore_log_types' attribute for suppressing
15032  log messages, which is set to 'warning' by default.
15033
15034- Issue #2703: SimpleXMLRPCDispatcher.__init__: Provide default values for
15035  new arguments introduced in 2.5.
15036
15037- Issue #5828 (Invalid behavior of unicode.lower): Fixed bogus logic in
15038  makeunicodedata.py and regenerated the Unicode database (This fixes
15039  u'\u1d79'.lower() == '\x00').
15040
15041Extension Modules
15042-----------------
15043
15044- Issue #5881: Remove old undocumented compatibility interfaces in hashlib and
15045  pwd.
15046
15047- Issue #5463: In struct module, remove deprecated float coercion
15048  for integer type codes: struct.pack('L', 0.3) should now raise
15049  an error.  The _PY_STRUCT_FLOAT_COERCE constant has been removed.
15050  The version number has been bumped to 0.3.
15051
15052- Issue #5359: Readd the Berkeley DB detection code to allow _dbm be built
15053  using Berkeley DB.
15054
15055Tests
15056-----
15057
15058- Issue #5354: New test support function import_fresh_module() makes
15059  it easy to import both normal and optimised versions of modules.
15060  test_heapq and test_warnings have been adjusted to use it, tests for
15061  other modules with both C and Python implementations in the stdlib
15062  can be adjusted to use it over time.
15063
15064- Issue #5837: Certain sequences of calls to set() and unset() for
15065  support.EnvironmentVarGuard objects restored the environment variables
15066  incorrectly on __exit__.
15067
15068C-API
15069-----
15070
15071- Issue #5630: A replacement PyCObject API, PyCapsule, has been added.
15072
15073
15074What's New in Python 3.1 alpha 2?
15075=================================
15076
15077*Release date: 2009-4-4*
15078
15079Core and Builtins
15080-----------------
15081
15082- Implement PEP 378, Format Specifier for Thousands Separator, for
15083  integers.
15084
15085- Issue #5666: Py_BuildValue's 'c' code should create byte strings.
15086
15087- Issue #5499: The 'c' code for argument parsing functions now only accepts a
15088  byte, and the 'C' code only accepts a unicode character.
15089
15090- Fix a problem in PyErr_NormalizeException that leads to "undetected errors"
15091  when hitting the recursion limit under certain circumstances.
15092
15093- Issue #1665206: Remove the last eager import in _warnings.c and make it lazy.
15094
15095- Fix a segfault when running test_exceptions with coverage, caused by
15096  insufficient checks in accessors of Exception.__context__.
15097
15098- Issue #5604: non-ASCII characters in module name passed to
15099  imp.find_module() were converted to UTF-8 while the path is
15100  converted to the default filesystem encoding, causing nonsense.
15101
15102- Issue #5126: str.isprintable() returned False for space characters.
15103
15104- Issue #4865: On MacOSX /Library/Python/2.7/site-packages is added to
15105  the end sys.path, for compatibility with the system install of Python.
15106
15107- Issue #4688: Add a heuristic so that tuples and dicts containing only
15108  untrackable objects are not tracked by the garbage collector. This can
15109  reduce the size of collections and therefore the garbage collection overhead
15110  on long-running programs, depending on their particular use of datatypes.
15111
15112- Issue #5512: Rewrite PyLong long division algorithm (x_divrem) to
15113  improve its performance.  Long divisions and remainder operations
15114  are now between 50% and 150% faster.
15115
15116- Issue #4258: Make it possible to use base 2**30 instead of base
15117  2**15 for the internal representation of integers, for performance
15118  reasons.  Base 2**30 is enabled by default on 64-bit machines.  Add
15119  --enable-big-digits option to configure, which overrides the
15120  default.  Add sys.int_info structseq to provide information about
15121  the internal format.
15122
15123- Issue #4474: PyUnicode_FromWideChar now converts characters outside
15124  the BMP to surrogate pairs, on systems with sizeof(wchar_t) == 4
15125  and sizeof(Py_UNICODE) == 2.
15126
15127- Issue #5237: Allow auto-numbered fields in str.format(). For
15128  example: '{} {}'.format(1, 2) == '1 2'.
15129
15130- Issue #5392: when a very low recursion limit was set, the interpreter would
15131  abort with a fatal error after the recursion limit was hit twice.
15132
15133- Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with
15134  short file names.
15135
15136Library
15137-------
15138
15139- Issue #2625: added missing items() call to the for loop in
15140  mailbox.MH.get_message().
15141
15142- Issue #5640: Fix _multibytecodec so that CJK codecs don't repeat
15143  error substitutions from non-strict codec error callbacks in
15144  incrementalencoder and StreamWriter.
15145
15146- Issue #5656: Fix the coverage reporting when running the test suite with
15147  the -T argument.
15148
15149- Issue #5647: MutableSet.__iand__() no longer mutates self during iteration.
15150
15151- Issue #5624: Fix the _winreg module name still used in several modules.
15152
15153- Issue #5628: Fix io.TextIOWrapper.read() with an unreadable buffer.
15154
15155- Issue #5619: Multiprocessing children disobey the debug flag and causes
15156  popups on windows buildbots. Patch applied to work around this issue.
15157
15158- Issue #5400: Added patch for multiprocessing on netbsd compilation/support
15159
15160- Issue #5387: Fixed mmap.move crash by integer overflow.
15161
15162- Issue #5261: Patch multiprocessing's semaphore.c to support context
15163  manager use: "with multiprocessing.Lock()" works now.
15164
15165- Issue #5236: Change time.strptime() to only take strings. Didn't work with
15166  bytes already but the failure was non-obvious.
15167
15168- Issue #5177: Multiprocessing's SocketListener class now uses
15169  socket.SO_REUSEADDR on all connections so that the user no longer needs
15170  to wait 120 seconds for the socket to expire.
15171
15172- Issue #5595: Fix UnboundedLocalError in ntpath.ismount().
15173
15174- Issue #1174606: Calling read() without arguments of an unbounded file
15175  (typically /dev/zero under Unix) could crash the interpreter.
15176
15177- The max_buffer_size arguments of io.BufferedWriter, io.BufferedRWPair, and
15178  io.BufferedRandom have been deprecated for removal in Python 3.2.
15179
15180- Issue #5068: Fixed the tarfile._BZ2Proxy.read() method that would loop
15181  forever on incomplete input. That caused tarfile.open() to hang when used
15182  with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or
15183  partial bzip2 compressed data.
15184
15185- Issue #2110: Add support for thousands separator and 'n' type
15186  specifier to Decimal.__format__
15187
15188- Fix Decimal.__format__ bug that swapped the meanings of the '<' and
15189  '>' alignment characters.
15190
15191- The error detection code in FileIO.close() could fail to reflect the `errno`
15192  value, and report it as -1 instead.
15193
15194- Issue #5016: FileIO.seekable() could return False if the file position
15195  was negative when truncated to a C int. Patch by Victor Stinner.
15196
15197Extension Modules
15198-----------------
15199
15200- Issue #5391: mmap now deals exclusively with bytes.
15201
15202- Issue #5463: In struct module, remove deprecated overflow wrapping
15203  when packing an integer: struct.pack('=L', -1) now raises
15204  struct.error instead of returning b'\xff\xff\xff\xff'.  The
15205  _PY_STRUCT_RANGE_CHECKING and _PY_STRUCT_OVERFLOW_MASKING constants
15206  have been removed from the struct module.
15207
15208
15209What's New in Python 3.1 alpha 1
15210================================
15211
15212*Release date: 2009-03-07*
15213
15214Core and Builtins
15215-----------------
15216
15217- The io module has been reimplemented in C for speed.
15218
15219- Give dict views an informative __repr__.
15220
15221- Issue #5247: Improve error message when unknown format codes are
15222  used when using str.format() with str, int, and float arguments.
15223
15224- Issue #5249: time.strftime returned malformed string when format string
15225  contained non ascii character on windows.
15226
15227- Issue #4626: compile(), exec(), and eval() ignore the coding cookie if the
15228  source has already been decoded into str.
15229
15230- Issue #5186: Reduce hash collisions for objects with no __hash__ method by
15231  rotating the object pointer by 4 bits to the right.
15232
15233- Issue #4575: Fix Py_IS_INFINITY macro to work correctly on x87 FPUs:
15234  it now forces its argument to double before testing for infinity.
15235
15236- Issue #5137: Make len() correctly raise a TypeError when a __len__ method
15237  returns a non-number type.
15238
15239- Issue #5182: Removed memoryview.__str__.
15240
15241- Issue #1717: Removed builtin cmp() function, dropped tp_compare
15242  slot, the C API functions PyObject_Compare and PyUnicode_Compare and
15243  the type definition cmpfunc.  The tp_compare slot has been renamed
15244  to tp_reserved, and is reserved for future usage.
15245
15246- Issue #1242657: the __len__() and __length_hint__() calls in several tools
15247  were suppressing all exceptions.  These include list() and bytearray().
15248
15249- Issue #4707: round(x, n) now returns an integer if x is an integer.
15250  Previously it returned a float.
15251
15252- Issue #4753: By enabling a configure option named '--with-computed-gotos'
15253  on compilers that support it (notably: gcc, SunPro, icc), the bytecode
15254  evaluation loop is compiled with a new dispatch mechanism which gives
15255  speedups of up to 20%, depending on the system, on various benchmarks.
15256
15257- Issue #4874: Most builtin decoders now reject unicode input.
15258
15259- Issue #4842: Don't allow trailing 'L' when constructing an integer
15260  from a string.
15261
15262- Issue #4991: os.fdopen now raises an OSError for invalid file descriptors.
15263
15264- Issue #4838: When a module is deallocated, free the memory backing the
15265  optional module state data.
15266
15267- Issue #4910: Rename nb_long slot to nb_reserved, and change its
15268  type to ``(void *)``.
15269
15270- Issue #4935: The overflow checking code in the expandtabs() method common
15271  to str, bytes and bytearray could be optimized away by the compiler, letting
15272  the interpreter segfault instead of raising an error.
15273
15274- Issue #3720: Fix a crash when an iterator modifies its class and removes its
15275  __next__ method.
15276
15277- Issue #4910: Builtin int() function and PyNumber_Long/PyNumber_Int API
15278  function no longer attempt to call the __long__ slot to convert an object
15279  to an integer.  Only the __int__ and __trunc__ slots are examined.
15280
15281- Issue #4893: Use NT threading on CE.
15282
15283- Issue #4915: Port sysmodule to Windows CE.
15284
15285- Issue #4868: utf-8, utf-16 and latin1 decoding are now 2x to 4x faster. The
15286  common cases are optimized thanks to a dedicated fast path and a moderate
15287  amount of loop unrolling.
15288
15289- Issue #4074: Change the criteria for doing a full garbage collection (i.e.
15290  collecting the oldest generation) so that allocating lots of objects without
15291  destroying them does not show quadratic performance. Based on a proposal by
15292  Martin von Löwis at
15293  http://mail.python.org/pipermail/python-dev/2008-June/080579.html.
15294
15295- Issue #4604: Some objects of the I/O library could still be used after
15296  having been closed (for instance, a read() call could return some
15297  previously buffered data). Patch by Dmitry Vasiliev.
15298
15299- Issue #4705: Fix the -u ("unbuffered binary stdout and stderr") command-line
15300  flag to work properly. Furthermore, when specifying -u, the text stdout
15301  and stderr streams have line-by-line buffering enabled (the default being
15302  to buffer arbitrary chunks of data).
15303
15304- The internal table, _PyLong_DigitValue, is now an array of unsigned chars
15305  instead of ints (reducing its size from 4 to 8 times thereby reducing
15306  Python's overall memory).
15307
15308- Issue #1180193: When importing a module from a .pyc (or .pyo) file with
15309  an existing .py counterpart, override the co_filename attributes of all
15310  code objects if the original filename is obsolete (which can happen if the
15311  file has been renamed, moved, or if it is accessed through different paths).
15312  Patch by Ziga Seilnacht and Jean-Paul Calderone.
15313
15314- Issue #4580: Fix slicing of memoryviews when the item size is greater than
15315  one byte. Also fixes the meaning of len() so that it returns the number of
15316  items, rather than the size in bytes.
15317
15318- Issue #4075: Use OutputDebugStringW in Py_FatalError.
15319
15320- Issue #4747: When the terminal does not use utf-8, executing a script with
15321  non-ascii characters in its name could fail with a "SyntaxError: None" error.
15322
15323- Issue #4797: IOError.filename was not set when ``_fileio.FileIO`` failed
15324  to open file with a bytes filename on Windows.
15325
15326- Issue #3680: Reference cycles created through a dict, set or deque iterator
15327  did not get collected.
15328
15329- Issue #4701: PyObject_Hash now implicitly calls PyType_Ready on types
15330  where the tp_hash and tp_dict slots are both NULL.
15331
15332- Issue #4759: None is now allowed as the first argument of
15333  bytearray.translate().  It was always allowed for bytes.translate().
15334
15335- Added test case to ensure attempts to read from a file opened for writing
15336  fail.
15337
15338- Issue #3106: Speedup some comparisons (str/str and int/int).
15339
15340- Issue #2183: Simplify and optimize bytecode for list, dict and set
15341  comprehensions. Original patch for list comprehensions by Neal Norwitz.
15342
15343- Issue #2467: gc.DEBUG_STATS reported invalid elapsed times. Also, always
15344  print elapsed times, not only when some objects are uncollectable /
15345  unreachable. Original patch by Neil Schemenauer.
15346
15347- Issue #3439: Add a bit_length method to int.
15348
15349- Issue #2173: When getting device encoding, check that return value of
15350  nl_langinfo is not the empty string.  This was causing silent build
15351  failures on OS X.
15352
15353- Issue #4597: Fixed several opcodes that weren't always propagating
15354  exceptions.
15355
15356- Issue #4589: Fixed exception handling when the __exit__ function of a
15357  context manager returns a value that cannot be converted to a bool.
15358
15359- Issue #4445: Replace "sizeof(PyBytesObject)" with
15360  "offsetof(PyBytesObject, ob_sval) + 1" when allocating memory for
15361  bytes instances.  On a typical machine this saves 3 bytes of memory
15362  (on average) per allocation of a bytes instance.
15363
15364- Issue #4533: File read operation was dreadfully slow due to a slowly
15365  growing read buffer. Fixed by using the same growth rate algorithm as
15366  Python 2.x.
15367
15368- Issue #4509: Various issues surrounding resize of bytearray objects to
15369  which there are buffer exports (e.g. memoryview instances).
15370
15371- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()``
15372  method on file objects with closefd=False. The file descriptor is still
15373  kept open but the file object behaves like a closed file. The ``FileIO``
15374  object also got a new readonly attribute ``closefd``.
15375
15376- Issue #4569: Interpreter crash when mutating a memoryview with an item size
15377  larger than 1.
15378
15379- Issue #4748: Lambda generators no longer return a value.
15380
15381- The re.sub(), re.subn() and re.split() functions now accept a flags parameter.
15382
15383- Issue #5108: Handle %s like %S, %R and %A in PyUnicode_FromFormatV(): Call
15384  PyUnicode_DecodeUTF8() once, remember the result and output it in a second
15385  step. This avoids problems with counting UTF-8 bytes that ignores the effect
15386  of using the replace error handler in PyUnicode_DecodeUTF8().
15387
15388Library
15389-------
15390
15391- Issue #7071: byte-compilation in Distutils is now done with respect to
15392  sys.dont_write_bytecode.
15393
15394- Issue #7066: archive_util.make_archive now restores the cwd if an error is
15395  raised. Initial patch by Ezio Melotti.
15396
15397- Issue #6516: Added owner/group support when creating tar archives in
15398  Distutils.
15399
15400- Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils.
15401
15402- Issue #6163: Fixed HP-UX runtime library dir options in
15403  distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and
15404  Michael Haubenwallner.
15405
15406- Issue #6693: New functions in site.py to get user/global site packages paths.
15407
15408- Issue #6511: ZipFile now raises BadZipfile (instead of an IOError) when
15409  opening an empty or very small file.
15410
15411- Issue #6545: Removed assert statements in distutils.Extension, so the
15412  behavior is similar when used with -O.
15413
15414- unittest has been split up into a package.  All old names should still work.
15415
15416- Issue #6466: now distutils.cygwinccompiler and distutils.emxccompiler
15417  uses the same refactored function to get gcc/ld/dllwrap versions numbers.
15418  It's `distutils.util.get_compiler_versions`. Added deprecation warnings
15419  for the obsolete get_versions() functions.
15420
15421- Issue #6433: fixed issues with multiprocessing.pool.map hanging on empty list
15422
15423- Issue #6314: logging: Extra checks on the "level" argument in more places.
15424
15425- Issue #2622: Fixed an ImportError when importing email.message from a
15426  standalone application built with py2exe or py2app.
15427
15428- Issue #6455: Fixed test_build_ext under win32.
15429
15430- Issue #6377: Enabled the compiler option, and deprecate its usage as an
15431  attribute.
15432
15433- Issue #6413: Fixed the log level in distutils.dist for announce.
15434
15435- Issue #6403: Fixed package path usage in build_ext.
15436
15437- Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was
15438  unconditionally calling "os.close(sys.stdin.fileno())" resulting in file
15439  descriptor errors
15440
15441- Issue #6365: Distutils build_ext inplace mode was copying the compiled
15442  extension in a subdirectory if the extension name had dots.
15443
15444- Issue #6164: Added an AIX specific linker argument in Distutils
15445  unixcompiler. Original patch by Sridhar Ratnakumar.
15446
15447- Issue #6286: Now Distutils upload command is based on urllib2 instead of
15448  httplib, allowing the usage of http_proxy.
15449
15450- Issue #6287: Added the license field in Distutils documentation.
15451
15452- Issue #6263: Fixed syntax error in distutils.cygwincompiler.
15453
15454- Issue #5201: distutils.sysconfig.parse_makefile() now understands `$$`
15455  in Makefiles. This prevents compile errors when using syntax like:
15456  `LDFLAGS='-rpath=\$$LIB:/some/other/path'`. Patch by Floris Bruynooghe.
15457
15458- Issue #6131: test_modulefinder leaked when run after test_distutils.
15459  Patch by Hirokazu Yamamoto.
15460
15461- Issue #6048: Now Distutils uses the tarfile module in archive_util.
15462
15463- Issue #6062: In distutils, fixed the package option of build_ext. Feedback
15464  and tests on pywin32 by Tim Golden.
15465
15466- Issue #6053: Fixed distutils tests on win32. patch by Hirokazu Yamamoto.
15467
15468- Issue #6046: Fixed the library extension when distutils build_ext is used
15469  inplace. Initial patch by Roumen Petrov.
15470
15471- Issue #6041: Now distutils `sdist` and `register` commands use `check` as a
15472  subcommand.
15473
15474- Issue #6022: a test file was created in the current working directory by
15475  test_get_outputs in Distutils.
15476
15477- Issue #5977: distutils build_ext.get_outputs was not taking into account the
15478  inplace option. Initial patch by kxroberto.
15479
15480- Issue #5984: distutils.command.build_ext.check_extensions_list checks were broken
15481  for old-style extensions.
15482
15483- Issue #5976: Fixed Distutils test_check_environ.
15484
15485- Issue #5941: Distutils build_clib command was not working anymore because
15486  of an incomplete customization of the archiver command. Added ARFLAGS in the
15487  Makefile besides AR and make Distutils use it. Original patch by David
15488  Cournapeau.
15489
15490- Issue #2245: aifc now skips chunk types it doesn't recognize, per spec.
15491
15492- Issue #5874: distutils.tests.test_config_cmd is not locale-sensitive
15493  anymore.
15494
15495- Issue #5810: Fixed Distutils test_build_scripts so it uses
15496  sysconfig.get_config_vars.
15497
15498- Issue #4951: Fixed failure in test_httpservers.
15499
15500- Issue #5795: Fixed test_distutils failure on Debian ppc.
15501
15502- Issue #5607: fixed Distutils test_get_platform for Mac OS X fat binaries.
15503
15504- Issue #5741: don't disallow "%%" (which is an escape for "%") when setting
15505  a value in SafeConfigParser.
15506
15507- Issue #5732: added a new command in Distutils: check.
15508
15509- Issue #5731: Distutils bdist_wininst no longer worked on non-Windows
15510  platforms. Initial patch by Paul Moore.
15511
15512- Issue #5095: Added bdist_msi to the list of bdist supported formats.
15513  Initial fix by Steven Bethard.
15514
15515- Issue #1491431: Fixed distutils.filelist.glob_to_re for edge cases.
15516  Initial fix by Wayne Davison.
15517
15518- Issue #5694: removed spurious test output in Distutils (test_clean).
15519
15520- Issue #1326077: fix the formatting of SyntaxErrors by the traceback module.
15521
15522- Issue #1665206 (partially): Move imports in cgitb to the top of the module
15523  instead of performing them in functions. Helps prevent import deadlocking in
15524  threads.
15525
15526- Issue #2522: locale.format now checks its first argument to ensure it has
15527  been passed only one pattern, avoiding mysterious errors where it appeared
15528  that it was failing to do localization.
15529
15530- Issue #5583: Added optional Extensions in Distutils. Initial patch by Georg
15531  Brandl.
15532
15533- Issue #1222: locale.format() bug when the thousands separator is a space
15534  character.
15535
15536- Issue #5472: Fixed distutils.test_util tear down. Original patch by
15537  Tim Golden.
15538
15539- collections.deque() objects now have a read-only attribute called maxlen.
15540
15541- Issue #2638: Show a window constructed with tkSimpleDialog.Dialog only after
15542  it is has been populated and properly configured in order to prevent
15543  window flashing.
15544
15545- Issue #4792: Prevent a segfault in _tkinter by using the
15546  guaranteed to be safe interp argument given to the PythonCmd in place of
15547  the Tcl interpreter taken from a PythonCmd_ClientData.
15548
15549- Issue #5193: Guarantee that tkinter.Text.search returns a string.
15550
15551- Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler.
15552  Original patch by Akira Kitada.
15553
15554- Issue #5334: array.fromfile() failed to insert values when EOFError was raised.
15555
15556- Issue #5385: Fixed mmap crash after resize failure on windows.
15557
15558- Issue #5179: Fixed subprocess handle leak on failure on windows.
15559
15560- PEP 372:  Added collections.OrderedDict().
15561
15562- The _asdict() for method for namedtuples now returns an OrderedDict().
15563
15564- configparser now defaults to using an ordered dictionary.
15565
15566- Issue #5401: Fixed a performance problem in mimetypes when ``from mimetypes
15567  import guess_extension`` was used.
15568
15569- Issue #1733986: Fixed mmap crash in accessing elements of second map object
15570  with same tagname but larger size than first map. (Windows)
15571
15572- Issue #5386: mmap.write_byte didn't check map size, so it could cause buffer
15573  overrun.
15574
15575- Issue #1533164: Installed but not listed ``*.pyo`` was breaking Distutils
15576  bdist_rpm command.
15577
15578- Issue #5378: added --quiet option to Distutils bdist_rpm command.
15579
15580- Issue #5052: make Distutils compatible with 2.3 again.
15581
15582- Issue #5316: Fixed buildbot failures introduced by multiple inheritance
15583  in Distutils tests.
15584
15585- Issue #5287: Add exception handling around findCaller() call to help out
15586  IronPython.
15587
15588- Issue #5282: Fixed mmap resize on 32bit windows and unix. When offset > 0,
15589  The file was resized to wrong size.
15590
15591- Issue #5292: Fixed mmap crash on its boundary access m[len(m)].
15592
15593- Issue #2279: distutils.sdist.add_defaults now add files
15594  from the package_data and the data_files metadata.
15595
15596- Issue #5257: refactored all tests in distutils, so they use
15597  support.TempdirManager, to avoid writing in the tests directory.
15598
15599- Issue #4524: distutils build_script command failed with --with-suffix=3.
15600  Initial patch by Amaury Forgeot d'Arc.
15601
15602- Issue #2461: added tests for distutils.util
15603
15604- Issue #4998: The memory saving effect of __slots__ had been lost on Fractions
15605  which inherited from numbers.py which did not have __slots__ defined.  The
15606  numbers hierarchy now has its own __slots__ declarations.
15607
15608- Issue #4631: Fix urlopen() result when an HTTP response uses chunked
15609  encoding.
15610
15611- Issue #5203: Fixed ctypes segfaults when passing a unicode string to a
15612  function without argtypes (only occurs if HAVE_USABLE_WCHAR_T is false).
15613
15614- Issue #3386: distutils.sysconfig.get_python_lib prefix argument was ignored
15615  under NT and OS2. Patch by Philip Jenvey.
15616
15617- Issue #5128: Make compileall properly inspect bytecode to determine if needs
15618  to be recreated. This avoids a timing hole thanks to the old reliance on the
15619  ctime of the files involved.
15620
15621- Issue #5122: Synchronize tk load failure check to prevent a potential
15622  deadlock.
15623
15624- Issue #1818: collections.namedtuple() now supports a keyword argument
15625  'rename' which lets invalid fieldnames be automatically converted to
15626  positional names in the form, _1, _2, ...
15627
15628- Issue #4890: Handle empty text search pattern in Tkinter.Text.search.
15629
15630- Issue #4512 (part 2): Promote ``ZipImporter._get_filename()`` to be a
15631  public documented method ``ZipImporter.get_filename()``.
15632
15633- Issue #4195: The ``runpy`` module (and the ``-m`` switch) now support
15634  the execution of packages by looking for and executing a ``__main__``
15635  submodule when a package name is supplied. Initial patch by Andi
15636  Vajda.
15637
15638- Issue #1731706: Call Tcl_ConditionFinalize for Tcl_Conditions that will
15639  not be used again (this requires Tcl/Tk 8.3.1), also fix a memory leak in
15640  Tkapp_Call when calling from a thread different than the one that created
15641  the Tcl interpreter. Patch by Robert Hancock.
15642
15643- Issue #4285: Change sys.version_info to be a named tuple. Patch by
15644  Ross Light.
15645
15646- Issue #1520877: Now distutils.sysconfig reads $AR from the
15647  environment/Makefile. Patch by Douglas Greiman.
15648
15649- Issue #1276768: The verbose option was not used in the code of
15650  distutils.file_util and distutils.dir_util.
15651
15652- Issue #5132: Fixed trouble building extensions under Solaris with
15653  --enabled-shared activated. Initial patch by Dave Peterson.
15654
15655- Issue #1581476: Always use the Tcl global namespace when calling into Tcl.
15656
15657- The shelve module now defaults to pickle protocol 3.
15658
15659- Fix a bug in the trace module where a bytes object from co_lnotab had its
15660  items being passed through ord().
15661
15662- Issue #2047: shutil.move() could believe that its destination path was
15663  inside its source path if it began with the same letters (e.g. "src" vs.
15664  "src.new").
15665
15666- Added the ttk module. See issue #2983: Ttk support for Tkinter.
15667
15668- Removed isSequenceType(), isMappingType, and isNumberType() from the
15669  operator module; use the abstract base classes instead.  Also removed
15670  the repeat() function; use mul() instead.
15671
15672- Issue #5021:  doctest.testfile() did not create __name__ and
15673  collections.namedtuple() relied on __name__ being defined.
15674
15675- Backport importlib from Python 3.1. Only the import_module() function has
15676  been backported to help facilitate transitions from 2.7 to 3.1.
15677
15678- Issue #1885: distutils. When running sdist with --formats=tar,gztar
15679  the tar file was overridden by the gztar one.
15680
15681- Issue #4863: distutils.mwerkscompiler has been removed.
15682
15683- Added a new itertools functions:  combinations_with_replacement()
15684  and compress().
15685
15686- Issue #5032:  added a step argument to itertools.count() and
15687  allowed non-integer arguments.
15688
15689- Fix and properly document the multiprocessing module's logging
15690  support, expose the internal levels and provide proper usage
15691  examples.
15692
15693- Issue #1672332: fix unpickling of subnormal floats, which was
15694  producing a ValueError on some platforms.
15695
15696- Issue #3881: Help Tcl to load even when started through the
15697  unreadable local symlink to "Program Files" on Vista.
15698
15699- Issue #4710: Extract directories properly in the zipfile module;
15700  allow adding directories to a zipfile.
15701
15702- Issue #3807: _multiprocessing build fails when configure is passed
15703  --without-threads argument. When this occurs, _multiprocessing will
15704  be disabled, and not compiled.
15705
15706- Issue #5008: When a file is opened in append mode with the new IO library,
15707  do an explicit seek to the end of file (so that e.g. tell() returns the
15708  file size rather than 0). This is consistent with the behaviour of the
15709  traditional 2.x file object.
15710
15711- Issue #5013: Fixed a bug in FileHandler which occurred when the delay
15712  parameter was set.
15713
15714- Issue #4842: Always append a trailing 'L' when pickling longs using
15715  pickle protocol 0.  When reading, the 'L' is optional.
15716
15717- Add the importlib package.
15718
15719- Issue #4301: Patch the logging module to add processName support, remove
15720  _check_logger_class from multiprocessing.
15721
15722- Issue #3325: Remove python2.x try: except: imports for old cPickle from
15723  multiprocessing.
15724
15725- Issue #4959: inspect.formatargspec now works for keyword only arguments
15726  without defaults.
15727
15728- Issue #3321: ``_multiprocessing.Connection()`` doesn't check handle; added checks
15729  for Unix machines for negative handles and large int handles. Without this check
15730  it is possible to segfault the interpreter.
15731
15732- Issue #4449: AssertionError in mp_benchmarks.py, caused by an underlying issue
15733  in sharedctypes.py.
15734
15735- Issue #1225107: inspect.isclass() returned True for instances with a custom
15736  __getattr__.
15737
15738- Issue #3826 and #4791: The socket module now closes the underlying socket
15739  appropriately when it is being used via socket.makefile() objects
15740  rather than delaying the close by waiting for garbage collection to do it.
15741
15742- Issue #1696199:  Add collections.Counter() for rapid and convenient
15743  counting.
15744
15745- Issue #3860: GzipFile and BZ2File now support the context management protocol.
15746
15747- Issue #4867: Fixed a crash in ctypes when passing a string to a
15748  function without defining argtypes.
15749
15750- Issue #4272: Add an optional argument to the GzipFile constructor to override
15751  the timestamp in the gzip stream. The default value remains the current time.
15752  The information can be used by e.g. gunzip when decompressing. Patch by
15753  Jacques Frechet.
15754
15755- Restore Python 2.3 compatibility for decimal.py.
15756
15757- Issue #3638: Remove functions from _tkinter module level that depend on
15758  TkappObject to work with multiple threads.
15759
15760- Issue #4718: Adapt the wsgiref package so that it actually works with
15761  Python 3.x, in accordance with the `official amendments of the spec
15762  <http://www.wsgi.org/wsgi/Amendments_1.0>`_.
15763
15764- Issue #4796: Added Decimal.from_float() and Context.create_decimal_from_float()
15765  to the decimal module.
15766
15767- Fractions.from_float() no longer loses precision for integers too big to
15768  cast as floats.
15769
15770- Issue #4812: add missing underscore prefix to some internal-use-only
15771  constants in the decimal module.  (Dec_0 becomes _Dec_0, etc.)
15772
15773- Issue #4790: The nsmallest() and nlargest() functions in the heapq module
15774  did unnecessary work in the common case where no key function was specified.
15775
15776- Issue #4795: inspect.isgeneratorfunction() returns False instead of None when
15777  the function is not a generator.
15778
15779- Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case
15780  no MSVC compiler is found under Windows. Original patch by Philip Jenvey.
15781
15782- Issue #4646: distutils was choking on empty options arg in the setup
15783  function. Original patch by Thomas Heller.
15784
15785- Issue #3767: Convert Tk object to string in tkColorChooser.
15786
15787- Issue #3248: Allow placing ScrolledText in a PanedWindow.
15788
15789- Issue #4444: Allow assertRaises() to be used as a context handler, so that
15790  the code under test can be written inline if more practical.
15791
15792- Issue #4739: Add pydoc help topics for symbols, so that e.g. help('@')
15793  works as expected in the interactive environment.
15794
15795- Issue #4756: zipfile.is_zipfile() now supports file-like objects. Patch by
15796  Gabriel Genellina.
15797
15798- Issue #4574: reading a UTF16-encoded text file crashes if \r on 64-char
15799  boundary.
15800
15801- Issue #4223: inspect.getsource() will now correctly display source code
15802  for packages loaded via zipimport (or any other conformant PEP 302
15803  loader). Original patch by Alexander Belopolsky.
15804
15805- Issue #4201: pdb can now access and display source code loaded via
15806  zipimport (or any other conformant PEP 302 loader). Original patch by
15807  Alexander Belopolsky.
15808
15809- Issue #4197: doctests in modules loaded via zipimport (or any other PEP
15810  302 conformant loader) will now work correctly in most cases (they
15811  are still subject to the constraints that exist for all code running
15812  from inside a module loaded via a PEP 302 loader and attempting to
15813  perform IO operations based on __file__). Original patch by
15814  Alexander Belopolsky.
15815
15816- Issues #4082 and #4512: Add runpy support to zipimport in a manner that
15817  allows backporting to maintenance branches. Original patch by
15818  Alexander Belopolsky.
15819
15820- Issue #4163: textwrap module: allow word splitting on a hyphen preceded by
15821  a non-ASCII letter.
15822
15823- Issue #4616: TarFile.utime(): Restore directory times on Windows.
15824
15825- Issue #4021: tokenize.detect_encoding() now raises a SyntaxError when the
15826  codec cannot be found.  This is for compatibility with the builtin behavior.
15827
15828- Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to
15829  give correct results in the case where one argument is a quiet NaN
15830  and the other is a finite number that requires rounding.
15831
15832- Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat
15833  libs.
15834
15835- Added the subprocess.check_call_output() convenience function to get output
15836  from a subprocess on success or raise an exception on error.
15837
15838- Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters to
15839  support unusual filenames (such as those containing semi-colons) in
15840  Content-Disposition headers.
15841
15842- Issue #4384: Added logging integration with warnings module using
15843  captureWarnings(). This change includes a NullHandler which does nothing;
15844  it will be of use to library developers who want to avoid the "No handlers
15845  could be found for logger XXX" message which can appear if the library user
15846  doesn't configure logging.
15847
15848- Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an
15849  exception.
15850
15851- Issue #4529: fix the parser module's validation of try-except-finally
15852  statements.
15853
15854- Issue #4458: getopt.gnu_getopt() now recognizes a single "-" as an argument,
15855  not a malformed option.
15856
15857- Added the subprocess.check_output() convenience function to get output
15858  from a subprocess on success or raise an exception on error.
15859
15860- Issue #4542: On Windows, binascii.crc32 still accepted str as binary input;
15861  the corresponding tests now pass.
15862
15863- Issue #4537: webbrowser.UnixBrowser would fail to open the browser because
15864  it was calling the wrong open() function.
15865
15866- Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters to
15867  support unusual filenames (such as those containing semi-colons) in
15868  Content-Disposition headers.
15869
15870- Issue #4861: ctypes.util.find_library(): Robustify. Fix library detection on
15871  biarch systems. Try to rely on ldconfig only, without using objdump and gcc.
15872
15873- Issue #5104: The socket module now raises OverflowError when 16-bit port and
15874  protocol numbers are supplied outside the allowed 0-65536 range on bind()
15875  and getservbyport().
15876
15877- Windows locale mapping updated to Vista.
15878
15879Tools/Demos
15880-----------
15881
15882- Issue #4704: remove use of cmp() in pybench, bump its version number to 2.1,
15883  and make it 2.6-compatible.
15884
15885- Ttk demos added in Demo/tkinter/ttk/
15886
15887- Issue #4677: add two list comprehension tests to pybench.
15888
15889
15890Build
15891-----
15892
15893- Issue #6094: Build correctly with Subversion 1.7.
15894
15895- Issue #5847: Remove -n switch on "Edit with IDLE" menu item.
15896
15897- Issue #5726: Make Modules/ld_so_aix return the actual exit code of the
15898  linker, rather than always exit successfully. Patch by Floris Bruynooghe.
15899
15900- Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
15901  the order that backends for the dbm extension are checked.
15902
15903- Link the shared python library with $(MODLIBS).
15904
15905- Issue #5134: Silence compiler warnings when compiling sqlite with VC++.
15906
15907- Issue #4494: Fix build with Py_NO_ENABLE_SHARED on Windows.
15908
15909- Issue #4895: Use _strdup on Windows CE.
15910
15911- Issue #4472: "configure --enable-shared" now works on OSX
15912
15913- Issues #4728 and #4060: WORDS_BIGEDIAN is now correct in Universal builds.
15914
15915- Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs".
15916
15917- Issue #4289: Remove Cancel button from AdvancedDlg.
15918
15919- Issue #1656675: Register a drop handler for .py* files on Windows.
15920
15921- Issue #4120: Exclude manifest from extension modules in VS2008.
15922
15923- Issue #4091: Install pythonxy.dll in system32 again.
15924
15925- Issue #4018: Disable "for me" installations on Vista.
15926
15927- Issue #3758: Add ``patchcheck`` build target to .PHONY.
15928
15929- Issue #4204: Fixed module build errors on FreeBSD 4.
15930
15931
15932C-API
15933-----
15934
15935- Issue #6624: yArg_ParseTuple with "s" format when parsing argument with
15936  NUL: Bogus TypeError detail string.
15937
15938- Issue #5175: PyLong_AsUnsignedLongLong now raises OverflowError
15939  for negative arguments.  Previously, it raised TypeError.
15940
15941- Issue #4720: The format for PyArg_ParseTupleAndKeywords can begin with '|'.
15942
15943- Issue #3632: from the gdb debugger, the 'pyo' macro can now be called when
15944  the GIL is released, or owned by another thread.
15945
15946- Issue #4122: On Windows, fix a compilation error when using the
15947  Py_UNICODE_ISSPACE macro in an extension module.
15948
15949
15950Extension Modules
15951-----------------
15952
15953- Issue #3745: Fix hashlib to always reject unicode and non buffer-api
15954  supporting objects as input no matter how it was compiled (built in
15955  implementations or external openssl library).
15956
15957- Issue #4397: Fix occasional test_socket failure on OS X.
15958
15959- Issue #4279: Fix build of parsermodule under Cygwin.
15960
15961- Issue #4751: hashlib now releases the GIL when hashing large buffers
15962  (with a hardwired threshold of 2048 bytes), allowing better parallelization
15963  on multi-CPU systems. Contributed by Lukas Lueg (ebfe) and Victor Stinner.
15964
15965- Issue #4051: Prevent conflict of UNICODE macros in cPickle.
15966
15967- Issue #4738: Each zlib object now has a separate lock, allowing several streams
15968  to be compressed or decompressed at once on multi-CPU systems. Also, the GIL
15969  is now released when computing the CRC of a large buffer. Patch by ebfe.
15970
15971- Issue #4228: Pack negative values the same way as 2.4 in struct's L format.
15972
15973- Issue #1040026: Fix os.times result on systems where HZ is incorrect.
15974
15975- Issues #3167, #3682: Fix test_math failures for log, log10 on Solaris,
15976  OpenBSD.
15977
15978- Issue #4583: array.array would not always prohibit resizing when a buffer
15979  has been exported, resulting in an interpreter crash when accessing the
15980  buffer.
15981
15982
15983- Issue #5228: Make functools.partial objects can now be pickled.
15984
15985Tests
15986-----
15987
15988- Issue #6152: New option '-j'/'--multiprocess' for regrtest allows running
15989  regression tests in parallel, shortening the total runtime.
15990
15991- Issue #5450: Moved tests involving loading tk from Lib/test/test_tcl to
15992  Lib/tkinter/test/test_tkinter/test_loadtk. With this, these tests demonstrate
15993  the same behaviour as test_ttkguionly (and now also test_tk) which is to
15994  skip the tests if DISPLAY is defined but can't be used.
15995
15996- regrtest no longer treats ImportError as equivalent to SkipTest.  Imports
15997  that should cause a test to be skipped are now done using import_module
15998  from test support, which does the conversion.
15999
16000- Issue #5083: New 'gui' resource for regrtest.
16001
16002
16003Docs
16004----
16005
16006
16007What's New in Python 3.0 final
16008==============================
16009
16010*Release date: 03-Dec-2008*
16011
16012Core and Builtins
16013-----------------
16014
16015- Issue #3996: On Windows, the PyOS_CheckStack function would cause the
16016  interpreter to abort ("Fatal Python error: Could not reset the stack!")
16017  instead of throwing a MemoryError.
16018
16019- Issue #3689: The list reversed iterator now supports __length_hint__
16020  instead of __len__.  Behavior now matches other reversed iterators.
16021
16022- Issue #4367: Python would segfault during compiling when the unicodedata
16023  module couldn't be imported and \N escapes were present.
16024
16025- Fix build failure of _cursesmodule.c building with -D_FORTIFY_SOURCE=2.
16026
16027Library
16028-------
16029
16030- Issue #4387: binascii now refuses to accept str as binary input.
16031
16032- Issue #4073: Add 2to3 support to build_scripts, refactor that support
16033  in build_py.
16034
16035- IDLE would print a "Unhandled server exception!" message when internal
16036  debugging is enabled.
16037
16038- Issue #4455: IDLE failed to display the windows list when two windows have
16039  the same title.
16040
16041- Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an
16042  exception.
16043
16044- Issue #4433: Fixed an access violation when garbage collecting
16045  _ctypes.COMError instances.
16046
16047- Issue #4429: Fixed UnicodeDecodeError in ctypes.
16048
16049- Issue #4373: Corrected a potential reference leak in the pickle module and
16050  silenced a false positive ref leak in distutils.tests.test_build_ext.
16051
16052- Issue #4382: dbm.dumb did not specify the expected file encoding for opened
16053  files.
16054
16055- Issue #4383: When IDLE cannot make the connection to its subprocess, it would
16056  fail to properly display the error message.
16057
16058Build
16059-----
16060
16061- Issue #4407: Fix source file that caused the compileall step in Windows installer
16062  to fail.
16063
16064Docs
16065----
16066
16067- Issue #4449: Fixed multiprocessing examples
16068
16069- Issue #3799: Document that dbm.gnu and dbm.ndbm will accept string arguments
16070  for keys and values which will be converted to bytes before committal.
16071
16072
16073What's New in Python 3.0 release candidate 3?
16074=============================================
16075
16076*Release date: 20-Nov-2008*
16077
16078
16079Core and Builtins
16080-----------------
16081
16082- Issue #4349: sys.path included a non-existent platform directory because of a
16083  faulty Makefile.
16084
16085- Issue #3327: Don't overallocate in the modules_by_index list.
16086
16087- Issue #1721812:  Binary set operations and copy() returned the input type
16088  instead of the appropriate base type.  This was incorrect because set
16089  subclasses would be created without their __init__() method being called.
16090  The corrected behavior brings sets into line with lists and dicts.
16091
16092- Issue #4296: Fix PyObject_RichCompareBool so that "x in [x]" evaluates to
16093  True, even when x doesn't compare equal to itself.  This was a regression
16094  from 2.6.
16095
16096- Issue #3705: Command-line arguments were not correctly decoded when the
16097  terminal does not use UTF8.
16098
16099Library
16100-------
16101
16102- Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if
16103  the ctypes module is not present.
16104
16105- FileIO's mode attribute now always includes ``"b"``.
16106
16107- Issue #3799: Fix dbm.dumb to accept strings as well as bytes for keys. String
16108  keys are now written out in UTF-8.
16109
16110- Issue #4338: Fix distutils upload command.
16111
16112- Issue #4354: Fix distutils register command.
16113
16114- Issue #4116: Resolve member name conflict in ScrolledCanvas.__init__.
16115
16116- Issue #4307: The named tuple that ``inspect.getfullargspec()`` returns now
16117  uses ``kwonlydefaults`` instead of ``kwdefaults``.
16118
16119- Issue #4298: Fix a segfault when pickle.loads is passed ill-formed input.
16120
16121- Issue #4283: Fix a left-over "iteritems" call in distutils.
16122
16123Build
16124-----
16125
16126- Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs".
16127
16128- Issue #4289: Remove Cancel button from AdvancedDlg.
16129
16130- Issue #1656675: Register a drop handler for .py* files on Windows.
16131
16132Tools/Demos
16133-----------
16134
16135- Demos of the socketserver module now work with Python 3.
16136
16137
16138What's New in Python 3.0 release candidate 2
16139============================================
16140
16141*Release date: 05-Nov-2008*
16142
16143Core and Builtins
16144-----------------
16145
16146- Issue #4211: The __path__ attribute of frozen packages is now a list instead
16147  of a string as required by PEP 302.
16148
16149- Issue #3727: Fixed poplib.
16150
16151- Issue #3714: Fixed nntplib by using bytes where appropriate.
16152
16153- Issue #1210: Fixed imaplib and its documentation.
16154
16155- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()``
16156  method on file objects with closefd=False. The file descriptor is still
16157  kept open but the file object behaves like a closed file. The ``FileIO``
16158  object also got a new readonly attribute ``closefd``.
16159
16160- Issue #3626: On cygwin, starting python with a non-existent script name
16161  would not display anything if the file name is only 1 character long.
16162
16163- Issue #4176: Fixed a crash when pickling an object which ``__reduce__``
16164  method does not return iterators for the 4th and 5th items.
16165
16166- Issue #3723: Fixed initialization of subinterpreters.
16167
16168- Issue #4213: The file system encoding is now normalized by the
16169  codec subsystem, for example UTF-8 is turned into utf-8.
16170
16171- Issue #4200: Changed the atexit module to store its state in its
16172  PyModuleDef atexitmodule. This fixes a bug with multiple subinterpeters.
16173
16174- Issue #4237: io.FileIO() was raising invalid warnings caused by
16175  insufficient initialization of PyFileIOObject struct members.
16176
16177- Issue #4170: Pickling a collections.defaultdict object would crash the
16178  interpreter.
16179
16180- Issue #4146: Compilation on OpenBSD has been restored.
16181
16182- Issue #3574: compile() incorrectly handled source code encoded as Latin-1.
16183
16184- Issues #2384 and #3975: Tracebacks were not correctly printed when the
16185  source file contains a ``coding:`` header: the wrong line was displayed, and
16186  the encoding was not respected.
16187
16188- Issue #3740: Null-initialize module state.
16189
16190- Issue #3946: PyObject_CheckReadBuffer crashed on a memoryview object.
16191
16192- Issue #1688: On Windows, the input() prompt was not correctly displayed if it
16193  contains non-ascii characters.
16194
16195- Bug #3951: Py_USING_MEMORY_DEBUGGER should not be enabled by default.
16196
16197Library
16198-------
16199
16200- Issue #3664: The pickle module could segfault if a subclass of Pickler fails
16201  to call the base __init__ method.
16202
16203- Issue #3725: telnetlib now works completely in bytes.
16204
16205- Issue #4072: Restore build_py_2to3.
16206
16207- Issue #4014: Don't claim that Python has an Alpha release status, in addition
16208  to claiming it is Mature.
16209
16210- Issue #3187: Add sys.setfilesystemencoding.
16211
16212- Issue #3187: Better support for "undecodable" filenames.  Code by Victor
16213  Stinner, with small tweaks by GvR.
16214
16215- Issue #3965: Allow repeated calls to turtle.Screen, by making it a
16216  true singleton object.
16217
16218- Issue #3911: ftplib.FTP.makeport() could give invalid port numbers.
16219
16220- Issue #3929: When the database cannot be opened, dbm.open() would incorrectly
16221  raise a TypeError: "'tuple' object is not callable" instead of the expected
16222  dbm.error.
16223
16224- Bug #3884: Make the turtle module toplevel again.
16225
16226- Issue #3547: Fixed ctypes structures bitfields of varying integer
16227  sizes.
16228
16229Extension Modules
16230-----------------
16231
16232- Issue #3659: Subclasses of str didn't work as SQL parameters.
16233
16234Build
16235-----
16236
16237- Issue #4120: Exclude manifest from extension modules in VS2008.
16238
16239- Issue #4091: Install pythonxy.dll in system32 again.
16240
16241- Issue #4018: Disable "for me" installations on Vista.
16242
16243- Issue #4204: Fixed module build errors on FreeBSD 4.
16244
16245Tools/Demos
16246-----------
16247
16248- Issue #3717: Fix Demo/embed/demo.c.
16249
16250- Issue #4072: Add a distutils demo for build_py_2to3.
16251
16252
16253What's New in Python 3.0 release candidate 1
16254============================================
16255
16256*Release date: 17-Sep-2008*
16257
16258Core and Builtins
16259-----------------
16260
16261- Issue #3827: memoryview lost its size attribute in favor of using len(view).
16262
16263- Issue #3813: could not lanch python.exe via symbolic link on cygwin.
16264
16265- Issue #3705: fix crash when given a non-ascii value on the command line for
16266  the "-c" and "-m" parameters. Now the behaviour is as expected under Linux,
16267  although under Windows it fails at a later point.
16268
16269- Issue #3279: Importing site at interpreter was failing silently because the
16270  site module uses the open builtin which was not initialized at the time.
16271
16272- Issue #3660: Corrected a reference leak in str.encode() when the encoder
16273  does not return a bytes object.
16274
16275- Issue #3774: Added a few more checks in PyTokenizer_FindEncoding to handle
16276  error conditions.
16277
16278- Issue #3594: Fix Parser/tokenizer.c:fp_setreadl() to open the file being
16279  tokenized by either a file path or file pointer for the benefit of
16280  PyTokenizer_FindEncoding().
16281
16282- Issue #3696: Error parsing arguments on OpenBSD <= 4.4 and Cygwin. On
16283  these systems, the mbstowcs() function is slightly buggy and must be
16284  replaced with strlen() for the purpose of counting of number of wide
16285  characters needed to represent the multi-byte character string.
16286
16287- Issue #3697: "Fatal Python error: Cannot recover from stack overflow"
16288  could be easily encountered under Windows in debug mode when exercising
16289  the recursion limit checking code, due to bogus handling of recursion
16290  limit when USE_STACKCHEK was enabled.
16291
16292- Issue #3639: The _warnings module could segfault the interpreter when
16293  unexpected types were passed in as arguments.
16294
16295- Issue #3712: The memoryview object had a reference leak and didn't support
16296  cyclic garbage collection.
16297
16298- Issue #3668: Fix a memory leak with the "s*" argument parser in
16299  PyArg_ParseTuple and friends, which occurred when the argument for "s*"
16300  was correctly parsed but parsing of subsequent arguments failed.
16301
16302- Issue #3611: An exception __context__ could be cleared in a complex pattern
16303  involving a __del__ method re-raising an exception.
16304
16305- Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to
16306  match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__
16307  mechanism. In the process, fix a bug where isinstance() and issubclass(),
16308  when given a tuple of classes as second argument, were looking up
16309  __instancecheck__ / __subclasscheck__ on the tuple rather than on each
16310  type object.
16311
16312- Issue #3663: Py_None was decref'd when printing SyntaxErrors.
16313
16314- Issue #3651: Fix various memory leaks when using the buffer
16315  interface, or when the "s#" code of PyArg_ParseTuple is given a
16316  bytes object.
16317
16318- Issue #3657: Fix uninitialized memory read when pickling longs.
16319  Found by valgrind.
16320
16321- Apply security patches from Apple.
16322
16323- Fix crashes on memory allocation failure found with failmalloc.
16324
16325- Fix memory leaks found with valgrind and update suppressions file.
16326
16327- Fix compiler warnings in opt mode which would lead to invalid memory reads.
16328
16329- Fix problem using wrong name in decimal module reported by pychecker.
16330
16331- Issue #3650: Fixed a reference leak in bytes.split('x').
16332
16333- bytes(o) now tries to use o.__bytes__() before using fallbacks.
16334
16335- Issue #1204: The configure script now tests for additional libraries
16336  that may be required when linking against readline.  This fixes issues
16337  with x86_64 builds on some platforms (a few Linux flavors and OpenBSD).
16338
16339C API
16340-----
16341
16342- PyObject_Bytes and PyBytes_FromObject were added.
16343
16344Library
16345-------
16346
16347- Issue #3756: make re.escape() handle bytes as well as str.
16348
16349- Issue #3800: fix filter() related bug in formatter.py.
16350
16351- Issue #874900: fix behaviour of threading module after a fork.
16352
16353- Issue #3535: zipfile couldn't read some zip files larger than 2GB.
16354
16355- Issue #3776: Deprecate the bsddb package for removal in 3.0.
16356
16357- Issue #3762: platform.architecture() fails if python is lanched via
16358  its symbolic link.
16359
16360- Issue #3660: fix a memory leak in the C accelerator of the pickle module.
16361
16362- Issue #3160: the "bdist_wininst" distutils command didn't work.
16363
16364- Issue #1658: tkinter changes dict size during iteration in both
16365    tkinter.BaseWidget and tkinter.scrolledtext.ScrolledText.
16366
16367- The bsddb module (and therefore the dbm.bsd module) has been removed.
16368  It is now maintained outside of the standard library at
16369  http://www.jcea.es/programacion/pybsddb.htm.
16370
16371- Issue #600362:  Relocated parse_qs() and parse_qsl(), from the cgi module
16372  to the urlparse one.  Added a DeprecationWarning in the old module, it
16373  will be deprecated in the future.
16374
16375- Issue #3719: platform.architecture() fails if there are spaces in the
16376  path to the Python binary.
16377
16378- Issue #3602: As part of the merge of r66135, make the parameters on
16379  warnings.catch_warnings() keyword-only. Also remove a DeprecationWarning.
16380
16381- The deprecation warnings for the camelCase threading API names were removed.
16382
16383- Issue #3110: multiprocessing fails to compiel on solaris 10 due to missing
16384  SEM_VALUE_MAX.
16385
16386Extension Modules
16387-----------------
16388
16389- Issue #3782: os.write() must not accept unicode strings.
16390
16391- Issue #2975: When compiling several extension modules with Visual Studio 2008
16392  from the same python interpreter, some environment variables would grow
16393  without limit.
16394
16395- Issue #3643: Added a few more checks to _testcapi to prevent segfaults by
16396  exploitation of poor argument checking.
16397
16398- bsddb code updated to version 4.7.3pre2. This code is the same than
16399  Python 2.6 one, since the intention is to keep a unified 2.x/3.x codebase.
16400  The Python code is automatically translated using "2to3". Please, do not
16401  update this code in Python 3.0 by hand. Update the 2.6 one and then
16402  do "2to3".
16403
16404- The _bytesio and _stringio modules are now compiled into the python binary.
16405
16406- Issue #3492 and #3790: Fixed the zlib module and zipimport module uses of
16407  mutable bytearray objects where they should have been using immutable bytes.
16408
16409- Issue #3797: Fixed the dbm, marshal, mmap, ossaudiodev, & winreg modules to
16410  return bytes objects instead of bytearray objects.
16411
16412
16413Tools/Demos
16414-----------
16415
16416- Fix Misc/gdbinit so it works.
16417
16418
16419Build
16420-----
16421
16422- Issue #3812: Failed to build python if configure --without-threads.
16423
16424- Issue #3791: Remove the bsddb module from the Windows installer, and the
16425  core bsddb library from the Windows build files.
16426
16427
16428What's new in Python 3.0b3?
16429===========================
16430
16431*Release date: 20-Aug-2008*
16432
16433Core and Builtins
16434-----------------
16435
16436- Issue #3653: Fix a segfault when sys.excepthook was called with invalid
16437  arguments.
16438
16439- Issue #2394: implement more of the memoryview API, with the caveat that
16440  only one-dimensional contiguous buffers are supported and exercised right
16441  now. Slicing, slice assignment and comparison (equality and inequality)
16442  have been added. Also, the tolist() method has been implemented, but only
16443  for byte buffers. Finally, the API has been updated to return bytes objects
16444  wherever it used to return bytearrays.
16445
16446- Issue #3560: clean up the new C PyMemoryView API so that naming is
16447  internally consistent; add macros PyMemoryView_GET_BASE() and
16448  PyMemoryView_GET_BUFFER() to access useful properties of a memory views
16449  without relying on a particular implementation; remove the ill-named
16450  PyMemoryView() function (PyMemoryView_GET_BUFFER() can be used instead).
16451
16452- ctypes function pointers that are COM methods have a boolean True
16453  value again.
16454
16455- Issue #1819: function calls with several named parameters are now on
16456  average 35% faster (as measured by pybench).
16457
16458- The undocumented C APIs PyUnicode_AsString() and
16459  PyUnicode_AsStringAndSize() were made private to the interpreter, in
16460  order to be able to refine their interfaces for Python 3.1.
16461
16462  If you need to access the UTF-8 representation of a Unicode object
16463  as bytes string, please use PyUnicode_AsUTF8String() instead.
16464
16465- Issue #3460: PyUnicode_Join() implementation is 10% to 80% faster thanks
16466  to Python 3.0's stricter semantics which allow avoiding successive
16467  reallocations of the result string (this also affects str.join()).
16468
16469
16470Library
16471-------
16472
16473- Issue #1276: Added temporary aliases for CJK Mac encodings to resolve
16474  a build problem on MacOS with CJK locales.  It adds four temporary
16475  mappings to existing legacy codecs that are virtually compatible
16476  with Mac encodings.  They will be replaced by codecs correctly
16477  implemented in 3.1.
16478
16479- Issue #3614: Corrected a typo in xmlrpc.client, leading to a NameError
16480  "global name 'header' is not defined".
16481
16482- Issue #2834: update the regular expression library to match the unicode
16483  standards of py3k. In other words, mixing bytes and unicode strings
16484  (be it as pattern, search string or replacement string) raises a TypeError.
16485  Moreover, the re.UNICODE flag is enabled automatically for unicode patterns,
16486  and can be disabled by specifying a new re.ASCII flag; as for bytes
16487  patterns, ASCII matching is the only option and trying to specify re.UNICODE
16488  for such patterns raises a ValueError.
16489
16490- Issue #3300: make urllib.parse.[un]quote() default to UTF-8.
16491  Code contributed by Matt Giuca.  quote() now encodes the input
16492  before quoting, unquote() decodes after unquoting.  There are
16493  new arguments to change the encoding and errors settings.
16494  There are also new APIs to skip the encode/decode steps.
16495  [un]quote_plus() are also affected.
16496
16497- Issue #2235: numbers.Number now blocks inheritance of the default id()
16498  based hash because that hash mechanism is not correct for numeric types.
16499  All concrete numeric types that inherit from Number (rather than just
16500  registering with it) must explicitly provide a hash implementation in
16501  order for their instances to be hashable.
16502
16503- Issue #2676: in the email package, content-type parsing was hanging on
16504  pathological input because of quadratic or exponential behaviour of a
16505  regular expression.
16506
16507- Issue #3476: binary buffered reading through the new "io" library is now
16508  thread-safe.
16509
16510- Issue #1342811: Fix leak in Tkinter.Menu.delete. Commands associated to
16511  menu entries were not deleted.
16512
16513- Remove the TarFileCompat class from tarfile.py.
16514
16515- Issue #2491: os.fdopen is now almost an alias for the built-in open(), and
16516  accepts the same parameters.  It just checks that its first argument is an
16517  integer.
16518
16519- Issue #3394: zipfile.writestr sets external attributes when passed a
16520  file name rather than a ZipInfo instance, so files are extracted with
16521  mode 0600 rather than 000 under Unix.
16522
16523- Issue #2523: Fix quadratic behaviour when read()ing a binary file without
16524  asking for a specific length.
16525
16526Extension Modules
16527-----------------
16528
16529- Bug #3542: Support Unicode strings in _msi module.
16530
16531What's new in Python 3.0b2?
16532===========================
16533
16534*Release date: 17-Jul-2008*
16535
16536Core and Builtins
16537-----------------
16538
16539- Issue #3008: the float type has a new instance method 'float.hex'
16540  and a new class method 'float.fromhex' to convert floating-point
16541  numbers to and from hexadecimal strings, respectively.
16542
16543- Issue #3083: Add alternate (#) formatting for bin, oct, hex output
16544  for str.format().  This adds the prefix 0b, 0o, or 0x, respectively.
16545
16546- Issue #3280: like chr(), the "%c" format now accepts unicode code points
16547  beyond the Basic Multilingual Plane (above 0xffff) on all configurations. On
16548  "narrow Unicode" builds, the result is a string of 2 code units, forming a
16549  UTF-16 surrogate pair.
16550
16551- Issue #3282: str.isprintable() should return False for undefined
16552  Unicode characters.
16553
16554- Issue #3236: Return small longs from PyLong_FromString.
16555
16556- Exception tracebacks now support exception chaining.
16557
16558Library
16559-------
16560
16561- Removed the sunaudio module. Use sunau instead.
16562
16563- Issue #3554: ctypes.string_at and ctypes.wstring_at did call Python
16564  api functions without holding the GIL, which could lead to a fatal
16565  error when they failed.
16566
16567- Issue #799428: Fix Tkinter.Misc._nametowidget to unwrap Tcl command objects.
16568
16569- Removed "ast" function aliases from the parser module.
16570
16571- Issue #3313: Fixed a crash when a failed dlopen() call does not set
16572  a valid dlerror() message.
16573
16574- Issue #3258: Fixed a crash when a ctypes POINTER type to an
16575  incomplete structure was created.
16576
16577- Issue #2683: Fix inconsistency in subprocess.Popen.communicate(): the
16578  argument now must be a bytes object in any case.
16579
16580- Issue #3145: help("modules whatever") failed when trying to load the source
16581  code of every single module of the standard library, including invalid files
16582  used in the test suite.
16583
16584- The gettext library now consistently uses Unicode strings for message ids
16585  and message strings, and ``ugettext()`` and the like don't exist anymore.
16586
16587- The traceback module has been expanded to handle chained exceptions.
16588
16589C API
16590-----
16591
16592- Issue #3247: the function Py_FindMethod was removed. Modern types should
16593  use the tp_methods slot instead.
16594
16595Tools/Demos
16596-----------
16597
16598- The Mac/Demos directory has been removed.
16599
16600- All of the Mac scripts have been removed (including BuildApplet.py).
16601
16602
16603What's new in Python 3.0b1?
16604===========================
16605
16606*Release date: 18-Jun-2008*
16607
16608Core and Builtins
16609-----------------
16610
16611- Issue #3211: warnings.warn_explicit() did not guard against its 'registry'
16612  argument being anything other than a dict or None. Also fixed a bug in error
16613  handling when 'message' and 'category' were both set to None, triggering a
16614  bus error.
16615
16616- Issue #3100: Corrected a crash on deallocation of a subclassed weakref which
16617  holds the last (strong) reference to its referent.
16618
16619- Issue #2630: implement PEP 3138. repr() now returns printable
16620  Unicode characters unescaped, to get an ASCII-only representation
16621  of an object use ascii().
16622
16623- Issue #1342: On windows, Python could not start when installed in a
16624  directory with non-ascii characters.
16625
16626- Implement PEP 3121: new module initialization and finalization API.
16627
16628- Removed the already-defunct ``-t`` option.
16629
16630- Issue #2957: Corrected a ValueError "recursion limit exceeded", when
16631  unmarshalling many code objects, which happens when importing a
16632  large .pyc file (~1000 functions).
16633
16634- Issue #2963: fix merging oversight that disabled method cache for
16635  all types.
16636
16637- Issue #2964: fix a missing INCREF in instancemethod_descr_get.
16638
16639- Issue #2895: Don't crash when given bytes objects as keyword names.
16640
16641- Issue #2798: When parsing arguments with PyArg_ParseTuple, the "s"
16642  code now allows any unicode string and returns a utf-8 encoded
16643  buffer, just like the "s#" code already does.  The "z" code was
16644  corrected as well.
16645
16646- Issue #2863: generators now have a ``gen.__name__`` attribute that
16647  equals ``gen.gi_code.co_name``, like ``func.__name___`` that equals
16648  ``func.func_code.co_name``.  The repr() of a generator now also
16649  contains this name.
16650
16651- Issue #2831: enumerate() now has a ``start`` argument.
16652
16653- Issue #2801: fix bug in the float.is_integer method where a
16654  ValueError was sometimes incorrectly raised.
16655
16656- The ``--with-toolbox-glue`` option (and the associated
16657  pymactoolbox.h) have been removed.
16658
16659- Issue #2196: hasattr() now lets exceptions which do not inherit
16660  Exception (KeyboardInterrupt, and SystemExit) propagate instead of
16661  ignoring them.
16662
16663- #3021 Exception reraising semantics have been significantly improved.  However,
16664  f_exc_type, f_exc_value, and f_exc_traceback cannot be accessed from Python
16665  code anymore.
16666
16667- Three of PyNumberMethods' members, nb_coerce, nb_hex, and nb_oct, have been
16668  removed.
16669
16670Extension Modules
16671-----------------
16672
16673- Renamed ``_winreg`` module to ``winreg``.
16674
16675- Support os.O_ASYNC and fcntl.FASYNC if the constants exist on the
16676  platform.
16677
16678- Support for Windows 9x has been removed from the winsound module.
16679
16680- Issue #2870: cmathmodule.c compile error.
16681
16682Library
16683-------
16684
16685- The methods ``is_in_tuple()``, ``is_vararg()``, and ``is_keywordarg()`` of
16686  symtable.Symbol have been removed.
16687
16688- Patch #3133: http.server.CGIHTTPRequestHandler did not work on windows.
16689
16690- a new ``urllib`` package was created.  It consists of code from
16691  ``urllib``, ``urllib2``, ``urlparse``, and ``robotparser``.  The old
16692  modules have all been removed.  The new package has five submodules:
16693  ``urllib.parse``, ``urllib.request``, ``urllib.response``,
16694  ``urllib.error``, and ``urllib.robotparser``.  The
16695  ``urllib.request.urlopen()`` function uses the url opener from
16696  ``urllib2``.  (Note that the unittests have not been renamed for the
16697  beta, but they will be renamed in the future.)
16698
16699- rfc822 has been removed in favor of the email package.
16700
16701- mimetools has been removed in favor of the email package.
16702
16703- Patch #2849: Remove use of rfc822 module from standard library.
16704
16705- Added C optimized implementation of io.StringIO.
16706
16707- The ``pickle`` module is now automatically use an optimized C
16708  implementation of Pickler and Unpickler when available. The
16709  ``cPickle`` module is no longer needed.
16710
16711- Removed the ``htmllib`` and ``sgmllib`` modules.
16712
16713- The deprecated ``SmartCookie`` and ``SimpleCookie`` classes have
16714  been removed from ``http.cookies``.
16715
16716- The ``commands`` module has been removed. Its getoutput() and
16717  getstatusoutput() functions have been moved to the ``subprocess`` module.
16718
16719- The ``http`` package was created; it contains the old ``httplib``
16720  as ``http.client``, ``Cookie`` as ``http.cookies``, ``cookielib``
16721  as ``http.cookiejar``, and the content of the three ``HTTPServer``
16722  modules as ``http.server``.
16723
16724- The ``xmlrpc`` package was created; it contains the old
16725  ``xmlrpclib`` module as ``xmlrpc.client`` and the content of
16726  the old ``SimpleXMLRPCServer`` and ``DocXMLRPCServer`` modules
16727  as ``xmlrpc.server``.
16728
16729- The ``dbm`` package was created, containing the old modules
16730  ``anydbm`` and ``whichdb`` in its ``__init__.py``, and having
16731  ``dbm.gnu`` (was ``gdbm``), ``dbm.bsd`` (was ``dbhash``),
16732  ``dbm.ndbm`` (was ``dbm``) and ``dbm.dumb`` (was ``dumbdbm``)
16733  as submodules.
16734
16735- The ``repr`` module has been renamed to ``reprlib``.
16736
16737- The ``statvfs`` module has been removed.
16738
16739- Issue #1713041: fix pprint's handling of maximum depth.
16740
16741- Issue #2250: Exceptions raised during evaluation of names in
16742  rlcompleter's ``Completer.complete()`` method are now caught and
16743  ignored.
16744
16745- Patch #2659: Added ``break_on_hyphens`` option to textwrap's
16746  ``TextWrapper`` class.
16747
16748- Issue #2487: change the semantics of math.ldexp(x, n) when n is too
16749  large to fit in a C long.  ldexp(x, n) now returns a zero (with
16750  suitable sign) if n is large and negative; previously, it raised
16751  OverflowError.
16752
16753- The ``ConfigParser`` module has been renamed to ``configparser``.
16754
16755- Issue #2865: webbrowser.open() works again in a KDE environment.
16756
16757- The ``multifile`` module has been removed.
16758
16759- The ``SocketServer`` module has been renamed to ``socketserver``.
16760
16761- Fixed the ``__all__`` setting on ``collections`` to include
16762  ``UserList`` and ``UserString``.
16763
16764- The sre module has been removed.
16765
16766- The Queue module has been renamed to queue.
16767
16768- The copy_reg module has been renamed to copyreg.
16769
16770- The mhlib module has been removed.
16771
16772- The ihooks module has been removed.
16773
16774- The fpformat module has been removed.
16775
16776- The dircache module has been removed.
16777
16778- The Canvas module has been removed.
16779
16780- The Decimal module gained the magic methods __round__, __ceil__,
16781  __floor__ and __trunc__, to give support for round, math.ceil,
16782  math.floor and math.trunc.
16783
16784- The user module has been removed.
16785
16786- The mutex module has been removed.
16787
16788- The imputil module has been removed.
16789
16790- os.path.walk has been removed in favor of os.walk.
16791
16792- pdb gained the "until" command.
16793
16794- The test.test_support module has been renamed to test.support.
16795
16796- The threading module API was renamed to be PEP 8 compliant.  The
16797  old names are still present, but will be removed in the near future.
16798
16799Tools/Demos
16800-----------
16801
16802- The bgen tool has been removed.
16803
16804Build
16805-----
16806
16807
16808What's New in Python 3.0a5?
16809===========================
16810
16811*Release date: 08-May-2008*
16812
16813Core and Builtins
16814-----------------
16815
16816- Fixed misbehaviour of PyLong_FromSsize_t on systems where
16817  sizeof(size_t) > sizeof(long).
16818
16819- Issue #2221: Corrected a SystemError "error return without exception
16820  set", when the code executed by exec() raises an exception, and
16821  sys.stdout.flush() also raises an error.
16822
16823- Bug #2565: The repr() of type objects now calls them 'class', not
16824  'type' - whether they are builtin types or not.
16825
16826- The command line processing was converted to pass Unicode strings
16827  through as unmodified as possible; as a consequence, the C API
16828  related to command line arguments was changed to use wchar_t.
16829
16830- All backslashes in raw strings are interpreted literally.  This
16831  means that '\u' and '\U' escapes are not treated specially.
16832
16833Extension Modules
16834-----------------
16835
16836Library
16837-------
16838
16839- ctypes objects now support the PEP3118 buffer interface.
16840
16841- Issue #2682: ctypes callback functions now longer contain a cyclic
16842  reference to themselves.
16843
16844- Issue #2058: Remove the buf attribute and add __slots__ to the
16845  TarInfo class in order to reduce tarfile's memory usage.
16846
16847- Bug #2606: Avoid calling .sort() on a dict_keys object.
16848
16849- The bundled libffi copy is now in sync with the recently released
16850  libffi3.0.5 version, apart from some small changes to
16851  Modules/_ctypes/libffi/configure.ac.
16852
16853Build
16854-----
16855
16856- Issue #1496032: On alpha, use -mieee when gcc is the compiler.
16857
16858- "make install" is now an alias for "make altinstall", to prevent
16859  accidentally overwriting a Python 2.x installation.  Use "make
16860  fullinstall" to force Python 3.0 to be installed as "python".
16861
16862- Issue #2544: On HP-UX systems, use 'gcc -shared' for linking when
16863  gcc is used as compiler.
16864
16865
16866What's New in Python 3.0a4?
16867===========================
16868
16869*Release date: 02-Apr-2008*
16870
16871Core and Builtins
16872-----------------
16873
16874- Bug #2301: Don't try decoding the source code into the original
16875  encoding for syntax errors.
16876
16877Extension Modules
16878-----------------
16879
16880- The dl module was removed, use the ctypes module instead.
16881
16882- Use wchar_t functions in _locale module.
16883
16884Library
16885-------
16886
16887- The class distutils.commands.build_py.build_py_2to3 can be used as a
16888  build_py replacement to automatically run 2to3 on modules that are
16889  going to be installed.
16890
16891- A new pickle protocol (protocol 3) is added with explicit support
16892  for bytes.  This is the default protocol.  It intentionally cannot
16893  be unpickled by Python 2.x.
16894
16895- When a pickle written by Python 2.x contains an (8-bit) str
16896  instance, this is now decoded to a (Unicode) str instance.  The
16897  encoding used to do this defaults to ASCII, but can be overridden
16898  via two new keyword arguments to the Unpickler class.  Previously
16899  this would create bytes instances, which is usually wrong: str
16900  instances are often used to pickle attribute names etc., and text is
16901  more common than binary data anyway.
16902
16903- Default to ASCII as the locale.getpreferredencoding, if the POSIX
16904  system doesn't support CODESET and LANG isn't set or doesn't allow
16905  deduction of an encoding.
16906
16907- Issue #1202: zlib.crc32 and zlib.adler32 now return an unsigned
16908  value.
16909
16910- Issue #719888: Updated tokenize to use a bytes API.  generate_tokens
16911  has been renamed tokenize and now works with bytes rather than
16912  strings.  A new detect_encoding function has been added for
16913  determining source file encoding according to PEP-0263.  Token
16914  sequences returned by tokenize always start with an ENCODING token
16915  which specifies the encoding used to decode the file.  This token is
16916  used to encode the output of untokenize back to bytes.
16917
16918
16919What's New in Python 3.0a3?
16920===========================
16921
16922*Release date: 29-Feb-2008*
16923
16924Core and Builtins
16925-----------------
16926
16927- Issue #2282: io.TextIOWrapper was not overriding seekable() from
16928  io.IOBase.
16929
16930- Issue #2115: Important speedup in setting __slot__ attributes.  Also
16931  prevent a possible crash: an Abstract Base Class would try to access
16932  a slot on a registered virtual subclass.
16933
16934- Fixed repr() and str() of complex numbers with infinity or nan as
16935  real or imaginary part.
16936
16937- Clear all free list during a gc.collect() of the highest generation
16938  in order to allow pymalloc to free more arenas. Python may give back
16939  memory to the OS earlier.
16940
16941- Issue #2045: Fix an infinite recursion triggered when printing a
16942  subclass of collections.defaultdict, if its default_factory is set
16943  to a bound method.
16944
16945- Fixed a minor memory leak in dictobject.c. The content of the free
16946  list was not freed on interpreter shutdown.
16947
16948- Limit free list of method and builtin function objects to 256
16949  entries each.
16950
16951- Patch #1953: Added ``sys._compact_freelists()`` and the C API
16952  functions ``PyInt_CompactFreeList`` and ``PyFloat_CompactFreeList``
16953  to compact the internal free lists of pre-allocted ints and floats.
16954
16955- Bug #1983: Fixed return type of fork(), fork1() and forkpty() calls.
16956  Python expected the return type int but the fork familie returns
16957  pi_t.
16958
16959- Issue #1678380: Fix a bug that identifies 0j and -0j when they
16960  appear in the same code unit.
16961
16962- Issue #2025: Added tuple.count() and tuple.index() methods to comply
16963  with the collections.Sequence API.
16964
16965- Fixed multiple reinitialization of the Python interpreter. The small
16966  int list in longobject.c has caused a seg fault during the third
16967  finalization.
16968
16969- Issue #1973: bytes.fromhex('') raised SystemError.
16970
16971- Issue #1771: remove cmp parameter from sorted() and list.sort().
16972
16973- Issue #1969: split and rsplit in bytearray are inconsistent.
16974
16975- map() no longer accepts None for the first argument.  Use zip()
16976  instead.
16977
16978- Issue #1769: Now int("- 1") is not allowed any more.
16979
16980- Object/longobject.c: long(float('nan')) raises an OverflowError
16981  instead of returning 0.
16982
16983- Issue #1762972: __file__ points to the source file instead of the
16984  pyc/pyo file if the py file exists.
16985
16986- Issue #1393: object_richcompare() returns NotImplemented instead of
16987  False if the objects aren't equal, to give the other side a chance.
16988
16989- Issue #1692: Interpreter was not displaying location of SyntaxError.
16990
16991- Improve some exception messages when Windows fails to load an
16992  extension module.  Now we get for example '%1 is not a valid Win32
16993  application' instead of 'error code 193'.  Also use Unicode strings
16994  to deal with non-English locales.
16995
16996- Issue #1587: Added instancemethod wrapper for PyCFunctions. The
16997  Python C API has gained a new type *PyInstanceMethod_Type* and the
16998  functions *PyInstanceMethod_Check(o)*, *PyInstanceMethod_New(func)*
16999  and *PyInstanceMethod_Function(im)*.
17000
17001- Constants gc.DEBUG_OBJECT and gc.DEBUG_INSTANCE have been removed
17002  from the gc module; gc.DEBUG_COLLECTABLE or gc.DEBUG_UNCOLLECTABLE
17003  are now enough to print the corresponding list of objects considered
17004  by the garbage collector.
17005
17006- Issue #1573: Improper use of the keyword-only syntax makes the
17007  parser crash.
17008
17009- Issue #1564: The set implementation should special-case PyUnicode
17010  instead of PyString.
17011
17012- Patch #1031213: Decode source line in SyntaxErrors back to its
17013  original source encoding.
17014
17015- inspect.getsource() includes the decorators again.
17016
17017- Bug #1713: posixpath.ismount() claims symlink to a mountpoint is a
17018  mountpoint.
17019
17020- Fix utf-8-sig incremental decoder, which didn't recognise a BOM when
17021  the first chunk fed to the decoder started with a BOM, but was
17022  longer than 3 bytes.
17023
17024Extension Modules
17025-----------------
17026
17027- Code for itertools ifilter(), imap(), and izip() moved to bultins
17028  and renamed to filter(), map(), and zip().  Also, renamed
17029  izip_longest() to zip_longest() and ifilterfalse() to filterfalse().
17030
17031- Issue #1762972: Readded the reload() function as imp.reload().
17032
17033- Bug #2111: mmap segfaults when trying to write a block opened with
17034  PROT_READ.
17035
17036- Issue #2063: correct order of utime and stime in os.times() result
17037  on Windows.
17038
17039Library
17040-------
17041
17042- Weakref dictionaries now inherit from MutableMapping.
17043
17044- Created new UserDict class in collections module.  This one inherits
17045  from and complies with the MutableMapping ABC.  Also, moved
17046  UserString and UserList to the collections module.  The
17047  MutableUserString class was removed.
17048
17049- Removed UserDict.DictMixin.  Replaced all its uses with
17050  collections.MutableMapping.
17051
17052- Issue #1703: getpass() should flush after writing prompt.
17053
17054- Issue #1585: IDLE uses non-existent xrange() function.
17055
17056- Issue #1578: Problems in win_getpass.
17057
17058Build
17059-----
17060
17061- Renamed --enable-unicode configure flag to --with-wide-unicode,
17062  since Unicode strings can't be disabled anymore.
17063
17064C API
17065-----
17066
17067- Issue #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE,
17068  Py_TYPE and Py_REFCNT.
17069
17070- New API PyImport_ImportModuleNoBlock(), works like
17071  PyImport_ImportModule() but won't block on the import lock
17072  (returning an error instead).
17073
17074
17075What's New in Python 3.0a2?
17076===========================
17077
17078*Release date: 07-Dec-2007*
17079
17080(Note: this list is incomplete.)
17081
17082Core and Builtins
17083-----------------
17084
17085- str8 now has the same construction signature as bytes.
17086
17087- Comparisons between str and str8 now return False/True for ==/!=.
17088  sqlite3 returns str8 when recreating on object from it's __conform__
17089  value.  The struct module returns str8 for all string-related
17090  formats.  This was true before this change, but becomes more
17091  apparent thanks to string comparisons always being False.
17092
17093- Replaced `PyFile_FromFile()` with `PyFile_FromFd(fd, name. mode,
17094  buffer, encoding, newline)`.
17095
17096- Fixed `imp.find_module()` to obey the -*- coding: -*- header.
17097
17098- Changed `__file__` and `co_filename` to unicode. The path names are decoded
17099  with `Py_FileSystemDefaultEncoding` and a new API method
17100  `PyUnicode_DecodeFSDefault(char*)` was added.
17101
17102- io.open() and _fileio.FileIO have grown a new argument closefd. A
17103  false value disables the closing of the file descriptor.
17104
17105- Added a new option -b to issues warnings (-bb for errors) about
17106  certain operations between bytes/buffer and str like str(b'') and
17107  comparison.
17108
17109- The standard streams sys.stdin, stdout and stderr may be None
17110  when the C runtime library returns an invalid file descriptor
17111  for the streams (fileno(stdin) < 0). For now this happens only for
17112  Windows GUI apps and scripts started with `pythonw.exe`.
17113
17114- Added PCbuild9 directory for VS 2008.
17115
17116- Renamed structmember.h WRITE_RESTRICTED to PY_WRITE_RESTRICTED to
17117  work around a name clash with VS 2008 on Windows.
17118
17119- Unbound methods are gone for good. ClassObject.method returns an
17120  ordinary function object, instance.method still returns a bound
17121  method object.  The API of bound methods is cleaned up, too. The
17122  im_class attribute is removed and im_func + im_self are renamed to
17123  __func__ and __self__. The factory PyMethod_New takes only func and
17124  instance as argument.
17125
17126- intobject.h is no longer included by Python.h. The remains were
17127  moved to longobject.h. It still exists to define several aliases
17128  from PyInt to PyLong functions.
17129
17130- Removed sys.maxint, use sys.maxsize instead.
17131
17132Extension Modules
17133-----------------
17134
17135- The `hotshot` profiler has been removed; use `cProfile` instead.
17136
17137Library
17138-------
17139
17140- When loading an external file using testfile(), the passed-in
17141  encoding argument was being ignored if __loader__ is defined and
17142  forcing the source to be UTF-8.
17143
17144- The methods `os.tmpnam()`, `os.tempnam()` and `os.tmpfile()` have
17145  been removed in favor of the tempfile module.
17146
17147- Removed the 'new' module.
17148
17149- Removed all types from the 'types' module that are easily accessible
17150  through builtins.
17151
17152
17153What's New in Python 3.0a1?
17154===========================
17155
17156*Release date: 31-Aug-2007*
17157
17158Core and Builtins
17159-----------------
17160
17161- PEP 3131: Support non-ASCII identifiers.
17162
17163- PEP 3120: Change default encoding to UTF-8.
17164
17165- PEP 3123: Use proper C inheritance for PyObject.
17166
17167- Removed the __oct__ and __hex__ special methods and added a bin()
17168  builtin function.
17169
17170- PEP 3127: octal literals now start with "0o". Old-style octal
17171  literals are invalid. There are binary literals with a prefix of
17172  "0b".  This also affects int(x, 0).
17173
17174- None, True, False are now keywords.
17175
17176- PEP 3119: isinstance() and issubclass() can be overridden.
17177
17178- Remove BaseException.message.
17179
17180- Remove tuple parameter unpacking (PEP 3113).
17181
17182- Remove the f_restricted attribute from frames.  This naturally leads
17183  to the removal of PyEval_GetRestricted() and PyFrame_IsRestricted().
17184
17185- PEP 3132 was accepted. That means that you can do ``a, *b =
17186  range(5)`` to assign 0 to a and [1, 2, 3, 4] to b.
17187
17188- range() now returns an iterator rather than a list.  Floats are not
17189  allowed.  xrange() is no longer defined.
17190
17191- Patch #1660500: hide iteration variable in list comps, add set comps
17192  and use common code to handle compilation of iterative expressions.
17193
17194- By default, != returns the opposite of ==, unless the latter returns
17195  NotImplemented.
17196
17197- Patch #1680961: sys.exitfunc has been removed and replaced with a
17198  private C-level API.
17199
17200- PEP 3115: new metaclasses: the metaclass is now specified as a
17201  keyword arg in the class statement, which can now use the full
17202  syntax of a parameter list. Also, the metaclass can implement a
17203  __prepare__ function which will be called to create the dictionary
17204  for the new class namespace.
17205
17206- The long-deprecated argument "pend" of PyFloat_FromString() has been
17207  removed.
17208
17209- The dir() function has been extended to call the __dir__() method on
17210  its argument, if it exists. If not, it will work like before. This
17211  allows customizing the output of dir() in the presence of a
17212  __getattr__().
17213
17214- Removed support for __members__ and __methods__.
17215
17216- Removed indexing/slicing on BaseException.
17217
17218- input() became raw_input(): the name input() now implements the
17219  functionality formerly known as raw_input(); the name raw_input() is
17220  no longer defined.
17221
17222- Classes listed in an 'except' clause must inherit from
17223  BaseException.
17224
17225- PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone;
17226  and .keys(), .items(), .values() return dict views, which behave
17227  like sets.
17228
17229- PEP 3105: print is now a function.  Also (not in the PEP) the
17230  'softspace' attribute of files is now gone (since print() doesn't
17231  use it).  A side effect of this change is that you can get
17232  incomplete output lines in interactive sessions:
17233
17234  >>> print(42, end="")
17235  42>>>
17236
17237  We may be able to fix this after the I/O library rewrite.
17238
17239- PEP 3102: keyword-only arguments.
17240
17241- Int/Long unification is complete.  The 'long' built-in type and
17242  literals with trailing 'L' or 'l' have been removed.  Performance
17243  may be sub-optimal (haven't really benchmarked).
17244
17245- 'except E, V' must now be spelled as 'except E as V' and deletes V
17246  at the end of the except clause; V must be a simple name.
17247
17248- Added function annotations per PEP 3107.
17249
17250- Added nonlocal declaration from PEP 3104:
17251
17252  >>> def f(x):
17253  ...     def inc():
17254  ...         nonlocal x
17255  ...         x += 1
17256  ...         return x
17257  ...     return inc
17258  ...
17259  >>> inc = f(0)
17260  >>> inc()
17261  1
17262  >>> inc()
17263  2
17264
17265- Moved intern() to sys.intern().
17266
17267- exec is now a function.
17268
17269- Renamed nb_nonzero to nb_bool and __nonzero__ to __bool__.
17270
17271- Classic classes are a thing of the past.  All classes are new style.
17272
17273- Exceptions *must* derive from BaseException.
17274
17275- Integer division always returns a float.  The -Q option is no more.
17276  All the following are gone:
17277
17278  * PyNumber_Divide and PyNumber_InPlaceDivide
17279  * __div__, __rdiv__, and __idiv__
17280  * nb_divide, nb_inplace_divide
17281  * operator.div, operator.idiv, operator.__div__, operator.__idiv__
17282    (Only __truediv__ and __floordiv__ remain, not sure how to handle
17283    them if we want to re-use __div__ and friends.  If we do, it will
17284    make it harder to write code for both 2.x and 3.x.)
17285
17286- 'as' and 'with' are keywords.
17287
17288- Absolute import is the default behavior for 'import foo' etc.
17289
17290- Removed support for syntax: backticks (ie, `x`), <>.
17291
17292- Removed these Python builtins: apply(), callable(), coerce(),
17293  execfile(), file(), reduce(), reload().
17294
17295- Removed these Python methods: {}.has_key.
17296
17297- Removed these opcodes: BINARY_DIVIDE, INPLACE_DIVIDE, UNARY_CONVERT.
17298
17299- Remove C API support for restricted execution.
17300
17301- zip(), map() and filter() now return iterators, behaving like their
17302  itertools counterparts.  This also affect map()'s behavior on
17303  sequences of unequal length -- it now stops after the shortest one
17304  is exhausted.
17305
17306- Additions: set literals, set comprehensions, ellipsis literal.
17307
17308- Added class decorators per PEP 3129.
17309
17310
17311Extension Modules
17312-----------------
17313
17314- Removed the imageop module.  Obsolete long with its unit tests
17315  becoming useless from the removal of rgbimg and imgfile.
17316
17317- Removed these attributes from the operator module: div, idiv,
17318  __div__, __idiv__, isCallable, sequenceIncludes.
17319
17320- Removed these attributes from the sys module: exc_clear(), exc_type,
17321  exc_value, exc_traceback.
17322
17323
17324Library
17325-------
17326
17327- Removed the compiler package.  Use of the _ast module and (an
17328  eventual) AST -> bytecode mechanism.
17329
17330- Removed these modules: audiodev, Bastion, bsddb185, exceptions,
17331  linuxaudiodev, md5, MimeWriter, mimify, popen2, rexec, sets, sha,
17332  stringold, strop, sunaudiodev, timing, xmllib.
17333
17334- Moved the toaiff module to Tools/Demos.
17335
17336- Removed obsolete IRIX modules: al/AL, cd/CD, cddb, cdplayer, cl/CL,
17337  DEVICE, ERRNO, FILE, fl/FL, flp, fm, GET, gl/GL, GLWS, IN, imgfile,
17338  IOCTL, jpeg, panel, panelparser, readcd, sgi, sv/SV, torgb, WAIT.
17339
17340- Removed obsolete functions: commands.getstatus(), os.popen*().
17341
17342- Removed functions in the string module that are also string methods;
17343  Remove string.{letters, lowercase, uppercase}.
17344
17345- Removed support for long obsolete platforms: plat-aix3, plat-irix5.
17346
17347- Removed xmlrpclib.SlowParser.  It was based on xmllib.
17348
17349- Patch #1680961: atexit has been reimplemented in C.
17350
17351- Add new codecs for UTF-32, UTF-32-LE and UTF-32-BE.
17352
17353Build
17354-----
17355
17356C API
17357-----
17358
17359- Removed these Python slots: __coerce__, __div__, __idiv__, __rdiv__.
17360
17361- Removed these C APIs: PyNumber_Coerce(), PyNumber_CoerceEx(),
17362  PyMember_Get, PyMember_Set.
17363
17364- Removed these C slots/fields: nb_divide, nb_inplace_divide.
17365
17366- Removed these macros: staticforward, statichere, PyArg_GetInt,
17367  PyArg_NoArgs, _PyObject_Del.
17368
17369- Removed these typedefs: intargfunc, intintargfunc, intobjargproc,
17370  intintobjargproc, getreadbufferproc, getwritebufferproc,
17371  getsegcountproc, getcharbufferproc, memberlist.
17372
17373Tests
17374-----
17375
17376- Removed test.testall as test.regrtest replaces it.
17377
17378Documentation
17379-------------
17380
17381Mac
17382---
17383
17384- The cfmfile module was removed.
17385
17386Platforms
17387---------
17388
17389- Support for BeOS and AtheOS was removed (according to PEP 11).
17390
17391- Support for RiscOS, Irix, Tru64 was removed (allegedly).
17392
17393Tools/Demos
17394-----------
17395
17396
17397What's New in Python 2.5 release candidate 1?
17398=============================================
17399
17400*Release date: 17-AUG-2006*
17401
17402Core and builtins
17403-----------------
17404
17405- Unicode objects will no longer raise an exception when being
17406  compared equal or unequal to a string and a UnicodeDecodeError
17407  exception occurs, e.g. as result of a decoding failure.
17408
17409  Instead, the equal (==) and unequal (!=) comparison operators will
17410  now issue a UnicodeWarning and interpret the two objects as
17411  unequal. The UnicodeWarning can be filtered as desired using
17412  the warning framework, e.g. silenced completely, turned into an
17413  exception, logged, etc.
17414
17415  Note that compare operators other than equal and unequal will still
17416  raise UnicodeDecodeError exceptions as they've always done.
17417
17418- Fix segfault when doing string formatting on subclasses of long.
17419
17420- Fix bug related to __len__ functions using values > 2**32 on 64-bit machines
17421  with new-style classes.
17422
17423- Fix bug related to __len__ functions returning negative values with
17424  classic classes.
17425
17426- Patch #1538606, Fix __index__() clipping.  There were some problems
17427  discovered with the API and how integers that didn't fit into Py_ssize_t
17428  were handled.  This patch attempts to provide enough alternatives
17429  to effectively use __index__.
17430
17431- Bug #1536021: __hash__ may now return long int; the final hash
17432  value is obtained by invoking hash on the long int.
17433
17434- Bug #1536786: buffer comparison could emit a RuntimeWarning.
17435
17436- Bug #1535165: fixed a segfault in input() and raw_input() when
17437  sys.stdin is closed.
17438
17439- On Windows, the PyErr_Warn function is now exported from
17440  the Python dll again.
17441
17442- Bug #1191458: tracing over for loops now produces a line event
17443  on each iteration.  Fixing this problem required changing the .pyc
17444  magic number.  This means that .pyc files generated before 2.5c1
17445  will be regenerated.
17446
17447- Bug #1333982: string/number constants were inappropriately stored
17448  in the byte code and co_consts even if they were not used, ie
17449  immediately popped off the stack.
17450
17451- Fixed a reference-counting problem in property().
17452
17453
17454Library
17455-------
17456
17457- Fix a bug in the ``compiler`` package that caused invalid code to be
17458  generated for generator expressions.
17459
17460- The distutils version has been changed to 2.5.0. The change to
17461  keep it programmatically in sync with the Python version running
17462  the code (introduced in 2.5b3) has been reverted. It will continue
17463  to be maintained manually as static string literal.
17464
17465- If the Python part of a ctypes callback function returns None,
17466  and this cannot be converted to the required C type, an exception is
17467  printed with PyErr_WriteUnraisable.  Before this change, the C
17468  callback returned arbitrary values to the calling code.
17469
17470- The __repr__ method of a NULL ctypes.py_object() no longer raises
17471  an exception.
17472
17473- uuid.UUID now has a bytes_le attribute. This returns the UUID in
17474  little-endian byte order for Windows. In addition, uuid.py gained some
17475  workarounds for clocks with low resolution, to stop the code yielding
17476  duplicate UUIDs.
17477
17478- Patch #1540892: site.py Quitter() class attempts to close sys.stdin
17479  before raising SystemExit, allowing IDLE to honor quit() and exit().
17480
17481- Bug #1224621: make tabnanny recognize IndentationErrors raised by tokenize.
17482
17483- Patch #1536071: trace.py should now find the full module name of a
17484  file correctly even on Windows.
17485
17486- logging's atexit hook now runs even if the rest of the module has
17487  already been cleaned up.
17488
17489- Bug #1112549, fix DoS attack on cgi.FieldStorage.
17490
17491- Bug #1531405, format_exception no longer raises an exception if
17492  str(exception) raised an exception.
17493
17494- Fix a bug in the ``compiler`` package that caused invalid code to be
17495  generated for nested functions.
17496
17497
17498Extension Modules
17499-----------------
17500
17501- Patch #1511317: don't crash on invalid hostname (alias) info.
17502
17503- Patch #1535500: fix segfault in BZ2File.writelines and make sure it
17504  raises the correct exceptions.
17505
17506- Patch # 1536908: enable building ctypes on OpenBSD/AMD64.  The
17507  '-no-stack-protector' compiler flag for OpenBSD has been removed.
17508
17509- Patch #1532975 was applied, which fixes Bug #1533481: ctypes now
17510  uses the _as_parameter_ attribute when objects are passed to foreign
17511  function calls.  The ctypes version number was changed to 1.0.1.
17512
17513- Bug #1530559, struct.pack raises TypeError where it used to convert.
17514  Passing float arguments to struct.pack when integers are expected
17515  now triggers a DeprecationWarning.
17516
17517
17518Tests
17519-----
17520
17521- test_socketserver should now work on cygwin and not fail sporadically
17522  on other platforms.
17523
17524- test_mailbox should now work on cygwin versions 2006-08-10 and later.
17525
17526- Bug #1535182: really test the xreadlines() method of bz2 objects.
17527
17528- test_threading now skips testing alternate thread stack sizes on
17529  platforms that don't support changing thread stack size.
17530
17531
17532Documentation
17533-------------
17534
17535- Patch #1534922: unittest docs were corrected and enhanced.
17536
17537
17538Build
17539-----
17540
17541- Bug #1535502, build _hashlib on Windows, and use masm assembler
17542  code in OpenSSL.
17543
17544- Bug #1534738, win32 debug version of _msi should be _msi_d.pyd.
17545
17546- Bug #1530448, ctypes build failure on Solaris 10 was fixed.
17547
17548
17549C API
17550-----
17551
17552- New API for Unicode rich comparisons: PyUnicode_RichCompare()
17553
17554- Bug #1069160.  Internal correctness changes were made to
17555  ``PyThreadState_SetAsyncExc()``.  A test case was added, and
17556  the documentation was changed to state that the return value
17557  is always 1 (normal) or 0 (if the specified thread wasn't found).
17558
17559
17560What's New in Python 2.5 beta 3?
17561================================
17562
17563*Release date: 03-AUG-2006*
17564
17565Core and builtins
17566-----------------
17567
17568- _PyWeakref_GetWeakrefCount() now returns a Py_ssize_t; it previously
17569  returned a long (see PEP 353).
17570
17571- Bug #1515471: string.replace() accepts character buffers again.
17572
17573- Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn().
17574  This provides the proper warning for struct.pack().
17575  PyErr_Warn() is now deprecated in favor of PyErr_WarnEx().
17576
17577- Patch #1531113: Fix augmented assignment with yield expressions.
17578  Also fix a SystemError when trying to assign to yield expressions.
17579
17580- Bug #1529871: The speed enhancement patch #921466 broke Python's compliance
17581  with PEP 302.  This was fixed by adding an ``imp.NullImporter`` type that is
17582  used in ``sys.path_importer_cache`` to cache non-directory paths and avoid
17583  excessive filesystem operations during imports.
17584
17585- Bug #1521947: When checking for overflow, ``PyOS_strtol()`` used some
17586  operations on signed longs that are formally undefined by C.
17587  Unfortunately, at least one compiler now cares about that, so complicated
17588  the code to make that compiler happy again.
17589
17590- Bug #1524310: Properly report errors from FindNextFile in os.listdir.
17591
17592- Patch #1232023: Stop including current directory in search
17593  path on Windows.
17594
17595- Fix some potential crashes found with failmalloc.
17596
17597- Fix warnings reported by Klocwork's static analysis tool.
17598
17599- Bug #1512814, Fix incorrect lineno's when code within a function
17600  had more than 255 blank lines.
17601
17602- Patch #1521179: Python now accepts the standard options ``--help`` and
17603  ``--version`` as well as ``/?`` on Windows.
17604
17605- Bug #1520864: unpacking singleton tuples in a 'for' loop (for x, in) works
17606  again.  Fixing this problem required changing the .pyc magic number.
17607  This means that .pyc files generated before 2.5b3 will be regenerated.
17608
17609- Bug #1524317:  Compiling Python ``--without-threads`` failed.
17610  The Python core compiles again, and, in a build without threads, the
17611  new ``sys._current_frames()`` returns a dictionary with one entry,
17612  mapping the faux "thread id" 0 to the current frame.
17613
17614- Bug #1525447: build on MacOS X on a case-sensitive filesystem.
17615
17616
17617Library
17618-------
17619
17620- Fix #1693149.  Now you can pass several modules separated by
17621  comma to trace.py in the same --ignore-module option.
17622
17623- Correction of patch #1455898: In the mbcs decoder, set final=False
17624  for stream decoder, but final=True for the decode function.
17625
17626- os.urandom no longer masks unrelated exceptions like SystemExit or
17627  KeyboardInterrupt.
17628
17629- Bug #1525866: Don't copy directory stat times in
17630  shutil.copytree on Windows
17631
17632- Bug #1002398: The documentation for os.path.sameopenfile now correctly
17633  refers to file descriptors, not file objects.
17634
17635- The renaming of the xml package to xmlcore, and the import hackery done
17636  to make it appear at both names, has been removed.  Bug #1511497,
17637  #1513611, and probably others.
17638
17639- Bug #1441397: The compiler module now recognizes module and function
17640  docstrings correctly as it did in Python 2.4.
17641
17642- Bug #1529297:  The rewrite of doctest for Python 2.4 unintentionally
17643  lost that tests are sorted by name before being run.  This rarely
17644  matters for well-written tests, but can create baffling symptoms if
17645  side effects from one test to the next affect outcomes.  ``DocTestFinder``
17646  has been changed to sort the list of tests it returns.
17647
17648- The distutils version has been changed to 2.5.0, and is now kept
17649  in sync with sys.version_info[:3].
17650
17651- Bug #978833: Really close underlying socket in _socketobject.close.
17652
17653- Bug #1459963: urllib and urllib2 now normalize HTTP header names with
17654  title().
17655
17656- Patch #1525766: In pkgutil.walk_packages, correctly pass the onerror callback
17657  to recursive calls and call it with the failing package name.
17658
17659- Bug #1525817: Don't truncate short lines in IDLE's tool tips.
17660
17661- Patch #1515343: Fix printing of deprecated string exceptions with a
17662  value in the traceback module.
17663
17664- Resync optparse with Optik 1.5.3: minor tweaks for/to tests.
17665
17666- Patch #1524429: Use repr() instead of backticks in Tkinter again.
17667
17668- Bug #1520914: Change time.strftime() to accept a zero for any position in its
17669  argument tuple.  For arguments where zero is illegal, the value is forced to
17670  the minimum value that is correct.  This is to support an undocumented but
17671  common way people used  to fill in inconsequential information in the time
17672  tuple pre-2.4.
17673
17674- Patch #1220874: Update the binhex module for Mach-O.
17675
17676- The email package has improved RFC 2231 support, specifically for
17677  recognizing the difference between encoded (name*0*=<blah>) and non-encoded
17678  (name*0=<blah>) parameter continuations.  This may change the types of
17679  values returned from email.message.Message.get_param() and friends.
17680  Specifically in some cases where non-encoded continuations were used,
17681  get_param() used to return a 3-tuple of (None, None, string) whereas now it
17682  will just return the string (since non-encoded continuations don't have
17683  charset and language parts).
17684
17685  Also, whereas % values were decoded in all parameter continuations, they are
17686  now only decoded in encoded parameter parts.
17687
17688- Bug #1517990: IDLE keybindings on MacOS X now work correctly
17689
17690- Bug #1517996: IDLE now longer shows the default Tk menu when a
17691  path browser, class browser or debugger is the frontmost window on MacOS X
17692
17693- Patch #1520294: Support for getset and member descriptors in types.py,
17694  inspect.py, and pydoc.py.  Specifically, this allows for querying the type
17695  of an object against these built-in types and more importantly, for getting
17696  their docstrings printed in the interactive interpreter's help() function.
17697
17698
17699Extension Modules
17700-----------------
17701
17702- Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs during
17703  a socket operation on a socket with a timeout, the exception will be
17704  caught correctly.  Previously, the exception was not caught.
17705
17706- Patch #1529514: The _ctypes extension is now compiled on more
17707  openbsd target platforms.
17708
17709- The ``__reduce__()`` method of the new ``collections.defaultdict`` had
17710  a memory leak, affecting pickles and deep copies.
17711
17712- Bug #1471938: Fix curses module build problem on Solaris 8; patch by
17713  Paul Eggert.
17714
17715- Patch #1448199: Release interpreter lock in _winreg.ConnectRegistry.
17716
17717- Patch #1521817: Index range checking on ctypes arrays containing
17718  exactly one element enabled again.  This allows iterating over these
17719  arrays, without the need to check the array size before.
17720
17721- Bug #1521375: When the code in ctypes.util.find_library was
17722  run with root privileges, it could overwrite or delete
17723  /dev/null in certain cases; this is now fixed.
17724
17725- Bug #1467450: On Mac OS X 10.3, RTLD_GLOBAL is now used as the
17726  default mode for loading shared libraries in ctypes.
17727
17728- Because of a misspelled preprocessor symbol, ctypes was always
17729  compiled without thread support; this is now fixed.
17730
17731- pybsddb Bug #1527939: bsddb module DBEnv dbremove and dbrename
17732  methods now allow their database parameter to be None as the
17733  sleepycat API allows.
17734
17735- Bug #1526460: Fix socketmodule compile on NetBSD as it has a different
17736  bluetooth API compared with Linux and FreeBSD.
17737
17738Tests
17739-----
17740
17741- Bug #1501330: Change test_ossaudiodev to be much more tolerant in terms of
17742  how long the test file should take to play.  Now accepts taking 2.93 secs
17743  (exact time) +/- 10% instead of the hard-coded 3.1 sec.
17744
17745- Patch #1529686: The standard tests ``test_defaultdict``, ``test_iterlen``,
17746  ``test_uuid`` and ``test_email_codecs`` didn't actually run any tests when
17747  run via ``regrtest.py``. Now they do.
17748
17749Build
17750-----
17751
17752- Bug #1439538: Drop usage of test -e in configure as it is not portable.
17753
17754Mac
17755---
17756
17757- PythonLauncher now works correctly when the path to the script contains
17758  characters that are treated specially by the shell (such as quotes).
17759
17760- Bug #1527397: PythonLauncher now launches scripts with the working directory
17761  set to the directory that contains the script instead of the user home
17762  directory. That latter was an implementation accident and not what users
17763  expect.
17764
17765
17766What's New in Python 2.5 beta 2?
17767================================
17768
17769*Release date: 11-JUL-2006*
17770
17771Core and builtins
17772-----------------
17773
17774- Bug #1441486: The literal representation of -(sys.maxint - 1)
17775  again evaluates to an int object, not a long.
17776
17777- Bug #1501934: The scope of global variables that are locally assigned
17778  using augmented assignment is now correctly determined.
17779
17780- Bug #927248: Recursive method-wrapper objects can now safely
17781  be released.
17782
17783- Bug #1417699: Reject locale-specific decimal point in float()
17784  and atof().
17785
17786- Bug #1511381: codec_getstreamcodec() in codec.c is corrected to
17787  omit a default "error" argument for NULL pointer.  This allows
17788  the parser to take a codec from cjkcodecs again.
17789
17790- Bug #1519018: 'as' is now validated properly in import statements.
17791
17792- On 64 bit systems, int literals that use less than 64 bits are
17793  now ints rather than longs.
17794
17795- Bug #1512814, Fix incorrect lineno's when code at module scope
17796  started after line 256.
17797
17798- New function ``sys._current_frames()`` returns a dict mapping thread
17799  id to topmost thread stack frame.  This is for expert use, and is
17800  especially useful for debugging application deadlocks.  The functionality
17801  was previously available in Fazal Majid's ``threadframe`` extension
17802  module, but it wasn't possible to do this in a wholly threadsafe way from
17803  an extension.
17804
17805Library
17806-------
17807
17808- Bug #1257728: Mention Cygwin in distutils error message about a missing
17809  VS 2003.
17810
17811- Patch #1519566: Update turtle demo, make begin_fill idempotent.
17812
17813- Bug #1508010: msvccompiler now requires the DISTUTILS_USE_SDK
17814  environment variable to be set in order to the SDK environment
17815  for finding the compiler, include files, etc.
17816
17817- Bug #1515998: Properly generate logical ids for files in bdist_msi.
17818
17819- warnings.py now ignores ImportWarning by default
17820
17821- string.Template() now correctly handles tuple-values. Previously,
17822  multi-value tuples would raise an exception and single-value tuples would
17823  be treated as the value they contain, instead.
17824
17825- Bug #822974: Honor timeout in telnetlib.{expect,read_until}
17826  even if some data are received.
17827
17828- Bug #1267547: Put proper recursive setup.py call into the
17829  spec file generated by bdist_rpm.
17830
17831- Bug #1514693: Update turtle's heading when switching between
17832  degrees and radians.
17833
17834- Reimplement turtle.circle using a polyline, to allow correct
17835  filling of arcs.
17836
17837- Bug #1514703: Only setup canvas window in turtle when the canvas
17838  is created.
17839
17840- Bug #1513223: .close() of a _socketobj now releases the underlying
17841  socket again, which then gets closed as it becomes unreferenced.
17842
17843- Bug #1504333: Make sgmllib support angle brackets in quoted
17844  attribute values.
17845
17846- Bug #853506: Fix IPv6 address parsing in unquoted attributes in
17847  sgmllib ('[' and ']' were not accepted).
17848
17849- Fix a bug in the turtle module's end_fill function.
17850
17851- Bug #1510580: The 'warnings' module improperly required that a Warning
17852  category be either a types.ClassType and a subclass of Warning.  The proper
17853  check is just that it is a subclass with Warning as the documentation states.
17854
17855- The compiler module now correctly compiles the new try-except-finally
17856  statement (bug #1509132).
17857
17858- The wsgiref package is now installed properly on Unix.
17859
17860- A bug was fixed in logging.config.fileConfig() which caused a crash on
17861  shutdown when fileConfig() was called multiple times.
17862
17863- The sqlite3 module did cut off data from the SQLite database at the first
17864  null character before sending it to a custom converter. This has been fixed
17865  now.
17866
17867Extension Modules
17868-----------------
17869
17870- #1494314: Fix a regression with high-numbered sockets in 2.4.3. This
17871  means that select() on sockets > FD_SETSIZE (typically 1024) work again.
17872  The patch makes sockets use poll() internally where available.
17873
17874- Assigning None to pointer type fields in ctypes structures possible
17875  overwrote the wrong fields, this is fixed now.
17876
17877- Fixed a segfault in _ctypes when ctypes.wintypes were imported
17878  on non-Windows platforms.
17879
17880- Bug #1518190: The ctypes.c_void_p constructor now accepts any
17881  integer or long, without range checking.
17882
17883- Patch #1517790: It is now possible to use custom objects in the ctypes
17884  foreign function argtypes sequence as long as they provide a from_param
17885  method, no longer is it required that the object is a ctypes type.
17886
17887- The '_ctypes' extension module now works when Python is configured
17888  with the --without-threads option.
17889
17890- Bug #1513646: os.access on Windows now correctly determines write
17891  access, again.
17892
17893- Bug #1512695: cPickle.loads could crash if it was interrupted with
17894  a KeyboardInterrupt.
17895
17896- Bug #1296433: parsing XML with a non-default encoding and
17897  a CharacterDataHandler could crash the interpreter in pyexpat.
17898
17899- Patch #1516912: improve Modules support for OpenVMS.
17900
17901Build
17902-----
17903
17904- Automate Windows build process for the Win64 SSL module.
17905
17906- 'configure' now detects the zlib library the same way as distutils.
17907  Previously, the slight difference could cause compilation errors of the
17908  'zlib' module on systems with more than one version of zlib.
17909
17910- The MSI compileall step was fixed to also support a TARGETDIR
17911  with spaces in it.
17912
17913- Bug #1517388: sqlite3.dll is now installed on Windows independent
17914  of Tcl/Tk.
17915
17916- Bug #1513032: 'make install' failed on FreeBSD 5.3 due to lib-old
17917  trying to be installed even though it's empty.
17918
17919Tests
17920-----
17921
17922- Call os.waitpid() at the end of tests that spawn child processes in order
17923  to minimize resources (zombies).
17924
17925Documentation
17926-------------
17927
17928- Cover ImportWarning, PendingDeprecationWarning and simplefilter() in the
17929  documentation for the warnings module.
17930
17931- Patch #1509163: MS Toolkit Compiler no longer available.
17932
17933- Patch #1504046: Add documentation for xml.etree.
17934
17935
17936What's New in Python 2.5 beta 1?
17937================================
17938
17939*Release date: 20-JUN-2006*
17940
17941Core and builtins
17942-----------------
17943
17944- Patch #1507676: Error messages returned by invalid abstract object operations
17945  (such as iterating over an integer) have been improved and now include the
17946  type of the offending object to help with debugging.
17947
17948- Bug #992017: A classic class that defined a __coerce__() method that returned
17949  its arguments swapped would infinitely recurse and segfault the interpreter.
17950
17951- Fix the socket tests so they can be run concurrently.
17952
17953- Removed 5 integers from C frame objects (PyFrameObject).
17954  f_nlocals, f_ncells, f_nfreevars, f_stack_size, f_restricted.
17955
17956- Bug #532646: object.__call__() will continue looking for the __call__
17957  attribute on objects until one without one is found.  This leads to recursion
17958  when you take a class and set its __call__ attribute to an instance of the
17959  class.  Originally fixed for classic classes, but this fix is for new-style.
17960  Removes the infinite_rec_3 crasher.
17961
17962- The string and unicode methods startswith() and endswith() now accept
17963  a tuple of prefixes/suffixes to look for. Implements RFE #1491485.
17964
17965- Buffer objects, at the C level, never used the char buffer
17966  implementation even when the char buffer for the wrapped object was
17967  explicitly requested (originally returned the read or write buffer).
17968  Now a TypeError is raised if the char buffer is not present but is
17969  requested.
17970
17971- Patch #1346214: Statements like "if 0: suite" are now again optimized
17972  away like they were in Python 2.4.
17973
17974- Builtin exceptions are now full-blown new-style classes instead of
17975  instances pretending to be classes, which speeds up exception handling
17976  by about 80% in comparison to 2.5a2.
17977
17978- Patch #1494554: Update unicodedata.numeric and unicode.isnumeric to
17979  Unicode 4.1.
17980
17981- Patch #921466: sys.path_importer_cache is now used to cache valid and
17982  invalid file paths for the built-in import machinery which leads to
17983  fewer open calls on startup.
17984
17985- Patch #1442927: ``long(str, base)`` is now up to 6x faster for non-power-
17986  of-2 bases.  The largest speedup is for inputs with about 1000 decimal
17987  digits.  Conversion from non-power-of-2 bases remains quadratic-time in
17988  the number of input digits (it was and remains linear-time for bases
17989  2, 4, 8, 16 and 32).
17990
17991- Bug #1334662: ``int(string, base)`` could deliver a wrong answer
17992  when ``base`` was not 2, 4, 8, 10, 16 or 32, and ``string`` represented
17993  an integer close to ``sys.maxint``.  This was repaired by patch
17994  #1335972, which also gives a nice speedup.
17995
17996- Patch #1337051: reduced size of frame objects.
17997
17998- PyErr_NewException now accepts a tuple of base classes as its
17999  "base" parameter.
18000
18001- Patch #876206: function call speedup by retaining allocated frame
18002  objects.
18003
18004- Bug #1462152: file() now checks more thoroughly for invalid mode
18005  strings and removes a possible "U" before passing the mode to the
18006  C library function.
18007
18008- Patch #1488312, Fix memory alignment problem on SPARC in unicode
18009
18010- Bug #1487966: Fix SystemError with conditional expression in assignment
18011
18012- WindowsError now has two error code attributes: errno, which carries
18013  the error values from errno.h, and winerror, which carries the error
18014  values from winerror.h. Previous versions put the winerror.h values
18015  (from GetLastError()) into the errno attribute.
18016
18017- Patch #1475845: Raise IndentationError for unexpected indent.
18018
18019- Patch #1479181: split open() and file() from being aliases for each other.
18020
18021- Patch #1497053 & bug #1275608: Exceptions occurring in ``__eq__()``
18022  methods were always silently ignored by dictionaries when comparing keys.
18023  They are now passed through (except when using the C API function
18024  ``PyDict_GetItem()``, whose semantics did not change).
18025
18026- Bug #1456209: In some obscure cases it was possible for a class with a
18027  custom ``__eq__()`` method to confuse dict internals when class instances
18028  were used as a dict's keys and the ``__eq__()`` method mutated the dict.
18029  No, you don't have any code that did this ;-)
18030
18031Extension Modules
18032-----------------
18033
18034- Bug #1295808: expat symbols should be namespaced in pyexpat
18035
18036- Patch #1462338: Upgrade pyexpat to expat 2.0.0
18037
18038- Change binascii.hexlify to accept a read-only buffer instead of only a char
18039  buffer and actually follow its documentation.
18040
18041- Fixed a potentially invalid memory access of CJKCodecs' shift-jis decoder.
18042
18043- Patch #1478788 (modified version): The functional extension module has
18044  been renamed to _functools and a functools Python wrapper module added.
18045  This provides a home for additional function related utilities that are
18046  not specifically about functional programming. See PEP 309.
18047
18048- Patch #1493701: performance enhancements for struct module.
18049
18050- Patch #1490224: time.altzone is now set correctly on Cygwin.
18051
18052- Patch #1435422: zlib's compress and decompress objects now have a
18053  copy() method.
18054
18055- Patch #1454481: thread stack size is now tunable at runtime for thread
18056  enabled builds on Windows and systems with Posix threads support.
18057
18058- On Win32, os.listdir now supports arbitrarily-long Unicode path names
18059  (up to the system limit of 32K characters).
18060
18061- Use Win32 API to implement os.{access,chdir,chmod,mkdir,remove,rename,rmdir,utime}.
18062  As a result, these functions now raise WindowsError instead of OSError.
18063
18064- ``time.clock()`` on Win64 should use the high-performance Windows
18065  ``QueryPerformanceCounter()`` now (as was already the case on 32-bit
18066  Windows platforms).
18067
18068- Calling Tk_Init twice is refused if the first call failed as that
18069  may deadlock.
18070
18071- bsddb: added the DB_ARCH_REMOVE flag and fixed db.DBEnv.log_archive() to
18072  accept it without potentially using an uninitialized pointer.
18073
18074- bsddb: added support for the DBEnv.log_stat() and DBEnv.lsn_reset() methods
18075  assuming BerkeleyDB >= 4.0 and 4.4 respectively.  [pybsddb project SF
18076  patch numbers 1494885 and 1494902]
18077
18078- bsddb: added an interface for the BerkeleyDB >= 4.3 DBSequence class.
18079  [pybsddb project SF patch number 1466734]
18080
18081- bsddb: fix DBCursor.pget() bug with keyword argument names when no data
18082  parameter is supplied.  [SF pybsddb bug #1477863]
18083
18084- bsddb: the __len__ method of a DB object has been fixed to return correct
18085  results.  It could previously incorrectly return 0 in some cases.
18086  Fixes SF bug 1493322 (pybsddb bug 1184012).
18087
18088- bsddb: the bsddb.dbtables Modify method now raises the proper error and
18089  aborts the db transaction safely when a modifier callback fails.
18090  Fixes SF python patch/bug #1408584.
18091
18092- bsddb: multithreaded DB access using the simple bsddb module interface
18093  now works reliably.  It has been updated to use automatic BerkeleyDB
18094  deadlock detection and the bsddb.dbutils.DeadlockWrap wrapper to retry
18095  database calls that would previously deadlock. [SF python bug #775414]
18096
18097- Patch #1446489: add support for the ZIP64 extensions to zipfile.
18098
18099- Patch #1506645: add Python wrappers for the curses functions
18100  is_term_resized, resize_term and resizeterm.
18101
18102Library
18103-------
18104
18105- Patch #815924: Restore ability to pass type= and icon= in tkMessageBox
18106  functions.
18107
18108- Patch #812986: Update turtle output even if not tracing.
18109
18110- Patch #1494750: Destroy master after deleting children in
18111  Tkinter.BaseWidget.
18112
18113- Patch #1096231: Add ``default`` argument to Tkinter.Wm.wm_iconbitmap.
18114
18115- Patch #763580: Add name and value arguments to Tkinter variable
18116  classes.
18117
18118- Bug #1117556: SimpleHTTPServer now tries to find and use the system's
18119  mime.types file for determining MIME types.
18120
18121- Bug #1339007: Shelf objects now don't raise an exception in their
18122  __del__ method when initialization failed.
18123
18124- Patch #1455898: The MBCS codec now supports the incremental mode for
18125  double-byte encodings.
18126
18127- ``difflib``'s ``SequenceMatcher.get_matching_blocks()`` was changed to
18128  guarantee that adjacent triples in the return list always describe
18129  non-adjacent blocks.  Previously, a pair of matching blocks could end
18130  up being described by multiple adjacent triples that formed a partition
18131  of the matching pair.
18132
18133- Bug #1498146: fix optparse to handle Unicode strings in option help,
18134  description, and epilog.
18135
18136- Bug #1366250: minor optparse documentation error.
18137
18138- Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately;
18139  clarify docs.
18140
18141- The wsgiref package has been added to the standard library.
18142
18143- The functions update_wrapper() and wraps() have been added to the functools
18144  module. These make it easier to copy relevant metadata from the original
18145  function when writing wrapper functions.
18146
18147- The optional ``isprivate`` argument to ``doctest.testmod()``, and the
18148  ``doctest.is_private()`` function, both deprecated in 2.4, were removed.
18149
18150- Patch #1359618: Speed up charmap encoder by using a trie structure
18151  for lookup.
18152
18153- The functions in the ``pprint`` module now sort dictionaries by key
18154  before computing the display.  Before 2.5, ``pprint`` sorted a dictionary
18155  if and only if its display required more than one line, although that
18156  wasn't documented.  The new behavior increases predictability; e.g.,
18157  using ``pprint.pprint(a_dict)`` in a doctest is now reliable.
18158
18159- Patch #1497027: try HTTP digest auth before basic auth in urllib2
18160  (thanks for J. J. Lee).
18161
18162- Patch #1496206: improve urllib2 handling of passwords with respect to
18163  default HTTP and HTTPS ports.
18164
18165- Patch #1080727: add "encoding" parameter to doctest.DocFileSuite.
18166
18167- Patch #1281707: speed up gzip.readline.
18168
18169- Patch #1180296: Two new functions were added to the locale module:
18170  format_string() to get the effect of  "format % items" but locale-aware,
18171  and currency() to format a monetary number with currency sign.
18172
18173- Patch #1486962: Several bugs in the turtle Tk demo module were fixed
18174  and several features added, such as speed and geometry control.
18175
18176- Patch #1488881: add support for external file objects in bz2 compressed
18177  tarfiles.
18178
18179- Patch #721464: pdb.Pdb instances can now be given explicit stdin and
18180  stdout arguments, making it possible to redirect input and output
18181  for remote debugging.
18182
18183- Patch #1484695: Update the tarfile module to version 0.8. This fixes
18184  a couple of issues, notably handling of long file names using the
18185  GNU LONGNAME extension.
18186
18187- Patch #1478292. ``doctest.register_optionflag(name)`` shouldn't create a
18188  new flag when ``name`` is already the name of an option flag.
18189
18190- Bug #1385040: don't allow "def foo(a=1, b): pass" in the compiler
18191  package.
18192
18193- Patch #1472854: make the rlcompleter.Completer class usable on non-
18194  UNIX platforms.
18195
18196- Patch #1470846: fix urllib2 ProxyBasicAuthHandler.
18197
18198- Bug #1472827: correctly escape newlines and tabs in attribute values in
18199  the saxutils.XMLGenerator class.
18200
18201
18202Build
18203-----
18204
18205- Bug #1502728: Correctly link against librt library on HP-UX.
18206
18207- OpenBSD 3.9 is supported now.
18208
18209- Patch #1492356: Port to Windows CE.
18210
18211- Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
18212
18213- Patch #1471883: Add --enable-universalsdk.
18214
18215C API
18216-----
18217
18218Tests
18219-----
18220
18221Tools
18222-----
18223
18224Documentation
18225-------------
18226
18227
18228
18229What's New in Python 2.5 alpha 2?
18230=================================
18231
18232*Release date: 27-APR-2006*
18233
18234Core and builtins
18235-----------------
18236
18237- Bug #1465834: 'bdist_wininst preinstall script support' was fixed
18238  by converting these apis from macros into exported functions again:
18239
18240    PyParser_SimpleParseFile PyParser_SimpleParseString PyRun_AnyFile
18241    PyRun_AnyFileEx PyRun_AnyFileFlags PyRun_File PyRun_FileEx
18242    PyRun_FileFlags PyRun_InteractiveLoop PyRun_InteractiveOne
18243    PyRun_SimpleFile PyRun_SimpleFileEx PyRun_SimpleString
18244    PyRun_String Py_CompileString
18245
18246- Under COUNT_ALLOCS, types are not necessarily immortal anymore.
18247
18248- All uses of PyStructSequence_InitType have been changed to initialize
18249  the type objects only once, even if the interpreter is initialized
18250  multiple times.
18251
18252- Bug #1454485, array.array('u') could crash the interpreter.  This was
18253  due to PyArgs_ParseTuple(args, 'u#', ...) trying to convert buffers (strings)
18254  to unicode when it didn't make sense.  'u#' now requires a unicode string.
18255
18256- Py_UNICODE is unsigned.  It was always documented as unsigned, but
18257  due to a bug had a signed value in previous versions.
18258
18259- Patch #837242: ``id()`` of any Python object always gives a positive
18260  number now, which might be a long integer. ``PyLong_FromVoidPtr`` and
18261  ``PyLong_AsVoidPtr`` have been changed accordingly.  Note that it has
18262  never been correct to implement a ``__hash()__`` method that returns the
18263  ``id()`` of an object:
18264
18265      def __hash__(self):
18266          return id(self)  # WRONG
18267
18268  because a hash result must be a (short) Python int but it was always
18269  possible for ``id()`` to return a Python long.  However, because ``id()``
18270  could return negative values before, on a 32-bit box an ``id()`` result
18271  was always usable as a hash value before this patch.  That's no longer
18272  necessarily so.
18273
18274- Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c)
18275  to load extension modules and now provides the dl module. As a result,
18276  sys.setdlopenflags() now works correctly on these systems. (SF patch
18277  #1454844)
18278
18279- Patch #1463867: enhanced garbage collection to allow cleanup of cycles
18280  involving generators that have paused outside of any ``try`` or ``with``
18281  blocks.  (In 2.5a1, a paused generator that was part of a reference
18282  cycle could not be garbage collected, regardless of whether it was
18283  paused in a ``try`` or ``with`` block.)
18284
18285Extension Modules
18286-----------------
18287
18288- Patch #1191065: Fix preprocessor problems on systems where recvfrom
18289  is a macro.
18290
18291- Bug #1467952: os.listdir() now correctly raises an error if readdir()
18292  fails with an error condition.
18293
18294- Fixed bsddb.db.DBError derived exceptions so they can be unpickled.
18295
18296- Bug #1117761: bsddb.*open() no longer raises an exception when using
18297  the cachesize parameter.
18298
18299- Bug #1149413: bsddb.*open() no longer raises an exception when using
18300  a temporary db (file=None) with the 'n' flag to truncate on open.
18301
18302- Bug #1332852: bsddb module minimum BerkeleyDB version raised to 3.3
18303  as older versions cause excessive test failures.
18304
18305- Patch #1062014: AF_UNIX sockets under Linux have a special
18306  abstract namespace that is now fully supported.
18307
18308Library
18309-------
18310
18311- Bug #1223937: subprocess.CalledProcessError reports the exit status
18312  of the process using the returncode attribute, instead of
18313  abusing errno.
18314
18315- Patch #1475231: ``doctest`` has a new ``SKIP`` option, which causes
18316  a doctest to be skipped (the code is not run, and the expected output
18317  or exception is ignored).
18318
18319- Fixed contextlib.nested to cope with exceptions being raised and
18320  caught inside exit handlers.
18321
18322- Updated optparse module to Optik 1.5.1 (allow numeric constants in
18323  hex, octal, or binary; add ``append_const`` action; keep going if
18324  gettext cannot be imported; added ``OptionParser.destroy()`` method;
18325  added ``epilog`` for better help generation).
18326
18327- Bug #1473760: ``tempfile.TemporaryFile()`` could hang on Windows, when
18328  called from a thread spawned as a side effect of importing a module.
18329
18330- The pydoc module now supports documenting packages contained in
18331  .zip or .egg files.
18332
18333- The pkgutil module now has several new utility functions, such
18334  as ``walk_packages()`` to support working with packages that are either
18335  in the filesystem or zip files.
18336
18337- The mailbox module can now modify and delete messages from
18338  mailboxes, in addition to simply reading them.  Thanks to Gregory
18339  K. Johnson for writing the code, and to the 2005 Google Summer of
18340  Code for funding his work.
18341
18342- The ``__del__`` method of class ``local`` in module ``_threading_local``
18343  returned before accomplishing any of its intended cleanup.
18344
18345- Patch #790710: Add breakpoint command lists in pdb.
18346
18347- Patch #1063914: Add Tkinter.Misc.clipboard_get().
18348
18349- Patch #1191700: Adjust column alignment in bdb breakpoint lists.
18350
18351- SimpleXMLRPCServer relied on the fcntl module, which is unavailable on
18352  Windows. Bug #1469163.
18353
18354- The warnings, linecache, inspect, traceback, site, and doctest modules
18355  were updated to work correctly with modules imported from zipfiles or
18356  via other PEP 302 __loader__ objects.
18357
18358- Patch #1467770: Reduce usage of subprocess._active to processes which
18359  the application hasn't waited on.
18360
18361- Patch #1462222: Fix Tix.Grid.
18362
18363- Fix exception when doing glob.glob('anything*/')
18364
18365- The pstats.Stats class accepts an optional stream keyword argument to
18366  direct output to an alternate file-like object.
18367
18368Build
18369-----
18370
18371- The Makefile now has a reindent target, which runs reindent.py on
18372  the library.
18373
18374- Patch #1470875: Building Python with MS Free Compiler
18375
18376- Patch #1161914: Add a python-config script.
18377
18378- Patch #1324762:Remove ccpython.cc; replace --with-cxx with
18379  --with-cxx-main. Link with C++ compiler only if --with-cxx-main was
18380  specified. (Can be overridden by explicitly setting LINKCC.) Decouple
18381  CXX from --with-cxx-main, see description in README.
18382
18383- Patch #1429775: Link extension modules with the shared libpython.
18384
18385- Fixed a libffi build problem on MIPS systems.
18386
18387- ``PyString_FromFormat``, ``PyErr_Format``, and ``PyString_FromFormatV``
18388  now accept formats "%u" for unsigned ints, "%lu" for unsigned longs,
18389  and "%zu" for unsigned integers of type ``size_t``.
18390
18391Tests
18392-----
18393
18394- test_contextlib now checks contextlib.nested can cope with exceptions
18395  being raised and caught inside exit handlers.
18396
18397- test_cmd_line now checks operation of the -m and -c command switches
18398
18399- The test_contextlib test in 2.5a1 wasn't actually run unless you ran
18400  it separately and by hand.  It also wasn't cleaning up its changes to
18401  the current Decimal context.
18402
18403- regrtest.py now has a -M option to run tests that test the new limits of
18404  containers, on 64-bit architectures. Running these tests is only sensible
18405  on 64-bit machines with more than two gigabytes of memory. The argument
18406  passed is the maximum amount of memory for the tests to use.
18407
18408Tools
18409-----
18410
18411- Added the Python benchmark suite pybench to the Tools/ directory;
18412  contributed by Marc-Andre Lemburg.
18413
18414Documentation
18415-------------
18416
18417- Patch #1473132: Improve docs for ``tp_clear`` and ``tp_traverse``.
18418
18419- PEP 343: Added Context Types section to the library reference
18420  and attempted to bring other PEP 343 related documentation into
18421  line with the implementation and/or python-dev discussions.
18422
18423- Bug #1337990: clarified that ``doctest`` does not support examples
18424  requiring both expected output and an exception.
18425
18426
18427What's New in Python 2.5 alpha 1?
18428=================================
18429
18430*Release date: 05-APR-2006*
18431
18432Core and builtins
18433-----------------
18434
18435- PEP 338: -m command line switch now delegates to runpy.run_module
18436  allowing it to support modules in packages and zipfiles
18437
18438- On Windows, .DLL is not an accepted file name extension for
18439  extension modules anymore; extensions are only found if they
18440  end in .PYD.
18441
18442- Bug #1421664: sys.stderr.encoding is now set to the same value as
18443  sys.stdout.encoding.
18444
18445- __import__ accepts keyword arguments.
18446
18447- Patch #1460496: round() now accepts keyword arguments.
18448
18449- Fixed bug #1459029 - unicode reprs were double-escaped.
18450
18451- Patch #1396919: The system scope threads are reenabled on FreeBSD
18452  5.4 and later versions.
18453
18454- Bug #1115379: Compiling a Unicode string with an encoding declaration
18455  now gives a SyntaxError.
18456
18457- Previously, Python code had no easy way to access the contents of a
18458  cell object. Now, a ``cell_contents`` attribute has been added
18459  (closes patch #1170323).
18460
18461- Patch #1123430: Python's small-object allocator now returns an arena to
18462  the system ``free()`` when all memory within an arena becomes unused
18463  again.  Prior to Python 2.5, arenas (256KB chunks of memory) were never
18464  freed.  Some applications will see a drop in virtual memory size now,
18465  especially long-running applications that, from time to time, temporarily
18466  use a large number of small objects.  Note that when Python returns an
18467  arena to the platform C's ``free()``, there's no guarantee that the
18468  platform C library will in turn return that memory to the operating system.
18469  The effect of the patch is to stop making that impossible, and in tests it
18470  appears to be effective at least on Microsoft C and gcc-based systems.
18471  Thanks to Evan Jones for hard work and patience.
18472
18473- Patch #1434038: property() now uses the getter's docstring if there is
18474  no "doc" argument given. This makes it possible to legitimately use
18475  property() as a decorator to produce a read-only property.
18476
18477- PEP 357, patch 1436368: add an __index__ method to int/long and a matching
18478  nb_index slot to the PyNumberMethods struct.  The slot is consulted instead
18479  of requiring an int or long in slicing and a few other contexts, enabling
18480  other objects (e.g. Numeric Python's integers) to be used as slice indices.
18481
18482- Fixed various bugs reported by Coverity's Prevent tool.
18483
18484- PEP 352, patch #1104669: Make exceptions new-style objects.  Introduced the
18485  new exception base class, BaseException, which has a new message attribute.
18486  KeyboardInterrupt and SystemExit to directly inherit from BaseException now.
18487  Raising a string exception now raises a DeprecationWarning.
18488
18489- Patch #1438387, PEP 328: relative and absolute imports. Imports can now be
18490  explicitly relative, using 'from .module import name' to mean 'from the same
18491  package as this module is in. Imports without dots still default to the
18492  old relative-then-absolute, unless 'from __future__ import
18493  absolute_import' is used.
18494
18495- Properly check if 'warnings' raises an exception (usually when a filter set
18496  to "error" is triggered) when raising a warning for raising string
18497  exceptions.
18498
18499- CO_GENERATOR_ALLOWED is no longer defined. This behavior is the default.
18500  The name was removed from Include/code.h.
18501
18502- PEP 308: conditional expressions were added: (x if cond else y).
18503
18504- Patch 1433928:
18505  - The copy module now "copies" function objects (as atomic objects).
18506  - dict.__getitem__ now looks for a __missing__ hook before raising
18507    KeyError.
18508
18509- PEP 343: with statement implemented. Needs ``from __future__ import
18510  with_statement``. Use of 'with' as a variable will generate a warning.
18511  Use of 'as' as a variable will also generate a warning (unless it's
18512  part of an import statement).
18513  The following objects have __context__ methods:
18514  - The built-in file type.
18515  - The thread.LockType type.
18516  - The following types defined by the threading module:
18517    Lock, RLock, Condition, Semaphore, BoundedSemaphore.
18518  - The decimal.Context class.
18519
18520- Fix the encodings package codec search function to only search
18521  inside its own package. Fixes problem reported in patch #1433198.
18522
18523  Note: Codec packages should implement and register their own
18524  codec search function. PEP 100 has the details.
18525
18526- PEP 353: Using ``Py_ssize_t`` as the index type.
18527
18528- ``PYMALLOC_DEBUG`` builds now add ``4*sizeof(size_t)`` bytes of debugging
18529  info to each allocated block, since the ``Py_ssize_t`` changes (PEP 353)
18530  now allow Python to make use of memory blocks exceeding 2**32 bytes for
18531  some purposes on 64-bit boxes.  A ``PYMALLOC_DEBUG`` build was limited
18532  to 4-byte allocations before.
18533
18534- Patch #1400181, fix unicode string formatting to not use the locale.
18535  This is how string objects work.  u'%f' could use , instead of .
18536  for the decimal point.  Now both strings and unicode always use periods.
18537
18538- Bug #1244610, #1392915, fix build problem on OpenBSD 3.7 and 3.8.
18539  configure would break checking curses.h.
18540
18541- Bug #959576: The pwd module is now built in. This allows Python to be
18542  built on UNIX platforms without $HOME set.
18543
18544- Bug #1072182, fix some potential problems if characters are signed.
18545
18546- Bug #889500, fix line number on SyntaxWarning for global declarations.
18547
18548- Bug #1378022, UTF-8 files with a leading BOM crashed the interpreter.
18549
18550- Support for converting hex strings to floats no longer works.
18551  This was not portable.  float('0x3') now raises a ValueError.
18552
18553- Patch #1382163: Expose Subversion revision number to Python.  New C API
18554  function Py_GetBuildNumber().  New attribute sys.subversion.  Build number
18555  is now displayed in interactive prompt banner.
18556
18557- Implementation of PEP 341 - Unification of try/except and try/finally.
18558  "except" clauses can now be written together with a "finally" clause in
18559  one try statement instead of two nested ones.  Patch #1355913.
18560
18561- Bug #1379994: Builtin unicode_escape and raw_unicode_escape codec
18562  now encodes backslash correctly.
18563
18564- Patch #1350409: Work around signal handling bug in Visual Studio 2005.
18565
18566- Bug #1281408: Py_BuildValue now works correctly even with unsigned longs
18567  and long longs.
18568
18569- SF Bug #1350188, "setdlopenflags" leads to crash upon "import"
18570  It was possible for dlerror() to return a NULL pointer, so
18571  it will now use a default error message in this case.
18572
18573- Replaced most Unicode charmap codecs with new ones using the
18574  new Unicode translate string feature in the built-in charmap
18575  codec; the codecs were created from the mapping tables available
18576  at ftp.unicode.org and contain a few updates (e.g. the Mac OS
18577  encodings now include a mapping for the Apple logo)
18578
18579- Added a few more codecs for Mac OS encodings
18580
18581- Sped up some Unicode operations.
18582
18583- A new AST parser implementation was completed. The abstract
18584  syntax tree is available for read-only (non-compile) access
18585  to Python code; an _ast module was added.
18586
18587- SF bug #1167751: fix incorrect code being produced for generator expressions.
18588  The following code now raises a SyntaxError:  foo(a = i for i in range(10))
18589
18590- SF Bug #976608: fix SystemError when mtime of an imported file is -1.
18591
18592- SF Bug #887946: fix segfault when redirecting stdin from a directory.
18593  Provide a warning when a directory is passed on the command line.
18594
18595- Fix segfault with invalid coding.
18596
18597- SF bug #772896: unknown encoding results in MemoryError.
18598
18599- All iterators now have a Boolean value of True.  Formerly, some iterators
18600  supported a __len__() method which evaluated to False when the iterator
18601  was empty.
18602
18603- On 64-bit platforms, when __len__() returns a value that cannot be
18604  represented as a C int, raise OverflowError.
18605
18606- test__locale is skipped on OS X < 10.4 (only partial locale support is
18607  present).
18608
18609- SF bug #893549: parsing keyword arguments was broken with a few format
18610  codes.
18611
18612- Changes donated by Elemental Security to make it work on AIX 5.3
18613  with IBM's 64-bit compiler (SF patch #1284289).  This also closes SF
18614  bug #105470: test_pwd fails on 64bit system (Opteron).
18615
18616- Changes donated by Elemental Security to make it work on HP-UX 11 on
18617  Itanium2 with HP's 64-bit compiler (SF patch #1225212).
18618
18619- Disallow keyword arguments for type constructors that don't use them
18620  (fixes bug #1119418).
18621
18622- Forward UnicodeDecodeError into SyntaxError for source encoding errors.
18623
18624- SF bug #900092: When tracing (e.g. for hotshot), restore 'return' events for
18625  exceptions that cause a function to exit.
18626
18627- The implementation of set() and frozenset() was revised to use its
18628  own internal data structure.  Memory consumption is reduced by 1/3
18629  and there are modest speed-ups as well.  The API is unchanged.
18630
18631- SF bug #1238681:  freed pointer is used in longobject.c:long_pow().
18632
18633- SF bug #1229429: PyObject_CallMethod failed to decrement some
18634  reference counts in some error exit cases.
18635
18636- SF bug #1185883:  Python's small-object memory allocator took over
18637  a block managed by the platform C library whenever a realloc specified
18638  a small new size.  However, there's no portable way to know then how
18639  much of the address space following the pointer is valid, so there's no
18640  portable way to copy data from the C-managed block into Python's
18641  small-object space without risking a memory fault.  Python's small-object
18642  realloc now leaves such blocks under the control of the platform C
18643  realloc.
18644
18645- SF bug #1232517: An overflow error was not detected properly when
18646  attempting to convert a large float to an int in os.utime().
18647
18648- SF bug #1224347: hex longs now print with lowercase letters just
18649  like their int counterparts.
18650
18651- SF bug #1163563: the original fix for bug #1010677 ("thread Module
18652  Breaks PyGILState_Ensure()") broke badly in the case of multiple
18653  interpreter states; back out that fix and do a better job (see
18654  http://mail.python.org/pipermail/python-dev/2005-June/054258.html
18655  for a longer write-up of the problem).
18656
18657- SF patch #1180995: marshal now uses a binary format by default when
18658  serializing floats.
18659
18660- SF patch #1181301: on platforms that appear to use IEEE 754 floats,
18661  the routines that promise to produce IEEE 754 binary representations
18662  of floats now simply copy bytes around.
18663
18664- bug #967182: disallow opening files with 'wU' or 'aU' as specified by PEP
18665  278.
18666
18667- patch #1109424: int, long, float, complex, and unicode now check for the
18668  proper magic slot for type conversions when subclassed.  Previously the
18669  magic slot was ignored during conversion.  Semantics now match the way
18670  subclasses of str always behaved.  int/long/float, conversion of an instance
18671  to the base class has been moved to the proper nb_* magic slot and out of
18672  PyNumber_*().
18673  Thanks Walter Dörwald.
18674
18675- Descriptors defined in C with a PyGetSetDef structure, where the setter is
18676  NULL, now raise an AttributeError when attempting to set or delete the
18677  attribute.  Previously a TypeError was raised, but this was inconsistent
18678  with the equivalent pure-Python implementation.
18679
18680- It is now safe to call PyGILState_Release() before
18681  PyEval_InitThreads() (note that if there is reason to believe there
18682  are multiple threads around you still must call PyEval_InitThreads()
18683  before using the Python API; this fix is for extension modules that
18684  have no way of knowing if Python is multi-threaded yet).
18685
18686- Typing Ctrl-C whilst raw_input() was waiting in a build with threads
18687  disabled caused a crash.
18688
18689- Bug #1165306: instancemethod_new allowed the creation of a method
18690  with im_class == im_self == NULL, which caused a crash when called.
18691
18692- Move exception finalisation later in the shutdown process - this
18693  fixes the crash seen in bug #1165761
18694
18695- Added two new builtins, any() and all().
18696
18697- Defining a class with empty parentheses is now allowed
18698  (e.g., ``class C(): pass`` is no longer a syntax error).
18699  Patch #1176012 added support to the 'parser' module and 'compiler' package
18700  (thanks to logistix for that added support).
18701
18702- Patch #1115086: Support PY_LONGLONG in structmember.
18703
18704- Bug #1155938: new style classes did not check that __init__() was
18705  returning None.
18706
18707- Patch #802188: Report characters after line continuation character
18708  ('\') with a specific error message.
18709
18710- Bug #723201: Raise a TypeError for passing bad objects to 'L' format.
18711
18712- Bug #1124295: the __name__ attribute of file objects was
18713  inadvertently made inaccessible in restricted mode.
18714
18715- Bug #1074011: closing sys.std{out,err} now causes a flush() and
18716  an ferror() call.
18717
18718- min() and max() now support key= arguments with the same meaning as in
18719  list.sort().
18720
18721- The peephole optimizer now performs simple constant folding in expressions:
18722      (2+3) --> (5).
18723
18724- set and frozenset objects can now be marshalled.  SF #1098985.
18725
18726- Bug #1077106: Poor argument checking could cause memory corruption
18727  in calls to os.read().
18728
18729- The parser did not complain about future statements in illegal
18730  positions.  It once again reports a syntax error if a future
18731  statement occurs after anything other than a doc string.
18732
18733- Change the %s format specifier for str objects so that it returns a
18734  unicode instance if the argument is not an instance of basestring and
18735  calling __str__ on the argument returns a unicode instance.
18736
18737- Patch #1413181:  changed ``PyThreadState_Delete()`` to forget about the
18738  current thread state when the auto-GIL-state machinery knows about
18739  it (since the thread state is being deleted, continuing to remember it
18740  can't help, but can hurt if another thread happens to get created with
18741  the same thread id).
18742
18743Extension Modules
18744-----------------
18745
18746- Patch #1380952: fix SSL objects timing out on consecutive read()s
18747
18748- Patch #1309579: wait3 and wait4 were added to the posix module.
18749
18750- Patch #1231053: The audioop module now supports encoding/decoding of alaw.
18751  In addition, the existing ulaw code was updated.
18752
18753- RFE #567972: Socket objects' family, type and proto properties are
18754  now exposed via new attributes.
18755
18756- Everything under lib-old was removed.  This includes the following modules:
18757    Para, addpack, cmp, cmpcache, codehack, dircmp, dump, find, fmt, grep,
18758    lockfile, newdir, ni, packmail, poly, rand, statcache, tb, tzparse,
18759    util, whatsound, whrandom, zmod
18760
18761- The following modules were removed:  regsub, reconvert, regex, regex_syntax.
18762
18763- re and sre were swapped, so help(re) provides full help.  importing sre
18764  is deprecated.  The undocumented re.engine variable no longer exists.
18765
18766- Bug #1448490: Fixed a bug that ISO-2022 codecs could not handle
18767  SS2 (single-shift 2) escape sequences correctly.
18768
18769- The unicodedata module was updated to the 4.1 version of the Unicode
18770  database. The 3.2 version is still available as unicodedata.db_3_2_0
18771  for applications that require this specific version (such as IDNA).
18772
18773- The timing module is no longer built by default.  It was deprecated
18774  in PEP 4 in Python 2.0 or earlier.
18775
18776- Patch 1433928: Added a new type, defaultdict, to the collections module.
18777  This uses the new __missing__ hook behavior added to dict (see above).
18778
18779- Bug #854823: socketmodule now builds on Sun platforms even when
18780  INET_ADDRSTRLEN is not defined.
18781
18782- Patch #1393157: os.startfile() now has an optional argument to specify
18783  a "command verb" to invoke on the file.
18784
18785- Bug #876637, prevent stack corruption when socket descriptor
18786  is larger than FD_SETSIZE.
18787
18788- Patch #1407135, bug #1424041: harmonize mmap behavior of anonymous memory.
18789  mmap.mmap(-1, size) now returns anonymous memory in both Unix and Windows.
18790  mmap.mmap(0, size) should not be used on Windows for anonymous memory.
18791
18792- Patch #1422385: The nis module now supports access to domains other
18793  than the system default domain.
18794
18795- Use Win32 API to implement os.stat/fstat. As a result, subsecond timestamps
18796  are reported, the limit on path name lengths is removed, and stat reports
18797  WindowsError now (instead of OSError).
18798
18799- Add bsddb.db.DBEnv.set_tx_timestamp allowing time based database recovery.
18800
18801- Bug #1413192, fix seg fault in bsddb if a transaction was deleted
18802  before the env.
18803
18804- Patch #1103116: Basic AF_NETLINK support.
18805
18806- Bug #1402308, (possible) segfault when using mmap.mmap(-1, ...)
18807
18808- Bug #1400822, _curses over{lay,write} doesn't work when passing 6 ints.
18809  Also fix ungetmouse() which did not accept arguments properly.
18810  The code now conforms to the documented signature.
18811
18812- Bug #1400115, Fix segfault when calling curses.panel.userptr()
18813  without prior setting of the userptr.
18814
18815- Fix 64-bit problems in bsddb.
18816
18817- Patch #1365916: fix some unsafe 64-bit mmap methods.
18818
18819- Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn build
18820  problem on AIX.
18821
18822- Bug #869197: os.setgroups rejects long integer arguments
18823
18824- Bug #1346533, select.poll() doesn't raise an error if timeout > sys.maxint
18825
18826- Bug #1344508, Fix UNIX mmap leaking file descriptors
18827
18828- Patch #1338314, Bug #1336623: fix tarfile so it can extract
18829  REGTYPE directories from tarfiles written by old programs.
18830
18831- Patch #1407992, fixes broken bsddb module db associate when using
18832  BerkeleyDB 3.3, 4.0 or 4.1.
18833
18834- Get bsddb module to build with BerkeleyDB version 4.4
18835
18836- Get bsddb module to build with BerkeleyDB version 3.2
18837
18838- Patch #1309009, Fix segfault in pyexpat when the XML document is in latin_1,
18839  but Python incorrectly assumes it is in UTF-8 format
18840
18841- Fix parse errors in the readline module when compiling without threads.
18842
18843- Patch #1288833: Removed thread lock from socket.getaddrinfo on
18844  FreeBSD 5.3 and later versions which got thread-safe getaddrinfo(3).
18845
18846- Patches #1298449 and #1298499: Add some missing checks for error
18847  returns in cStringIO.c.
18848
18849- Patch #1297028: fix segfault if call type on MultibyteCodec,
18850  MultibyteStreamReader, or MultibyteStreamWriter
18851
18852- Fix memory leak in posix.access().
18853
18854- Patch #1213831: Fix typo in unicodedata._getcode.
18855
18856- Bug #1007046: os.startfile() did not accept unicode strings encoded in
18857  the file system encoding.
18858
18859- Patch #756021: Special-case socket.inet_aton('255.255.255.255') for
18860  platforms that don't have inet_aton().
18861
18862- Bug #1215928: Fix bz2.BZ2File.seek() for 64-bit file offsets.
18863
18864- Bug #1191043: Fix bz2.BZ2File.(x)readlines for files containing one
18865  line without newlines.
18866
18867- Bug #728515: mmap.resize() now resizes the file on Unix as it did
18868  on Windows.
18869
18870- Patch #1180695: Add nanosecond stat resolution, and st_gen,
18871  st_birthtime for FreeBSD.
18872
18873- Patch #1231069: The fcntl.ioctl function now uses the 'I' code for
18874  the request code argument, which results in more C-like behaviour
18875  for large or negative values.
18876
18877- Bug #1234979: For the argument of thread.Lock.acquire, the Windows
18878  implementation treated all integer values except 1 as false.
18879
18880- Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.
18881
18882- Patch #1212117: os.stat().st_flags is now accessible as an attribute
18883  if available on the platform.
18884
18885- Patch #1103951: Expose O_SHLOCK and O_EXLOCK in the posix module if
18886  available on the platform.
18887
18888- Bug #1166660: The readline module could segfault if hook functions
18889  were set in a different thread than that which called readline.
18890
18891- collections.deque objects now support a remove() method.
18892
18893- operator.itemgetter() and operator.attrgetter() now support retrieving
18894  multiple fields.  This provides direct support for sorting on multiple
18895  keys (primary, secondary, etc).
18896
18897- os.access now supports Unicode path names on non-Win32 systems.
18898
18899- Patches #925152, #1118602: Avoid reading after the end of the buffer
18900  in pyexpat.GetInputContext.
18901
18902- Patches #749830, #1144555: allow UNIX mmap size to default to current
18903  file size.
18904
18905- Added functional.partial().  See PEP309.
18906
18907- Patch #1093585: raise a ValueError for negative history items in readline.
18908  {remove_history,replace_history}
18909
18910- The spwd module has been added, allowing access to the shadow password
18911  database.
18912
18913- stat_float_times is now True.
18914
18915- array.array objects are now picklable.
18916
18917- the cPickle module no longer accepts the deprecated None option in the
18918  args tuple returned by __reduce__().
18919
18920- itertools.islice() now accepts None for the start and step arguments.
18921  This allows islice() to work more readily with slices:
18922      islice(s.start, s.stop, s.step)
18923
18924- datetime.datetime() now has a strptime class method which can be used to
18925  create datetime object using a string and format.
18926
18927- Patch #1117961: Replace the MD5 implementation from RSA Data Security Inc
18928  with the implementation from http://sourceforge.net/projects/libmd5-rfc/.
18929
18930Library
18931-------
18932
18933- Patch #1388073: Numerous __-prefixed attributes of unittest.TestCase have
18934  been renamed to have only a single underscore prefix.  This was done to
18935  make subclassing easier.
18936
18937- PEP 338: new module runpy defines a run_module function to support
18938  executing modules which provide access to source code or a code object
18939  via the PEP 302 import mechanisms.
18940
18941- The email module's parsedate_tz function now sets the daylight savings
18942  flag to -1 (unknown) since it can't tell from the date whether it should
18943  be set.
18944
18945- Patch #624325: urlparse.urlparse() and urlparse.urlsplit() results
18946  now sport attributes that provide access to the parts of the result.
18947
18948- Patch #1462498: sgmllib now handles entity and character references
18949  in attribute values.
18950
18951- Added the sqlite3 package. This is based on pysqlite2.1.3, and provides
18952  a DB-API interface in the standard library. You'll need sqlite 3.0.8 or
18953  later to build this - if you have an earlier version, the C extension
18954  module will not be built.
18955
18956- Bug #1460340: ``random.sample(dict)`` failed in various ways.  Dicts
18957  aren't officially supported here, and trying to use them will probably
18958  raise an exception some day.  But dicts have been allowed, and "mostly
18959  worked", so support for them won't go away without warning.
18960
18961- Bug #1445068: getpass.getpass() can now be given an explicit stream
18962  argument to specify where to write the prompt.
18963
18964- Patch #1462313, bug #1443328: the pickle modules now can handle classes
18965  that have __private names in their __slots__.
18966
18967- Bug #1250170: mimetools now handles socket.gethostname() failures gracefully.
18968
18969- patch #1457316: "setup.py upload" now supports --identity to select the
18970  key to be used for signing the uploaded code.
18971
18972- Queue.Queue objects now support .task_done() and .join() methods
18973  to make it easier to monitor when daemon threads have completed
18974  processing all enqueued tasks.  Patch #1455676.
18975
18976- popen2.Popen objects now preserve the command in a .cmd attribute.
18977
18978- Added the ctypes ffi package.
18979
18980- email 4.0 package now integrated.  This is largely the same as the email 3.0
18981  package that was included in Python 2.3, except that PEP 8 module names are
18982  now used (e.g. mail.message instead of email.Message).  The MIME classes
18983  have been moved to a subpackage (e.g. email.mime.text instead of
18984  email.MIMEText).  The old names are still supported for now.  Several
18985  deprecated Message methods have been removed and lots of bugs have been
18986  fixed.  More details can be found in the email package documentation.
18987
18988- Patches #1436130/#1443155: codecs.lookup() now returns a CodecInfo object
18989  (a subclass of tuple) that provides incremental decoders and encoders
18990  (a way to use stateful codecs without the stream API). Python functions
18991  codecs.getincrementaldecoder() and codecs.getincrementalencoder() as well
18992  as C functions PyCodec_IncrementalEncoder() and PyCodec_IncrementalDecoder()
18993  have been added.
18994
18995- Patch #1359365: Calling next() on a closed StringIO.String object raises
18996  a ValueError instead of a StopIteration now (like file and cString.String do).
18997  cStringIO.StringIO.isatty() will raise a ValueError now if close() has been
18998  called before (like file and StringIO.StringIO do).
18999
19000- A regrtest option -w was added to re-run failed tests in verbose mode.
19001
19002- Patch #1446372: quit and exit can now be called from the interactive
19003  interpreter to exit.
19004
19005- The function get_count() has been added to the gc module, and gc.collect()
19006  grew an optional 'generation' argument.
19007
19008- A library msilib to generate Windows Installer files, and a distutils
19009  command bdist_msi have been added.
19010
19011- PEP 343: new module contextlib.py defines decorator @contextmanager
19012  and helpful context managers nested() and closing().
19013
19014- The compiler package now supports future imports after the module docstring.
19015
19016- Bug #1413790: zipfile now sanitizes absolute archive names that are
19017  not allowed by the specs.
19018
19019- Patch #1215184: FileInput now can be given an opening hook which can
19020  be used to control how files are opened.
19021
19022- Patch #1212287: fileinput.input() now has a mode parameter for
19023  specifying the file mode input files should be opened with.
19024
19025- Patch #1215184: fileinput now has a fileno() function for getting the
19026  current file number.
19027
19028- Patch #1349274: gettext.install() now optionally installs additional
19029  translation functions other than _() in the builtins namespace.
19030
19031- Patch #1337756: fileinput now accepts Unicode filenames.
19032
19033- Patch #1373643: The chunk module can now read chunks larger than
19034  two gigabytes.
19035
19036- Patch #1417555: SimpleHTTPServer now returns Last-Modified headers.
19037
19038- Bug #1430298: It is now possible to send a mail with an empty
19039  return address using smtplib.
19040
19041- Bug #1432260: The names of lambda functions are now properly displayed
19042  in pydoc.
19043
19044- Patch #1412872: zipfile now sets the creator system to 3 (Unix)
19045  unless the system is Win32.
19046
19047- Patch #1349118: urllib now supports user:pass@ style proxy
19048  specifications, raises IOErrors when proxies for unsupported protocols
19049  are defined, and uses the https proxy on https redirections.
19050
19051- Bug #902075: urllib2 now supports 'host:port' style proxy specifications.
19052
19053- Bug #1407902: Add support for sftp:// URIs to urlparse.
19054
19055- Bug #1371247: Update Windows locale identifiers in locale.py.
19056
19057- Bug #1394565: SimpleHTTPServer now doesn't choke on query parameters
19058  any more.
19059
19060- Bug #1403410: The warnings module now doesn't get confused
19061  when it can't find out the module name it generates a warning for.
19062
19063- Patch #1177307: Added a new codec utf_8_sig for UTF-8 with a BOM signature.
19064
19065- Patch #1157027: cookielib mishandles RFC 2109 cookies in Netscape mode
19066
19067- Patch #1117398: cookielib.LWPCookieJar and .MozillaCookieJar now raise
19068  LoadError as documented, instead of IOError.  For compatibility,
19069  LoadError subclasses IOError.
19070
19071- Added the hashlib module.  It provides secure hash functions for MD5 and
19072  SHA1, 224, 256, 384, and 512.  Note that recent developments make the
19073  historic MD5 and SHA1 unsuitable for cryptographic-strength applications.
19074  In <http://mail.python.org/pipermail/python-dev/2005-December/058850.html>
19075  Ronald L. Rivest offered this advice for Python:
19076
19077      "The consensus of researchers in this area (at least as
19078      expressed at the NIST Hash Function Workshop 10/31/05),
19079      is that SHA-256 is a good choice for the time being, but
19080      that research should continue, and other alternatives may
19081      arise from this research.  The larger SHA's also seem OK."
19082
19083- Added a subset of Fredrik Lundh's ElementTree package.  Available
19084  modules are xml.etree.ElementTree, xml.etree.ElementPath, and
19085  xml.etree.ElementInclude, from ElementTree 1.2.6.
19086
19087- Patch #1162825: Support non-ASCII characters in IDLE window titles.
19088
19089- Bug #1365984: urllib now opens "data:" URLs again.
19090
19091- Patch #1314396: prevent deadlock for threading.Thread.join() when an exception
19092  is raised within the method itself on a previous call (e.g., passing in an
19093  illegal argument)
19094
19095- Bug #1340337: change time.strptime() to always return ValueError when there
19096  is an error in the format string.
19097
19098- Patch #754022: Greatly enhanced webbrowser.py (by Oleg Broytmann).
19099
19100- Bug #729103: pydoc.py: Fix docother() method to accept additional
19101  "parent" argument.
19102
19103- Patch #1300515: xdrlib.py: Fix pack_fstring() to really use null bytes
19104  for padding.
19105
19106- Bug #1296004: httplib.py: Limit maximal amount of data read from the
19107  socket to avoid a MemoryError on Windows.
19108
19109- Patch #1166948: locale.py: Prefer LC_ALL, LC_CTYPE and LANG over LANGUAGE
19110  to get the correct encoding.
19111
19112- Patch #1166938: locale.py: Parse LANGUAGE as a colon separated list of
19113  languages.
19114
19115- Patch #1268314: Cache lines in StreamReader.readlines for performance.
19116
19117- Bug #1290505: Fix clearing the regex cache for time.strptime().
19118
19119- Bug #1167128: Fix size of a symlink in a tarfile to be 0.
19120
19121- Patch #810023: Fix off-by-one bug in urllib.urlretrieve reporthook
19122  functionality.
19123
19124- Bug #1163178: Make IDNA return an empty string when the input is empty.
19125
19126- Patch #848017: Make Cookie more RFC-compliant. Use CRLF as default output
19127  separator and do not output trailing semicolon.
19128
19129- Patch #1062060: urllib.urlretrieve() now raises a new exception, named
19130  ContentTooShortException, when the actually downloaded size does not
19131  match the Content-Length header.
19132
19133- Bug #1121494: distutils.dir_utils.mkpath now accepts Unicode strings.
19134
19135- Bug #1178484: Return complete lines from codec stream readers
19136  even if there is an exception in later lines, resulting in
19137  correct line numbers for decoding errors in source code.
19138
19139- Bug #1192315: Disallow negative arguments to clear() in pdb.
19140
19141- Patch #827386: Support absolute source paths in msvccompiler.py.
19142
19143- Patch #1105730: Apply the new implementation of commonprefix in posixpath
19144  to ntpath, macpath, os2emxpath and riscospath.
19145
19146- Fix a problem in Tkinter introduced by SF patch #869468: delete bogus
19147  __hasattr__ and __delattr__ methods on class Tk that were breaking
19148  Tkdnd.
19149
19150- Bug #1015140: disambiguated the term "article id" in nntplib docs and
19151  docstrings to either "article number" or "message id".
19152
19153- Bug #1238170: threading.Thread.__init__ no longer has "kwargs={}" as a
19154  parameter, but uses the usual "kwargs=None".
19155
19156- textwrap now processes text chunks at O(n) speed instead of O(n**2).
19157  Patch #1209527 (Contributed by Connelly).
19158
19159- urllib2 has now an attribute 'httpresponses' mapping from HTTP status code
19160  to W3C name (404 -> 'Not Found'). RFE #1216944.
19161
19162- Bug #1177468: Don't cache the /dev/urandom file descriptor for os.urandom,
19163  as this can cause problems with apps closing all file descriptors.
19164
19165- Bug #839151: Fix an attempt to access sys.argv in the warnings module;
19166  it can be missing in embedded interpreters
19167
19168- Bug #1155638: Fix a bug which affected HTTP 0.9 responses in httplib.
19169
19170- Bug #1100201: Cross-site scripting was possible on BaseHTTPServer via
19171  error messages.
19172
19173- Bug #1108948: Cookie.py produced invalid JavaScript code.
19174
19175- The tokenize module now detects and reports indentation errors.
19176  Bug #1224621.
19177
19178- The tokenize module has a new untokenize() function to support a full
19179  roundtrip from lexed tokens back to Python source code.  In addition,
19180  the generate_tokens() function now accepts a callable argument that
19181  terminates by raising StopIteration.
19182
19183- Bug #1196315: fix weakref.WeakValueDictionary constructor.
19184
19185- Bug #1213894: os.path.realpath didn't resolve symlinks that were the first
19186  component of the path.
19187
19188- Patch #1120353: The xmlrpclib module provides better, more transparent,
19189  support for datetime.{datetime,date,time} objects.  With use_datetime set
19190  to True, applications shouldn't have to fiddle with the DateTime wrapper
19191  class at all.
19192
19193- distutils.commands.upload was added to support uploading distribution
19194  files to PyPI.
19195
19196- distutils.commands.register now encodes the data as UTF-8 before posting
19197  them to PyPI.
19198
19199- decimal operator and comparison methods now return NotImplemented
19200  instead of raising a TypeError when interacting with other types.  This
19201  allows other classes to implement __radd__ style methods and have them
19202  work as expected.
19203
19204- Bug #1163325:  Decimal infinities failed to hash.  Attempting to
19205  hash a NaN raised an InvalidOperation instead of a TypeError.
19206
19207- Patch #918101: Add tarfile open mode r|* for auto-detection of the
19208  stream compression; add, for symmetry reasons, r:* as a synonym of r.
19209
19210- Patch #1043890: Add extractall method to tarfile.
19211
19212- Patch #1075887: Don't require MSVC in distutils if there is nothing
19213  to build.
19214
19215- Patch #1103407: Properly deal with tarfile iterators when untarring
19216  symbolic links on Windows.
19217
19218- Patch #645894: Use getrusage for computing the time consumption in
19219  profile.py if available.
19220
19221- Patch #1046831: Use get_python_version where appropriate in sysconfig.py.
19222
19223- Patch #1117454: Remove code to special-case cookies without values
19224  in LWPCookieJar.
19225
19226- Patch #1117339: Add cookielib special name tests.
19227
19228- Patch #1112812: Make bsddb/__init__.py more friendly for modulefinder.
19229
19230- Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush.
19231
19232- Patch #1107973: Allow iterating over the lines of a tarfile.ExFileObject.
19233
19234- Patch #1104111: Alter setup.py --help and --help-commands.
19235
19236- Patch #1121234: Properly cleanup _exit and tkerror commands.
19237
19238- Patch #1049151: xdrlib now unpacks booleans as True or False.
19239
19240- Fixed bug in a NameError bug in cookielib.  Patch #1116583.
19241
19242- Applied a security fix to SimpleXMLRPCserver (PSF-2005-001).  This
19243  disables recursive traversal through instance attributes, which can
19244  be exploited in various ways.
19245
19246- Bug #1222790: in SimpleXMLRPCServer, set the reuse-address and close-on-exec
19247  flags on the HTTP listening socket.
19248
19249- Bug #792570: SimpleXMLRPCServer had problems if the request grew too large.
19250  Fixed by reading the HTTP body in chunks instead of one big socket.read().
19251
19252- Patches #893642, #1039083: add allow_none, encoding arguments to
19253  constructors of SimpleXMLRPCServer and CGIXMLRPCRequestHandler.
19254
19255- Bug #1110478: Revert os.environ.update to do putenv again.
19256
19257- Bug #1103844: fix distutils.install.dump_dirs() with negated options.
19258
19259- os.{SEEK_SET, SEEK_CUR, SEEK_END} have been added for convenience.
19260
19261- Enhancements to the csv module:
19262
19263  + Dialects are now validated by the underlying C code, better
19264    reflecting its capabilities, and improving its compliance with
19265    PEP 305.
19266  + Dialect parameter parsing has been re-implemented to improve error
19267    reporting.
19268  + quotechar=None and quoting=QUOTE_NONE now work the way PEP 305
19269    dictates.
19270  + the parser now removes the escapechar prefix from escaped characters.
19271  + when quoting=QUOTE_NONNUMERIC, the writer now tests for numeric
19272    types, rather than any object that can be represented as a numeric.
19273  + when quoting=QUOTE_NONNUMERIC, the reader now casts unquoted fields
19274    to floats.
19275  + reader now allows \r characters to be quoted (previously it only allowed
19276    \n to be quoted).
19277  + writer doublequote handling improved.
19278  + Dialect classes passed to the module are no longer instantiated by
19279    the module before being parsed (the former validation scheme required
19280    this, but the mechanism was unreliable).
19281  + The dialect registry now contains instances of the internal
19282    C-coded dialect type, rather than references to python objects.
19283  + the internal c-coded dialect type is now immutable.
19284  + register_dialect now accepts the same keyword dialect specifications
19285    as the reader and writer, allowing the user to register dialects
19286    without first creating a dialect class.
19287  + a configurable limit to the size of parsed fields has been added -
19288    previously, an unmatched quote character could result in the entire
19289    file being read into the field buffer before an error was reported.
19290  + A new module method csv.field_size_limit() has been added that sets
19291    the parser field size limit (returning the former limit). The initial
19292    limit is 128kB.
19293  + A line_num attribute has been added to the reader object, which tracks
19294    the number of lines read from the source iterator. This is not
19295    the same as the number of records returned, as records can span
19296    multiple lines.
19297  + reader and writer objects were not being registered with the cyclic-GC.
19298    This has been fixed.
19299
19300- _DummyThread objects in the threading module now delete self.__block that is
19301  inherited from _Thread since it uses up a lock allocated by 'thread'.  The
19302  lock primitives tend to be limited in number and thus should not be wasted on
19303  a _DummyThread object.  Fixes bug #1089632.
19304
19305- The imghdr module now detects Exif files.
19306
19307- StringIO.truncate() now correctly adjusts the size attribute.
19308  (Bug #951915).
19309
19310- locale.py now uses an updated locale alias table (built using
19311  Tools/i18n/makelocalealias.py, a tool to parse the X11 locale
19312  alias file); the encoding lookup was enhanced to use Python's
19313  encoding alias table.
19314
19315- moved deprecated modules to Lib/lib-old:  whrandom, tzparse, statcache.
19316
19317- the pickle module no longer accepts the deprecated None option in the
19318  args tuple returned by __reduce__().
19319
19320- optparse now optionally imports gettext.  This allows its use in setup.py.
19321
19322- the pickle module no longer uses the deprecated bin parameter.
19323
19324- the shelve module no longer uses the deprecated binary parameter.
19325
19326- the pstats module no longer uses the deprecated ignore() method.
19327
19328- the filecmp module no longer uses the deprecated use_statcache argument.
19329
19330- unittest.TestCase.run() and unittest.TestSuite.run() can now be successfully
19331  extended or overridden by subclasses.  Formerly, the subclassed method would
19332  be ignored by the rest of the module.  (Bug #1078905).
19333
19334- heapq.nsmallest() and heapq.nlargest() now support key= arguments with
19335  the same meaning as in list.sort().
19336
19337- Bug #1076985: ``codecs.StreamReader.readline()`` now calls ``read()`` only
19338  once when a size argument is given. This prevents a buffer overflow in the
19339  tokenizer with very long source lines.
19340
19341- Bug #1083110: ``zlib.decompress.flush()`` would segfault if called
19342  immediately after creating the object, without any intervening
19343  ``.decompress()`` calls.
19344
19345- The reconvert.quote function can now emit triple-quoted strings.  The
19346  reconvert module now has some simple documentation.
19347
19348- ``UserString.MutableString`` now supports negative indices in
19349  ``__setitem__`` and ``__delitem__``
19350
19351- Bug #1149508: ``textwrap`` now handles hyphenated numbers (eg. "2004-03-05")
19352  correctly.
19353
19354- Partial fixes for SF bugs #1163244 and #1175396: If a chunk read by
19355  ``codecs.StreamReader.readline()`` has a trailing "\r", read one more
19356  character even if the user has passed a size parameter to get a proper
19357  line ending. Remove the special handling of a "\r\n" that has been split
19358  between two lines.
19359
19360- Bug #1251300: On UCS-4 builds the "unicode-internal" codec will now complain
19361  about illegal code points. The codec now supports PEP 293 style error
19362  handlers.
19363
19364- Bug #1235646: ``codecs.StreamRecoder.next()`` now reencodes the data it reads
19365  from the input stream, so that the output is a byte string in the correct
19366  encoding instead of a unicode string.
19367
19368- Bug #1202493: Fixing SRE parser to handle '{}' as perl does, rather than
19369  considering it exactly like a '*'.
19370
19371- Bug #1245379: Add "unicode-1-1-utf-7" as an alias for "utf-7" to
19372  ``encodings.aliases``.
19373
19374- ` uu.encode()`` and ``uu.decode()`` now support unicode filenames.
19375
19376- Patch #1413711: Certain patterns of differences were making difflib
19377  touch the recursion limit.
19378
19379- Bug #947906: An object oriented interface has been added to the calendar
19380  module. It's possible to generate HTML calendar now and the module can be
19381  called as a script (e.g. via ``python -mcalendar``). Localized month and
19382  weekday names can be output (even if an exotic encoding is used) using
19383  special classes that use unicode.
19384
19385Build
19386-----
19387
19388- Fix test_float, test_long, and test_struct failures on Tru64 with gcc
19389  by using -mieee gcc option.
19390
19391- Patch #1432345: Make python compile on DragonFly.
19392
19393- Build support for Win64-AMD64 was added.
19394
19395- Patch #1428494: Prefer linking against ncursesw over ncurses library.
19396
19397- Patch #881820: look for openpty and forkpty also in libbsd.
19398
19399- The sources of zlib are now part of the Python distribution (zlib 1.2.3).
19400  The zlib module is now built in on Windows.
19401
19402- Use -xcode=pic32 for CCSHARED on Solaris with SunPro.
19403
19404- Bug #1189330: configure did not correctly determine the necessary
19405  value of LINKCC if python was built with GCC 4.0.
19406
19407- Upgrade Windows build to zlib 1.2.3 which eliminates a potential security
19408  vulnerability in zlib 1.2.1 and 1.2.2.
19409
19410- EXTRA_CFLAGS has been introduced as an environment variable to hold compiler
19411  flags that change binary compatibility.  Changes were also made to
19412  distutils.sysconfig to also use the environment variable when used during
19413  compilation of the interpreter and of C extensions through distutils.
19414
19415- SF patch 1171735: Darwin 8's headers are anal about POSIX compliance,
19416  and linking has changed (prebinding is now deprecated, and libcc_dynamic
19417  no longer exists). This configure patch makes things right.
19418
19419- Bug #1158607: Build with --disable-unicode again.
19420
19421- spwdmodule.c is built only if either HAVE_GETSPNAM or HAVE_HAVE_GETSPENT is
19422  defined.  Discovered as a result of not being able to build on OS X.
19423
19424- setup.py now uses the directories specified in LDFLAGS using the -L option
19425  and in CPPFLAGS using the -I option for adding library and include
19426  directories, respectively, for compiling extension modules against.  This has
19427  led to the core being compiled using the values in CPPFLAGS.  It also removes
19428  the need for the special-casing of both DarwinPorts and Fink for darwin since
19429  the proper directories can be specified in LDFLAGS (``-L/sw/lib`` for Fink,
19430  ``-L/opt/local/lib`` for DarwinPorts) and CPPFLAGS (``-I/sw/include`` for
19431  Fink, ``-I/opt/local/include`` for DarwinPorts).
19432
19433- Test in configure.in that checks for tzset no longer dependent on tm->tm_zone
19434  to exist in the struct (not required by either ISO C nor the UNIX 2 spec).
19435  Tests for sanity in tzname when HAVE_TZNAME defined were also defined.
19436  Closes bug #1096244.  Thanks Gregory Bond.
19437
19438C API
19439-----
19440
19441- ``PyMem_{Del, DEL}`` and ``PyMem_{Free, FREE}`` no longer map to
19442  ``PyObject_{Free, FREE}``.  They map to the system ``free()`` now.  If memory
19443  is obtained via the ``PyObject_`` family, it must be released via the
19444  ``PyObject_`` family, and likewise for the ``PyMem_`` family.  This has
19445  always been officially true, but when Python's small-object allocator was
19446  introduced, an attempt was made to cater to a few extension modules
19447  discovered at the time that obtained memory via ``PyObject_New`` but
19448  released it via ``PyMem_DEL``.  It's years later, and if such code still
19449  exists it will fail now (probably with segfaults, but calling wrong
19450  low-level memory management functions can yield many symptoms).
19451
19452- Added a C API for set and frozenset objects.
19453
19454- Removed PyRange_New().
19455
19456- Patch #1313939: PyUnicode_DecodeCharmap() accepts a unicode string as the
19457  mapping argument now. This string is used as a mapping table. Byte values
19458  greater than the length of the string and 0xFFFE are treated as undefined
19459  mappings.
19460
19461
19462Tests
19463-----
19464
19465- In test_os, st_?time is now truncated before comparing it with ST_?TIME.
19466
19467- Patch #1276356: New resource "urlfetch" is implemented.  This enables
19468  even impatient people to run tests that require remote files.
19469
19470
19471Documentation
19472-------------
19473
19474- Bug #1402224: Add warning to dl docs about crashes.
19475
19476- Bug #1396471: Document that Windows' ftell() can return invalid
19477  values for text files with UNIX-style line endings.
19478
19479- Bug #1274828: Document os.path.splitunc().
19480
19481- Bug #1190204: Clarify which directories are searched by site.py.
19482
19483- Bug #1193849: Clarify os.path.expanduser() documentation.
19484
19485- Bug #1243192: re.UNICODE and re.LOCALE affect \d, \D, \s and \S.
19486
19487- Bug #755617: Document the effects of os.chown() on Windows.
19488
19489- Patch #1180012: The documentation for modulefinder is now in the library reference.
19490
19491- Patch #1213031: Document that os.chown() accepts argument values of -1.
19492
19493- Bug #1190563: Document os.waitpid() return value with WNOHANG flag.
19494
19495- Bug #1175022: Correct the example code for property().
19496
19497- Document the IterableUserDict class in the UserDict module.
19498  Closes bug #1166582.
19499
19500- Remove all latent references for "Macintosh" that referred to semantics for
19501  Mac OS 9 and change to reflect the state for OS X.
19502  Closes patch #1095802.  Thanks Jack Jansen.
19503
19504Mac
19505---
19506
19507
19508New platforms
19509-------------
19510
19511- FreeBSD 7 support is added.
19512
19513
19514Tools/Demos
19515-----------
19516
19517- Created Misc/Vim/vim_syntax.py to auto-generate a python.vim file in that
19518  directory for syntax highlighting in Vim.  Vim directory was added and placed
19519  vimrc to it (was previous up a level).
19520
19521- Added two new files to Tools/scripts: pysource.py, which recursively
19522  finds Python source files, and findnocoding.py, which finds Python
19523  source files that need an encoding declaration.
19524  Patch #784089, credits to Oleg Broytmann.
19525
19526- Bug #1072853: pindent.py used an uninitialized variable.
19527
19528- Patch #1177597: Correct Complex.__init__.
19529
19530- Fixed a display glitch in Pynche, which could cause the right arrow to
19531  wiggle over by a pixel.
19532
19533
19534What's New in Python 2.4 final?
19535===============================
19536
19537*Release date: 30-NOV-2004*
19538
19539Core and builtins
19540-----------------
19541
19542- Bug 875692: Improve signal handling, especially when using threads, by
19543  forcing an early re-execution of PyEval_EvalFrame() "periodic" code when
19544  things_to_do is not cleared by Py_MakePendingCalls().
19545
19546
19547What's New in Python 2.4 (release candidate 1)
19548==============================================
19549
19550*Release date: 18-NOV-2004*
19551
19552Core and builtins
19553-----------------
19554
19555- Bug 1061968:  Fixes in 2.4a3 to address thread bug 1010677 reintroduced
19556  the years-old thread shutdown race bug 225673.  Numeric history lesson
19557  aside, all bugs in all three reports are fixed now.
19558
19559
19560Library
19561-------
19562
19563- Bug 1052242: If exceptions are raised by an atexit handler function an
19564  attempt is made to execute the remaining handlers.  The last exception
19565  raised is re-raised.
19566
19567- ``doctest``'s new support for adding ``pdb.set_trace()`` calls to
19568  doctests was broken in a dramatic but shallow way.  Fixed.
19569
19570- Bug 1065388:  ``calendar``'s ``day_name``, ``day_abbr``, ``month_name``,
19571  and ``month_abbr`` attributes emulate sequences of locale-correct
19572  spellings of month and day names.  Because the locale can change at
19573  any time, the correct spelling is recomputed whenever one of these is
19574  indexed.  In the worst case, the index may be a slice object, so these
19575  recomputed every day or month name each time they were indexed.  This is
19576  much slower than necessary in the usual case, when the index is just an
19577  integer.  In that case, only the single spelling needed is recomputed
19578  now; and, when the index is a slice object, only the spellings needed
19579  by the slice are recomputed now.
19580
19581- Patch 1061679: Added ``__all__`` to pickletools.py.
19582
19583Build
19584-----
19585
19586- Bug 1034277 / Patch 1035255: Remove compilation of core against CoreServices
19587  and CoreFoundation on OS X.  Involved removing PyMac_GetAppletScriptFile()
19588  which has no known users.  Thanks Bob Ippolito.
19589
19590C API
19591-----
19592
19593- The PyRange_New() function is deprecated.
19594
19595
19596What's New in Python 2.4 beta 2?
19597================================
19598
19599*Release date: 03-NOV-2004*
19600
19601License
19602-------
19603
19604The Python Software Foundation changed the license under which Python
19605is released, to remove Python version numbers.  There were no other
19606changes to the license.  So, for example, wherever the license for
19607Python 2.3 said "Python 2.3", the new license says "Python".  The
19608intent is to make it possible to refer to the PSF license in a more
19609durable way.  For example, some people say they're confused by that
19610the Open Source Initiative's entry for the Python Software Foundation
19611License::
19612
19613      http://www.opensource.org/licenses/PythonSoftFoundation.php
19614
19615says "Python 2.1.1" all over it, wondering whether it applies only
19616to Python 2.1.1.
19617
19618The official name of the new license is the Python Software Foundation
19619License Version 2.
19620
19621Core and builtins
19622-----------------
19623
19624- Bug #1055820 Cyclic garbage collection was not protecting against that
19625  calling a live weakref to a piece of cyclic trash could resurrect an
19626  insane mutation of the trash if any Python code ran during gc (via
19627  running a dead object's __del__ method, running another callback on a
19628  weakref to a dead object, or via any Python code run in any other thread
19629  that managed to obtain the GIL while a __del__ or callback was running
19630  in the thread doing gc).  The most likely symptom was "impossible"
19631  ``AttributeError`` exceptions, appearing seemingly at random, on weakly
19632  referenced objects.  The cure was to clear all weakrefs to unreachable
19633  objects before allowing any callbacks to run.
19634
19635- Bug #1054139 _PyString_Resize() now invalidates its cached hash value.
19636
19637Extension Modules
19638-----------------
19639
19640- Bug #1048870:  the compiler now generates distinct code objects for
19641  functions with identical bodies.  This was producing confusing
19642  traceback messages which pointed to the function where the code
19643  object was first defined rather than the function being executed.
19644
19645Library
19646-------
19647
19648- Patch #1056967 changes the semantics of Template.safe_substitute() so that
19649  no ValueError is raised on an 'invalid' match group.  Now the delimiter is
19650  returned.
19651
19652- Bug #1052503 pdb.runcall() was not passing along keyword arguments.
19653
19654- Bug #902037: XML.sax.saxutils.prepare_input_source() now combines relative
19655  paths with a base path before checking os.path.isfile().
19656
19657- The whichdb module can now be run from the command line.
19658
19659- Bug #1045381: time.strptime() can now infer the date using %U or %W (week of
19660  the year) when the day of the week and year are also specified.
19661
19662- Bug #1048816: fix bug in Ctrl-K at start of line in curses.textpad.Textbox
19663
19664- Bug #1017553: fix bug in tarfile.filemode()
19665
19666- Patch #737473: fix bug that old source code is shown in tracebacks even if
19667  the source code is updated and reloaded.
19668
19669Build
19670-----
19671
19672- Patch #1044395: --enable-shared is allowed in FreeBSD also.
19673
19674What's New in Python 2.4 beta 1?
19675================================
19676
19677*Release date: 15-OCT-2004*
19678
19679Core and builtins
19680-----------------
19681
19682- Patch #975056: Restartable signals were not correctly disabled on
19683  BSD systems. Consistently use PyOS_setsig() instead of signal().
19684
19685- The internal portable implementation of thread-local storage (TLS), used
19686  by the ``PyGILState_Ensure()``/``PyGILState_Release()`` API, was not
19687  thread-correct.  This could lead to a variety of problems, up to and
19688  including segfaults.  See bug 1041645 for an example.
19689
19690- Added a command line option, -m module, which searches sys.path for the
19691  module and then runs it.  (Contributed by Nick Coghlan.)
19692
19693- The bytecode optimizer now folds tuples of constants into a single
19694  constant.
19695
19696- SF bug #513866:  Float/long comparison anomaly.  Prior to 2.4b1, when
19697  an integer was compared to a float, the integer was coerced to a float.
19698  That could yield spurious overflow errors (if the integer was very
19699  large), and to anomalies such as
19700  ``long(1e200)+1 == 1e200 == long(1e200)-1``.  Coercion to float is no
19701  longer performed, and cases like ``long(1e200)-1 < 1e200``,
19702  ``long(1e200)+1 > 1e200`` and ``(1 << 20000) > 1e200`` are computed
19703  correctly now.
19704
19705Extension modules
19706-----------------
19707
19708- ``collections.deque`` objects didn't play quite right with garbage
19709  collection, which could lead to a segfault in a release build, or
19710  an assert failure in a debug build.  Also, added overflow checks,
19711  better detection of mutation during iteration, and shielded deque
19712  comparisons from unusual subclass overrides of the __iter__() method.
19713
19714Library
19715-------
19716
19717- Patch 1046644: distutils build_ext grew two new options - --swig for
19718  specifying the swig executable to use, and --swig-opts to specify
19719  options to pass to swig. --swig-opts="-c++" is the new way to spell
19720  --swig-cpp.
19721
19722- Patch 983206: distutils now obeys environment variable LDSHARED, if
19723  it is set.
19724
19725- Added Peter Astrand's subprocess.py module.  See PEP 324 for details.
19726
19727- time.strptime() now properly escapes timezones and all other locale-specific
19728  strings for regex-specific symbols.  Was breaking under Japanese Windows when
19729  the timezone was specified as "Tokyo (standard time)".
19730  Closes bug #1039270.
19731
19732- Updates for the email package:
19733
19734  + email.Utils.formatdate() grew a 'usegmt' argument for HTTP support.
19735  + All deprecated APIs that in email 2.x issued warnings have been removed:
19736    _encoder argument to the MIMEText constructor, Message.add_payload(),
19737    Utils.dump_address_pair(), Utils.decode(), Utils.encode()
19738  + New deprecations: Generator.__call__(), Message.get_type(),
19739    Message.get_main_type(), Message.get_subtype(), the 'strict' argument to
19740    the Parser constructor.  These will be removed in email 3.1.
19741  + Support for Python earlier than 2.3 has been removed (see PEP 291).
19742  + All defect classes have been renamed to end in 'Defect'.
19743  + Some FeedParser fixes; also a MultipartInvariantViolationDefect will be
19744    added to messages that claim to be multipart but really aren't.
19745  + Updates to documentation.
19746
19747- re's findall() and finditer() functions now take an optional flags argument
19748  just like the compile(), search(), and match() functions.  Also, documented
19749  the previously existing start and stop parameters for the findall() and
19750  finditer() methods of regular expression objects.
19751
19752- rfc822 Messages now support iterating over the headers.
19753
19754- The (undocumented) tarfile.Tarfile.membernames has been removed;
19755  applications should use the getmember function.
19756
19757- httplib now offers symbolic constants for the HTTP status codes.
19758
19759- SF bug #1028306:  Trying to compare a ``datetime.date`` to a
19760  ``datetime.datetime`` mistakenly compared only the year, month and day.
19761  Now it acts like a mixed-type comparison:  ``False`` for ``==``,
19762  ``True`` for ``!=``, and raises ``TypeError`` for other comparison
19763  operators.  Because datetime is a subclass of date, comparing only the
19764  base class (date) members can still be done, if that's desired, by
19765  forcing using of the appropriate date method; e.g.,
19766  ``a_date.__eq__(a_datetime)`` is true if and only if the year, month
19767  and day members of ``a_date`` and ``a_datetime`` are equal.
19768
19769- bdist_rpm now supports command line options --force-arch,
19770  {pre,post}-install,  {pre,post}-uninstall, and
19771  {prep,build,install,clean,verify}-script.
19772
19773- SF patch #998993: The UTF-8 and the UTF-16 stateful decoders now support
19774  decoding incomplete input (when the input stream is temporarily exhausted).
19775  ``codecs.StreamReader`` now implements buffering, which enables proper
19776  readline support for the UTF-16 decoders. ``codecs.StreamReader.read()``
19777  has a new argument ``chars`` which specifies the number of characters to
19778  return. ``codecs.StreamReader.readline()`` and
19779  ``codecs.StreamReader.readlines()`` have a new argument ``keepends``.
19780  Trailing "\n"s will be stripped from the lines if ``keepends`` is false.
19781
19782- The documentation for doctest is greatly expanded, and now covers all
19783  the new public features (of which there are many).
19784
19785- ``doctest.master`` was put back in, and ``doctest.testmod()`` once again
19786  updates it.  This isn't good, because every ``testmod()`` call
19787  contributes to bloating the "hidden" state of ``doctest.master``, but
19788  some old code apparently relies on it.  For now, all we can do is
19789  encourage people to stitch doctests together via doctest's unittest
19790  integration features instead.
19791
19792- httplib now handles ipv6 address/port pairs.
19793
19794- SF bug #1017864: ConfigParser now correctly handles default keys,
19795  processing them with ``ConfigParser.optionxform`` when supplied,
19796  consistent with the handling of config file entries and runtime-set
19797  options.
19798
19799- SF bug #997050: Document, test, & check for non-string values in
19800  ConfigParser.  Moved the new string-only restriction added in
19801  rev. 1.65 to the SafeConfigParser class, leaving existing
19802  ConfigParser & RawConfigParser behavior alone, and documented the
19803  conditions under which non-string values work.
19804
19805Build
19806-----
19807
19808- Building on darwin now includes /opt/local/include and /opt/local/lib for
19809  building extension modules.  This is so as to include software installed as
19810  a DarwinPorts port <http://darwinports.opendarwin.org/>
19811
19812- pyport.h now defines a Py_IS_NAN macro.  It works as-is when the
19813  platform C computes true for ``x != x`` if and only if X is a NaN.
19814  Other platforms can override the default definition with a platform-
19815  specific spelling in that platform's pyconfig.h.  You can also override
19816  pyport.h's default Py_IS_INFINITY definition now.
19817
19818C API
19819-----
19820
19821- SF patch 1044089:  New function ``PyEval_ThreadsInitialized()`` returns
19822  non-zero if PyEval_InitThreads() has been called.
19823
19824- The undocumented and unused extern int ``_PyThread_Started`` was removed.
19825
19826- The C API calls ``PyInterpreterState_New()`` and ``PyThreadState_New()``
19827  are two of the very few advertised as being safe to call without holding
19828  the GIL.  However, this wasn't true in a debug build, as bug 1041645
19829  demonstrated.  In a debug build, Python redirects the ``PyMem`` family
19830  of calls to Python's small-object allocator, to get the benefit of
19831  its extra debugging capabilities.  But Python's small-object allocator
19832  isn't threadsafe, relying on the GIL to avoid the expense of doing its
19833  own locking.  ``PyInterpreterState_New()`` and ``PyThreadState_New()``
19834  call the platform ``malloc()`` directly now, regardless of build type.
19835
19836- PyLong_AsUnsignedLong[Mask] now support int objects as well.
19837
19838- SF patch #998993: ``PyUnicode_DecodeUTF8Stateful`` and
19839  ``PyUnicode_DecodeUTF16Stateful`` have been added, which implement stateful
19840  decoding.
19841
19842Tests
19843-----
19844
19845- test__locale ported to unittest
19846
19847Mac
19848---
19849
19850- ``plistlib`` now supports non-dict root objects.  There is also a new
19851  interface for reading and writing plist files: ``readPlist(pathOrFile)``
19852  and ``writePlist(rootObject, pathOrFile)``
19853
19854Tools/Demos
19855-----------
19856
19857- The text file comparison scripts ``ndiff.py`` and ``diff.py`` now
19858  read the input files in universal-newline mode.  This spares them
19859  from consuming a great deal of time to deduce the useless result that,
19860  e.g., a file with Windows line ends and a file with Linux line ends
19861  have no lines in common.
19862
19863
19864What's New in Python 2.4 alpha 3?
19865=================================
19866
19867*Release date: 02-SEP-2004*
19868
19869Core and builtins
19870-----------------
19871
19872- SF patch #1007189: ``from ... import ...`` statements now allow the name
19873  list to be surrounded by parentheses.
19874
19875- Some speedups for long arithmetic, thanks to Trevor Perrin.  Gradeschool
19876  multiplication was sped a little by optimizing the C code.  Gradeschool
19877  squaring was sped by about a factor of 2, by exploiting that about half
19878  the digit products are duplicates in a square.  Because exponentiation
19879  uses squaring often, this also speeds long power.  For example, the time
19880  to compute 17**1000000 dropped from about 14 seconds to 9 on my box due
19881  to this much.  The cutoff for Karatsuba multiplication was raised,
19882  since gradeschool multiplication got quicker, and the cutoff was
19883  aggressively small regardless.  The exponentiation algorithm was switched
19884  from right-to-left to left-to-right, which is more efficient for small
19885  bases.  In addition, if the exponent is large, the algorithm now does
19886  5 bits (instead of 1 bit) at a time.  That cut the time to compute
19887  17**1000000 on my box in half again, down to about 4.5 seconds.
19888
19889- OverflowWarning is no longer generated.  PEP 237 scheduled this to
19890  occur in Python 2.3, but since OverflowWarning was disabled by default,
19891  nobody realized it was still being generated.  On the chance that user
19892  code is still using them, the Python builtin OverflowWarning, and
19893  corresponding C API PyExc_OverflowWarning, will exist until Python 2.5.
19894
19895- Py_InitializeEx has been added.
19896
19897- Fix the order of application of decorators.  The proper order is bottom-up;
19898  the first decorator listed is the last one called.
19899
19900- SF patch #1005778.  Fix a seg fault if the list size changed while
19901  calling list.index().  This could happen if a rich comparison function
19902  modified the list.
19903
19904- The ``func_name`` (a.k.a. ``__name__``) attribute of user-defined
19905  functions is now writable.
19906
19907- code_new (a.k.a new.code()) now checks its arguments sufficiently
19908  carefully that passing them on to PyCode_New() won't trigger calls
19909  to Py_FatalError() or PyErr_BadInternalCall().  It is still the case
19910  that the returned code object might be entirely insane.
19911
19912- Subclasses of string can no longer be interned.  The semantics of
19913  interning were not clear here -- a subclass could be mutable, for
19914  example -- and had bugs.  Explicitly interning a subclass of string
19915  via intern() will raise a TypeError.  Internal operations that attempt
19916  to intern a string subclass will have no effect.
19917
19918- Bug 1003935:  xrange() could report bogus OverflowErrors.  Documented
19919  what xrange() intends, and repaired tests accordingly.
19920
19921Extension modules
19922-----------------
19923
19924- difflib now supports HTML side-by-side diff.
19925
19926- os.urandom has been added for systems that support sources of random
19927  data.
19928
19929- Patch 1012740:  truncate() on a writable cStringIO now resets the
19930  position to the end of the stream.  This is consistent with the original
19931  StringIO module and avoids inadvertently resurrecting data that was
19932  supposed to have been truncated away.
19933
19934- Added socket.socketpair().
19935
19936- Added CurrentByteIndex, CurrentColumnNumber, CurrentLineNumber
19937  members to xml.parsers.expat.XMLParser object.
19938
19939- The mpz, rotor, and xreadlines modules, all deprecated in earlier
19940  versions of Python, have now been removed.
19941
19942Library
19943-------
19944
19945- Patch #934356: if a module defines __all__, believe that rather than using
19946  heuristics for filtering out imported names.
19947
19948- Patch #941486: added os.path.lexists(), which returns True for broken
19949  symlinks, unlike os.path.exists().
19950
19951- the random module now uses os.urandom() for seeding if it is available.
19952  Added a new generator based on os.urandom().
19953
19954- difflib and diff.py can now generate HTML.
19955
19956- bdist_rpm now includes version and release in the BuildRoot, and
19957  replaces - by ``_`` in version and release.
19958
19959- distutils build/build_scripts now has an -e option to specify the
19960  path to the Python interpreter for installed scripts.
19961
19962- PEP 292 classes Template and SafeTemplate are added to the string module.
19963
19964- tarfile now generates GNU tar files by default.
19965
19966- HTTPResponse has now a getheaders method.
19967
19968- Patch #1006219: let inspect.getsource handle '@' decorators. Thanks Simon
19969  Percivall.
19970
19971- logging.handlers.SMTPHandler.date_time has been removed;
19972  the class now uses email.Utils.formatdate to generate the time stamp.
19973
19974- A new function tkFont.nametofont was added to return an existing
19975  font. The Font class constructor now has an additional exists argument
19976  which, if True, requests to return/configure an existing font, rather
19977  than creating a new one.
19978
19979- Updated the decimal package's min() and max() methods to match the
19980  latest revision of the General Decimal Arithmetic Specification.
19981  Quiet NaNs are ignored and equal values are sorted based on sign
19982  and exponent.
19983
19984- The decimal package's Context.copy() method now returns deep copies.
19985
19986- Deprecated sys.exitfunc in favor of the atexit module.  The sys.exitfunc
19987  attribute will be kept around for backwards compatibility and atexit
19988  will just become the one preferred way to do it.
19989
19990- patch #675551: Add get_history_item and replace_history_item functions
19991  to the readline module.
19992
19993- bug #989672: pdb.doc and the help messages for the help_d and help_u methods
19994  of the pdb.Pdb class gives have been corrected. d(own) goes to a newer
19995  frame, u(p) to an older frame, not the other way around.
19996
19997- bug #990669: os.path.realpath() will resolve symlinks before normalizing the
19998  path, as normalizing the path may alter the meaning of the path if it
19999  contains symlinks.
20000
20001- bug #851123: shutil.copyfile will raise an exception when trying to copy a
20002  file onto a link to itself. Thanks Gregory Ball.
20003
20004- bug #570300: Fix inspect to resolve file locations using os.path.realpath()
20005  so as to properly list all functions in a module when the module itself is
20006  reached through a symlink.  Thanks Johannes Gijsbers.
20007
20008- doctest refactoring continued.  See the docs for details.  As part of
20009  this effort, some old and little- (never?) used features are now
20010  deprecated:  the Tester class, the module is_private() function, and the
20011  isprivate argument to testmod().  The Tester class supplied a feeble
20012  "by hand" way to combine multiple doctests, if you knew exactly what
20013  you were doing.  The newer doctest features for unittest integration
20014  already did a better job of that, are stronger now than ever, and the
20015  new DocTestRunner class is a saner foundation if you want to do it by
20016  hand.  The "private name" filtering gimmick was a mistake from the
20017  start, and testmod() changed long ago to ignore it by default.  If
20018  you want to filter out tests, the new DocTestFinder class can be used
20019  to return a list of all doctests, and you can filter that list by
20020  any computable criteria before passing it to a DocTestRunner instance.
20021
20022- Bug #891637, patch #1005466: fix inspect.getargs() crash on def foo((bar)).
20023
20024Tools/Demos
20025-----------
20026
20027- IDLE's shortcut keys for windows are now case insensitive so that
20028  Control-V works the same as Control-v.
20029
20030- pygettext.py: Generate POT-Creation-Date header in ISO format.
20031
20032Build
20033-----
20034
20035- Backward incompatibility:  longintrepr.h now triggers a compile-time
20036  error if SHIFT (the number of bits in a Python long "digit") isn't
20037  divisible by 5.  This new requirement allows simple code for the new
20038  5-bits-at-a-time long_pow() implementation.  If necessary, the
20039  restriction could be removed (by complicating long_pow(), or by
20040  falling back to the 1-bit-at-a-time algorithm), but there are no
20041  plans to do so.
20042
20043- bug #991962: When building with --disable-toolbox-glue on Darwin no
20044  attempt to build Mac-specific modules occurs.
20045
20046- The --with-tsc flag to configure to enable VM profiling with the
20047  processor's timestamp counter now works on PPC platforms.
20048
20049- patch #1006629: Define _XOPEN_SOURCE to 500 on Solaris 8/9 to match
20050  GCC's definition and avoid redefinition warnings.
20051
20052- Detect pthreads support (provided by gnu pth pthread emulation) on
20053  GNU/k*BSD systems.
20054
20055- bug #1005737, #1007249: Fixed several build problems and warnings
20056  found on old/legacy C compilers of HP-UX, IRIX and Tru64.
20057
20058C API
20059-----
20060
20061..
20062
20063Documentation
20064-------------
20065
20066- patch #1005936, bug #1009373: fix index entries which contain
20067  an underscore when viewed with Acrobat.
20068
20069- bug #990669: os.path.normpath may alter the meaning of a path if
20070  it contains symbolic links. This has been documented in a comment
20071  since 1992, but is now in the library reference as well.
20072
20073New platforms
20074-------------
20075
20076- FreeBSD 6 is now supported.
20077
20078Tests
20079-----
20080
20081..
20082
20083Windows
20084-------
20085
20086- Boosted the stack reservation for python.exe and pythonw.exe from
20087  the default 1MB to 2MB.  Stack frames under VC 7.1 for 2.4 are enough
20088  bigger than under VC 6.0 for 2.3.4 that deeply recursive progams
20089  within the default sys.getrecursionlimit() default value of 1000 were
20090  able to suffer undetected C stack overflows.  The standard test program
20091  test_compiler was one such program.  If a Python process on Windows
20092  "just vanishes" without a trace, and without an error message of any
20093  kind, but with an exit code of 128, undetected stack overflow may be
20094  the problem.
20095
20096Mac
20097---
20098
20099..
20100
20101
20102What's New in Python 2.4 alpha 2?
20103=================================
20104
20105*Release date: 05-AUG-2004*
20106
20107Core and builtins
20108-----------------
20109
20110- Patch #980695:  Implements efficient string concatenation for statements
20111  of the form s=s+t and s+=t.  This will vary across implementations.
20112  Accordingly, the str.join() method is strongly preferred for performance
20113  sensitive code.
20114
20115- PEP-0318, Function Decorators have been added to the language. These are
20116  implemented using the Java-style @decorator syntax, like so::
20117
20118     @staticmethod
20119     def foo(bar):
20120
20121  (The PEP needs to be updated to reflect the current state)
20122
20123- When importing a module M raises an exception, Python no longer leaves M
20124  in sys.modules.  Before 2.4a2 it did, and a subsequent import of M would
20125  succeed, picking up a module object from sys.modules reflecting as much
20126  of the initialization of M as completed before the exception was raised.
20127  Subsequent imports got no indication that M was in a partially-
20128  initialized state, and the importers could get into arbitrarily bad
20129  trouble as a result (the M they got was in an unintended state,
20130  arbitrarily far removed from M's author's intent).  Now subsequent
20131  imports of M will continue raising exceptions (but if, for example, the
20132  source code for M is edited between import attempts, then perhaps later
20133  attempts will succeed, or raise a different exception).
20134
20135  This can break existing code, but in such cases the code was probably
20136  working before by accident.  In the Python source, the only case of
20137  breakage discovered was in a test accidentally relying on a damaged
20138  module remaining in sys.modules.  Cases are also known where tests
20139  deliberately provoking import errors remove damaged modules from
20140  sys.modules themselves, and such tests will break now if they do an
20141  unconditional del sys.modules[M].
20142
20143- u'%s' % obj will now try obj.__unicode__() first and fallback to
20144  obj.__str__() if no __unicode__ method can be found.
20145
20146- Patch #550732: Add PyArg_VaParseTupleAndKeywords().  Analogous to
20147  PyArg_VaParse().  Both are now documented.  Thanks Greg Chapman.
20148
20149- Allow string and unicode return types from .encode()/.decode()
20150  methods on string and unicode objects.  Added unicode.decode()
20151  which was missing for no apparent reason.
20152
20153- An attempt to fix the mess that is Python's behaviour with
20154  signal handlers and threads, complicated by readline's behaviour.
20155  It's quite possible that there are still bugs here.
20156
20157- Added C macros Py_CLEAR and Py_VISIT to ease the implementation of
20158  types that support garbage collection.
20159
20160- Compiler now treats None as a constant.
20161
20162- The type of values returned by __int__, __float__, __long__,
20163  __oct__, and __hex__ are now checked.  Returning an invalid type
20164  will cause a TypeError to be raised.  This matches the behavior of
20165  Jython.
20166
20167- Implemented bind_textdomain_codeset() in locale module.
20168
20169- Added a workaround for proper string operations in BSDs.  str.split
20170  and str.is* methods can now work correctly with UTF-8 locales.
20171
20172- Bug #989185: unicode.iswide() and unicode.width() is dropped and
20173  the East Asian Width support is moved to unicodedata extension
20174  module.
20175
20176- Patch #941229: The source code encoding in interactive mode
20177  now refers sys.stdin.encoding not just ISO-8859-1 anymore.  This
20178  allows for non-latin-1 users to write unicode strings directly.
20179
20180Extension modules
20181-----------------
20182
20183- cpickle now supports the same keyword arguments as pickle.
20184
20185Library
20186-------
20187
20188- Added new codecs and aliases for ISO_8859-11, ISO_8859-16 and
20189  TIS-620
20190
20191- Thanks to Edward Loper, doctest has been massively refactored, and
20192  many new features were added.  Full docs will appear later.  For now
20193  the doctest module comments and new test cases give good coverage.
20194  The refactoring provides many hook points for customizing behavior
20195  (such as how to report errors, and how to compare expected to actual
20196  output).  New features include a <BLANKLINE> marker for expected
20197  output containing blank lines, options to produce unified or context
20198  diffs when actual output doesn't match expectations, an option to
20199  normalize whitespace before comparing, and an option to use an
20200  ellipsis to signify "don't care" regions of output.
20201
20202- Tkinter now supports the wish -sync and -use options.
20203
20204- The following methods in time support passing of None: ctime(), gmtime(),
20205  and localtime().  If None is provided, the current time is used (the
20206  same as when the argument is omitted).
20207  [SF bug 658254, patch 663482]
20208
20209- nntplib does now allow ignoring a .netrc file.
20210
20211- urllib2 now recognizes Basic authentication even if other authentication
20212  schemes are offered.
20213
20214- Bug #1001053.  wave.open() now accepts unicode filenames.
20215
20216- gzip.GzipFile has a new fileno() method, to retrieve the handle of the
20217  underlying file object (provided it has a fileno() method).  This is
20218  needed if you want to use os.fsync() on a GzipFile.
20219
20220- imaplib has two new methods: deleteacl and myrights.
20221
20222- nntplib has two new methods: description and descriptions. They
20223  use a more RFC-compliant way of getting a newsgroup description.
20224
20225- Bug #993394.  Fix a possible red herring of KeyError in 'threading' being
20226  raised during interpreter shutdown from a registered function with atexit
20227  when dummy_threading is being used.
20228
20229- Bug #857297/Patch #916874.  Fix an error when extracting a hard link
20230  from a tarfile.
20231
20232- Patch #846659.  Fix an error in tarfile.py when using
20233  GNU longname/longlink creation.
20234
20235- The obsolete FCNTL.py has been deleted.  The built-in fcntl module
20236  has been available (on platforms that support fcntl) since Python
20237  1.5a3, and all FCNTL.py did is export fcntl's names, after generating
20238  a deprecation warning telling you to use fcntl directly.
20239
20240- Several new unicode codecs are added: big5hkscs, euc_jis_2004,
20241  iso2022_jp_2004, shift_jis_2004.
20242
20243- Bug #788520.  Queue.{get, get_nowait, put, put_nowait} have new
20244  implementations, exploiting Conditions (which didn't exist at the time
20245  Queue was introduced).  A minor semantic change is that the Full and
20246  Empty exceptions raised by non-blocking calls now occur only if the
20247  queue truly was full or empty at the instant the queue was checked (of
20248  course the Queue may no longer be full or empty by the time a calling
20249  thread sees those exceptions, though).  Before, the exceptions could
20250  also be raised if it was "merely inconvenient" for the implementation
20251  to determine the true state of the Queue (because the Queue was locked
20252  by some other method in progress).
20253
20254- Bugs #979794 and #980117: difflib.get_grouped_opcodes() now handles the
20255  case of comparing two empty lists.  This affected both context_diff() and
20256  unified_diff(),
20257
20258- Bug #980938: smtplib now prints debug output to sys.stderr.
20259
20260- Bug #930024: posixpath.realpath() now handles infinite loops in symlinks by
20261  returning the last point in the path that was not part of any loop.  Thanks
20262  AM Kuchling.
20263
20264- Bug #980327: ntpath not handles compressing erroneous slashes between the
20265  drive letter and the rest of the path.  Also clearly handles UNC addresses now
20266  as well.  Thanks Paul Moore.
20267
20268- bug #679953: zipfile.py should now work for files over 2 GB.  The packed data
20269  for file sizes (compressed and uncompressed) was being stored as signed
20270  instead of unsigned.
20271
20272- decimal.py now only uses signals in the IBM spec.  The other conditions are
20273  no longer part of the public API.
20274
20275- codecs module now has two new generic APIs: encode() and decode()
20276  which don't restrict the return types (unlike the unicode and
20277  string methods of the same name).
20278
20279- Non-blocking SSL sockets work again; they were broken in Python 2.3.
20280  SF patch 945642.
20281
20282- doctest unittest integration improvements:
20283
20284  o Improved the unitest test output for doctest-based unit tests
20285
20286  o Can now pass setUp and tearDown functions when creating
20287    DocTestSuites.
20288
20289- The threading module has a new class, local, for creating objects
20290  that provide thread-local data.
20291
20292- Bug #990307: when keep_empty_values is True, cgi.parse_qsl()
20293  no longer returns spurious empty fields.
20294
20295- Implemented bind_textdomain_codeset() in gettext module.
20296
20297- Introduced in gettext module the l*gettext() family of functions,
20298  which return translation strings encoded in the preferred encoding,
20299  as informed by locale module's getpreferredencoding().
20300
20301- optparse module (and tests) upgraded to Optik 1.5a1.  Changes:
20302
20303  - Add expansion of default values in help text: the string
20304    "%default" in an option's help string is expanded to str() of
20305    that option's default value, or "none" if no default value.
20306
20307  - Bug #955889: option default values that happen to be strings are
20308    now processed in the same way as values from the command line; this
20309    allows generation of nicer help when using custom types.  Can
20310    be disabled with parser.set_process_default_values(False).
20311
20312  - Bug #960515: don't crash when generating help for callback
20313    options that specify 'type', but not 'dest' or 'metavar'.
20314
20315  - Feature #815264: change the default help format for short options
20316    that take an argument from e.g. "-oARG" to "-o ARG"; add
20317    set_short_opt_delimiter() and set_long_opt_delimiter() methods to
20318    HelpFormatter to allow (slight) customization of the formatting.
20319
20320  - Patch #736940: internationalize Optik: all built-in user-
20321    targeted literal strings are passed through gettext.gettext().  (If
20322    you want translations (.po files), they're not included with Python
20323    -- you'll find them in the Optik source distribution from
20324    http://optik.sourceforge.net/ .)
20325
20326  - Bug #878453: respect $COLUMNS environment variable for
20327    wrapping help output.
20328
20329  - Feature #988122: expand "%prog" in the 'description' passed
20330    to OptionParser, just like in the 'usage' and 'version' strings.
20331    (This is *not* done in the 'description' passed to OptionGroup.)
20332
20333C API
20334-----
20335
20336- PyImport_ExecCodeModule() and PyImport_ExecCodeModuleEx():  if an
20337  error occurs while loading the module, these now delete the module's
20338  entry from sys.modules.  All ways of loading modules eventually call
20339  one of these, so this is an error-case change in semantics for all
20340  ways of loading modules.  In rare cases, a module loader may wish
20341  to keep a module object in sys.modules despite that the module's
20342  code cannot be executed.  In such cases, the module loader must
20343  arrange to reinsert the name and module object in sys.modules.
20344  PyImport_ReloadModule() has been changed to reinsert the original
20345  module object into sys.modules if the module reload fails, so that
20346  its visible semantics have not changed.
20347
20348- A large pile of datetime field-extraction macros is now documented,
20349  thanks to Anthony Tuininga (patch #986010).
20350
20351Documentation
20352-------------
20353
20354- Improved the tutorial on creating types in C.
20355
20356  - point out the importance of reassigning data members before
20357    assigning their values
20358
20359  - correct my misconception about return values from visitprocs. Sigh.
20360
20361  - mention the labor saving Py_VISIT and Py_CLEAR macros.
20362
20363- Major rewrite of the math module docs, to address common confusions.
20364
20365Tests
20366-----
20367
20368- The test data files for the decimal test suite are now installed on
20369  platforms that use the Makefile.
20370
20371- SF patch 995225:  The test file testtar.tar accidentally contained
20372  CVS keywords (like $Id$), which could cause spurious failures in
20373  test_tarfile.py depending on how the test file was checked out.
20374
20375
20376What's New in Python 2.4 alpha 1?
20377=================================
20378
20379*Release date: 08-JUL-2004*
20380
20381Core and builtins
20382-----------------
20383
20384- weakref.ref is now the type object also known as
20385  weakref.ReferenceType; it can be subclassed like any other new-style
20386  class.  There's less per-entry overhead in WeakValueDictionary
20387  objects now (one object instead of three).
20388
20389- Bug #951851: Python crashed when reading import table of certain
20390  Windows DLLs.
20391
20392- Bug #215126.  The locals argument to eval(), execfile(), and exec now
20393  accept any mapping type.
20394
20395- marshal now shares interned strings. This change introduces
20396  a new .pyc magic.
20397
20398- Bug #966623. classes created with type() in an exec(, {}) don't
20399  have a __module__, but code in typeobject assumed it would always
20400  be there.
20401
20402- Python no longer relies on the LC_NUMERIC locale setting to be
20403  the "C" locale; as a result, it no longer tries to prevent changing
20404  the LC_NUMERIC category.
20405
20406- Bug #952807:  Unpickling pickled instances of subclasses of
20407  datetime.date, datetime.datetime and datetime.time could yield insane
20408  objects.  Thanks to Jiwon Seo for a fix.
20409
20410- Bug #845802: Python crashes when __init__.py is a directory.
20411
20412- Unicode objects received two new methods: iswide() and width().
20413  These query East Asian width information, as specified in Unicode
20414  TR11.
20415
20416- Improved the tuple hashing algorithm to give fewer collisions in
20417  common cases.  Fixes bug  #942952.
20418
20419- Implemented generator expressions (PEP 289).  Coded by Jiwon Seo.
20420
20421- Enabled the profiling of C extension functions (and builtins) - check
20422  new documentation and modified profile and bdb modules for more details
20423
20424- Set file.name to the object passed to open (instead of a new string)
20425
20426- Moved tracebackobject into traceback.h and renamed to PyTracebackObject
20427
20428- Optimized the byte coding for multiple assignments like "a,b=b,a" and
20429  "a,b,c=1,2,3".  Improves their speed by 25% to 30%.
20430
20431- Limit the nested depth of a tuple for the second argument to isinstance()
20432  and issubclass() to the recursion limit of the interpreter.
20433  Fixes bug  #858016 .
20434
20435- Optimized dict iterators, creating separate types for each
20436  and having them reveal their length.  Also optimized the
20437  methods:  keys(), values(), and items().
20438
20439- Implemented a newcode opcode, LIST_APPEND, that simplifies
20440  the generated bytecode for list comprehensions and further
20441  improves their performance (about 35%).
20442
20443- Implemented rich comparisons for floats, which seems to make
20444  comparisons involving NaNs somewhat less surprising when the
20445  underlying C compiler actually implements C99 semantics.
20446
20447- Optimized list.extend() to save memory and no longer create
20448  intermediate sequences.  Also, extend() now pre-allocates the
20449  needed memory whenever the length of the iterable is known in
20450  advance -- this halves the time to extend the list.
20451
20452- Optimized list resize operations to make fewer calls to the system
20453  realloc().  Significantly speeds up list appends, list pops,
20454  list comprehensions, and the list constructor (when the input iterable
20455  length is not known).
20456
20457- Changed the internal list over-allocation scheme.  For larger lists,
20458  overallocation ranged between 3% and 25%.  Now, it is a constant 12%.
20459  For smaller lists (n<8), overallocation was upto eight elements.  Now,
20460  the overallocation is no more than three elements -- this improves space
20461  utilization for applications that have large numbers of small lists.
20462
20463- Most list bodies now get re-used rather than freed.  Speeds up list
20464  instantiation and deletion by saving calls to malloc() and free().
20465
20466- The dict.update() method now accepts all the same argument forms
20467  as the dict() constructor.  This now includes item lists and/or
20468  keyword arguments.
20469
20470- Support for arbitrary objects supporting the read-only buffer
20471  interface as the co_code field of code objects (something that was
20472  only possible to create from C code) has been removed.
20473
20474- Made omitted callback and None equivalent for weakref.ref() and
20475  weakref.proxy(); the None case wasn't handled correctly in all
20476  cases.
20477
20478- Fixed problem where PyWeakref_NewRef() and PyWeakref_NewProxy()
20479  assumed that initial existing entries in an object's weakref list
20480  would not be removed while allocating a new weakref object.  Since
20481  GC could be invoked at that time, however, that assumption was
20482  invalid.  In a truly obscure case of GC being triggered during
20483  creation for a new weakref object for a referent which already
20484  has a weakref without a callback which is only referenced from
20485  cyclic trash, a memory error can occur.  This consistently created a
20486  segfault in a debug build, but provided less predictable behavior in
20487  a release build.
20488
20489- input() built-in function now respects compiler flags such as
20490  __future__ statements.  SF patch 876178.
20491
20492- Removed PendingDeprecationWarning from apply().  apply() remains
20493  deprecated, but the nuisance warning will not be issued.
20494
20495- At Python shutdown time (Py_Finalize()), 2.3 called cyclic garbage
20496  collection twice, both before and after tearing down modules.  The
20497  call after tearing down modules has been disabled, because too much
20498  of Python has been torn down then for __del__ methods and weakref
20499  callbacks to execute sanely.  The most common symptom was a sequence
20500  of uninformative messages on stderr when Python shut down, produced
20501  by threads trying to raise exceptions, but unable to report the nature
20502  of their problems because too much of the sys module had already been
20503  destroyed.
20504
20505- Removed FutureWarnings related to hex/oct literals and conversions
20506  and left shifts.  (Thanks to Kalle Svensson for SF patch 849227.)
20507  This addresses most of the remaining semantic changes promised by
20508  PEP 237, except for repr() of a long, which still shows the trailing
20509  'L'.  The PEP appears to promise warnings for operations that
20510  changed semantics compared to Python 2.3, but this is not
20511  implemented; we've suffered through enough warnings related to
20512  hex/oct literals and I think it's best to be silent now.
20513
20514- For str and unicode objects, the ljust(), center(), and rjust()
20515  methods now accept an optional argument specifying a fill
20516  character other than a space.
20517
20518- When method objects have an attribute that can be satisfied either
20519  by the function object or by the method object, the function
20520  object's attribute usually wins.  Christian Tismer pointed out that
20521  this is really a mistake, because this only happens for special
20522  methods (like __reduce__) where the method object's version is
20523  really more appropriate than the function's attribute.  So from now
20524  on, all method attributes will have precedence over function
20525  attributes with the same name.
20526
20527- Critical bugfix, for SF bug 839548:  if a weakref with a callback,
20528  its callback, and its weakly referenced object, all became part of
20529  cyclic garbage during a single run of garbage collection, the order
20530  in which they were torn down was unpredictable.  It was possible for
20531  the callback to see partially-torn-down objects, leading to immediate
20532  segfaults, or, if the callback resurrected garbage objects, to
20533  resurrect insane objects that caused segfaults (or other surprises)
20534  later.  In one sense this wasn't surprising, because Python's cyclic gc
20535  had no knowledge of Python's weakref objects.  It does now.  When
20536  weakrefs with callbacks become part of cyclic garbage now, those
20537  weakrefs are cleared first.  The callbacks don't trigger then,
20538  preventing the problems.  If you need callbacks to trigger, then just
20539  as when cyclic gc is not involved, you need to write your code so
20540  that weakref objects outlive the objects they weakly reference.
20541
20542- Critical bugfix, for SF bug 840829:  if cyclic garbage collection
20543  happened to occur during a weakref callback for a new-style class
20544  instance, subtle memory corruption was the result (in a release build;
20545  in a debug build, a segfault occurred reliably very soon after).
20546  This has been repaired.
20547
20548- Compiler flags set in PYTHONSTARTUP are now active in __main__.
20549
20550- Added two built-in types, set() and frozenset().
20551
20552- Added a reversed() built-in function that returns a reverse iterator
20553  over a sequence.
20554
20555- Added a sorted() built-in function that returns a new sorted list
20556  from any iterable.
20557
20558- CObjects are now mutable (on the C level) through PyCObject_SetVoidPtr.
20559
20560- list.sort() now supports three keyword arguments:  cmp, key, and reverse.
20561  The key argument can be a function of one argument that extracts a
20562  comparison key from the original record:  mylist.sort(key=str.lower).
20563  The reverse argument is a boolean value and if True will change the
20564  sort order as if the comparison arguments were reversed.  In addition,
20565  the documentation has been amended to provide a guarantee that all sorts
20566  starting with Py2.3 are guaranteed to be stable (the relative order of
20567  records with equal keys is unchanged).
20568
20569- Added test whether wchar_t is signed or not. A signed wchar_t is not
20570  usable as internal unicode type base for Py_UNICODE since the
20571  unicode implementation assumes an unsigned type.
20572
20573- Fixed a bug in the cache of length-one Unicode strings that could
20574  lead to a seg fault.  The specific problem occurred when an earlier,
20575  non-fatal error left an uninitialized Unicode object in the
20576  freelist.
20577
20578- The % formatting operator now supports '%F' which is equivalent to
20579  '%f'.  This has always been documented but never implemented.
20580
20581- complex(obj) could leak a little memory if obj wasn't a string or
20582  number.
20583
20584- zip() with no arguments now returns an empty list instead of raising
20585  a TypeError exception.
20586
20587- obj.__contains__() now returns True/False instead of 1/0.  SF patch
20588  820195.
20589
20590- Python no longer tries to be smart about recursive comparisons.
20591  When comparing containers with cyclic references to themselves it
20592  will now just hit the recursion limit.  See SF patch 825639.
20593
20594- str and unicode built-in types now have an rsplit() method that is
20595  same as split() except that it scans the string from the end
20596  working towards the beginning.  See SF feature request 801847.
20597
20598- Fixed a bug in object.__reduce_ex__ when using protocol 2.  Failure
20599  to clear the error when attempts to get the __getstate__ attribute
20600  fail caused intermittent errors and odd behavior.
20601
20602- buffer objects based on other objects no longer cache a pointer to
20603  the data and the data length.  Instead, the appropriate tp_as_buffer
20604  method is called as necessary.
20605
20606- fixed: if a file is opened with an explicit buffer size >= 1, repeated
20607  close() calls would attempt to free() the buffer already free()ed on
20608  the first call.
20609
20610
20611Extension modules
20612-----------------
20613
20614- Added socket.getservbyport(), and make the second argument in
20615  getservbyname() and getservbyport() optional.
20616
20617- time module code that deals with input POSIX timestamps will now raise
20618  ValueError if more than a second is lost in precision when the
20619  timestamp is cast to the platform C time_t type.  There's no chance
20620  that the platform will do anything sensible with the result in such
20621  cases.  This includes ctime(), localtime() and gmtime().  Assorted
20622  fromtimestamp() and utcfromtimestamp() methods in the datetime module
20623  were also protected.  Closes bugs #919012 and 975996.
20624
20625- fcntl.ioctl now warns if the mutate flag is not specified.
20626
20627- nt now properly allows referring to UNC roots, e.g. in nt.stat().
20628
20629- the weakref module now supports additional objects:  array.array,
20630  sre.pattern_objects, file objects, and sockets.
20631
20632- operator.isMappingType() and operator.isSequenceType() now give
20633  fewer false positives.
20634
20635- socket.sslerror is now a subclass of socket.error .  Also added
20636  socket.error to the socket module's C API.
20637
20638- Bug #920575: A problem where the _locale module segfaults on
20639  nl_langinfo(ERA) caused by GNU libc's illegal NULL return is fixed.
20640
20641- array objects now support the copy module.  Also, their resizing
20642  scheme has been updated to match that used for list objects.  This improves
20643  the performance (speed and memory usage) of append() operations.
20644  Also, array.array() and array.extend() now accept any iterable argument
20645  for repeated appends without needing to create another temporary array.
20646
20647- cStringIO.writelines() now accepts any iterable argument and writes
20648  the lines one at a time rather than joining them and writing once.
20649  Made a parallel change to StringIO.writelines().  Saves memory and
20650  makes suitable for use with generator expressions.
20651
20652- time.strftime() now checks that the values in its time tuple argument
20653  are within the proper boundaries to prevent possible crashes from the
20654  platform's C library implementation of strftime().  Can possibly
20655  break code that uses values outside the range that didn't cause
20656  problems previously (such as sitting day of year to 0).  Fixes bug
20657  #897625.
20658
20659- The socket module now supports Bluetooth sockets, if the
20660  system has <bluetooth/bluetooth.h>
20661
20662- Added a collections module containing a new datatype, deque(),
20663  offering high-performance, thread-safe, memory friendly appends
20664  and pops on either side of the deque.
20665
20666- Several modules now take advantage of collections.deque() for
20667  improved performance:  Queue, mutex, shlex, threading, and pydoc.
20668
20669- The operator module has two new functions, attrgetter() and
20670  itemgetter() which are useful for creating fast data extractor
20671  functions for map(), list.sort(), itertools.groupby(), and
20672  other functions that expect a function argument.
20673
20674- socket.SHUT_{RD,WR,RDWR} was added.
20675
20676- os.getsid was added.
20677
20678- The pwd module incorrectly advertised its struct type as
20679  struct_pwent; this has been renamed to struct_passwd.  (The old name
20680  is still supported for backwards compatibility.)
20681
20682- The xml.parsers.expat module now provides Expat 1.95.7.
20683
20684- socket.IPPROTO_IPV6 was added.
20685
20686- readline.clear_history was added.
20687
20688- select.select() now accepts sequences for its first three arguments.
20689
20690- cStringIO now supports the f.closed attribute.
20691
20692- The signal module now exposes SIGRTMIN and SIGRTMAX (if available).
20693
20694- curses module now supports use_default_colors().  [patch #739124]
20695
20696- Bug #811028: ncurses.h breakage on FreeBSD/MacOS X
20697
20698- Bug #814613: INET_ADDRSTRLEN fix needed for all compilers on SGI
20699
20700- Implemented non-recursive SRE matching scheme (#757624).
20701
20702- Implemented (?(id/name)yes|no) support in SRE (#572936).
20703
20704- random.seed() with no arguments or None uses time.time() as a default
20705  seed.  Modified to match Py2.2 behavior and use fractional seconds so
20706  that successive runs are more likely to produce different sequences.
20707
20708- random.Random has a new method, getrandbits(k), which returns an int
20709  with k random bits.  This method is now an optional part of the API
20710  for user defined generators.  Any generator that defines genrandbits()
20711  can now use randrange() for ranges with a length >= 2**53.  Formerly,
20712  randrange would return only even numbers for ranges that large (see
20713  SF bug #812202).  Generators that do not define genrandbits() now
20714  issue a warning when randrange() is called with a range that large.
20715
20716- itertools has a new function, groupby() for aggregating iterables
20717  into groups sharing the same key (as determined by a key function).
20718  It offers some of functionality of SQL's groupby keyword and of
20719  the Unix uniq filter.
20720
20721- itertools now has a new tee() function which produces two independent
20722  iterators from a single iterable.
20723
20724- itertools.izip() with no arguments now returns an empty iterator instead
20725  of raising a TypeError exception.
20726
20727- Fixed #853061: allow BZ2Compressor.compress() to receive an empty string
20728  as parameter.
20729
20730Library
20731-------
20732
20733- Added a new module: cProfile, a C profiler with the same interface as the
20734  profile module.  cProfile avoids some of the drawbacks of the hotshot
20735  profiler and provides a bit more information than the other two profilers.
20736  Based on "lsprof" (patch #1212837).
20737
20738- Bug #1266283: The new function "lexists" is now in os.path.__all__.
20739
20740- Bug #981530: Fix UnboundLocalError in shutil.rmtree().  This affects
20741  the documented behavior: the function passed to the onerror()
20742  handler can now also be os.listdir.
20743
20744- Bug #754449: threading.Thread objects no longer mask exceptions raised during
20745  interpreter shutdown with another exception from attempting to handle the
20746  original exception.
20747
20748- Added decimal.py per PEP 327.
20749
20750- Bug #981299: rsync is now a recognized protocol in urlparse that uses a
20751  "netloc" portion of a URL.
20752
20753- Bug #919012: shutil.move() will not try to move a directory into itself.
20754  Thanks Johannes Gijsbers.
20755
20756- Bug #934282: pydoc.stripid() is now case-insensitive.  Thanks Robin Becker.
20757
20758- Bug #823209:  cmath.log() now takes an optional base argument so that its
20759  API matches math.log().
20760
20761- Bug #957381: distutils bdist_rpm no longer fails on recent RPM versions
20762  that generate a -debuginfo.rpm
20763
20764- os.path.devnull has been added for all supported platforms.
20765
20766- Fixed #877165: distutils now picks the right C++ compiler command
20767  on cygwin and mingw32.
20768
20769- urllib.urlopen().readline() now handles HTTP/0.9 correctly.
20770
20771- refactored site.py into functions.  Also wrote regression tests for the
20772  module.
20773
20774- The distutils install command now supports the --home option and
20775  installation scheme for all platforms.
20776
20777- asyncore.loop now has a repeat count parameter that defaults to
20778  looping forever.
20779
20780- The distutils sdist command now ignores all .svn directories, in
20781  addition to CVS and RCS directories.  .svn directories hold
20782  administrative files for the Subversion source control system.
20783
20784- Added a new module: cookielib.  Automatic cookie handling for HTTP
20785  clients.  Also, support for cookielib has been added to urllib2, so
20786  urllib2.urlopen() can transparently handle cookies.
20787
20788- stringprep.py now uses built-in set() instead of sets.Set().
20789
20790- Bug #876278: Unbounded recursion in modulefinder
20791
20792- Bug #780300: Swap public and system ID in LexicalHandler.startDTD.
20793  Applications relying on the wrong order need to be corrected.
20794
20795- Bug #926075: Fixed a bug that returns a wrong pattern object
20796  for a string or unicode object in sre.compile() when a different
20797  type pattern with the same value exists.
20798
20799- Added countcallers arg to trace.Trace class (--trackcalls command line arg
20800  when run from the command prompt).
20801
20802- Fixed a caching bug in platform.platform() where the argument of 'terse' was
20803  not taken into consideration when caching value.
20804
20805- Added two new command-line arguments for profile (output file and
20806  default sort).
20807
20808- Added global runctx function to profile module
20809
20810- Add hlist missing entryconfigure and entrycget methods.
20811
20812- The ptcp154 codec was added for Kazakh character set support.
20813
20814- Support non-anonymous ftp URLs in urllib2.
20815
20816- The encodings package will now apply codec name aliases
20817  first before starting to try the import of the codec module.
20818  This simplifies overriding built-in codecs with external
20819  packages, e.g. the included CJK codecs with the JapaneseCodecs
20820  package, by adjusting the aliases dictionary in encodings.aliases
20821  accordingly.
20822
20823- base64 now supports RFC 3548 Base16, Base32, and Base64 encoding and
20824  decoding standards.
20825
20826- urllib2 now supports processors.  A processor is a handler that
20827  implements an xxx_request or xxx_response method.  These methods are
20828  called for all requests.
20829
20830- distutils compilers now compile source files in the same order as
20831  they are passed to the compiler.
20832
20833- pprint.pprint() and pprint.pformat() now have additional parameters
20834  indent, width and depth.
20835
20836- Patch #750542: pprint now will pretty print subclasses of list, tuple
20837  and dict too, as long as they don't overwrite __repr__().
20838
20839- Bug #848614: distutils' msvccompiler fails to find the MSVC6
20840  compiler because of incomplete registry entries.
20841
20842- httplib.HTTP.putrequest now offers to omit the implicit Accept-Encoding.
20843
20844- Patch #841977: modulefinder didn't find extension modules in packages
20845
20846- imaplib.IMAP4.thread was added.
20847
20848- Plugged a minor hole in tempfile.mktemp() due to the use of
20849  os.path.exists(), switched to using os.lstat() directly if possible.
20850
20851- bisect.py and heapq.py now have underlying C implementations
20852  for better performance.
20853
20854- heapq.py has two new functions, nsmallest() and nlargest().
20855
20856- traceback.format_exc has been added (similar to print_exc but it returns
20857  a string).
20858
20859- xmlrpclib.MultiCall has been added.
20860
20861- poplib.POP3_SSL has been added.
20862
20863- tmpfile.mkstemp now returns an absolute path even if dir is relative.
20864
20865- urlparse is RFC 2396 compliant.
20866
20867- The fieldnames argument to the csv module's DictReader constructor is now
20868  optional.  If omitted, the first row of the file will be used as the
20869  list of fieldnames.
20870
20871- encodings.bz2_codec was added for access to bz2 compression
20872  using "a long string".encode('bz2')
20873
20874- Various improvements to unittest.py, realigned with PyUnit CVS.
20875
20876- dircache now passes exceptions to the caller, instead of returning
20877  empty lists.
20878
20879- The bsddb module and dbhash module now support the iterator and
20880  mapping protocols which make them more substitutable for dictionaries
20881  and shelves.
20882
20883- The csv module's DictReader and DictWriter classes now accept keyword
20884  arguments.  This was an omission in the initial implementation.
20885
20886- The email package handles some RFC 2231 parameters with missing
20887  CHARSET fields better.  It also includes a patch to parameter
20888  parsing when semicolons appear inside quotes.
20889
20890- sets.py now runs under Py2.2.  In addition, the argument restrictions
20891  for most set methods (but not the operators) have been relaxed to
20892  allow any iterable.
20893
20894- _strptime.py now has a behind-the-scenes caching mechanism for the most
20895  recent TimeRE instance used along with the last five unique directive
20896  patterns.  The overall module was also made more thread-safe.
20897
20898- random.cunifvariate() and random.stdgamma() were deprecated in Py2.3
20899  and removed in Py2.4.
20900
20901- Bug #823328: urllib2.py's HTTP Digest Auth support works again.
20902
20903- Patch #873597: CJK codecs are imported into rank of default codecs.
20904
20905Tools/Demos
20906-----------
20907
20908- A hotshotmain script was added to the Tools/scripts directory that
20909  makes it easy to run a script under control of the hotshot profiler.
20910
20911- The db2pickle and pickle2db scripts can now dump/load gdbm files.
20912
20913- The file order on the command line of the pickle2db script was reversed.
20914  It is now [ picklefile ] dbfile.  This provides better symmetry with
20915  db2pickle.  The file arguments to both scripts are now source followed by
20916  destination in situations where both files are given.
20917
20918- The pydoc script will display a link to the module documentation for
20919  modules determined to be part of the core distribution.  The documentation
20920  base directory defaults to http://www.python.org/doc/current/lib/ but can
20921  be changed by setting the PYTHONDOCS environment variable.
20922
20923- texcheck.py now detects double word errors.
20924
20925- md5sum.py mistakenly opened input files in text mode by default, a
20926  silent and dangerous change from previous releases.  It once again
20927  opens input files in binary mode by default.  The -t and -b flags
20928  remain for compatibility with the 2.3 release, but -b is the default
20929  now.
20930
20931- py-electric-colon now works when pending-delete/delete-selection mode is
20932  in effect
20933
20934- py-help-at-point is no longer bound to the F1 key - it's still bound to
20935  C-c C-h
20936
20937- Pynche was fixed to not crash when there is no ~/.pynche file and no
20938  -d option was given.
20939
20940Build
20941-----
20942
20943- Bug #978645: Modules/getpath.c now builds properly in --disable-framework
20944  build under OS X.
20945
20946- Profiling using gprof is now available if Python is configured with
20947  --enable-profiling.
20948
20949- Profiling the VM using the Pentium TSC is now possible if Python
20950  is configured --with-tsc.
20951
20952- In order to find libraries, setup.py now also looks in /lib64, for use
20953  on AMD64.
20954
20955- Bug #934635: Fixed a bug where the configure script couldn't detect
20956  getaddrinfo() properly if the KAME stack had SCTP support.
20957
20958- Support for missing ANSI C header files (limits.h, stddef.h, etc) was
20959  removed.
20960
20961- Systems requiring the D4, D6 or D7 variants of pthreads are no longer
20962  supported (see PEP 11).
20963
20964- Universal newline support can no longer be disabled (see PEP 11).
20965
20966- Support for DGUX, SunOS 4, IRIX 4 and Minix was removed (see PEP 11).
20967
20968- Support for systems requiring --with-dl-dld or --with-sgi-dl was removed
20969  (see PEP 11).
20970
20971- Tests for sizeof(char) were removed since ANSI C mandates that
20972  sizeof(char) must be 1.
20973
20974C API
20975-----
20976
20977- Thanks to Anthony Tuininga, the datetime module now supplies a C API
20978  containing type-check macros and constructors.  See new docs in the
20979  Python/C API Reference Manual for details.
20980
20981- Private function _PyTime_DoubleToTimet added, to convert a Python
20982  timestamp (C double) to platform time_t with some out-of-bounds
20983  checking.  Declared in new header file timefuncs.h.  It would be
20984  good to expose some other internal timemodule.c functions there.
20985
20986- New public functions PyEval_EvaluateFrame and PyGen_New to expose
20987  generator objects.
20988
20989- New public functions Py_IncRef() and Py_DecRef(), exposing the
20990  functionality of the Py_XINCREF() and Py_XDECREF macros. Useful for
20991  runtime dynamic embedding of Python.  See patch #938302, by Bob
20992  Ippolito.
20993
20994- Added a new macro, PySequence_Fast_ITEMS, which retrieves a fast sequence's
20995  underlying array of PyObject pointers.  Useful for high speed looping.
20996
20997- Created a new method flag, METH_COEXIST, which causes a method to be loaded
20998  even if already defined by a slot wrapper.  This allows a __contains__
20999  method, for example, to co-exist with a defined sq_contains slot.  This
21000  is helpful because the PyCFunction can take advantage of optimized calls
21001  whenever METH_O or METH_NOARGS flags are defined.
21002
21003- Added a new function, PyDict_Contains(d, k) which is like
21004  PySequence_Contains() but is specific to dictionaries and executes
21005  about 10% faster.
21006
21007- Added three new macros: Py_RETURN_NONE, Py_RETURN_TRUE, and Py_RETURN_FALSE.
21008  Each return the singleton they mention after Py_INCREF()ing them.
21009
21010- Added a new function, PyTuple_Pack(n, ...) for constructing tuples from a
21011  variable length argument list of Python objects without having to invoke
21012  the more complex machinery of Py_BuildValue().  PyTuple_Pack(3, a, b, c)
21013  is equivalent to Py_BuildValue("(OOO)", a, b, c).
21014
21015Windows
21016-------
21017
21018- The _winreg module could segfault when reading very large registry
21019  values, due to unchecked alloca() calls (SF bug 851056).  The fix is
21020  uses either PyMem_Malloc(n) or PyString_FromStringAndSize(NULL, n),
21021  as appropriate, followed by a size check.
21022
21023- file.truncate() could misbehave if the file was open for update
21024  (modes r+, rb+, w+, wb+), and the most recent file operation before
21025  the truncate() call was an input operation.  SF bug 801631.
21026
21027
21028What's New in Python 2.3 final?
21029===============================
21030
21031*Release date: 29-Jul-2003*
21032
21033IDLE
21034----
21035
21036- Bug 778400:  IDLE hangs when selecting "Edit with IDLE" from explorer.
21037  This was unique to Windows, and was fixed by adding an -n switch to
21038  the command the Windows installer creates to execute "Edit with IDLE"
21039  context-menu actions.
21040
21041- IDLE displays a new message upon startup:  some "personal firewall"
21042  kinds of programs (for example, ZoneAlarm) open a dialog of their
21043  own when any program opens a socket.  IDLE does use sockets, talking
21044  on the computer's internal loopback interface.  This connection is not
21045  visible on any external interface and no data is sent to or received
21046  from the Internet.  So, if you get such a dialog when opening IDLE,
21047  asking whether to let pythonw.exe talk to address 127.0.0.1, say yes,
21048  and rest assured no communication external to your machine is taking
21049  place.  If you don't allow it, IDLE won't be able to start.
21050
21051
21052What's New in Python 2.3 release candidate 2?
21053=============================================
21054
21055*Release date: 24-Jul-2003*
21056
21057Core and builtins
21058-----------------
21059
21060- It is now possible to import from zipfiles containing additional
21061  data bytes before the zip compatible archive.  Zipfiles containing a
21062  comment at the end are still unsupported.
21063
21064Extension modules
21065-----------------
21066
21067- A longstanding bug in the parser module's initialization could cause
21068  fatal internal refcount confusion when the module got initialized more
21069  than once.  This has been fixed.
21070
21071- Fixed memory leak in pyexpat; using the parser's ParseFile() method
21072  with open files that aren't instances of the standard file type
21073  caused an instance of the bound .read() method to be leaked on every
21074  call.
21075
21076- Fixed some leaks in the locale module.
21077
21078Library
21079-------
21080
21081- Lib/encodings/rot_13.py when used as a script, now more properly
21082  uses the first Python interpreter on your path.
21083
21084- Removed caching of TimeRE (and thus LocaleTime) in _strptime.py to
21085  fix a locale related bug in the test suite.  Although another patch
21086  was needed to actually fix the problem, the cache code was not
21087  restored.
21088
21089IDLE
21090----
21091
21092- Calltips patches.
21093
21094Build
21095-----
21096
21097- For MacOSX, added -mno-fused-madd to BASECFLAGS to fix test_coercion
21098  on Panther (OSX 10.3).
21099
21100C API
21101-----
21102
21103Windows
21104-------
21105
21106- The tempfile module could do insane imports on Windows if PYTHONCASEOK
21107  was set, making temp file creation impossible.  Repaired.
21108
21109- Add a patch to workaround pthread_sigmask() bugs in Cygwin.
21110
21111Mac
21112---
21113
21114- Various fixes to pimp.
21115
21116- Scripts runs with pythonw no longer had full window manager access.
21117
21118- Don't force boot-disk-only install, for reasons unknown it causes
21119  more problems than it solves.
21120
21121
21122What's New in Python 2.3 release candidate 1?
21123=============================================
21124
21125*Release date: 18-Jul-2003*
21126
21127Core and builtins
21128-----------------
21129
21130- The new function sys.getcheckinterval() returns the last value set
21131  by sys.setcheckinterval().
21132
21133- Several bugs in the symbol table phase of the compiler have been
21134  fixed.  Errors could be lost and compilation could fail without
21135  reporting an error.  SF patch 763201.
21136
21137- The interpreter is now more robust about importing the warnings
21138  module.  In an executable generated by freeze or similar programs,
21139  earlier versions of 2.3 would fail if the warnings module could
21140  not be found on the file system.  Fixes SF bug 771097.
21141
21142- A warning about assignments to module attributes that shadow
21143  builtins, present in earlier releases of 2.3, has been removed.
21144
21145- It is not possible to create subclasses of built-in types like str
21146  and tuple that define an itemsize.  Earlier releases of Python 2.3
21147  allowed this by mistake, leading to crashes and other problems.
21148
21149- The thread_id is now initialized to 0 in a non-thread build.  SF bug
21150  770247.
21151
21152- SF bug 762891: "del p[key]" on proxy object no longer raises SystemError.
21153
21154Extension modules
21155-----------------
21156
21157- weakref.proxy() can now handle "del obj[i]" for proxy objects
21158  defining __delitem__.  Formerly, it generated a SystemError.
21159
21160- SSL no longer crashes the interpreter when the remote side disconnects.
21161
21162- On Unix the mmap module can again be used to map device files.
21163
21164- time.strptime now exclusively uses the Python implementation
21165  contained within the _strptime module.
21166
21167- The print slot of weakref proxy objects was removed, because it was
21168  not consistent with the object's repr slot.
21169
21170- The mmap module only checks file size for regular files, not
21171  character or block devices.  SF patch 708374.
21172
21173- The cPickle Pickler garbage collection support was fixed to traverse
21174  the find_class attribute, if present.
21175
21176- There are several fixes for the bsddb3 wrapper module.
21177
21178  bsddb3 no longer crashes if an environment is closed before a cursor
21179  (SF bug 763298).
21180
21181  The DB and DBEnv set_get_returns_none function was extended to take
21182  a level instead of a boolean flag.  The new level 2 means that in
21183  addition, cursor.set()/.get() methods return None instead of raising
21184  an exception.
21185
21186  A typo was fixed in DBCursor.join_item(), preventing a crash.
21187
21188Library
21189-------
21190
21191- distutils now supports MSVC 7.1
21192
21193- doctest now examines all docstrings by default.  Previously, it would
21194  skip over functions with private names (as indicated by the underscore
21195  naming convention).  The old default created too much of a risk that
21196  user tests were being skipped inadvertently.  Note, this change could
21197  break code in the unlikely case that someone had intentionally put
21198  failing tests in the docstrings of private functions.  The breakage
21199  is easily fixable by specifying the old behavior when calling testmod()
21200  or Tester().
21201
21202- There were several fixes to the way dumbdbms are closed.  It's vital
21203  that a dumbdbm database be closed properly, else the on-disk data
21204  and directory files can be left in mutually inconsistent states.
21205  dumbdbm.py's _Database.__del__() method attempted to close the
21206  database properly, but a shutdown race in _Database._commit() could
21207  prevent this from working, so that a program trusting __del__() to
21208  get the on-disk files in synch could be badly surprised.  The race
21209  has been repaired.  A sync() method was also added so that shelve
21210  can guarantee data is written to disk.
21211
21212  The close() method can now be called more than once without complaint.
21213
21214- The classes in threading.py are now new-style classes.  That they
21215  weren't before was an oversight.
21216
21217- The urllib2 digest authentication handlers now define the correct
21218  auth_header.  The earlier versions would fail at runtime.
21219
21220- SF bug 763023: fix uncaught ZeroDivisionError in difflib ratio methods
21221  when there are no lines.
21222
21223- SF bug 763637: fix exception in Tkinter with after_cancel
21224  which could occur with Tk 8.4
21225
21226- SF bug 770601: CGIHTTPServer.py now passes the entire environment
21227  to child processes.
21228
21229- SF bug 765238: add filter to fnmatch's __all__.
21230
21231- SF bug 748201: make time.strptime() error messages more helpful.
21232
21233- SF patch 764470: Do not dump the args attribute of a Fault object in
21234  xmlrpclib.
21235
21236- SF patch 549151: urllib and urllib2 now redirect POSTs on 301
21237  responses.
21238
21239- SF patch 766650: The whichdb module was fixed to recognize dbm files
21240  generated by gdbm on OS/2 EMX.
21241
21242- SF bugs 763047 and 763052: fixes bug of timezone value being left as
21243  -1 when ``time.tzname[0] == time.tzname[1] and not time.daylight``
21244  is true when it should only when time.daylight is true.
21245
21246- SF bug 764548: re now allows subclasses of str and unicode to be
21247  used as patterns.
21248
21249- SF bug 763637: In Tkinter, change after_cancel() to handle tuples
21250  of varying sizes.  Tk 8.4 returns a different number of values
21251  than Tk 8.3.
21252
21253- SF bug 763023: difflib.ratio() did not catch zero division.
21254
21255- The Queue module now has an __all__ attribute.
21256
21257Tools/Demos
21258-----------
21259
21260- See Lib/idlelib/NEWS.txt for IDLE news.
21261
21262- SF bug 753592: webchecker/wsgui now handles user supplied directories.
21263
21264- The trace.py script has been removed.  It is now in the standard library.
21265
21266Build
21267-----
21268
21269- Python now compiles with -fno-strict-aliasing if possible (SF bug 766696).
21270
21271- The socket module compiles on IRIX 6.5.10.
21272
21273- An irix64 system is treated the same way as an irix6 system (SF
21274  patch 764560).
21275
21276- Several definitions were missing on FreeBSD 5.x unless the
21277  __BSD_VISIBLE symbol was defined.  configure now defines it as
21278  needed.
21279
21280C API
21281-----
21282
21283- Unicode objects now support mbcs as a built-in encoding, so the C
21284  API can use it without deferring to the encodings package.
21285
21286Windows
21287-------
21288
21289- The Windows implementation of PyThread_start_new_thread() never
21290  checked error returns from Windows functions correctly.  As a result,
21291  it could claim to start a new thread even when the Microsoft
21292  _beginthread() function failed (due to "too many threads" -- this is
21293  on the order of thousands when it happens).  In these cases, the
21294  Python exception ::
21295
21296      thread.error: can't start new thread
21297
21298  is raised now.
21299
21300- SF bug 766669: Prevent a GPF on interpreter exit when sockets are in
21301  use.  The interpreter now calls WSACleanup() from Py_Finalize()
21302  instead of from DLL teardown.
21303
21304Mac
21305---
21306
21307- Bundlebuilder now inherits default values in the right way.  It was
21308  previously possible for app bundles to get a type of "BNDL" instead
21309  of "APPL."  Other improvements include, a --build-id option to
21310  specify the CFBundleIdentifier and using the --python option to set
21311  the executable in the bundle.
21312
21313- Fixed two bugs in MacOSX framework handling.
21314
21315- pythonw did not allow user interaction in 2.3rc1, this has been fixed.
21316
21317- Python is now compiled with -mno-fused-madd, making all tests pass
21318  on Panther.
21319
21320What's New in Python 2.3 beta 2?
21321================================
21322
21323*Release date: 29-Jun-2003*
21324
21325Core and builtins
21326-----------------
21327
21328- A program can now set the environment variable PYTHONINSPECT to some
21329  string value in Python, and cause the interpreter to enter the
21330  interactive prompt at program exit, as if Python had been invoked
21331  with the -i option.
21332
21333- list.index() now accepts optional start and stop arguments.  Similar
21334  changes were made to UserList.index(). SF feature request 754014.
21335
21336- SF patch 751998 fixes an unwanted side effect of the previous fix
21337  for SF bug 742860 (the next item).
21338
21339- SF bug 742860: "WeakKeyDictionary __delitem__ uses iterkeys".  This
21340  wasn't threadsafe, was very inefficient (expected time O(len(dict))
21341  instead of O(1)), and could raise a spurious RuntimeError if another
21342  thread mutated the dict during __delitem__, or if a comparison function
21343  mutated it.  It also neglected to raise KeyError when the key wasn't
21344  present; didn't raise TypeError when the key wasn't of a weakly
21345  referencable type; and broke various more-or-less obscure dict
21346  invariants by using a sequence of equality comparisons over the whole
21347  set of dict keys instead of computing the key's hash code to narrow
21348  the search to those keys with the same hash code.  All of these are
21349  considered to be bugs.  A new implementation of __delitem__ repairs all
21350  that, but note that fixing these bugs may change visible behavior in
21351  code relying (whether intentionally or accidentally) on old behavior.
21352
21353- SF bug 734869: Fixed a compiler bug that caused a fatal error when
21354  compiling a list comprehension that contained another list comprehension
21355  embedded in a lambda expression.
21356
21357- SF bug 705231:  builtin pow() no longer lets the platform C pow()
21358  raise -1.0 to integer powers, because (at least) glibc gets it wrong
21359  in some cases.  The result should be -1.0 if the power is odd and 1.0
21360  if the power is even, and any float with a sufficiently large exponent
21361  is (mathematically) an exact even integer.
21362
21363- SF bug 759227: A new-style class that implements __nonzero__() must
21364  return a bool or int (but not an int subclass) from that method.  This
21365  matches the restriction on classic classes.
21366
21367- The encoding attribute has been added for file objects, and set to
21368  the terminal encoding on Unix and Windows.
21369
21370- The softspace attribute of file objects became read-only by oversight.
21371  It's writable again.
21372
21373- Reverted a 2.3 beta 1 change to iterators for subclasses of list and
21374  tuple.  By default, the iterators now access data elements directly
21375  instead of going through __getitem__.  If __getitem__ access is
21376  preferred, then __iter__ can be overridden.
21377
21378- SF bug 735247: The staticmethod and super types participate in
21379  garbage collection. Before this change, it was possible for leaks to
21380  occur in functions with non-global free variables that used these types.
21381
21382Extension modules
21383-----------------
21384
21385- the socket module has a new exception, socket.timeout, to allow
21386  timeouts to be handled separately from other socket errors.
21387
21388- SF bug 751276: cPickle has fixed to propagate exceptions raised in
21389  user code.  In earlier versions, cPickle caught and ignored any
21390  exception when it performed operations that it expected to raise
21391  specific exceptions like AttributeError.
21392
21393- cPickle Pickler and Unpickler objects now participate in garbage
21394  collection.
21395
21396- mimetools.choose_boundary() could return duplicate strings at times,
21397  especially likely on Windows.  The strings returned are now guaranteed
21398  unique within a single program run.
21399
21400- thread.interrupt_main() raises KeyboardInterrupt in the main thread.
21401  dummy_thread has also been modified to try to simulate the behavior.
21402
21403- array.array.insert() now treats negative indices as being relative
21404  to the end of the array, just like list.insert() does. (SF bug #739313)
21405
21406- The datetime module classes datetime, time, and timedelta are now
21407  properly subclassable.
21408
21409- _tkinter.{get|set}busywaitinterval was added.
21410
21411- itertools.islice() now accepts stop=None as documented.
21412  Fixes SF bug #730685.
21413
21414- the bsddb185 module is built in one restricted instance -
21415  /usr/include/db.h exists and defines HASHVERSION to be 2.  This is true
21416  for many BSD-derived systems.
21417
21418
21419Library
21420-------
21421
21422- Some happy doctest extensions from Jim Fulton have been added to
21423  doctest.py.  These are already being used in Zope3.  The two
21424  primary ones:
21425
21426  doctest.debug(module, name) extracts the doctests from the named object
21427  in the given module, puts them in a temp file, and starts pdb running
21428  on that file.  This is great when a doctest fails.
21429
21430  doctest.DocTestSuite(module=None) returns a synthesized unittest
21431  TestSuite instance, to be run by the unittest framework, which
21432  runs all the doctests in the module.  This allows writing tests in
21433  doctest style (which can be clearer and shorter than writing tests
21434  in unittest style), without losing unittest's powerful testing
21435  framework features (which doctest lacks).
21436
21437- For compatibility with doctests created before 2.3, if an expected
21438  output block consists solely of "1" and the actual output block
21439  consists solely of "True", it's accepted as a match; similarly
21440  for "0" and "False".  This is quite un-doctest-like, but is practical.
21441  The behavior can be disabled by passing the new doctest module
21442  constant DONT_ACCEPT_TRUE_FOR_1 to the new optionflags optional
21443  argument.
21444
21445- ZipFile.testzip() now only traps BadZipfile exceptions.  Previously,
21446  a bare except caught to much and reported all errors as a problem
21447  in the archive.
21448
21449- The logging module now has a new function, makeLogRecord() making
21450  LogHandler easier to interact with DatagramHandler and SocketHandler.
21451
21452- The cgitb module has been extended to support plain text display (SF patch
21453  569574).
21454
21455- A brand new version of IDLE (from the IDLEfork project at
21456  SourceForge) is now included as Lib/idlelib.  The old Tools/idle is
21457  no more.
21458
21459- Added a new module: trace (documentation missing).  This module used
21460  to be distributed in Tools/scripts.  It uses sys.settrace() to trace
21461  code execution -- either function calls or individual lines.  It can
21462  generate tracing output during execution or a post-mortem report of
21463  code coverage.
21464
21465- The threading module has new functions settrace() and setprofile()
21466  that cooperate with the functions of the same name in the sys
21467  module.  A function registered with the threading module will
21468  be used for all threads it creates.  The new trace module uses this
21469  to provide tracing for code running in threads.
21470
21471- copy.py: applied SF patch 707900, fixing bug 702858, by Steven
21472  Taschuk.  Copying a new-style class that had a reference to itself
21473  didn't work.  (The same thing worked fine for old-style classes.)
21474  Builtin functions are now treated as atomic, fixing bug #746304.
21475
21476- difflib.py has two new functions:  context_diff() and unified_diff().
21477
21478- More fixes to urllib (SF 549151): (a) When redirecting, always use
21479  GET.  This is common practice and more-or-less sanctioned by the
21480  HTTP standard. (b) Add a handler for 307 redirection, which becomes
21481  an error for POST, but a regular redirect for GET and HEAD
21482
21483- Added optional 'onerror' argument to os.walk(), to control error
21484  handling.
21485
21486- inspect.is{method|data}descriptor was added, to allow pydoc display
21487  __doc__ of data descriptors.
21488
21489- Fixed socket speed loss caused by use of the _socketobject wrapper class
21490  in socket.py.
21491
21492- timeit.py now checks the current directory for imports.
21493
21494- urllib2.py now knows how to order proxy classes, so the user doesn't
21495  have to insert it in front of other classes, nor do dirty tricks like
21496  inserting a "dummy" HTTPHandler after a ProxyHandler when building an
21497  opener with proxy support.
21498
21499- Iterators have been added for dbm keys.
21500
21501- random.Random objects can now be pickled.
21502
21503Tools/Demos
21504-----------
21505
21506- pydoc now offers help on keywords and topics.
21507
21508- Tools/idle is gone; long live Lib/idlelib.
21509
21510- diff.py prints file diffs in context, unified, or ndiff formats,
21511  providing a command line interface to difflib.py.
21512
21513- texcheck.py is a new script for making a rough validation of Python LaTeX
21514  files.
21515
21516Build
21517-----
21518
21519- Setting DESTDIR during 'make install' now allows specifying a
21520  different root directory.
21521
21522C API
21523-----
21524
21525- PyType_Ready():  If a type declares that it participates in gc
21526  (Py_TPFLAGS_HAVE_GC), and its base class does not, and its base class's
21527  tp_free slot is the default _PyObject_Del, and type does not define
21528  a tp_free slot itself, _PyObject_GC_Del is assigned to type->tp_free.
21529  Previously _PyObject_Del was inherited, which could at best lead to a
21530  segfault.  In addition, if even after this magic the type's tp_free
21531  slot is _PyObject_Del or NULL, and the type is a base type
21532  (Py_TPFLAGS_BASETYPE), TypeError is raised:  since the type is a base
21533  type, its dealloc function must call type->tp_free, and since the type
21534  is gc'able, tp_free must not be NULL or _PyObject_Del.
21535
21536- PyThreadState_SetAsyncExc(): A new API (deliberately accessible only
21537  from C) to interrupt a thread by sending it an exception.  It is
21538  intentional that you have to write your own C extension to call it
21539  from Python.
21540
21541
21542New platforms
21543-------------
21544
21545None this time.
21546
21547Tests
21548-----
21549
21550- test_imp rewritten so that it doesn't raise RuntimeError if run as a
21551  side effect of being imported ("import test.autotest").
21552
21553Windows
21554-------
21555
21556- The Windows installer ships with Tcl/Tk 8.4.3 (upgraded from 8.4.1).
21557
21558- The installer always suggested that Python be installed on the C:
21559  drive, due to a hardcoded "C:" generated by the Wise installation
21560  wizard.  People with machines where C: is not the system drive
21561  usually want Python installed on whichever drive is their system drive
21562  instead.  We removed the hardcoded "C:", and two testers on machines
21563  where C: is not the system drive report that the installer now
21564  suggests their system drive.  Note that you can always select the
21565  directory you want in the "Select Destination Directory" dialog --
21566  that's what it's for.
21567
21568Mac
21569---
21570
21571- There's a new module called "autoGIL", which offers a mechanism to
21572  automatically release the Global Interpreter Lock when an event loop
21573  goes to sleep, allowing other threads to run. It's currently only
21574  supported on OSX, in the Mach-O version.
21575- The OSA modules now allow direct access to properties of the
21576  toplevel application class (in AppleScript terminology).
21577- The Package Manager can now update itself.
21578
21579SourceForge Bugs and Patches Applied
21580------------------------------------
21581
21582430160, 471893, 501716, 542562, 549151, 569574, 595837, 596434,
21583598163, 604210, 604716, 610332, 612627, 614770, 620190, 621891,
21584622042, 639139, 640236, 644345, 649742, 649742, 658233, 660022,
21585661318, 661676, 662807, 662923, 666219, 672855, 678325, 682347,
21586683486, 684981, 685773, 686254, 692776, 692959, 693094, 696777,
21587697989, 700827, 703666, 708495, 708604, 708901, 710733, 711902,
21588713722, 715782, 718286, 719359, 719367, 723136, 723831, 723962,
21589724588, 724767, 724767, 725942, 726150, 726446, 726869, 727051,
21590727719, 727719, 727805, 728277, 728563, 728656, 729096, 729103,
21591729293, 729297, 729300, 729317, 729395, 729622, 729817, 730170,
21592730296, 730594, 730685, 730826, 730963, 731209, 731403, 731504,
21593731514, 731626, 731635, 731643, 731644, 731644, 731689, 732124,
21594732143, 732234, 732284, 732284, 732479, 732761, 732783, 732951,
21595733667, 733781, 734118, 734231, 734869, 735051, 735293, 735527,
21596735613, 735694, 736962, 736962, 737970, 738066, 739313, 740055,
21597740234, 740301, 741806, 742126, 742741, 742860, 742860, 742911,
21598744041, 744104, 744238, 744687, 744877, 745055, 745478, 745525,
21599745620, 746012, 746304, 746366, 746801, 746953, 747348, 747667,
21600747954, 748846, 748849, 748973, 748975, 749191, 749210, 749759,
21601749831, 749911, 750008, 750092, 750542, 750595, 751038, 751107,
21602751276, 751451, 751916, 751941, 751956, 751998, 752671, 753451,
21603753602, 753617, 753845, 753925, 754014, 754340, 754447, 755031,
21604755087, 755147, 755245, 755683, 755987, 756032, 756996, 757058,
21605757229, 757818, 757821, 757822, 758112, 758910, 759227, 759889,
21606760257, 760703, 760792, 761104, 761337, 761519, 761830, 762455
21607
21608
21609What's New in Python 2.3 beta 1?
21610================================
21611
21612*Release date: 25-Apr-2003*
21613
21614Core and builtins
21615-----------------
21616
21617- New format codes B, H, I, k and K have been implemented for
21618  PyArg_ParseTuple and PyBuild_Value.
21619
21620- New built-in function sum(seq, start=0) returns the sum of all the
21621  items in iterable object seq, plus start (items are normally numbers,
21622  and cannot be strings).
21623
21624- bool() called without arguments now returns False rather than
21625  raising an exception.  This is consistent with calling the
21626  constructors for the other built-in types -- called without argument
21627  they all return the false value of that type.  (SF patch #724135)
21628
21629- In support of PEP 269 (making the pgen parser generator accessible
21630  from Python), some changes to the pgen code structure were made; a
21631  few files that used to be linked only with pgen are now linked with
21632  Python itself.
21633
21634- The repr() of a weakref object now shows the __name__ attribute of
21635  the referenced object, if it has one.
21636
21637- super() no longer ignores data descriptors, except __class__.  See
21638  the thread started at
21639  http://mail.python.org/pipermail/python-dev/2003-April/034338.html
21640
21641- list.insert(i, x) now interprets negative i as it would be
21642  interpreted by slicing, so negative values count from the end of the
21643  list.  This was the only place where such an interpretation was not
21644  placed on a list index.
21645
21646- range() now works even if the arguments are longs with magnitude
21647  larger than sys.maxint, as long as the total length of the sequence
21648  fits.  E.g., range(2**100, 2**101, 2**100) is the following list:
21649  [1267650600228229401496703205376L].  (SF patch #707427.)
21650
21651- Some horridly obscure problems were fixed involving interaction
21652  between garbage collection and old-style classes with "ambitious"
21653  getattr hooks.  If an old-style instance didn't have a __del__ method,
21654  but did have a __getattr__ hook, and the instance became reachable
21655  only from an unreachable cycle, and the hook resurrected or deleted
21656  unreachable objects when asked to resolve "__del__", anything up to
21657  a segfault could happen.  That's been repaired.
21658
21659- dict.pop now takes an optional argument specifying a default
21660  value to return if the key is not in the dict.  If a default is not
21661  given and the key is not found, a KeyError will still be raised.
21662  Parallel changes were made to UserDict.UserDict and UserDict.DictMixin.
21663  [SF patch #693753] (contributed by Michael Stone.)
21664
21665- sys.getfilesystemencoding() was added to expose
21666  Py_FileSystemDefaultEncoding.
21667
21668- New function sys.exc_clear() clears the current exception.  This is
21669  rarely needed, but can sometimes be useful to release objects
21670  referenced by the traceback held in sys.exc_info()[2].  (SF patch
21671  #693195.)
21672
21673- On 64-bit systems, a dictionary could contain duplicate long/int keys
21674  if the key value was larger than 2**32.  See SF bug #689659.
21675
21676- Fixed SF bug #663074. The codec system was using global static
21677  variables to store internal data. As a result, any attempts to use the
21678  unicode system with multiple active interpreters, or successive
21679  interpreter executions, would fail.
21680
21681- "%c" % u"a" now returns a unicode string instead of raising a
21682  TypeError. u"%c" % 0xffffffff now raises an OverflowError instead
21683  of a ValueError to be consistent with "%c" % 256. See SF patch #710127.
21684
21685Extension modules
21686-----------------
21687
21688- The socket module now provides the functions inet_pton and inet_ntop
21689  for converting between string and packed representation of IP
21690  addresses.  There is also a new module variable, has_ipv6, which is
21691  True iff the current Python has IPv6 support.  See SF patch #658327.
21692
21693- Tkinter wrappers around Tcl variables now pass objects directly
21694  to Tcl, instead of first converting them to strings.
21695
21696- The .*? pattern in the re module is now special-cased to avoid the
21697  recursion limit.  (SF patch #720991 -- many thanks to Gary Herron
21698  and Greg Chapman.)
21699
21700- New function sys.call_tracing() allows pdb to debug code
21701  recursively.
21702
21703- New function gc.get_referents(obj) returns a list of objects
21704  directly referenced by obj.  In effect, it exposes what the object's
21705  tp_traverse slot does, and can be helpful when debugging memory
21706  leaks.
21707
21708- The iconv module has been removed from this release.
21709
21710- The platform-independent routines for packing floats in IEEE formats
21711  (struct.pack's <f, >f, <d, and >d codes; pickle and cPickle's protocol 1
21712  pickling of floats) ignored that rounding can cause a carry to
21713  propagate.  The worst consequence was that, in rare cases, <f and >f
21714  could produce strings that, when unpacked again, were a factor of 2
21715  away from the original float.  This has been fixed.  See SF bug
21716  #705836.
21717
21718- New function time.tzset() provides access to the C library tzset()
21719  function, if supported.  (SF patch #675422.)
21720
21721- Using createfilehandler, deletefilehandler, createtimerhandler functions
21722  on Tkinter.tkinter (_tkinter module) no longer crashes the interpreter.
21723  See SF bug #692416.
21724
21725- Modified the fcntl.ioctl() function to allow modification of a passed
21726  mutable buffer (for details see the reference documentation).
21727
21728- Made user requested changes to the itertools module.
21729  Subsumed the times() function into repeat().
21730  Added chain() and cycle().
21731
21732- The rotor module is now deprecated; the encryption algorithm it uses
21733  is not believed to be secure, and including crypto code with Python
21734  has implications for exporting and importing it in various countries.
21735
21736- The socket module now always uses the _socketobject wrapper class, even on
21737  platforms which have dup(2).  The makefile() method is built directly
21738  on top of the socket without duplicating the file descriptor, allowing
21739  timeouts to work properly.
21740
21741Library
21742-------
21743
21744- New generator function os.walk() is an easy-to-use alternative to
21745  os.path.walk().  See os module docs for details.  os.path.walk()
21746  isn't deprecated at this time, but may become deprecated in a
21747  future release.
21748
21749- Added new module "platform" which provides a wide range of tools
21750  for querying platform dependent features.
21751
21752- netrc now allows ASCII punctuation characters in passwords.
21753
21754- shelve now supports the optional writeback argument, and exposes
21755  pickle protocol versions.
21756
21757- Several methods of nntplib.NNTP have grown an optional file argument
21758  which specifies a file where to divert the command's output
21759  (already supported by the body() method).  (SF patch #720468)
21760
21761- The self-documenting XML server library DocXMLRPCServer was added.
21762
21763- Support for internationalized domain names has been added through
21764  the 'idna' and 'punycode' encodings, the 'stringprep' module, the
21765  'mkstringprep' tool, and enhancements to the socket and httplib
21766  modules.
21767
21768- htmlentitydefs has two new dictionaries: name2codepoint maps
21769  HTML entity names to Unicode codepoints (as integers).
21770  codepoint2name is the reverse mapping. See SF patch #722017.
21771
21772- pdb has a new command, "debug", which lets you step through
21773  arbitrary code from the debugger's (pdb) prompt.
21774
21775- unittest.failUnlessEqual and its equivalent unittest.assertEqual now
21776  return 'not a == b' rather than 'a != b'.  This gives the desired
21777  result for classes that define __eq__ without defining __ne__.
21778
21779- sgmllib now supports SGML marked sections, in particular the
21780  MS Office extensions.
21781
21782- The urllib module now offers support for the iterator protocol.
21783  SF patch 698520 contributed by Brett Cannon.
21784
21785- New module timeit provides a simple framework for timing the
21786  execution speed of expressions and statements.
21787
21788- sets.Set objects now support mixed-type __eq__ and __ne__, instead
21789  of raising TypeError.  If x is a Set object and y is a non-Set object,
21790  x == y is False, and x != y is True.  This is akin to the change made
21791  for mixed-type comparisons of datetime objects in 2.3a2; more info
21792  about the rationale is in the NEWS entry for that.  See also SF bug
21793  report <http://www.python.org/sf/693121>.
21794
21795- On Unix platforms, if os.listdir() is called with a Unicode argument,
21796  it now returns Unicode strings.  (This behavior was added earlier
21797  to the Windows NT/2k/XP version of os.listdir().)
21798
21799- Distutils: both 'py_modules' and 'packages' keywords can now be specified
21800  in core.setup().  Previously you could supply one or the other, but
21801  not both of them.  (SF patch #695090 from Bernhard Herzog)
21802
21803- New csv package makes it easy to read/write CSV files.
21804
21805- Module shlex has been extended to allow posix-like shell parsings,
21806  including a split() function for easy spliting of quoted strings and
21807  commands. An iterator interface was also implemented.
21808
21809Tools/Demos
21810-----------
21811
21812- New script combinerefs.py helps analyze new PYTHONDUMPREFS output.
21813  See the module docstring for details.
21814
21815Build
21816-----
21817
21818- Fix problem building on OSF1 because the compiler only accepted
21819  preprocessor directives that start in column 1.  (SF bug #691793.)
21820
21821C API
21822-----
21823
21824- Added PyGC_Collect(), equivalent to calling gc.collect().
21825
21826- PyThreadState_GetDict() was changed not to raise an exception or
21827  issue a fatal error when no current thread state is available.  This
21828  makes it possible to print dictionaries when no thread is active.
21829
21830- LONG_LONG was renamed to PY_LONG_LONG.  Extensions that use this and
21831  need compatibility with previous versions can use this:
21832
21833    #ifndef  PY_LONG_LONG
21834    #define  PY_LONG_LONG  LONG_LONG
21835    #endif
21836
21837- Added PyObject_SelfIter() to fill the tp_iter slot for the
21838  typical case where the method returns its self argument.
21839
21840- The extended type structure used for heap types (new-style
21841  classes defined by Python code using a class statement) is now
21842  exported from object.h as PyHeapTypeObject.  (SF patch #696193.)
21843
21844New platforms
21845-------------
21846
21847None this time.
21848
21849Tests
21850-----
21851
21852- test_timeout now requires -u network to be passed to regrtest to run.
21853  See SF bug #692988.
21854
21855Windows
21856-------
21857
21858- os.fsync() now exists on Windows, and calls the Microsoft _commit()
21859  function.
21860
21861- New function winsound.MessageBeep() wraps the Win32 API
21862  MessageBeep().
21863
21864Mac
21865---
21866
21867- os.listdir() now returns Unicode strings on MacOS X when called with
21868  a Unicode argument. See the general news item under "Library".
21869
21870- A new method MacOS.WMAvailable() returns true if it is safe to access
21871  the window manager, false otherwise.
21872
21873- EasyDialogs dialogs are now movable-modal, and if the application is
21874  currently in the background they will ask to be moved to the foreground
21875  before displaying.
21876
21877- OSA Scripting support has improved a lot, and gensuitemodule.py can now
21878  be used by mere mortals. The documentation is now also more or less
21879  complete.
21880
21881- The IDE (in a framework build) now includes introductory documentation
21882  in Apple Help Viewer format.
21883
21884
21885What's New in Python 2.3 alpha 2?
21886=================================
21887
21888*Release date: 19-Feb-2003*
21889
21890Core and builtins
21891-----------------
21892
21893- Negative positions returned from PEP 293 error callbacks are now
21894  treated as being relative to the end of the input string. Positions
21895  that are out of bounds raise an IndexError.
21896
21897- sys.path[0] (the directory from which the script is loaded) is now
21898  turned into an absolute pathname, unless it is the empty string.
21899  (SF patch #664376.)
21900
21901- Finally fixed the bug in compile() and exec where a string ending
21902  with an indented code block but no newline would raise SyntaxError.
21903  This would have been a four-line change in parsetok.c...  Except
21904  codeop.py depends on this behavior, so a compilation flag had to be
21905  invented that causes the tokenizer to revert to the old behavior;
21906  this required extra changes to 2 .h files, 2 .c files, and 2 .py
21907  files.  (Fixes SF bug #501622.)
21908
21909- If a new-style class defines neither __new__ nor __init__, its
21910  constructor would ignore all arguments.  This is changed now: the
21911  constructor refuses arguments in this case.  This might break code
21912  that worked under Python 2.2.  The simplest fix is to add a no-op
21913  __init__: ``def __init__(self, *args, **kw): pass``.
21914
21915- Through a bytecode optimizer bug (and I bet you didn't even know
21916  Python *had* a bytecode optimizer :-), "unsigned" hex/oct constants
21917  with a leading minus sign would come out with the wrong sign.
21918  ("Unsigned" hex/oct constants are those with a face value in the
21919  range sys.maxint+1 through sys.maxint*2+1, inclusive; these have
21920  always been interpreted as negative numbers through sign folding.)
21921  E.g. 0xffffffff is -1, and -(0xffffffff) is 1, but -0xffffffff would
21922  come out as -4294967295.  This was the case in Python 2.2 through
21923  2.2.2 and 2.3a1, and in Python 2.4 it will once again have that
21924  value, but according to PEP 237 it really needs to be 1 now.  This
21925  will be backported to Python 2.2.3 a well.  (SF #660455)
21926
21927- int(s, base) sometimes sign-folds hex and oct constants; it only
21928  does this when base is 0 and s.strip() starts with a '0'.  When the
21929  sign is actually folded, as in int("0xffffffff", 0) on a 32-bit
21930  machine, which returns -1, a FutureWarning is now issued; in Python
21931  2.4, this will return 4294967295L, as do int("+0xffffffff", 0) and
21932  int("0xffffffff", 16) right now.  (PEP 347)
21933
21934- super(X, x): x may now be a proxy for an X instance, i.e.
21935  issubclass(x.__class__, X) but not issubclass(type(x), X).
21936
21937- isinstance(x, X): if X is a new-style class, this is now equivalent
21938  to issubclass(type(x), X) or issubclass(x.__class__, X).  Previously
21939  only type(x) was tested.  (For classic classes this was already the
21940  case.)
21941
21942- compile(), eval() and the exec statement now fully support source code
21943  passed as unicode strings.
21944
21945- int subclasses can be initialized with longs if the value fits in an int.
21946  See SF bug #683467.
21947
21948- long(string, base) takes time linear in len(string) when base is a power
21949  of 2 now.  It used to take time quadratic in len(string).
21950
21951- filter returns now Unicode results for Unicode arguments.
21952
21953- raw_input can now return Unicode objects.
21954
21955- List objects' sort() method now accepts None as the comparison function.
21956  Passing None is semantically identical to calling sort() with no
21957  arguments.
21958
21959- Fixed crash when printing a subclass of str and __str__ returned self.
21960  See SF bug #667147.
21961
21962- Fixed an invalid RuntimeWarning and an undetected error when trying
21963  to convert a long integer into a float which couldn't fit.
21964  See SF bug #676155.
21965
21966- Function objects now have a __module__ attribute that is bound to
21967  the name of the module in which the function was defined.  This
21968  applies for C functions and methods as well as functions and methods
21969  defined in Python.  This attribute is used by pickle.whichmodule(),
21970  which changes the behavior of whichmodule slightly.  In Python 2.2
21971  whichmodule() returns "__main__" for functions that are not defined
21972  at the top-level of a module (examples: methods, nested functions).
21973  Now whichmodule() will return the proper module name.
21974
21975Extension modules
21976-----------------
21977
21978- operator.isNumberType() now checks that the object has a nb_int or
21979  nb_float slot, rather than simply checking whether it has a non-NULL
21980  tp_as_number pointer.
21981
21982- The imp module now has ways to acquire and release the "import
21983  lock": imp.acquire_lock() and imp.release_lock().  Note: this is a
21984  reentrant lock, so releasing the lock only truly releases it when
21985  this is the last release_lock() call.  You can check with
21986  imp.lock_held().  (SF bug #580952 and patch #683257.)
21987
21988- Change to cPickle to match pickle.py (see below and PEP 307).
21989
21990- Fix some bugs in the parser module.  SF bug #678518.
21991
21992- Thanks to Scott David Daniels, a subtle bug in how the zlib
21993  extension implemented flush() was fixed.  Scott also rewrote the
21994  zlib test suite using the unittest module.  (SF bug #640230 and
21995  patch #678531.)
21996
21997- Added an itertools module containing high speed, memory efficient
21998  looping constructs inspired by tools from Haskell and SML.
21999
22000- The SSL module now handles sockets with a timeout set correctly (SF
22001  patch #675750, fixing SF bug #675552).
22002
22003- os/posixmodule has grown the sysexits.h constants (EX_OK and friends).
22004
22005- Fixed broken threadstate swap in readline that could cause fatal
22006  errors when a readline hook was being invoked while a background
22007  thread was active.  (SF bugs #660476 and #513033.)
22008
22009- fcntl now exposes the strops.h I_* constants.
22010
22011- Fix a crash on Solaris that occurred when calling close() on
22012  an mmap'ed file which was already closed.  (SF patch #665913)
22013
22014- Fixed several serious bugs in the zipimport implementation.
22015
22016- datetime changes:
22017
22018  The date class is now properly subclassable.  (SF bug #720908)
22019
22020  The datetime and datetimetz classes have been collapsed into a single
22021  datetime class, and likewise the time and timetz classes into a single
22022  time class.  Previously, a datetimetz object with tzinfo=None acted
22023  exactly like a datetime object, and similarly for timetz.  This wasn't
22024  enough of a difference to justify distinct classes, and life is simpler
22025  now.
22026
22027  today() and now() now round system timestamps to the closest
22028  microsecond <http://www.python.org/sf/661086>.  This repairs an
22029  irritation most likely seen on Windows systems.
22030
22031  In dt.astimezone(tz), if tz.utcoffset(dt) returns a duration,
22032  ValueError is raised if tz.dst(dt) returns None (2.3a1 treated it
22033  as 0 instead, but a tzinfo subclass wishing to participate in
22034  time zone conversion has to take a stand on whether it supports
22035  DST; if you don't care about DST, then code dst() to return 0 minutes,
22036  meaning that DST is never in effect).
22037
22038  The tzinfo methods utcoffset() and dst() must return a timedelta object
22039  (or None) now.  In 2.3a1 they could also return an int or long, but that
22040  was an unhelpfully redundant leftover from an earlier version wherein
22041  they couldn't return a timedelta.  TOOWTDI.
22042
22043  The example tzinfo class for local time had a bug.  It was replaced
22044  by a later example coded by Guido.
22045
22046  datetime.astimezone(tz) no longer raises an exception when the
22047  input datetime has no UTC equivalent in tz.  For typical "hybrid" time
22048  zones (a single tzinfo subclass modeling both standard and daylight
22049  time), this case can arise one hour per year, at the hour daylight time
22050  ends.  See new docs for details.  In short, the new behavior mimics
22051  the local wall clock's behavior of repeating an hour in local time.
22052
22053  dt.astimezone() can no longer be used to convert between naive and aware
22054  datetime objects.  If you merely want to attach, or remove, a tzinfo
22055  object, without any conversion of date and time members, use
22056  dt.replace(tzinfo=whatever) instead, where "whatever" is None or a
22057  tzinfo subclass instance.
22058
22059  A new method tzinfo.fromutc(dt) can be overridden in tzinfo subclasses
22060  to give complete control over how a UTC time is to be converted to
22061  a local time.  The default astimezone() implementation calls fromutc()
22062  as its last step, so a tzinfo subclass can affect that too by overriding
22063  fromutc().  It's expected that the default fromutc() implementation will
22064  be suitable as-is for "almost all" time zone subclasses, but the
22065  creativity of political time zone fiddling appears unbounded -- fromutc()
22066  allows the highly motivated to emulate any scheme expressible in Python.
22067
22068  datetime.now():  The optional tzinfo argument was undocumented (that's
22069  repaired), and its name was changed to tz ("tzinfo" is overloaded enough
22070  already).  With a tz argument, now(tz) used to return the local date
22071  and time, and attach tz to it, without any conversion of date and time
22072  members.  This was less than useful.  Now now(tz) returns the current
22073  date and time as local time in tz's time zone, akin to ::
22074
22075      tz.fromutc(datetime.utcnow().replace(tzinfo=utc))
22076
22077  where "utc" is an instance of a tzinfo subclass modeling UTC.  Without
22078  a tz argument, now() continues to return the current local date and time,
22079  as a naive datetime object.
22080
22081  datetime.fromtimestamp():  Like datetime.now() above, this had less than
22082  useful behavior when the optional tinzo argument was specified.  See
22083  also SF bug report <http://www.python.org/sf/660872>.
22084
22085  date and datetime comparison:  In order to prevent comparison from
22086  falling back to the default compare-object-addresses strategy, these
22087  raised TypeError whenever they didn't understand the other object type.
22088  They still do, except when the other object has a "timetuple" attribute,
22089  in which case they return NotImplemented now.  This gives other
22090  datetime objects (e.g., mxDateTime) a chance to intercept the
22091  comparison.
22092
22093  date, time, datetime and timedelta comparison:  When the exception
22094  for mixed-type comparisons in the last paragraph doesn't apply, if
22095  the comparison is == then False is returned, and if the comparison is
22096  != then True is returned.  Because dict lookup and the "in" operator
22097  only invoke __eq__, this allows, for example, ::
22098
22099      if some_datetime in some_sequence:
22100
22101  and ::
22102
22103      some_dict[some_timedelta] = whatever
22104
22105  to work as expected, without raising TypeError just because the
22106  sequence is heterogeneous, or the dict has mixed-type keys.  [This
22107  seems like a good idea to implement for all mixed-type comparisons
22108  that don't want to allow falling back to address comparison.]
22109
22110  The constructors building a datetime from a timestamp could raise
22111  ValueError if the platform C localtime()/gmtime() inserted "leap
22112  seconds".  Leap seconds are ignored now.  On such platforms, it's
22113  possible to have timestamps that differ by a second, yet where
22114  datetimes constructed from them are equal.
22115
22116  The pickle format of date, time and datetime objects has changed
22117  completely.  The undocumented pickler and unpickler functions no
22118  longer exist.  The undocumented __setstate__() and __getstate__()
22119  methods no longer exist either.
22120
22121Library
22122-------
22123
22124- The logging module was updated slightly; the WARN level was renamed
22125  to WARNING, and the matching function/method warn() to warning().
22126
22127- The pickle and cPickle modules were updated with a new pickling
22128  protocol (documented by pickletools.py, see below) and several
22129  extensions to the pickle customization API (__reduce__, __setstate__
22130  etc.).  The copy module now uses more of the pickle customization
22131  API to copy objects that don't implement __copy__ or __deepcopy__.
22132  See PEP 307 for details.
22133
22134- The distutils "register" command now uses http://www.python.org/pypi
22135  as the default repository.  (See PEP 301.)
22136
22137- the platform dependent path related variables sep, altsep,
22138  pathsep, curdir, pardir and defpath are now defined in the platform
22139  dependent path modules (e.g. ntpath.py) rather than os.py, so these
22140  variables are now available via os.path.  They continue to be
22141  available from the os module.
22142  (see <http://www.python.org/sf/680789>).
22143
22144- array.array was added to the types repr.py knows about (see
22145  <http://www.python.org/sf/680789>).
22146
22147- The new pickletools.py contains lots of documentation about pickle
22148  internals, and supplies some helpers for working with pickles, such as
22149  a symbolic pickle disassembler.
22150
22151- xmlrpclib.py now supports the built-in boolean type.
22152
22153- py_compile has a new 'doraise' flag and a new PyCompileError
22154  exception.
22155
22156- SimpleXMLRPCServer now supports CGI through the CGIXMLRPCRequestHandler
22157  class.
22158
22159- The sets module now raises TypeError in __cmp__, to clarify that
22160  sets are not intended to be three-way-compared; the comparison
22161  operators are overloaded as subset/superset tests.
22162
22163- Bastion.py and rexec.py are disabled.  These modules are not safe in
22164  Python 2.2. or 2.3.
22165
22166- realpath is now exported when doing ``from poxixpath import *``.
22167  It is also exported for ntpath, macpath, and os2emxpath.
22168  See SF bug #659228.
22169
22170- New module tarfile from Lars Gustäbel provides a comprehensive interface
22171  to tar archive files with transparent gzip and bzip2 compression.
22172  See SF patch #651082.
22173
22174- urlparse can now parse imap:// URLs.  See SF feature request #618024.
22175
22176- Tkinter.Canvas.scan_dragto() provides an optional parameter to support
22177  the gain value which is passed to Tk.  SF bug# 602259.
22178
22179- Fix logging.handlers.SysLogHandler protocol when using UNIX domain sockets.
22180  See SF patch #642974.
22181
22182- The dospath module was deleted.  Use the ntpath module when manipulating
22183  DOS paths from other platforms.
22184
22185Tools/Demos
22186-----------
22187
22188- Two new scripts (db2pickle.py and pickle2db.py) were added to the
22189  Tools/scripts directory to facilitate conversion from the old bsddb module
22190  to the new one.  While the user-visible API of the new module is
22191  compatible with the old one, it's likely that the version of the
22192  underlying database library has changed.  To convert from the old library,
22193  run the db2pickle.py script using the old version of Python to convert it
22194  to a pickle file.  After upgrading Python, run the pickle2db.py script
22195  using the new version of Python to reconstitute your database.  For
22196  example:
22197
22198    % python2.2 db2pickle.py -h some.db > some.pickle
22199    % python2.3 pickle2db.py -h some.db.new < some.pickle
22200
22201  Run the scripts without any args to get a usage message.
22202
22203
22204Build
22205-----
22206
22207- The audio driver tests (test_ossaudiodev.py and
22208  test_linuxaudiodev.py) are no longer run by default.  This is
22209  because they don't always work, depending on your hardware and
22210  software.  To run these tests, you must use an invocation like ::
22211
22212    ./python Lib/test/regrtest.py -u audio test_ossaudiodev
22213
22214- On systems which build using the configure script, compiler flags which
22215  used to be lumped together using the OPT flag have been split into two
22216  groups, OPT and BASECFLAGS.  OPT is meant to carry just optimization- and
22217  debug-related flags like "-g" and "-O3".  BASECFLAGS is meant to carry
22218  compiler flags that are required to get a clean compile.  On some
22219  platforms (many Linux flavors in particular) BASECFLAGS will be empty by
22220  default.  On others, such as Mac OS X and SCO, it will contain required
22221  flags.  This change allows people building Python to override OPT without
22222  fear of clobbering compiler flags which are required to get a clean build.
22223
22224- On Darwin/Mac OS X platforms, /sw/lib and /sw/include are added to the
22225  relevant search lists in setup.py.  This allows users building Python to
22226  take advantage of the many packages available from the fink project
22227  <http://fink.sf.net/>.
22228
22229- A new Makefile target, scriptsinstall, installs a number of useful scripts
22230  from the Tools/scripts directory.
22231
22232C API
22233-----
22234
22235- PyEval_GetFrame() is now declared to return a ``PyFrameObject *``
22236  instead of a plain ``PyObject *``.  (SF patch #686601.)
22237
22238- PyNumber_Check() now checks that the object has a nb_int or nb_float
22239  slot, rather than simply checking whether it has a non-NULL
22240  tp_as_number pointer.
22241
22242- A C type that inherits from a base type that defines tp_as_buffer
22243  will now inherit the tp_as_buffer pointer if it doesn't define one.
22244  (SF #681367)
22245
22246- The PyArg_Parse functions now issue a DeprecationWarning if a float
22247  argument is provided when an integer is specified (this affects the 'b',
22248  'B', 'h', 'H', 'i', and 'l' codes).  Future versions of Python will
22249  raise a TypeError.
22250
22251Tests
22252-----
22253
22254- Several tests weren't being run from regrtest.py (test_timeout.py,
22255  test_tarfile.py, test_netrc.py, test_multifile.py,
22256  test_importhooks.py and test_imp.py).  Now they are.  (Note to
22257  developers: please read Lib/test/README when creating a new test, to
22258  make sure to do it right!  All tests need to use either unittest or
22259  pydoc.)
22260
22261- Added test_posix.py, a test suite for the posix module.
22262
22263- Added test_hexoct.py, a test suite for hex/oct constant folding.
22264
22265Windows
22266-------
22267
22268- The timeout code for socket connect() didn't work right; this has
22269  now been fixed.  test_timeout.py should pass (at least most of the
22270  time).
22271
22272- distutils' msvccompiler class now passes the preprocessor options to
22273  the resource compiler.  See SF patch #669198.
22274
22275- The bsddb module now ships with Sleepycat's 4.1.25.NC, the latest
22276  release without strong cryptography.
22277
22278- sys.path[0], if it contains a directory name, is now always an
22279  absolute pathname. (SF patch #664376.)
22280
22281- The new logging package is now installed by the Windows installer.  It
22282  wasn't in 2.3a1 due to oversight.
22283
22284Mac
22285---
22286
22287- There are new dialogs EasyDialogs.AskFileForOpen, AskFileForSave
22288  and AskFolder. The old macfs.StandardGetFile and friends are deprecated.
22289
22290- Most of the standard library now uses pathnames or FSRefs in preference
22291  of FSSpecs, and use the underlying Carbon.File and Carbon.Folder modules
22292  in stead of macfs. macfs will probably be deprecated in the future.
22293
22294- Type Carbon.File.FSCatalogInfo and supporting methods have been implemented.
22295  This also makes macfs.FSSpec.SetDates() work again.
22296
22297- There is a new module pimp, the package install manager for Python, and
22298  accompanying applet PackageManager. These allow you to easily download
22299  and install pretested extension packages either in source or binary
22300  form. Only in MacPython-OSX.
22301
22302- Applets are now built with bundlebuilder in MacPython-OSX, which should make
22303  them more robust and also provides a path towards BuildApplication. The
22304  downside of this change is that applets can no longer be run from the
22305  Terminal window, this will hopefully be fixed in the 2.3b1.
22306
22307
22308What's New in Python 2.3 alpha 1?
22309=================================
22310
22311*Release date: 31-Dec-2002*
22312
22313Type/class unification and new-style classes
22314--------------------------------------------
22315
22316- One can now assign to __bases__ and __name__ of new-style classes.
22317
22318- dict() now accepts keyword arguments so that dict(one=1, two=2)
22319  is the equivalent of {"one": 1, "two": 2}.  Accordingly,
22320  the existing (but undocumented) 'items' keyword argument has
22321  been eliminated.  This means that dict(items=someMapping) now has
22322  a different meaning than before.
22323
22324- int() now returns a long object if the argument is outside the
22325  integer range, so int("4" * 1000), int(1e200) and int(1L<<1000) will
22326  all return long objects instead of raising an OverflowError.
22327
22328- Assignment to __class__ is disallowed if either the old or the new
22329  class is a statically allocated type object (such as defined by an
22330  extension module).  This prevents anomalies like 2.__class__ = bool.
22331
22332- New-style object creation and deallocation have been sped up
22333  significantly; they are now faster than classic instance creation
22334  and deallocation.
22335
22336- The __slots__ variable can now mention "private" names, and the
22337  right thing will happen (e.g. __slots__ = ["__foo"]).
22338
22339- The built-ins slice() and buffer() are now callable types.  The
22340  types classobj (formerly class), code, function, instance, and
22341  instancemethod (formerly instance-method), which have no built-in
22342  names but are accessible through the types module, are now also
22343  callable.  The type dict-proxy is renamed to dictproxy.
22344
22345- Cycles going through the __class__ link of a new-style instance are
22346  now detected by the garbage collector.
22347
22348- Classes using __slots__ are now properly garbage collected.
22349  [SF bug 519621]
22350
22351- Tightened the __slots__ rules: a slot name must be a valid Python
22352  identifier.
22353
22354- The constructor for the module type now requires a name argument and
22355  takes an optional docstring argument.  Previously, this constructor
22356  ignored its arguments.  As a consequence, deriving a class from a
22357  module (not from the module type) is now illegal; previously this
22358  created an unnamed module, just like invoking the module type did.
22359  [SF bug 563060]
22360
22361- A new type object, 'basestring', is added.  This is a common base type
22362  for 'str' and 'unicode', and can be used instead of
22363  types.StringTypes, e.g. to test whether something is "a string":
22364  isinstance(x, basestring) is True for Unicode and 8-bit strings.  This
22365  is an abstract base class and cannot be instantiated directly.
22366
22367- Changed new-style class instantiation so that when C's __new__
22368  method returns something that's not a C instance, its __init__ is
22369  not called.  [SF bug #537450]
22370
22371- Fixed super() to work correctly with class methods.  [SF bug #535444]
22372
22373- If you try to pickle an instance of a class that has __slots__ but
22374  doesn't define or override __getstate__, a TypeError is now raised.
22375  This is done by adding a bozo __getstate__ to the class that always
22376  raises TypeError.  (Before, this would appear to be pickled, but the
22377  state of the slots would be lost.)
22378
22379Core and builtins
22380-----------------
22381
22382- Import from zipfiles is now supported.  The name of a zipfile placed
22383  on sys.path causes the import statement to look for importable Python
22384  modules (with .py, pyc and .pyo extensions) and packages inside the
22385  zipfile.  The zipfile import follows the specification (though not
22386  the sample implementation) of PEP 273.  The semantics of __path__ are
22387  compatible with those that have been implemented in Jython since
22388  Jython 2.1.
22389
22390- PEP 302 has been accepted.  Although it was initially developed to
22391  support zipimport, it offers a new, general import hook mechanism.
22392  Several new variables have been added to the sys module:
22393  sys.meta_path, sys.path_hooks, and sys.path_importer_cache; these
22394  make extending the import statement much more convenient than
22395  overriding the __import__ built-in function.  For a description of
22396  these, see PEP 302.
22397
22398- A frame object's f_lineno attribute can now be written to from a
22399  trace function to change which line will execute next.  A command to
22400  exploit this from pdb has been added.  [SF patch #643835]
22401
22402- The _codecs support module for codecs.py was turned into a built-in
22403  module to assure that at least the built-in codecs are available
22404  to the Python parser for source code decoding according to PEP 263.
22405
22406- issubclass now supports a tuple as the second argument, just like
22407  isinstance does. ``issubclass(X, (A, B))`` is equivalent to
22408  ``issubclass(X, A) or issubclass(X, B)``.
22409
22410- Thanks to Armin Rigo, the last known way to provoke a system crash
22411  by cleverly arranging for a comparison function to mutate a list
22412  during a list.sort() operation has been fixed.  The effect of
22413  attempting to mutate a list, or even to inspect its contents or
22414  length, while a sort is in progress, is not defined by the language.
22415  The C implementation of Python 2.3 attempts to detect mutations,
22416  and raise ValueError if one occurs, but there's no guarantee that
22417  all mutations will be caught, or that any will be caught across
22418  releases or implementations.
22419
22420- Unicode file name processing for Windows (PEP 277) is implemented.
22421  All platforms now have an os.path.supports_unicode_filenames attribute,
22422  which is set to True on Windows NT/2000/XP, and False elsewhere.
22423
22424- Codec error handling callbacks (PEP 293) are implemented.
22425  Error handling in unicode.encode or str.decode can now be customized.
22426
22427- A subtle change to the semantics of the built-in function intern():
22428  interned strings are no longer immortal.  You must keep a reference
22429  to the return value intern() around to get the benefit.
22430
22431- Use of 'None' as a variable, argument or attribute name now
22432  issues a SyntaxWarning.  In the future, None may become a keyword.
22433
22434- SET_LINENO is gone.  co_lnotab is now consulted to determine when to
22435  call the trace function.  C code that accessed f_lineno should call
22436  PyCode_Addr2Line instead (f_lineno is still there, but only kept up
22437  to date when there is a trace function set).
22438
22439- There's a new warning category, FutureWarning.  This is used to warn
22440  about a number of situations where the value or sign of an integer
22441  result will change in Python 2.4 as a result of PEP 237 (integer
22442  unification).  The warnings implement stage B0 mentioned in that
22443  PEP.  The warnings are about the following situations:
22444
22445    - Octal and hex literals without 'L' prefix in the inclusive range
22446      [0x80000000..0xffffffff]; these are currently negative ints, but
22447      in Python 2.4 they will be positive longs with the same bit
22448      pattern.
22449
22450    - Left shifts on integer values that cause the outcome to lose
22451      bits or have a different sign than the left operand.  To be
22452      precise: x<<n where this currently doesn't yield the same value
22453      as long(x)<<n; in Python 2.4, the outcome will be long(x)<<n.
22454
22455    - Conversions from ints to string that show negative values as
22456      unsigned ints in the inclusive range [0x80000000..0xffffffff];
22457      this affects the functions hex() and oct(), and the string
22458      formatting codes %u, %o, %x, and %X.  In Python 2.4, these will
22459      show signed values (e.g. hex(-1) currently returns "0xffffffff";
22460      in Python 2.4 it will return "-0x1").
22461
22462- The bits manipulated under the cover by sys.setcheckinterval() have
22463  been changed.  Both the check interval and the ticker used to be
22464  per-thread values.  They are now just a pair of global variables.
22465  In addition, the default check interval was boosted from 10 to 100
22466  bytecode instructions.  This may have some effect on systems that
22467  relied on the old default value.  In particular, in multi-threaded
22468  applications which try to be highly responsive, response time will
22469  increase by some (perhaps imperceptible) amount.
22470
22471- When multiplying very large integers, a version of the so-called
22472  Karatsuba algorithm is now used.  This is most effective if the
22473  inputs have roughly the same size.  If they both have about N digits,
22474  Karatsuba multiplication has O(N**1.58) runtime (the exponent is
22475  log_base_2(3)) instead of the previous O(N**2).  Measured results may
22476  be better or worse than that, depending on platform quirks.  Besides
22477  the O() improvement in raw instruction count, the Karatsuba algorithm
22478  appears to have much better cache behavior on extremely large integers
22479  (starting in the ballpark of a million bits).  Note that this is a
22480  simple implementation, and there's no intent here to compete with,
22481  e.g., GMP.  It gives a very nice speedup when it applies, but a package
22482  devoted to fast large-integer arithmetic should run circles around it.
22483
22484- u'%c' will now raise a ValueError in case the argument is an
22485  integer outside the valid range of Unicode code point ordinals.
22486
22487- The tempfile module has been overhauled for enhanced security.  The
22488  mktemp() function is now deprecated; new, safe replacements are
22489  mkstemp() (for files) and mkdtemp() (for directories), and the
22490  higher-level functions NamedTemporaryFile() and TemporaryFile().
22491  Use of some global variables in this module is also deprecated; the
22492  new functions have keyword arguments to provide the same
22493  functionality.  All Lib, Tools and Demo modules that used the unsafe
22494  interfaces have been updated to use the safe replacements.  Thanks
22495  to Zack Weinberg!
22496
22497- When x is an object whose class implements __mul__ and __rmul__,
22498  1.0*x would correctly invoke __rmul__, but 1*x would erroneously
22499  invoke __mul__.  This was due to the sequence-repeat code in the int
22500  type.  This has been fixed now.
22501
22502- Previously, "str1 in str2" required str1 to be a string of length 1.
22503  This restriction has been relaxed to allow str1 to be a string of
22504  any length.  Thus "'el' in 'hello world'" returns True now.
22505
22506- File objects are now their own iterators.  For a file f, iter(f) now
22507  returns f (unless f is closed), and f.next() is similar to
22508  f.readline() when EOF is not reached; however, f.next() uses a
22509  readahead buffer that messes up the file position, so mixing
22510  f.next() and f.readline() (or other methods) doesn't work right.
22511  Calling f.seek() drops the readahead buffer, but other operations
22512  don't.  It so happens that this gives a nice additional speed boost
22513  to "for line in file:"; the xreadlines method and corresponding
22514  module are now obsolete.  Thanks to Oren Tirosh!
22515
22516- Encoding declarations (PEP 263, phase 1) have been implemented.  A
22517  comment of the form "# -*- coding: <encodingname> -*-" in the first
22518  or second line of a Python source file indicates the encoding.
22519
22520- list.sort() has a new implementation.  While cross-platform results
22521  may vary, and in data-dependent ways, this is much faster on many
22522  kinds of partially ordered lists than the previous implementation,
22523  and reported to be just as fast on randomly ordered lists on
22524  several major platforms.  This sort is also stable (if A==B and A
22525  precedes B in the list at the start, A precedes B after the sort too),
22526  although the language definition does not guarantee stability.  A
22527  potential drawback is that list.sort() may require temp space of
22528  len(list)*2 bytes (``*4`` on a 64-bit machine).  It's therefore possible
22529  for list.sort() to raise MemoryError now, even if a comparison function
22530  does not.  See <http://www.python.org/sf/587076> for full details.
22531
22532- All standard iterators now ensure that, once StopIteration has been
22533  raised, all future calls to next() on the same iterator will also
22534  raise StopIteration.  There used to be various counterexamples to
22535  this behavior, which could have caused confusion or subtle program
22536  breakage, without any benefits.  (Note that this is still an
22537  iterator's responsibility; the iterator framework does not enforce
22538  this.)
22539
22540- Ctrl+C handling on Windows has been made more consistent with
22541  other platforms.  KeyboardInterrupt can now reliably be caught,
22542  and Ctrl+C at an interactive prompt no longer terminates the
22543  process under NT/2k/XP (it never did under Win9x).  Ctrl+C will
22544  interrupt time.sleep() in the main thread, and any child processes
22545  created via the popen family (on win2k; we can't make win9x work
22546  reliably) are also interrupted (as generally happens on for Linux/Unix.)
22547  [SF bugs 231273, 439992 and 581232]
22548
22549- sys.getwindowsversion() has been added on Windows.  This
22550  returns a tuple with information about the version of Windows
22551  currently running.
22552
22553- Slices and repetitions of buffer objects now consistently return
22554  a string.  Formerly, strings would be returned most of the time,
22555  but a buffer object would be returned when the repetition count
22556  was one or when the slice range was all inclusive.
22557
22558- Unicode objects in sys.path are no longer ignored but treated
22559  as directory names.
22560
22561- Fixed string.startswith and string.endswith built-in methods
22562  so they accept negative indices.  [SF bug 493951]
22563
22564- Fixed a bug with a continue inside a try block and a yield in the
22565  finally clause.  [SF bug 567538]
22566
22567- Most built-in sequences now support "extended slices", i.e. slices
22568  with a third "stride" parameter.  For example, "hello world"[::-1]
22569  gives "dlrow olleh".
22570
22571- A new warning PendingDeprecationWarning was added to provide
22572  direction on features which are in the process of being deprecated.
22573  The warning will not be printed by default.  To see the pending
22574  deprecations, use -Walways::PendingDeprecationWarning::
22575  as a command line option or warnings.filterwarnings() in code.
22576
22577- Deprecated features of xrange objects have been removed as
22578  promised.  The start, stop, and step attributes and the tolist()
22579  method no longer exist.  xrange repetition and slicing have been
22580  removed.
22581
22582- New built-in function enumerate(x), from PEP 279.  Example:
22583  enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c").
22584  The argument can be an arbitrary iterable object.
22585
22586- The assert statement no longer tests __debug__ at runtime.  This means
22587  that assert statements cannot be disabled by assigning a false value
22588  to __debug__.
22589
22590- A method zfill() was added to str and unicode, that fills a numeric
22591  string to the left with zeros.  For example,
22592  "+123".zfill(6) -> "+00123".
22593
22594- Complex numbers supported divmod() and the // and % operators, but
22595  these make no sense.  Since this was documented, they're being
22596  deprecated now.
22597
22598- String and unicode methods lstrip(), rstrip() and strip() now take
22599  an optional argument that specifies the characters to strip.  For
22600  example, "Foo!!!?!?!?".rstrip("?!") -> "Foo".
22601
22602- There's a new dictionary constructor (a class method of the dict
22603  class), dict.fromkeys(iterable, value=None).  It constructs a
22604  dictionary with keys taken from the iterable and all values set to a
22605  single value.  It can be used for building sets and for removing
22606  duplicates from sequences.
22607
22608- Added a new dict method pop(key).  This removes and returns the
22609  value corresponding to key.  [SF patch #539949]
22610
22611- A new built-in type, bool, has been added, as well as built-in
22612  names for its two values, True and False.  Comparisons and sundry
22613  other operations that return a truth value have been changed to
22614  return a bool instead.  Read PEP 285 for an explanation of why this
22615  is backward compatible.
22616
22617- Fixed two bugs reported as SF #535905: under certain conditions,
22618  deallocating a deeply nested structure could cause a segfault in the
22619  garbage collector, due to interaction with the "trashcan" code;
22620  access to the current frame during destruction of a local variable
22621  could access a pointer to freed memory.
22622
22623- The optional object allocator ("pymalloc") has been enabled by
22624  default.  The recommended practice for memory allocation and
22625  deallocation has been streamlined.  A header file is included,
22626  Misc/pymemcompat.h, which can be bundled with 3rd party extensions
22627  and lets them use the same API with Python versions from 1.5.2
22628  onwards.
22629
22630- PyErr_Display will provide file and line information for all exceptions
22631  that have an attribute print_file_and_line, not just SyntaxErrors.
22632
22633- The UTF-8 codec will now encode and decode Unicode surrogates
22634  correctly and without raising exceptions for unpaired ones.
22635
22636- Universal newlines (PEP 278) is implemented.  Briefly, using 'U'
22637  instead of 'r' when opening a text file for reading changes the line
22638  ending convention so that any of '\r', '\r\n', and '\n' is
22639  recognized (even mixed in one file); all three are converted to
22640  '\n', the standard Python line end character.
22641
22642- file.xreadlines() now raises a ValueError if the file is closed:
22643  Previously, an xreadlines object was returned which would raise
22644  a ValueError when the xreadlines.next() method was called.
22645
22646- sys.exit() inadvertently allowed more than one argument.
22647  An exception will now be raised if more than one argument is used.
22648
22649- Changed evaluation order of dictionary literals to conform to the
22650  general left to right evaluation order rule. Now {f1(): f2()} will
22651  evaluate f1 first.
22652
22653- Fixed bug #521782: when a file was in non-blocking mode, file.read()
22654  could silently lose data or wrongly throw an unknown error.
22655
22656- The sq_repeat, sq_inplace_repeat, sq_concat and sq_inplace_concat
22657  slots are now always tried after trying the corresponding nb_* slots.
22658  This fixes a number of minor bugs (see bug #624807).
22659
22660- Fix problem with dynamic loading on 64-bit AIX (see bug #639945).
22661
22662Extension modules
22663-----------------
22664
22665- Added three operators to the operator module:
22666    operator.pow(a,b) which is equivalent to:  a**b.
22667    operator.is_(a,b) which is equivalent to:  a is b.
22668    operator.is_not(a,b) which is equivalent to:  a is not b.
22669
22670- posix.openpty now works on all systems that have /dev/ptmx.
22671
22672- A module zipimport exists to support importing code from zip
22673  archives.
22674
22675- The new datetime module supplies classes for manipulating dates and
22676  times.  The basic design came from the Zope "fishbowl process", and
22677  favors practical commercial applications over calendar esoterica.  See
22678
22679      http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage
22680
22681- _tkinter now returns Tcl objects, instead of strings. Objects which
22682  have Python equivalents are converted to Python objects, other objects
22683  are wrapped. This can be configured through the wantobjects method,
22684  or Tkinter.wantobjects.
22685
22686- The PyBSDDB wrapper around the Sleepycat Berkeley DB library has
22687  been added as the package bsddb.  The traditional bsddb module is
22688  still available in source code, but not built automatically anymore,
22689  and is now named bsddb185.  This supports Berkeley DB versions from
22690  3.0 to 4.1.  For help converting your databases from the old module (which
22691  probably used an obsolete version of Berkeley DB) to the new module, see
22692  the db2pickle.py and pickle2db.py scripts described in the Tools/Demos
22693  section above.
22694
22695- unicodedata was updated to Unicode 3.2. It supports normalization
22696  and names for Hangul syllables and CJK unified ideographs.
22697
22698- resource.getrlimit() now returns longs instead of ints.
22699
22700- readline now dynamically adjusts its input/output stream if
22701  sys.stdin/stdout changes.
22702
22703- The _tkinter module (and hence Tkinter) has dropped support for
22704  Tcl/Tk 8.0 and 8.1.  Only Tcl/Tk versions 8.2, 8.3 and 8.4 are
22705  supported.
22706
22707- cPickle.BadPickleGet is now a class.
22708
22709- The time stamps in os.stat_result are floating point numbers
22710  after stat_float_times has been called.
22711
22712- If the size passed to mmap.mmap() is larger than the length of the
22713  file on non-Windows platforms, a ValueError is raised. [SF bug 585792]
22714
22715- The xreadlines module is slated for obsolescence.
22716
22717- The strptime function in the time module is now always available (a
22718  Python implementation is used when the C library doesn't define it).
22719
22720- The 'new' module is no longer an extension, but a Python module that
22721  only exists for backwards compatibility.  Its contents are no longer
22722  functions but callable type objects.
22723
22724- The bsddb.*open functions can now take 'None' as a filename.
22725  This will create a temporary in-memory bsddb that won't be
22726  written to disk.
22727
22728- posix.getloadavg, posix.lchown, posix.killpg, posix.mknod, and
22729  posix.getpgid have been added where available.
22730
22731- The locale module now exposes the C library's gettext interface. It
22732  also has a new function getpreferredencoding.
22733
22734- A security hole ("double free") was found in zlib-1.1.3, a popular
22735  third party compression library used by some Python modules.  The
22736  hole was quickly plugged in zlib-1.1.4, and the Windows build of
22737  Python now ships with zlib-1.1.4.
22738
22739- pwd, grp, and resource return enhanced tuples now, with symbolic
22740  field names.
22741
22742- array.array is now a type object. A new format character
22743  'u' indicates Py_UNICODE arrays. For those, .tounicode and
22744  .fromunicode methods are available. Arrays now support __iadd__
22745  and __imul__.
22746
22747- dl now builds on every system that has dlfcn.h.  Failure in case
22748  of sizeof(int)!=sizeof(long)!=sizeof(void*) is delayed until dl.open
22749  is called.
22750
22751- The sys module acquired a new attribute, api_version, which evaluates
22752  to the value of the PYTHON_API_VERSION macro with which the
22753  interpreter was compiled.
22754
22755- Fixed bug #470582: sre module would return a tuple (None, 'a', 'ab')
22756  when applying the regular expression '^((a)c)?(ab)$' on 'ab'. It now
22757  returns (None, None, 'ab'), as expected. Also fixed handling of
22758  lastindex/lastgroup match attributes in similar cases. For example,
22759  when running the expression r'(a)(b)?b' over 'ab', lastindex must be
22760  1, not 2.
22761
22762- Fixed bug #581080: sre scanner was not checking the buffer limit
22763  before increasing the current pointer. This was creating an infinite
22764  loop in the search function, once the pointer exceeded the buffer
22765  limit.
22766
22767- The os.fdopen function now enforces a file mode starting with the
22768  letter 'r', 'w' or 'a', otherwise a ValueError is raised. This fixes
22769  bug #623464.
22770
22771- The linuxaudiodev module is now deprecated; it is being replaced by
22772  ossaudiodev.  The interface has been extended to cover a lot more of
22773  OSS (see www.opensound.com), including most DSP ioctls and the
22774  OSS mixer API.  Documentation forthcoming in 2.3a2.
22775
22776Library
22777-------
22778
22779- imaplib.py now supports SSL (Tino Lange and Piers Lauder).
22780
22781- Freeze's modulefinder.py has been moved to the standard library;
22782  slightly improved so it will issue less false missing submodule
22783  reports (see sf path #643711 for details).  Documentation will follow
22784  with Python 2.3a2.
22785
22786- os.path exposes getctime.
22787
22788- unittest.py now has two additional methods called assertAlmostEqual()
22789  and failIfAlmostEqual().  They implement an approximate comparison
22790  by rounding the difference between the two arguments and comparing
22791  the result to zero.  Approximate comparison is essential for
22792  unit tests of floating point results.
22793
22794- calendar.py now depends on the new datetime module rather than
22795  the time module.  As a result, the range of allowable dates
22796  has been increased.
22797
22798- pdb has a new 'j(ump)' command to select the next line to be
22799  executed.
22800
22801- The distutils created windows installers now can run a
22802  postinstallation script.
22803
22804- doctest.testmod can now be called without argument, which means to
22805  test the current module.
22806
22807- When canceling a server that implemented threading with a keyboard
22808  interrupt, the server would shut down but not terminate (waiting on
22809  client threads). A new member variable, daemon_threads, was added to
22810  the ThreadingMixIn class in SocketServer.py to make it explicit that
22811  this behavior needs to be controlled.
22812
22813- A new module, optparse, provides a fancy alternative to getopt for
22814  command line parsing.  It is a slightly modified version of Greg
22815  Ward's Optik package.
22816
22817- UserDict.py now defines a DictMixin class which defines all dictionary
22818  methods for classes that already have a minimum mapping interface.
22819  This greatly simplifies writing classes that need to be substitutable
22820  for dictionaries (such as the shelve module).
22821
22822- shelve.py now subclasses from UserDict.DictMixin.  Now shelve supports
22823  all dictionary methods.  This eases the transition to persistent
22824  storage for scripts originally written with dictionaries in mind.
22825
22826- shelve.open and the various classes in shelve.py now accept an optional
22827  binary flag, which defaults to False.  If True, the values stored in the
22828  shelf are binary pickles.
22829
22830- A new package, logging, implements the logging API defined by PEP
22831  282.  The code is written by Vinay Sajip.
22832
22833- StreamReader, StreamReaderWriter and StreamRecoder in the codecs
22834  modules are iterators now.
22835
22836- gzip.py now handles files exceeding 2GB.  Files over 4GB also work
22837  now (provided the OS supports it, and Python is configured with large
22838  file support), but in that case the underlying gzip file format can
22839  record only the least-significant 32 bits of the file size, so that
22840  some tools working with gzipped files may report an incorrect file
22841  size.
22842
22843- xml.sax.saxutils.unescape has been added, to replace entity references
22844  with their entity value.
22845
22846- Queue.Queue.{put,get} now support an optional timeout argument.
22847
22848- Various features of Tk 8.4 are exposed in Tkinter.py. The multiple
22849  option of tkFileDialog is exposed as function askopenfile{,name}s.
22850
22851- Various configure methods of Tkinter have been stream-lined, so that
22852  tag_configure, image_configure, window_configure now return a
22853  dictionary when invoked with no argument.
22854
22855- Importing the readline module now no longer has the side effect of
22856  calling setlocale(LC_CTYPE, "").  The initial "C" locale, or
22857  whatever locale is explicitly set by the user, is preserved.  If you
22858  want repr() of 8-bit strings in your preferred encoding to preserve
22859  all printable characters of that encoding, you have to add the
22860  following code to your $PYTHONSTARTUP file or to your application's
22861  main():
22862
22863    import locale
22864    locale.setlocale(locale.LC_CTYPE, "")
22865
22866- shutil.move was added. shutil.copytree now reports errors as an
22867  exception at the end, instead of printing error messages.
22868
22869- Encoding name normalization was generalized to not only
22870  replace hyphens with underscores, but also all other non-alphanumeric
22871  characters (with the exception of the dot which is used for Python
22872  package names during lookup). The aliases.py mapping was updated
22873  to the new standard.
22874
22875- mimetypes has two new functions: guess_all_extensions() which
22876  returns a list of all known extensions for a mime type, and
22877  add_type() which adds one mapping between a mime type and
22878  an extension to the database.
22879
22880- New module: sets, defines the class Set that implements a mutable
22881  set type using the keys of a dict to represent the set.  There's
22882  also a class ImmutableSet which is useful when you need sets of sets
22883  or when you need to use sets as dict keys, and a class BaseSet which
22884  is the base class of the two.
22885
22886- Added random.sample(population,k) for random sampling without replacement.
22887  Returns a k length list of unique elements chosen from the population.
22888
22889- random.randrange(-sys.maxint-1, sys.maxint) no longer raises
22890  OverflowError.  That is, it now accepts any combination of 'start'
22891  and 'stop' arguments so long as each is in the range of Python's
22892  bounded integers.
22893
22894- Thanks to Raymond Hettinger, random.random() now uses a new core
22895  generator.  The Mersenne Twister algorithm is implemented in C,
22896  threadsafe, faster than the previous generator, has an astronomically
22897  large period (2**19937-1), creates random floats to full 53-bit
22898  precision, and may be the most widely tested random number generator
22899  in existence.
22900
22901  The random.jumpahead(n) method has different semantics for the new
22902  generator.  Instead of jumping n steps ahead, it uses n and the
22903  existing state to create a new state.  This means that jumpahead()
22904  continues to support multi-threaded code needing generators of
22905  non-overlapping sequences.  However, it will break code which relies
22906  on jumpahead moving a specific number of steps forward.
22907
22908  The attributes random.whseed and random.__whseed have no meaning for
22909  the new generator.  Code using these attributes should switch to a
22910  new class, random.WichmannHill which is provided for backward
22911  compatibility and to make an alternate generator available.
22912
22913- New "algorithms" module: heapq, implements a heap queue.  Thanks to
22914  Kevin O'Connor for the code and François Pinard for an entertaining
22915  write-up explaining the theory and practical uses of heaps.
22916
22917- New encoding for the Palm OS character set: palmos.
22918
22919- binascii.crc32() and the zipfile module had problems on some 64-bit
22920  platforms.  These have been fixed.  On a platform with 8-byte C longs,
22921  crc32() now returns a signed-extended 4-byte result, so that its value
22922  as a Python int is equal to the value computed a 32-bit platform.
22923
22924- xml.dom.minidom.toxml and toprettyxml now take an optional encoding
22925  argument.
22926
22927- Some fixes in the copy module: when an object is copied through its
22928  __reduce__ method, there was no check for a __setstate__ method on
22929  the result [SF patch 565085]; deepcopy should treat instances of
22930  custom metaclasses the same way it treats instances of type 'type'
22931  [SF patch 560794].
22932
22933- Sockets now support timeout mode.  After s.settimeout(T), where T is
22934  a float expressing seconds, subsequent operations raise an exception
22935  if they cannot be completed within T seconds.  To disable timeout
22936  mode, use s.settimeout(None).  There's also a module function,
22937  socket.setdefaulttimeout(T), which sets the default for all sockets
22938  created henceforth.
22939
22940- getopt.gnu_getopt was added.  This supports GNU-style option
22941  processing, where options can be mixed with non-option arguments.
22942
22943- Stop using strings for exceptions.  String objects used for
22944  exceptions are now classes deriving from Exception.  The objects
22945  changed were: Tkinter.TclError, bdb.BdbQuit, macpath.norm_error,
22946  tabnanny.NannyNag, and xdrlib.Error.
22947
22948- Constants BOM_UTF8, BOM_UTF16, BOM_UTF16_LE, BOM_UTF16_BE,
22949  BOM_UTF32, BOM_UTF32_LE and BOM_UTF32_BE that represent the Byte
22950  Order Mark in UTF-8, UTF-16 and UTF-32 encodings for little and
22951  big endian systems were added to the codecs module. The old names
22952  BOM32_* and BOM64_* were off by a factor of 2.
22953
22954- Added conversion functions math.degrees() and math.radians().
22955
22956- math.log() now takes an optional argument:  math.log(x[, base]).
22957
22958- ftplib.retrlines() now tests for callback is None rather than testing
22959  for False.  Was causing an error when given a callback object which
22960  was callable but also returned len() as zero.  The change may
22961  create new breakage if the caller relied on the undocumented behavior
22962  and called with callback set to [] or some other False value not
22963  identical to None.
22964
22965- random.gauss() uses a piece of hidden state used by nothing else,
22966  and the .seed() and .whseed() methods failed to reset it.  In other
22967  words, setting the seed didn't completely determine the sequence of
22968  results produced by random.gauss().  It does now.  Programs repeatedly
22969  mixing calls to a seed method with calls to gauss() may see different
22970  results now.
22971
22972- The pickle.Pickler class grew a clear_memo() method to mimic that
22973  provided by cPickle.Pickler.
22974
22975- difflib's SequenceMatcher class now does a dynamic analysis of
22976  which elements are so frequent as to constitute noise.  For
22977  comparing files as sequences of lines, this generally works better
22978  than the IS_LINE_JUNK function, and function ndiff's linejunk
22979  argument defaults to None now as a result.  A happy benefit is
22980  that SequenceMatcher may run much faster now when applied
22981  to large files with many duplicate lines (for example, C program
22982  text with lots of repeated "}" and "return NULL;" lines).
22983
22984- New Text.dump() method in Tkinter module.
22985
22986- New distutils commands for building packagers were added to
22987  support pkgtool on Solaris and swinstall on HP-UX.
22988
22989- distutils now has a new abstract binary packager base class
22990  command/bdist_packager, which simplifies writing packagers.
22991  This will hopefully provide the missing bits to encourage
22992  people to submit more packagers, e.g. for Debian, FreeBSD
22993  and other systems.
22994
22995- The UTF-16, -LE and -BE stream readers now raise a
22996  NotImplementedError for all calls to .readline(). Previously, they
22997  used to just produce garbage or fail with an encoding error --
22998  UTF-16 is a 2-byte encoding and the C lib's line reading APIs don't
22999  work well with these.
23000
23001- compileall now supports quiet operation.
23002
23003- The BaseHTTPServer now implements optional HTTP/1.1 persistent
23004  connections.
23005
23006- socket module: the SSL support was broken out of the main
23007  _socket module C helper and placed into a new _ssl helper
23008  which now gets imported by socket.py if available and working.
23009
23010- encodings package: added aliases for all supported IANA character
23011  sets
23012
23013- ftplib: to safeguard the user's privacy, anonymous login will use
23014  "anonymous@" as default password, rather than the real user and host
23015  name.
23016
23017- webbrowser: tightened up the command passed to os.system() so that
23018  arbitrary shell code can't be executed because a bogus URL was
23019  passed in.
23020
23021- gettext.translation has an optional fallback argument, and
23022  gettext.find an optional all argument. Translations will now fallback
23023  on a per-message basis. The module supports plural forms, by means
23024  of gettext.[d]ngettext and Translation.[u]ngettext.
23025
23026- distutils bdist commands now offer a --skip-build option.
23027
23028- warnings.warn now accepts a Warning instance as first argument.
23029
23030- The xml.sax.expatreader.ExpatParser class will no longer create
23031  circular references by using itself as the locator that gets passed
23032  to the content handler implementation.  [SF bug #535474]
23033
23034- The email.Parser.Parser class now properly parses strings regardless
23035  of their line endings, which can be any of \r, \n, or \r\n (CR, LF,
23036  or CRLF).  Also, the Header class's constructor default arguments
23037  has changed slightly so that an explicit maxlinelen value is always
23038  honored, and so unicode conversion error handling can be specified.
23039
23040- distutils' build_ext command now links C++ extensions with the C++
23041  compiler available in the Makefile or CXX environment variable, if
23042  running under \*nix.
23043
23044- New module bz2: provides a comprehensive interface for the bz2 compression
23045  library.  It implements a complete file interface, one-shot (de)compression
23046  functions, and types for sequential (de)compression.
23047
23048- New pdb command 'pp' which is like 'p' except that it pretty-prints
23049  the value of its expression argument.
23050
23051- Now bdist_rpm distutils command understands a verify_script option in
23052  the config file, including the contents of the referred filename in
23053  the "%verifyscript" section of the rpm spec file.
23054
23055- Fixed bug #495695: webbrowser module would run graphic browsers in a
23056  unix environment even if DISPLAY was not set. Also, support for
23057  skipstone browser was included.
23058
23059- Fixed bug #636769: rexec would run unallowed code if subclasses of
23060  strings were used as parameters for certain functions.
23061
23062Tools/Demos
23063-----------
23064
23065- pygettext.py now supports globbing on Windows, and accepts module
23066  names in addition to accepting file names.
23067
23068- The SGI demos (Demo/sgi) have been removed.  Nobody thought they
23069  were interesting any more.  (The SGI library modules and extensions
23070  are still there; it is believed that at least some of these are
23071  still used and useful.)
23072
23073- IDLE supports the new encoding declarations (PEP 263); it can also
23074  deal with legacy 8-bit files if they use the locale's encoding. It
23075  allows non-ASCII strings in the interactive shell and executes them
23076  in the locale's encoding.
23077
23078- freeze.py now produces binaries which can import shared modules,
23079  unlike before when this failed due to missing symbol exports in
23080  the generated binary.
23081
23082Build
23083-----
23084
23085- On Unix, IDLE is now installed automatically.
23086
23087- The fpectl module is not built by default; it's dangerous or useless
23088  except in the hands of experts.
23089
23090- The public Python C API will generally be declared using PyAPI_FUNC
23091  and PyAPI_DATA macros, while Python extension module init functions
23092  will be declared with PyMODINIT_FUNC.  DL_EXPORT/DL_IMPORT macros
23093  are deprecated.
23094
23095- A bug was fixed that could cause COUNT_ALLOCS builds to segfault, or
23096  get into infinite loops, when a new-style class got garbage-collected.
23097  Unfortunately, to avoid this, the way COUNT_ALLOCS works requires
23098  that new-style classes be immortal in COUNT_ALLOCS builds.  Note that
23099  COUNT_ALLOCS is not enabled by default, in either release or debug
23100  builds, and that new-style classes are immortal only in COUNT_ALLOCS
23101  builds.
23102
23103- Compiling out the cyclic garbage collector is no longer an option.
23104  The old symbol WITH_CYCLE_GC is now ignored, and Python.h arranges
23105  that it's always defined (for the benefit of any extension modules
23106  that may be conditionalizing on it).  A bonus is that any extension
23107  type participating in cyclic gc can choose to participate in the
23108  Py_TRASHCAN mechanism now too; in the absence of cyclic gc, this used
23109  to require editing the core to teach the trashcan mechanism about the
23110  new type.
23111
23112- According to Annex F of the current C standard,
23113
23114    The Standard C macro HUGE_VAL and its float and long double analogs,
23115    HUGE_VALF and HUGE_VALL, expand to expressions whose values are
23116    positive infinities.
23117
23118  Python only uses the double HUGE_VAL, and only to #define its own symbol
23119  Py_HUGE_VAL.  Some platforms have incorrect definitions for HUGE_VAL.
23120  pyport.h used to try to worm around that, but the workarounds triggered
23121  other bugs on other platforms, so we gave up.  If your platform defines
23122  HUGE_VAL incorrectly, you'll need to #define Py_HUGE_VAL to something
23123  that works on your platform.  The only instance of this I'm sure about
23124  is on an unknown subset of Cray systems, described here:
23125
23126  http://www.cray.com/swpubs/manuals/SN-2194_2.0/html-SN-2194_2.0/x3138.htm
23127
23128  Presumably 2.3a1 breaks such systems.  If anyone uses such a system, help!
23129
23130- The configure option --without-doc-strings can be used to remove the
23131  doc strings from the built-in functions and modules; this reduces the
23132  size of the executable.
23133
23134- The universal newlines option (PEP 278) is on by default.  On Unix
23135  it can be disabled by passing --without-universal-newlines to the
23136  configure script.  On other platforms, remove
23137  WITH_UNIVERSAL_NEWLINES from pyconfig.h.
23138
23139- On Unix, a shared libpython2.3.so can be created with --enable-shared.
23140
23141- All uses of the CACHE_HASH, INTERN_STRINGS, and DONT_SHARE_SHORT_STRINGS
23142  preprocessor symbols were eliminated.  The internal decisions they
23143  controlled stopped being experimental long ago.
23144
23145- The tools used to build the documentation now work under Cygwin as
23146  well as Unix.
23147
23148- The bsddb and dbm module builds have been changed to try and avoid version
23149  skew problems and disable linkage with Berkeley DB 1.85 unless the
23150  installer knows what s/he's doing.  See the section on building these
23151  modules in the README file for details.
23152
23153C API
23154-----
23155
23156- PyNumber_Check() now returns true for string and unicode objects.
23157  This is a result of these types having a partially defined
23158  tp_as_number slot.  (This is not a feature, but an indication that
23159  PyNumber_Check() is not very useful to determine numeric behavior.
23160  It may be deprecated.)
23161
23162- The string object's layout has changed: the pointer member
23163  ob_sinterned has been replaced by an int member ob_sstate.  On some
23164  platforms (e.g. most 64-bit systems) this may change the offset of
23165  the ob_sval member, so as a precaution the API_VERSION has been
23166  incremented.  The apparently unused feature of "indirect interned
23167  strings", supported by the ob_sinterned member, is gone.  Interned
23168  strings are now usually mortal; there is a new API,
23169  PyString_InternImmortal() that creates immortal interned strings.
23170  (The ob_sstate member can only take three values; however, while
23171  making it a char saves a few bytes per string object on average, in
23172  it also slowed things down a bit because ob_sval was no longer
23173  aligned.)
23174
23175- The Py_InitModule*() functions now accept NULL for the 'methods'
23176  argument.  Modules without global functions are becoming more common
23177  now that factories can be types rather than functions.
23178
23179- New C API PyUnicode_FromOrdinal() which exposes unichr() at C
23180  level.
23181
23182- New functions PyErr_SetExcFromWindowsErr() and
23183  PyErr_SetExcFromWindowsErrWithFilename(). Similar to
23184  PyErr_SetFromWindowsErrWithFilename() and
23185  PyErr_SetFromWindowsErr(), but they allow specifying
23186  the exception type to raise. Available on Windows.
23187
23188- Py_FatalError() is now declared as taking a const char* argument.  It
23189  was previously declared without const.  This should not affect working
23190  code.
23191
23192- Added new macro PySequence_ITEM(o, i) that directly calls
23193  sq_item without rechecking that o is a sequence and without
23194  adjusting for negative indices.
23195
23196- PyRange_New() now raises ValueError if the fourth argument is not 1.
23197  This is part of the removal of deprecated features of the xrange
23198  object.
23199
23200- PyNumber_Coerce() and PyNumber_CoerceEx() now also invoke the type's
23201  coercion if both arguments have the same type but this type has the
23202  CHECKTYPES flag set.  This is to better support proxies.
23203
23204- The type of tp_free has been changed from "``void (*)(PyObject *)``" to
23205  "``void (*)(void *)``".
23206
23207- PyObject_Del, PyObject_GC_Del are now functions instead of macros.
23208
23209- A type can now inherit its metatype from its base type.  Previously,
23210  when PyType_Ready() was called, if ob_type was found to be NULL, it
23211  was always set to &PyType_Type; now it is set to base->ob_type,
23212  where base is tp_base, defaulting to &PyObject_Type.
23213
23214- PyType_Ready() accidentally did not inherit tp_is_gc; now it does.
23215
23216- The PyCore_* family of APIs have been removed.
23217
23218- The "u#" parser marker will now pass through Unicode objects as-is
23219  without going through the buffer API.
23220
23221- The enumerators of cmp_op have been renamed to use the prefix ``PyCmp_``.
23222
23223- An old #define of ANY as void has been removed from pyport.h.  This
23224  hasn't been used since Python's pre-ANSI days, and the #define has
23225  been marked as obsolete since then.  SF bug 495548 says it created
23226  conflicts with other packages, so keeping it around wasn't harmless.
23227
23228- Because Python's magic number scheme broke on January 1st, we decided
23229  to stop Python development.  Thanks for all the fish!
23230
23231- Some of us don't like fish, so we changed Python's magic number
23232  scheme to a new one. See Python/import.c for details.
23233
23234New platforms
23235-------------
23236
23237- OpenVMS is now supported.
23238
23239- AtheOS is now supported.
23240
23241- the EMX runtime environment on OS/2 is now supported.
23242
23243- GNU/Hurd is now supported.
23244
23245Tests
23246-----
23247
23248- The regrtest.py script's -u option now provides a way to say "allow
23249  all resources except this one."  For example, to allow everything
23250  except bsddb, give the option '-uall,-bsddb'.
23251
23252Windows
23253-------
23254
23255- The Windows distribution now ships with version 4.0.14 of the
23256  Sleepycat Berkeley database library.  This should be a huge
23257  improvement over the previous Berkeley DB 1.85, which had many
23258  bugs.
23259  XXX What are the licensing issues here?
23260  XXX If a user has a database created with a previous version of
23261  XXX     Python, what must they do to convert it?
23262  XXX I'm still not sure how to link this thing (see PCbuild/readme.txt).
23263  XXX The version # is likely to change before 2.3a1.
23264
23265- The Windows distribution now ships with a Secure Sockets Library (SLL)
23266   module (_ssl.pyd)
23267
23268- The Windows distribution now ships with Tcl/Tk version 8.4.1 (it
23269  previously shipped with Tcl/Tk 8.3.2).
23270
23271- When Python is built under a Microsoft compiler, sys.version now
23272  includes the compiler version number (_MSC_VER).  For example, under
23273  MSVC 6, sys.version contains the substring "MSC v.1200 ".  1200 is
23274  the value of _MSC_VER under MSVC 6.
23275
23276- Sometimes the uninstall executable (UNWISE.EXE) vanishes.  One cause
23277  of that has been fixed in the installer (disabled Wise's "delete in-
23278  use files" uninstall option).
23279
23280- Fixed a bug in urllib's proxy handling in Windows.  [SF bug #503031]
23281
23282- The installer now installs Start menu shortcuts under (the local
23283  equivalent of) "All Users" when doing an Admin install.
23284
23285- file.truncate([newsize]) now works on Windows for all newsize values.
23286  It used to fail if newsize didn't fit in 32 bits, reflecting a
23287  limitation of MS _chsize (which is no longer used).
23288
23289- os.waitpid() is now implemented for Windows, and can be used to block
23290  until a specified process exits.  This is similar to, but not exactly
23291  the same as, os.waitpid() on POSIX systems.  If you're waiting for
23292  a specific process whose pid was obtained from one of the spawn()
23293  functions, the same Python os.waitpid() code works across platforms.
23294  See the docs for details.  The docs were changed to clarify that
23295  spawn functions return, and waitpid requires, a process handle on
23296  Windows (not the same thing as a Windows process id).
23297
23298- New tempfile.TemporaryFile implementation for Windows:  this doesn't
23299  need a TemporaryFileWrapper wrapper anymore, and should be immune
23300  to a nasty problem:  before 2.3, if you got a temp file on Windows, it
23301  got wrapped in an object whose close() method first closed the
23302  underlying file, then deleted the file.  This usually worked fine.
23303  However, the spawn family of functions on Windows create (at a low C
23304  level) the same set of open files in the spawned process Q as were
23305  open in the spawning process P.  If a temp file f was among them, then
23306  doing f.close() in P first closed P's C-level file handle on f, but Q's
23307  C-level file handle on f remained open, so the attempt in P to delete f
23308  blew up with a "Permission denied" error (Windows doesn't allow
23309  deleting open files).  This was surprising, subtle, and difficult to
23310  work around.
23311
23312- The os module now exports all the symbolic constants usable with the
23313  low-level os.open() on Windows:  the new constants in 2.3 are
23314  O_NOINHERIT, O_SHORT_LIVED, O_TEMPORARY, O_RANDOM and O_SEQUENTIAL.
23315  The others were also available in 2.2:  O_APPEND, O_BINARY, O_CREAT,
23316  O_EXCL, O_RDONLY, O_RDWR, O_TEXT, O_TRUNC and O_WRONLY.  Contrary
23317  to Microsoft docs, O_SHORT_LIVED does not seem to imply O_TEMPORARY
23318  (so specify both if you want both; note that neither is useful unless
23319  specified with O_CREAT too).
23320
23321Mac
23322----
23323
23324- Mac/Relnotes is gone, the release notes are now here.
23325
23326- Python (the OSX-only, unix-based version, not the OS9-compatible CFM
23327  version) now fully supports unicode strings as arguments to various file
23328  system calls, eg. open(), file(), os.stat() and os.listdir().
23329
23330- The current naming convention for Python on the Macintosh is that MacPython
23331  refers to the unix-based OSX-only version, and MacPython-OS9 refers to the
23332  CFM-based version that runs on both OS9 and OSX.
23333
23334- All MacPython-OS9 functionality is now available in an OSX unix build,
23335  including the Carbon modules, the IDE, OSA support, etc. A lot of this
23336  will only work correctly in a framework build, though, because you cannot
23337  talk to the window manager unless your application is run from a .app
23338  bundle. There is a command line tool "pythonw" that runs your script
23339  with an interpreter living in such a .app bundle, this interpreter should
23340  be used to run any Python script using the window manager (including
23341  Tkinter or wxPython scripts).
23342
23343- Most of Mac/Lib has moved to Lib/plat-mac, which is again used both in
23344  MacPython-OSX and MacPython-OS9. The only modules remaining in Mac/Lib
23345  are specifically for MacPython-OS9 (CFM support, preference resources, etc).
23346
23347- A new utility PythonLauncher will start a Python interpreter when a .py or
23348  .pyw script is double-clicked in the Finder. By default .py scripts are
23349  run with a normal Python interpreter in a Terminal window and .pyw
23350  files are run with a window-aware pythonw interpreter without a Terminal
23351  window, but all this can be customized.
23352
23353- MacPython-OS9 is now Carbon-only, so it runs on Mac OS 9 or Mac OS X and
23354  possibly on Mac OS 8.6 with the right CarbonLib installed, but not on earlier
23355  releases.
23356
23357- Many tools such as BuildApplet.py and gensuitemodule.py now support a command
23358  line interface too.
23359
23360- All the Carbon classes are now PEP253 compliant, meaning that you can
23361  subclass them from Python. Most of the attributes have gone, you should
23362  now use the accessor function call API, which is also what Apple's
23363  documentation uses. Some attributes such as grafport.visRgn are still
23364  available for convenience.
23365
23366- New Carbon modules File (implementing the APIs in Files.h and Aliases.h)
23367  and Folder (APIs from Folders.h). The old macfs built-in module is
23368  gone, and replaced by a Python wrapper around the new modules.
23369
23370- Pathname handling should now be fully consistent: MacPython-OSX always uses
23371  unix pathnames and MacPython-OS9 always uses colon-separated Mac pathnames
23372  (also when running on Mac OS X).
23373
23374- New Carbon modules Help and AH give access to the Carbon Help Manager.
23375  There are hooks in the IDE to allow accessing the Python documentation
23376  (and Apple's Carbon and Cocoa documentation) through the Help Viewer.
23377  See Mac/OSX/README for converting the Python documentation to a
23378  Help Viewer compatible form and installing it.
23379
23380- OSA support has been redesigned and the generated Python classes now
23381  mirror the inheritance defined by the underlying OSA classes.
23382
23383- MacPython no longer maps both \r and \n to \n on input for any text file.
23384  This feature has been replaced by universal newline support (PEP278).
23385
23386- The default encoding for Python sourcefiles in MacPython-OS9 is no longer
23387  mac-roman (or whatever your local Mac encoding was) but "ascii", like on
23388  other platforms. If you really need sourcefiles with Mac characters in them
23389  you can change this in site.py.
23390
23391
23392What's New in Python 2.2 final?
23393===============================
23394
23395*Release date: 21-Dec-2001*
23396
23397Type/class unification and new-style classes
23398--------------------------------------------
23399
23400- pickle.py, cPickle: allow pickling instances of new-style classes
23401  with a custom metaclass.
23402
23403Core and builtins
23404-----------------
23405
23406- weakref proxy object: when comparing, unwrap both arguments if both
23407  are proxies.
23408
23409Extension modules
23410-----------------
23411
23412- binascii.b2a_base64(): fix a potential buffer overrun when encoding
23413  very short strings.
23414
23415- cPickle: the obscure "fast" mode was suspected of causing stack
23416  overflows on the Mac.  Hopefully fixed this by setting the recursion
23417  limit much smaller.  If the limit is too low (it only affects
23418  performance), you can change it by defining PY_CPICKLE_FAST_LIMIT
23419  when compiling cPickle.c (or in pyconfig.h).
23420
23421Library
23422-------
23423
23424- dumbdbm.py: fixed a dumb old bug (the file didn't get synched at
23425  close or delete time).
23426
23427- rfc822.py: fixed a bug where the address '<>' was converted to None
23428  instead of an empty string (also fixes the email.Utils module).
23429
23430- xmlrpclib.py: version 1.0.0; uses precision for doubles.
23431
23432- test suite: the pickle and cPickle tests were not executing any code
23433  when run from the standard regression test.
23434
23435Tools/Demos
23436-----------
23437
23438Build
23439-----
23440
23441C API
23442-----
23443
23444New platforms
23445-------------
23446
23447Tests
23448-----
23449
23450Windows
23451-------
23452
23453- distutils package: fixed broken Windows installers (bdist_wininst).
23454
23455- tempfile.py: prevent mysterious warnings when TemporaryFileWrapper
23456  instances are deleted at process exit time.
23457
23458- socket.py: prevent mysterious warnings when socket instances are
23459  deleted at process exit time.
23460
23461- posixmodule.c: fix a Windows crash with stat() of a filename ending
23462  in backslash.
23463
23464Mac
23465----
23466
23467- The Carbon toolbox modules have been upgraded to Universal Headers
23468  3.4, and experimental CoreGraphics and CarbonEvents modules have
23469  been added.  All only for framework-enabled MacOSX.
23470
23471
23472What's New in Python 2.2c1?
23473===========================
23474
23475*Release date: 14-Dec-2001*
23476
23477Type/class unification and new-style classes
23478--------------------------------------------
23479
23480- Guido's tutorial introduction to the new type/class features has
23481  been extensively updated.  See
23482
23483      http://www.python.org/2.2/descrintro.html
23484
23485  That remains the primary documentation in this area.
23486
23487- Fixed a leak: instance variables declared with __slots__ were never
23488  deleted!
23489
23490- The "delete attribute" method of descriptor objects is called
23491  __delete__, not __del__.  In previous releases, it was mistakenly
23492  called __del__, which created an unfortunate overloading condition
23493  with finalizers.  (The "get attribute" and "set attribute" methods
23494  are still called __get__ and __set__, respectively.)
23495
23496- Some subtle issues with the super built-in were fixed:
23497
23498  (a) When super itself is subclassed, its __get__ method would still
23499      return an instance of the base class (i.e., of super).
23500
23501  (b) super(C, C()).__class__ would return C rather than super.  This
23502      is confusing.  To fix this, I decided to change the semantics of
23503      super so that it only applies to code attributes, not to data
23504      attributes.  After all, overriding data attributes is not
23505      supported anyway.
23506
23507  (c) The __get__ method didn't check whether the argument was an
23508      instance of the type used in creation of the super instance.
23509
23510- Previously, hash() of an instance of a subclass of a mutable type
23511  (list or dictionary) would return some value, rather than raising
23512  TypeError.  This has been fixed.  Also, directly calling
23513  dict.__hash__ and list.__hash__ now raises the same TypeError
23514  (previously, these were the same as object.__hash__).
23515
23516- New-style objects now support deleting their __dict__.  This is for
23517  all intents and purposes equivalent to assigning a brand new empty
23518  dictionary, but saves space if the object is not used further.
23519
23520Core and builtins
23521-----------------
23522
23523- -Qnew now works as documented in PEP 238:  when -Qnew is passed on
23524  the command line, all occurrences of "/" use true division instead
23525  of classic division.  See the PEP for details.  Note that "all"
23526  means all instances in library and 3rd-party modules, as well as in
23527  your own code.  As the PEP says, -Qnew is intended for use only in
23528  educational environments with control over the libraries in use.
23529  Note that test_coercion.py in the standard Python test suite fails
23530  under -Qnew; this is expected, and won't be repaired until true
23531  division becomes the default (in the meantime, test_coercion is
23532  testing the current rules).
23533
23534- complex() now only allows the first argument to be a string
23535  argument, and raises TypeError if either the second arg is a string
23536  or if the second arg is specified when the first is a string.
23537
23538Extension modules
23539-----------------
23540
23541- gc.get_referents was renamed to gc.get_referrers.
23542
23543Library
23544-------
23545
23546- Functions in the os.spawn() family now release the global interpreter
23547  lock around calling the platform spawn.  They should always have done
23548  this, but did not before 2.2c1.  Multithreaded programs calling
23549  an os.spawn function with P_WAIT will no longer block all Python threads
23550  until the spawned program completes.  It's possible that some programs
23551  relies on blocking, although more likely by accident than by design.
23552
23553- webbrowser defaults to netscape.exe on OS/2 now.
23554
23555- Tix.ResizeHandle exposes detach_widget, hide, and show.
23556
23557- The charset alias windows_1252 has been added.
23558
23559- types.StringTypes is a tuple containing the defined string types;
23560  usually this will be (str, unicode), but if Python was compiled
23561  without Unicode support it will be just (str,).
23562
23563- The pulldom and minidom modules were synchronized to PyXML.
23564
23565Tools/Demos
23566-----------
23567
23568- A new script called Tools/scripts/google.py was added, which fires
23569  off a search on Google.
23570
23571Build
23572-----
23573
23574- Note that release builds of Python should arrange to define the
23575  preprocessor symbol NDEBUG on the command line (or equivalent).
23576  In the 2.2 pre-release series we tried to define this by magic in
23577  Python.h instead, but it proved to cause problems for extension
23578  authors.  The Unix, Windows and Mac builds now all define NDEBUG in
23579  release builds via cmdline (or equivalent) instead.  Ports to
23580  other platforms should do likewise.
23581
23582- It is no longer necessary to use --with-suffix when building on a
23583  case-insensitive file system (such as Mac OS X HFS+). In the build
23584  directory an extension is used, but not in the installed python.
23585
23586C API
23587-----
23588
23589- New function PyDict_MergeFromSeq2() exposes the built-in dict
23590  constructor's logic for updating a dictionary from an iterable object
23591  producing key-value pairs.
23592
23593- PyArg_ParseTupleAndKeywords() requires that the number of entries in
23594  the keyword list equal the number of argument specifiers.  This
23595  wasn't checked correctly, and PyArg_ParseTupleAndKeywords could even
23596  dump core in some bad cases.  This has been repaired.  As a result,
23597  PyArg_ParseTupleAndKeywords may raise RuntimeError in bad cases that
23598  previously went unchallenged.
23599
23600New platforms
23601-------------
23602
23603Tests
23604-----
23605
23606Windows
23607-------
23608
23609Mac
23610----
23611
23612- In unix-Python on Mac OS X (and darwin) sys.platform is now "darwin",
23613  without any trailing digits.
23614
23615- Changed logic for finding python home in Mac OS X framework Pythons.
23616  Now sys.executable points to the executable again, in stead of to
23617  the shared library. The latter is used only for locating the python
23618  home.
23619
23620
23621What's New in Python 2.2b2?
23622===========================
23623
23624*Release date: 16-Nov-2001*
23625
23626Type/class unification and new-style classes
23627--------------------------------------------
23628
23629- Multiple inheritance mixing new-style and classic classes in the
23630  list of base classes is now allowed, so this works now:
23631
23632      class Classic: pass
23633      class Mixed(Classic, object): pass
23634
23635  The MRO (method resolution order) for each base class is respected
23636  according to its kind, but the MRO for the derived class is computed
23637  using new-style MRO rules if any base class is a new-style class.
23638  This needs to be documented.
23639
23640- The new built-in dictionary() constructor, and dictionary type, have
23641  been renamed to dict.  This reflects a decade of common usage.
23642
23643- dict() now accepts an iterable object producing 2-sequences.  For
23644  example, dict(d.items()) == d for any dictionary d.  The argument,
23645  and the elements of the argument, can be any iterable objects.
23646
23647- New-style classes can now have a __del__ method, which is called
23648  when the instance is deleted (just like for classic classes).
23649
23650- Assignment to object.__dict__ is now possible, for objects that are
23651  instances of new-style classes that have a __dict__ (unless the base
23652  class forbids it).
23653
23654- Methods of built-in types now properly check for keyword arguments
23655  (formerly these were silently ignored).  The only built-in methods
23656  that take keyword arguments are __call__, __init__ and __new__.
23657
23658- The socket function has been converted to a type; see below.
23659
23660Core and builtins
23661-----------------
23662
23663- Assignment to __debug__ raises SyntaxError at compile-time.  This
23664  was promised when 2.1c1 was released as "What's New in Python 2.1c1"
23665  (see below) says.
23666
23667- Clarified the error messages for unsupported operands to an operator
23668  (like 1 + '').
23669
23670Extension modules
23671-----------------
23672
23673- mmap has a new keyword argument, "access", allowing a uniform way for
23674  both Windows and Unix users to create read-only, write-through and
23675  copy-on-write memory mappings.  This was previously possible only on
23676  Unix.  A new keyword argument was required to support this in a
23677  uniform way because the mmap() signatures had diverged across
23678  platforms.  Thanks to Jay T Miller for repairing this!
23679
23680- By default, the gc.garbage list now contains only those instances in
23681  unreachable cycles that have __del__ methods; in 2.1 it contained all
23682  instances in unreachable cycles.  "Instances" here has been generalized
23683  to include instances of both new-style and old-style classes.
23684
23685- The socket module defines a new method for socket objects,
23686  sendall().  This is like send() but may make multiple calls to
23687  send() until all data has been sent.  Also, the socket function has
23688  been converted to a subclassable type, like list and tuple (etc.)
23689  before it; socket and SocketType are now the same thing.
23690
23691- Various bugfixes to the curses module.  There is now a test suite
23692  for the curses module (you have to run it manually).
23693
23694- binascii.b2a_base64 no longer places an arbitrary restriction of 57
23695  bytes on its input.
23696
23697Library
23698-------
23699
23700- tkFileDialog exposes a Directory class and askdirectory
23701  convenience function.
23702
23703- Symbolic group names in regular expressions must be unique.  For
23704  example, the regexp r'(?P<abc>)(?P<abc>)' is not allowed, because a
23705  single name can't mean both "group 1" and "group 2" simultaneously.
23706  Python 2.2 detects this error at regexp compilation time;
23707  previously, the error went undetected, and results were
23708  unpredictable.  Also in sre, the pattern.split(), pattern.sub(), and
23709  pattern.subn() methods have been rewritten in C.  Also, an
23710  experimental function/method finditer() has been added, which works
23711  like findall() but returns an iterator.
23712
23713- Tix exposes more commands through the classes DirSelectBox,
23714  DirSelectDialog, ListNoteBook, Meter, CheckList, and the
23715  methods tix_addbitmapdir, tix_cget, tix_configure, tix_filedialog,
23716  tix_getbitmap, tix_getimage, tix_option_get, and tix_resetoptions.
23717
23718- Traceback objects are now scanned by cyclic garbage collection, so
23719  cycles created by casual use of sys.exc_info() no longer cause
23720  permanent memory leaks (provided garbage collection is enabled).
23721
23722- mimetypes.py has optional support for non-standard, but commonly
23723  found types.  guess_type() and guess_extension() now accept an
23724  optional 'strict' flag, defaulting to true, which controls whether
23725  recognize non-standard types or not.  A few non-standard types we
23726  know about have been added.  Also, when run as a script, there are
23727  new -l and -e options.
23728
23729- statcache is now deprecated.
23730
23731- email.Utils.formatdate() now produces the preferred RFC 2822 style
23732  dates with numeric timezones (it used to produce obsolete dates
23733  hard coded to "GMT" timezone).  An optional 'localtime' flag is
23734  added to produce dates in the local timezone, with daylight savings
23735  time properly taken into account.
23736
23737- In pickle and cPickle, instead of masking errors in load() by
23738  transforming them into SystemError, we let the original exception
23739  propagate out.  Also, implement support for __safe_for_unpickling__
23740  in pickle, as it already was supported in cPickle.
23741
23742Tools/Demos
23743-----------
23744
23745Build
23746-----
23747
23748- The dbm module is built using libdb1 if available.  The bsddb module
23749  is built with libdb3 if available.
23750
23751- Misc/Makefile.pre.in has been removed by BDFL pronouncement.
23752
23753C API
23754-----
23755
23756- New function PySequence_Fast_GET_SIZE() returns the size of a non-
23757  NULL result from PySequence_Fast(), more quickly than calling
23758  PySequence_Size().
23759
23760- New argument unpacking function PyArg_UnpackTuple() added.
23761
23762- New functions PyObject_CallFunctionObjArgs() and
23763  PyObject_CallMethodObjArgs() have been added to make it more
23764  convenient and efficient to call functions and methods from C.
23765
23766- PyArg_ParseTupleAndKeywords() no longer masks errors, so it's
23767  possible that this will propagate errors it didn't before.
23768
23769- New function PyObject_CheckReadBuffer(), which returns true if its
23770  argument supports the single-segment readable buffer interface.
23771
23772New platforms
23773-------------
23774
23775- We've finally confirmed that this release builds on HP-UX 11.00,
23776  *with* threads, and passes the test suite.
23777
23778- Thanks to a series of patches from Michael Muller, Python may build
23779  again under OS/2 Visual Age C++.
23780
23781- Updated RISCOS port by Dietmar Schwertberger.
23782
23783Tests
23784-----
23785
23786- Added a test script for the curses module.  It isn't run automatically;
23787  regrtest.py must be run with '-u curses' to enable it.
23788
23789Windows
23790-------
23791
23792Mac
23793----
23794
23795- PythonScript has been moved to unsupported and is slated to be
23796  removed completely in the next release.
23797
23798- It should now be possible to build applets that work on both OS9 and
23799  OSX.
23800
23801- The core is now linked with CoreServices not Carbon; as a side
23802  result, default 8bit encoding on OSX is now ASCII.
23803
23804- Python should now build on OSX 10.1.1
23805
23806
23807What's New in Python 2.2b1?
23808===========================
23809
23810*Release date: 19-Oct-2001*
23811
23812Type/class unification and new-style classes
23813--------------------------------------------
23814
23815- New-style classes are now always dynamic (except for built-in and
23816  extension types).  There is no longer a performance penalty, and I
23817  no longer see another reason to keep this baggage around.  One relic
23818  remains: the __dict__ of a new-style class is a read-only proxy; you
23819  must set the class's attribute to modify it.  As a consequence, the
23820  __defined__ attribute of new-style types no longer exists, for lack
23821  of need: there is once again only one __dict__ (although in the
23822  future a __cache__ may be resurrected with a similar function, if I
23823  can prove that it actually speeds things up).
23824
23825- C.__doc__ now works as expected for new-style classes (in 2.2a4 it
23826  always returned None, even when there was a class docstring).
23827
23828- doctest now finds and runs docstrings attached to new-style classes,
23829  class methods, static methods, and properties.
23830
23831Core and builtins
23832-----------------
23833
23834- A very subtle syntactical pitfall in list comprehensions was fixed.
23835  For example: [a+b for a in 'abc', for b in 'def'].  The comma in
23836  this example is a mistake.  Previously, this would silently let 'a'
23837  iterate over the singleton tuple ('abc',), yielding ['abcd', 'abce',
23838  'abcf'] rather than the intended ['ad', 'ae', 'af', 'bd', 'be',
23839  'bf', 'cd', 'ce', 'cf'].  Now, this is flagged as a syntax error.
23840  Note that [a for a in <singleton>] is a convoluted way to say
23841  [<singleton>] anyway, so it's not like any expressiveness is lost.
23842
23843- getattr(obj, name, default) now only catches AttributeError, as
23844  documented, rather than returning the default value for all
23845  exceptions (which could mask bugs in a __getattr__ hook, for
23846  example).
23847
23848- Weak reference objects are now part of the core and offer a C API.
23849  A bug which could allow a core dump when binary operations involved
23850  proxy reference has been fixed.  weakref.ReferenceError is now a
23851  built-in exception.
23852
23853- unicode(obj) now behaves more like str(obj), accepting arbitrary
23854  objects, and calling a __unicode__ method if it exists.
23855  unicode(obj, encoding) and unicode(obj, encoding, errors) still
23856  require an 8-bit string or character buffer argument.
23857
23858- isinstance() now allows any object as the first argument and a
23859  class, a type or something with a __bases__ tuple attribute for the
23860  second argument.  The second argument may also be a tuple of a
23861  class, type, or something with __bases__, in which case isinstance()
23862  will return true if the first argument is an instance of any of the
23863  things contained in the second argument tuple.  E.g.
23864
23865  isinstance(x, (A, B))
23866
23867  returns true if x is an instance of A or B.
23868
23869Extension modules
23870-----------------
23871
23872- thread.start_new_thread() now returns the thread ID (previously None).
23873
23874- binascii has now two quopri support functions, a2b_qp and b2a_qp.
23875
23876- readline now supports setting the startup_hook and the
23877  pre_event_hook, and adds the add_history() function.
23878
23879- os and posix supports chroot(), setgroups() and unsetenv() where
23880  available.  The stat(), fstat(), statvfs() and fstatvfs() functions
23881  now return "pseudo-sequences" -- the various fields can now be
23882  accessed as attributes (e.g. os.stat("/").st_mtime) but for
23883  backwards compatibility they also behave as a fixed-length sequence.
23884  Some platform-specific fields (e.g. st_rdev) are only accessible as
23885  attributes.
23886
23887- time: localtime(), gmtime() and strptime() now return a
23888  pseudo-sequence similar to the os.stat() return value, with
23889  attributes like tm_year etc.
23890
23891- Decompression objects in the zlib module now accept an optional
23892  second parameter to decompress() that specifies the maximum amount
23893  of memory to use for the uncompressed data.
23894
23895- optional SSL support in the socket module now exports OpenSSL
23896  functions RAND_add(), RAND_egd(), and RAND_status().  These calls
23897  are useful on platforms like Solaris where OpenSSL does not
23898  automatically seed its PRNG.  Also, the keyfile and certfile
23899  arguments to socket.ssl() are now optional.
23900
23901- posixmodule (and by extension, the os module on POSIX platforms) now
23902  exports O_LARGEFILE, O_DIRECT, O_DIRECTORY, and O_NOFOLLOW.
23903
23904Library
23905-------
23906
23907- doctest now excludes functions and classes not defined by the module
23908  being tested, thanks to Tim Hochberg.
23909
23910- HotShot, a new profiler implemented using a C-based callback, has
23911  been added.  This substantially reduces the overhead of profiling,
23912  but it is still quite preliminary.  Support modules and
23913  documentation will be added in upcoming releases (before 2.2 final).
23914
23915- profile now produces correct output in situations where an exception
23916  raised in Python is cleared by C code (e.g. hasattr()).  This used
23917  to cause wrong output, including spurious claims of recursive
23918  functions and attribution of time spent to the wrong function.
23919
23920  The code and documentation for the derived OldProfile and HotProfile
23921  profiling classes was removed.  The code hasn't worked for years (if
23922  you tried to use them, they raised exceptions).  OldProfile
23923  intended to reproduce the behavior of the profiler Python used more
23924  than 7 years ago, and isn't interesting anymore.  HotProfile intended
23925  to provide a faster profiler (but producing less information), and
23926  that's a worthy goal we intend to meet via a different approach (but
23927  without losing information).
23928
23929- Profile.calibrate() has a new implementation that should deliver
23930  a much better system-specific calibration constant.  The constant can
23931  now be specified in an instance constructor, or as a Profile class or
23932  instance variable, instead of by editing profile.py's source code.
23933  Calibration must still be done manually (see the docs for the profile
23934  module).
23935
23936  Note that Profile.calibrate() must be overridden by subclasses.
23937  Improving the accuracy required exploiting detailed knowledge of
23938  profiler internals; the earlier method abstracted away the details
23939  and measured a simplified model instead, but consequently computed
23940  a constant too small by a factor of 2 on some modern machines.
23941
23942- quopri's encode and decode methods take an optional header parameter,
23943  which indicates whether output is intended for the header 'Q'
23944  encoding.
23945
23946- The SocketServer.ThreadingMixIn class now closes the request after
23947  finish_request() returns.  (Not when it errors out though.)
23948
23949- The nntplib module's NNTP.body() method has grown a 'file' argument
23950  to allow saving the message body to a file.
23951
23952- The email package has added a class email.Parser.HeaderParser which
23953  only parses headers and does not recurse into the message's body.
23954  Also, the module/class MIMEAudio has been added for representing
23955  audio data (contributed by Anthony Baxter).
23956
23957- ftplib should be able to handle files > 2GB.
23958
23959- ConfigParser.getboolean() now also interprets TRUE, FALSE, YES, NO,
23960  ON, and OFF.
23961
23962- xml.dom.minidom NodeList objects now support the length attribute
23963  and item() method as required by the DOM specifications.
23964
23965Tools/Demos
23966-----------
23967
23968- Demo/dns was removed.  It no longer serves any purpose; a package
23969  derived from it is now maintained by Anthony Baxter, see
23970  http://PyDNS.SourceForge.net.
23971
23972- The freeze tool has been made more robust, and two new options have
23973  been added: -X and -E.
23974
23975Build
23976-----
23977
23978- configure will use CXX in LINKCC if CXX is used to build main() and
23979  the system requires to link a C++ main using the C++ compiler.
23980
23981C API
23982-----
23983
23984- The documentation for the tp_compare slot is updated to require that
23985  the return value must be -1, 0, 1; an arbitrary number <0 or >0 is
23986  not correct.  This is not yet enforced but will be enforced in
23987  Python 2.3; even later, we may use -2 to indicate errors and +2 for
23988  "NotImplemented".  Right now, -1 should be used for an error return.
23989
23990- PyLong_AsLongLong() now accepts int (as well as long) arguments.
23991  Consequently, PyArg_ParseTuple's 'L' code also accepts int (as well
23992  as long) arguments.
23993
23994- PyThread_start_new_thread() now returns a long int giving the thread
23995  ID, if one can be calculated; it returns -1 for error, 0 if no
23996  thread ID is calculated (this is an incompatible change, but only
23997  the thread module used this API).  This code has only really been
23998  tested on Linux and Windows; other platforms please beware (and
23999  report any bugs or strange behavior).
24000
24001- PyUnicode_FromEncodedObject() no longer accepts Unicode objects as
24002  input.
24003
24004New platforms
24005-------------
24006
24007Tests
24008-----
24009
24010Windows
24011-------
24012
24013- Installer:  If you install IDLE, and don't disable file-extension
24014  registration, a new "Edit with IDLE" context (right-click) menu entry
24015  is created for .py and .pyw files.
24016
24017- The signal module now supports SIGBREAK on Windows, thanks to Steven
24018  Scott.  Note that SIGBREAK is unique to Windows.  The default SIGBREAK
24019  action remains to call Win32 ExitProcess().  This can be changed via
24020  signal.signal().  For example::
24021
24022      # Make Ctrl+Break raise KeyboardInterrupt, like Python's default Ctrl+C
24023      # (SIGINT) behavior.
24024      import signal
24025      signal.signal(signal.SIGBREAK, signal.default_int_handler)
24026
24027      try:
24028          while 1:
24029              pass
24030      except KeyboardInterrupt:
24031          # We get here on Ctrl+C or Ctrl+Break now; if we had not changed
24032          # SIGBREAK, only on Ctrl+C (and Ctrl+Break would terminate the
24033          # program without the possibility for any Python-level cleanup).
24034          print "Clean exit"
24035
24036
24037What's New in Python 2.2a4?
24038===========================
24039
24040*Release date: 28-Sep-2001*
24041
24042Type/class unification and new-style classes
24043--------------------------------------------
24044
24045- pydoc and inspect are now aware of new-style classes;
24046  e.g. help(list) at the interactive prompt now shows proper
24047  documentation for all operations on list objects.
24048
24049- Applications using Jim Fulton's ExtensionClass module can now safely
24050  be used with Python 2.2.  In particular, Zope 2.4.1 now works with
24051  Python 2.2 (as well as with Python 2.1.1).  The Demo/metaclass
24052  examples also work again.  It is hoped that Gtk and Boost also work
24053  with 2.2a4 and beyond.  (If you can confirm this, please write
24054  webmaster@python.org; if there are still problems, please open a bug
24055  report on SourceForge.)
24056
24057- property() now takes 4 keyword arguments:  fget, fset, fdel and doc.
24058  These map to read-only attributes 'fget', 'fset', 'fdel', and '__doc__'
24059  in the constructed property object.  fget, fset and fdel weren't
24060  discoverable from Python in 2.2a3.  __doc__ is new, and allows
24061  associating a docstring with a property.
24062
24063- Comparison overloading is now more completely implemented.  For
24064  example, a str subclass instance can properly be compared to a str
24065  instance, and it can properly overload comparison.  Ditto for most
24066  other built-in object types.
24067
24068- The repr() of new-style classes has changed; instead of <type
24069  'M.Foo'> a new-style class is now rendered as <class 'M.Foo'>,
24070  *except* for built-in types, which are still rendered as <type
24071  'Foo'> (to avoid upsetting existing code that might parse or
24072  otherwise rely on repr() of certain type objects).
24073
24074- The repr() of new-style objects is now always <Foo object at XXX>;
24075  previously, it was sometimes <Foo instance at XXX>.
24076
24077- For new-style classes, what was previously called __getattr__ is now
24078  called __getattribute__.  This method, if defined, is called for
24079  *every* attribute access.  A new __getattr__ hook more similar to the
24080  one in classic classes is defined which is called only if regular
24081  attribute access raises AttributeError; to catch *all* attribute
24082  access, you can use __getattribute__ (for new-style classes).  If
24083  both are defined, __getattribute__ is called first, and if it raises
24084  AttributeError, __getattr__ is called.
24085
24086- The __class__ attribute of new-style objects can be assigned to.
24087  The new class must have the same C-level object layout as the old
24088  class.
24089
24090- The built-in file type can be subclassed now.  In the usual pattern,
24091  "file" is the name of the built-in type, and file() is a new built-in
24092  constructor, with the same signature as the built-in open() function.
24093  file() is now the preferred way to open a file.
24094
24095- Previously, __new__ would only see sequential arguments passed to
24096  the type in a constructor call; __init__ would see both sequential
24097  and keyword arguments.  This made no sense whatsoever any more, so
24098  now both __new__ and __init__ see all arguments.
24099
24100- Previously, hash() applied to an instance of a subclass of str or
24101  unicode always returned 0.  This has been repaired.
24102
24103- Previously, an operation on an instance of a subclass of an
24104  immutable type (int, long, float, complex, tuple, str, unicode),
24105  where the subtype didn't override the operation (and so the
24106  operation was handled by the built-in type), could return that
24107  instance instead a value of the base type.  For example, if s was of
24108  a str subclass type, s[:] returned s as-is.  Now it returns a str
24109  with the same value as s.
24110
24111- Provisional support for pickling new-style objects has been added.
24112
24113Core
24114----
24115
24116- file.writelines() now accepts any iterable object producing strings.
24117
24118- PyUnicode_FromEncodedObject() now works very much like
24119  PyObject_Str(obj) in that it tries to use __str__/tp_str
24120  on the object if the object is not a string or buffer. This
24121  makes unicode() behave like str() when applied to non-string/buffer
24122  objects.
24123
24124- PyFile_WriteObject now passes Unicode objects to the file's write
24125  method. As a result, all file-like objects which may be the target
24126  of a print statement must support Unicode objects, i.e. they must
24127  at least convert them into ASCII strings.
24128
24129- Thread scheduling on Solaris should be improved; it is no longer
24130  necessary to insert a small sleep at the start of a thread in order
24131  to let other runnable threads be scheduled.
24132
24133Library
24134-------
24135
24136- StringIO.StringIO instances and cStringIO.StringIO instances support
24137  read character buffer compatible objects for their .write() methods.
24138  These objects are converted to strings and then handled as such
24139  by the instances.
24140
24141- The "email" package has been added.  This is basically a port of the
24142  mimelib package <http://sf.net/projects/mimelib> with API changes
24143  and some implementations updated to use iterators and generators.
24144
24145- difflib.ndiff() and difflib.Differ.compare() are generators now.  This
24146  restores the ability of Tools/scripts/ndiff.py to start producing output
24147  before the entire comparison is complete.
24148
24149- StringIO.StringIO instances and cStringIO.StringIO instances support
24150  iteration just like file objects (i.e. their .readline() method is
24151  called for each iteration until it returns an empty string).
24152
24153- The codecs module has grown four new helper APIs to access
24154  built-in codecs: getencoder(), getdecoder(), getreader(),
24155  getwriter().
24156
24157- SimpleXMLRPCServer: a new module (based upon SimpleHTMLServer)
24158  simplifies writing XML RPC servers.
24159
24160- os.path.realpath(): a new function that returns the absolute pathname
24161  after interpretation of symbolic links.  On non-Unix systems, this
24162  is an alias for os.path.abspath().
24163
24164- operator.indexOf() (PySequence_Index() in the C API) now works with any
24165  iterable object.
24166
24167- smtplib now supports various authentication and security features of
24168  the SMTP protocol through the new login() and starttls() methods.
24169
24170- hmac: a new module implementing keyed hashing for message
24171  authentication.
24172
24173- mimetypes now recognizes more extensions and file types.  At the
24174  same time, some mappings not sanctioned by IANA were removed.
24175
24176- The "compiler" package has been brought up to date to the state of
24177  Python 2.2 bytecode generation.  It has also been promoted from a
24178  Tool to a standard library package.  (Tools/compiler still exists as
24179  a sample driver.)
24180
24181Build
24182-----
24183
24184- Large file support (LFS) is now automatic when the platform supports
24185  it; no more manual configuration tweaks are needed.  On Linux, at
24186  least, it's possible to have a system whose C library supports large
24187  files but whose kernel doesn't; in this case, large file support is
24188  still enabled but doesn't do you any good unless you upgrade your
24189  kernel or share your Python executable with another system whose
24190  kernel has large file support.
24191
24192- The configure script now supplies plausible defaults in a
24193  cross-compilation environment.  This doesn't mean that the supplied
24194  values are always correct, or that cross-compilation now works
24195  flawlessly -- but it's a first step (and it shuts up most of
24196  autoconf's warnings about AC_TRY_RUN).
24197
24198- The Unix build is now a bit less chatty, courtesy of the parser
24199  generator.  The build is completely silent (except for errors) when
24200  using "make -s", thanks to a -q option to setup.py.
24201
24202C API
24203-----
24204
24205- The "structmember" API now supports some new flag bits to deny read
24206  and/or write access to attributes in restricted execution mode.
24207
24208New platforms
24209-------------
24210
24211- Compaq's iPAQ handheld, running the "familiar" Linux distribution
24212  (http://familiar.handhelds.org).
24213
24214Tests
24215-----
24216
24217- The "classic" standard tests, which work by comparing stdout to
24218  an expected-output file under Lib/test/output/, no longer stop at
24219  the first mismatch.  Instead the test is run to completion, and a
24220  variant of ndiff-style comparison is used to report all differences.
24221  This is much easier to understand than the previous style of reporting.
24222
24223- The unittest-based standard tests now use regrtest's test_main()
24224  convention, instead of running as a side-effect of merely being
24225  imported.  This allows these tests to be run in more natural and
24226  flexible ways as unittests, outside the regrtest framework.
24227
24228- regrtest.py is much better integrated with unittest and doctest now,
24229  especially in regard to reporting errors.
24230
24231Windows
24232-------
24233
24234- Large file support now also works for files > 4GB, on filesystems
24235  that support it (NTFS under Windows 2000).  See "What's New in
24236  Python 2.2a3" for more detail.
24237
24238
24239What's New in Python 2.2a3?
24240===========================
24241
24242*Release Date: 07-Sep-2001*
24243
24244Core
24245----
24246
24247- Conversion of long to float now raises OverflowError if the long is too
24248  big to represent as a C double.
24249
24250- The 3-argument builtin pow() no longer allows a third non-None argument
24251  if either of the first two arguments is a float, or if both are of
24252  integer types and the second argument is negative (in which latter case
24253  the arguments are converted to float, so this is really the same
24254  restriction).
24255
24256- The builtin dir() now returns more information, and sometimes much
24257  more, generally naming all attributes of an object, and all attributes
24258  reachable from the object via its class, and from its class's base
24259  classes, and so on from them too.  Example:  in 2.2a2, dir([]) returned
24260  an empty list.  In 2.2a3,
24261
24262  >>> dir([])
24263  ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__',
24264   '__eq__', '__ge__', '__getattr__', '__getitem__', '__getslice__',
24265   '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__le__',
24266   '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__repr__',
24267   '__rmul__', '__setattr__', '__setitem__', '__setslice__', '__str__',
24268   'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove',
24269   'reverse', 'sort']
24270
24271  dir(module) continues to return only the module's attributes, though.
24272
24273- Overflowing operations on plain ints now return a long int rather
24274  than raising OverflowError.  This is a partial implementation of PEP
24275  237.  You can use -Wdefault::OverflowWarning to enable a warning for
24276  this situation, and -Werror::OverflowWarning to revert to the old
24277  OverflowError exception.
24278
24279- A new command line option, -Q<arg>, is added to control run-time
24280  warnings for the use of classic division.  (See PEP 238.)  Possible
24281  values are -Qold, -Qwarn, -Qwarnall, and -Qnew.  The default is
24282  -Qold, meaning the / operator has its classic meaning and no
24283  warnings are issued.  Using -Qwarn issues a run-time warning about
24284  all uses of classic division for int and long arguments; -Qwarnall
24285  also warns about classic division for float and complex arguments
24286  (for use with fixdiv.py).
24287  [Note:  the remainder of this item (preserved below) became
24288  obsolete in 2.2c1 -- -Qnew has global effect in 2.2] ::
24289
24290    Using -Qnew is questionable; it turns on new division by default, but
24291    only in the __main__ module.  You can usefully combine -Qwarn or
24292    -Qwarnall and -Qnew: this gives the __main__ module new division, and
24293    warns about classic division everywhere else.
24294
24295- Many built-in types can now be subclassed.  This applies to int,
24296  long, float, str, unicode, and tuple.  (The types complex, list and
24297  dictionary can also be subclassed; this was introduced earlier.)
24298  Note that restrictions apply when subclassing immutable built-in
24299  types: you can only affect the value of the instance by overloading
24300  __new__.  You can add mutable attributes, and the subclass instances
24301  will have a __dict__ attribute, but you cannot change the "value"
24302  (as implemented by the base class) of an immutable subclass instance
24303  once it is created.
24304
24305- The dictionary constructor now takes an optional argument, a
24306  mapping-like object, and initializes the dictionary from its
24307  (key, value) pairs.
24308
24309- A new built-in type, super, has been added.  This facilitates making
24310  "cooperative super calls" in a multiple inheritance setting.  For an
24311  explanation, see http://www.python.org/2.2/descrintro.html#cooperation
24312
24313- A new built-in type, property, has been added.  This enables the
24314  creation of "properties".  These are attributes implemented by
24315  getter and setter functions (or only one of these for read-only or
24316  write-only attributes), without the need to override __getattr__.
24317  See http://www.python.org/2.2/descrintro.html#property
24318
24319- The syntax of floating-point and imaginary literals has been
24320  liberalized, to allow leading zeroes.  Examples of literals now
24321  legal that were SyntaxErrors before:
24322
24323      00.0    0e3   0100j   07.5   00000000000000000008.
24324
24325- An old tokenizer bug allowed floating point literals with an incomplete
24326  exponent, such as 1e and 3.1e-.  Such literals now raise SyntaxError.
24327
24328Library
24329-------
24330
24331- telnetlib includes symbolic names for the options, and support for
24332  setting an option negotiation callback. It also supports processing
24333  of suboptions.
24334
24335- The new C standard no longer requires that math libraries set errno to
24336  ERANGE on overflow.  For platform libraries that exploit this new
24337  freedom, Python's overflow-checking was wholly broken.  A new overflow-
24338  checking scheme attempts to repair that, but may not be reliable on all
24339  platforms (C doesn't seem to provide anything both useful and portable
24340  in this area anymore).
24341
24342- Asynchronous timeout actions are available through the new class
24343  threading.Timer.
24344
24345- math.log and math.log10 now return sensible results for even huge
24346  long arguments.  For example, math.log10(10 ** 10000) ~= 10000.0.
24347
24348- A new function, imp.lock_held(), returns 1 when the import lock is
24349  currently held.  See the docs for the imp module.
24350
24351- pickle, cPickle and marshal on 32-bit platforms can now correctly read
24352  dumps containing ints written on platforms where Python ints are 8 bytes.
24353  When read on a box where Python ints are 4 bytes, such values are
24354  converted to Python longs.
24355
24356- In restricted execution mode (using the rexec module), unmarshalling
24357  code objects is no longer allowed.  This plugs a security hole.
24358
24359- unittest.TestResult instances no longer store references to tracebacks
24360  generated by test failures. This prevents unexpected dangling references
24361  to objects that should be garbage collected between tests.
24362
24363Tools
24364-----
24365
24366- Tools/scripts/fixdiv.py has been added which can be used to fix
24367  division operators as per PEP 238.
24368
24369Build
24370-----
24371
24372- If you are an adventurous person using Mac OS X you may want to look at
24373  Mac/OSX. There is a Makefile there that will build Python as a real Mac
24374  application, which can be used for experimenting with Carbon or Cocoa.
24375  Discussion of this on pythonmac-sig, please.
24376
24377C API
24378-----
24379
24380- New function PyObject_Dir(obj), like Python __builtin__.dir(obj).
24381
24382- Note that PyLong_AsDouble can fail!  This has always been true, but no
24383  callers checked for it.  It's more likely to fail now, because overflow
24384  errors are properly detected now.  The proper way to check::
24385
24386      double x = PyLong_AsDouble(some_long_object);
24387      if (x == -1.0 && PyErr_Occurred()) {
24388              /* The conversion failed. */
24389      }
24390
24391- The GC API has been changed.  Extensions that use the old API will still
24392  compile but will not participate in GC.  To upgrade an extension
24393  module:
24394
24395    - rename Py_TPFLAGS_GC to PyTPFLAGS_HAVE_GC
24396
24397    - use PyObject_GC_New or PyObject_GC_NewVar to allocate objects and
24398      PyObject_GC_Del to deallocate them
24399
24400    - rename PyObject_GC_Init to PyObject_GC_Track and PyObject_GC_Fini
24401      to PyObject_GC_UnTrack
24402
24403    - remove PyGC_HEAD_SIZE from object size calculations
24404
24405    - remove calls to PyObject_AS_GC and PyObject_FROM_GC
24406
24407- Two new functions: PyString_FromFormat() and PyString_FromFormatV().
24408  These can be used safely to construct string objects from a
24409  sprintf-style format string (similar to the format string supported
24410  by PyErr_Format()).
24411
24412New platforms
24413-------------
24414
24415- Stephen Hansen contributed patches sufficient to get a clean compile
24416  under Borland C (Windows), but he reports problems running it and ran
24417  out of time to complete the port.  Volunteers?  Expect a MemoryError
24418  when importing the types module; this is probably shallow, and
24419  causing later failures too.
24420
24421Tests
24422-----
24423
24424Windows
24425-------
24426
24427- Large file support is now enabled on Win32 platforms as well as on
24428  Win64.  This means that, for example, you can use f.tell() and f.seek()
24429  to manipulate files larger than 2 gigabytes (provided you have enough
24430  disk space, and are using a Windows filesystem that supports large
24431  partitions).  Windows filesystem limits:  FAT has a 2GB (gigabyte)
24432  filesize limit, and large file support makes no difference there.
24433  FAT32's limit is 4GB, and files >= 2GB are easier to use from Python now.
24434  NTFS has no practical limit on file size, and files of any size can be
24435  used from Python now.
24436
24437- The w9xpopen hack is now used on Windows NT and 2000 too when COMPSPEC
24438  points to command.com (patch from Brian Quinlan).
24439
24440
24441What's New in Python 2.2a2?
24442===========================
24443
24444*Release Date: 22-Aug-2001*
24445
24446Build
24447-----
24448
24449- Tim Peters developed a brand new Windows installer using Wise 8.1,
24450  generously donated to us by Wise Solutions.
24451
24452- configure supports a new option --enable-unicode, with the values
24453  ucs2 and ucs4 (new in 2.2a1). With --disable-unicode, the Unicode
24454  type and supporting code is completely removed from the interpreter.
24455
24456- A new configure option --enable-framework builds a Mac OS X framework,
24457  which "make frameworkinstall" will install. This provides a starting
24458  point for more mac-like functionality, join pythonmac-sig@python.org
24459  if you are interested in helping.
24460
24461- The NeXT platform is no longer supported.
24462
24463- The 'new' module is now statically linked.
24464
24465Tools
24466-----
24467
24468- The new Tools/scripts/cleanfuture.py can be used to automatically
24469  edit out obsolete future statements from Python source code.  See
24470  the module docstring for details.
24471
24472Tests
24473-----
24474
24475- regrtest.py now knows which tests are expected to be skipped on some
24476  platforms, allowing clearer test result output to be given.  regrtest
24477  also has optional --use/-u switch to run normally disabled tests
24478  which require network access or consume significant disk resources.
24479
24480- Several new tests in the standard test suite, with special thanks to
24481  Nick Mathewson.
24482
24483Core
24484----
24485
24486- The floor division operator // has been added as outlined in PEP
24487  238.  The / operator still provides classic division (and will until
24488  Python 3.0) unless "from __future__ import division" is included, in
24489  which case the / operator will provide true division.  The operator
24490  module provides truediv() and floordiv() functions.  Augmented
24491  assignment variants are included, as are the equivalent overloadable
24492  methods and C API methods.  See the PEP for a full discussion:
24493  <http://python.sf.net/peps/pep-0238.html>
24494
24495- Future statements are now effective in simulated interactive shells
24496  (like IDLE).  This should "just work" by magic, but read Michael
24497  Hudson's "Future statements in simulated shells" PEP 264 for full
24498  details:  <http://python.sf.net/peps/pep-0264.html>.
24499
24500- The type/class unification (PEP 252-253) was integrated into the
24501  trunk and is not so tentative any more (the exact specification of
24502  some features is still tentative).  A lot of work has done on fixing
24503  bugs and adding robustness and features (performance still has to
24504  come a long way).
24505
24506- Warnings about a mismatch in the Python API during extension import
24507  now use the Python warning framework (which makes it possible to
24508  write filters for these warnings).
24509
24510- A function's __dict__ (aka func_dict) will now always be a
24511  dictionary.  It used to be possible to delete it or set it to None,
24512  but now both actions raise TypeErrors.  It is still legal to set it
24513  to a dictionary object.  Getting func.__dict__ before any attributes
24514  have been assigned now returns an empty dictionary instead of None.
24515
24516- A new command line option, -E, was added which disables the use of
24517  all environment variables, or at least those that are specifically
24518  significant to Python.  Usually those have a name starting with
24519  "PYTHON".  This was used to fix a problem where the tests fail if
24520  the user happens to have PYTHONHOME or PYTHONPATH pointing to an
24521  older distribution.
24522
24523Library
24524-------
24525
24526- New class Differ and new functions ndiff() and restore() in difflib.py.
24527  These package the algorithms used by the popular Tools/scripts/ndiff.py,
24528  for programmatic reuse.
24529
24530- New function xml.sax.saxutils.quoteattr():  Quote an XML attribute
24531  value using the minimal quoting required for the value; more
24532  reliable than using xml.sax.saxutils.escape() for attribute values.
24533
24534- Readline completion support for cmd.Cmd was added.
24535
24536- Calling os.tempnam() or os.tmpnam() generate RuntimeWarnings.
24537
24538- Added function threading.BoundedSemaphore()
24539
24540- Added Ka-Ping Yee's cgitb.py module.
24541
24542- The 'new' module now exposes the CO_xxx flags.
24543
24544- The gc module offers the get_referents function.
24545
24546New platforms
24547-------------
24548
24549C API
24550-----
24551
24552- Two new APIs PyOS_snprintf() and PyOS_vsnprintf() were added
24553  which provide a cross-platform implementations for the
24554  relatively new snprintf()/vsnprintf() C lib APIs. In contrast to
24555  the standard sprintf() and vsprintf() C lib APIs, these versions
24556  apply bounds checking on the used buffer which enhances protection
24557  against buffer overruns.
24558
24559- Unicode APIs now use name mangling to assure that mixing interpreters
24560  and extensions using different Unicode widths is rendered next to
24561  impossible. Trying to import an incompatible Unicode-aware extension
24562  will result in an ImportError.  Unicode extensions writers must make
24563  sure to check the Unicode width compatibility in their extensions by
24564  using at least one of the mangled Unicode APIs in the extension.
24565
24566- Two new flags METH_NOARGS and METH_O are available in method definition
24567  tables to simplify implementation of methods with no arguments and a
24568  single untyped argument. Calling such methods is more efficient than
24569  calling corresponding METH_VARARGS methods. METH_OLDARGS is now
24570  deprecated.
24571
24572Windows
24573-------
24574
24575- "import module" now compiles module.pyw if it exists and nothing else
24576  relevant is found.
24577
24578
24579What's New in Python 2.2a1?
24580===========================
24581
24582*Release date: 18-Jul-2001*
24583
24584Core
24585----
24586
24587- TENTATIVELY, a large amount of code implementing much of what's
24588  described in PEP 252 (Making Types Look More Like Classes) and PEP
24589  253 (Subtyping Built-in Types) was added.  This will be released
24590  with Python 2.2a1.  Documentation will be provided separately
24591  through http://www.python.org/2.2/.  The purpose of releasing this
24592  with Python 2.2a1 is to test backwards compatibility.  It is
24593  possible, though not likely, that a decision is made not to release
24594  this code as part of 2.2 final, if any serious backwards
24595  incompatibilities are found during alpha testing that cannot be
24596  repaired.
24597
24598- Generators were added; this is a new way to create an iterator (see
24599  below) using what looks like a simple function containing one or
24600  more 'yield' statements.  See PEP 255.  Since this adds a new
24601  keyword to the language, this feature must be enabled by including a
24602  future statement: "from __future__ import generators" (see PEP 236).
24603  Generators will become a standard feature in a future release
24604  (probably 2.3).  Without this future statement, 'yield' remains an
24605  ordinary identifier, but a warning is issued each time it is used.
24606  (These warnings currently don't conform to the warnings framework of
24607  PEP 230; we intend to fix this in 2.2a2.)
24608
24609- The UTF-16 codec was modified to be more RFC compliant. It will now
24610  only remove BOM characters at the start of the string and then
24611  only if running in native mode (UTF-16-LE and -BE won't remove a
24612  leading BMO character).
24613
24614- Strings now have a new method .decode() to complement the already
24615  existing .encode() method. These two methods provide direct access
24616  to the corresponding decoders and encoders of the registered codecs.
24617
24618  To enhance the usability of the .encode() method, the special
24619  casing of Unicode object return values was dropped (Unicode objects
24620  were auto-magically converted to string using the default encoding).
24621
24622  Both methods will now return whatever the codec in charge of the
24623  requested encoding returns as object, e.g. Unicode codecs will
24624  return Unicode objects when decoding is requested ("äöü".decode("latin-1")
24625  will return u"äöü"). This enables codec writer to create codecs
24626  for various simple to use conversions.
24627
24628  New codecs were added to demonstrate these new features (the .encode()
24629  and .decode() columns indicate the type of the returned objects):
24630
24631  +---------+-----------+-----------+-----------------------------+
24632  |Name     | .encode() | .decode() | Description                 |
24633  +=========+===========+===========+=============================+
24634  |uu       | string    | string    | UU codec (e.g. for email)   |
24635  +---------+-----------+-----------+-----------------------------+
24636  |base64   | string    | string    | base64 codec                |
24637  +---------+-----------+-----------+-----------------------------+
24638  |quopri   | string    | string    | quoted-printable codec      |
24639  +---------+-----------+-----------+-----------------------------+
24640  |zlib     | string    | string    | zlib compression            |
24641  +---------+-----------+-----------+-----------------------------+
24642  |hex      | string    | string    | 2-byte hex codec            |
24643  +---------+-----------+-----------+-----------------------------+
24644  |rot-13   | string    | Unicode   | ROT-13 Unicode charmap codec|
24645  +---------+-----------+-----------+-----------------------------+
24646
24647- Some operating systems now support the concept of a default Unicode
24648  encoding for file system operations.  Notably, Windows supports 'mbcs'
24649  as the default.  The Macintosh will also adopt this concept in the medium
24650  term, although the default encoding for that platform will be other than
24651  'mbcs'.
24652
24653  On operating system that support non-ASCII filenames, it is common for
24654  functions that return filenames (such as os.listdir()) to return Python
24655  string objects pre-encoded using the default file system encoding for
24656  the platform.  As this encoding is likely to be different from Python's
24657  default encoding, converting this name to a Unicode object before passing
24658  it back to the Operating System would result in a Unicode error, as Python
24659  would attempt to use its default encoding (generally ASCII) rather than
24660  the default encoding for the file system.
24661
24662  In general, this change simply removes surprises when working with
24663  Unicode and the file system, making these operations work as you expect,
24664  increasing the transparency of Unicode objects in this context.
24665  See [????] for more details, including examples.
24666
24667- Float (and complex) literals in source code were evaluated to full
24668  precision only when running from a .py file; the same code loaded from a
24669  .pyc (or .pyo) file could suffer numeric differences starting at about the
24670  12th significant decimal digit.  For example, on a machine with IEEE-754
24671  floating arithmetic,
24672
24673      x = 9007199254740992.0
24674      print long(x)
24675
24676  printed 9007199254740992 if run directly from .py, but 9007199254740000
24677  if from a compiled (.pyc or .pyo) file.  This was due to marshal using
24678  str(float) instead of repr(float) when building code objects.  marshal
24679  now uses repr(float) instead, which should reproduce floats to full
24680  machine precision (assuming the platform C float<->string I/O conversion
24681  functions are of good quality).
24682
24683  This may cause floating-point results to change in some cases, and
24684  usually for the better, but may also cause numerically unstable
24685  algorithms to break.
24686
24687- The implementation of dicts suffers fewer collisions, which has speed
24688  benefits.  However, the order in which dict entries appear in dict.keys(),
24689  dict.values() and dict.items() may differ from previous releases for a
24690  given dict.  Nothing is defined about this order, so no program should
24691  rely on it.  Nevertheless, it's easy to write test cases that rely on the
24692  order by accident, typically because of printing the str() or repr() of a
24693  dict to an "expected results" file.  See Lib/test/test_support.py's new
24694  sortdict(dict) function for a simple way to display a dict in sorted
24695  order.
24696
24697- Many other small changes to dicts were made, resulting in faster
24698  operation along the most common code paths.
24699
24700- Dictionary objects now support the "in" operator: "x in dict" means
24701  the same as dict.has_key(x).
24702
24703- The update() method of dictionaries now accepts generic mapping
24704  objects.  Specifically the argument object must support the .keys()
24705  and __getitem__() methods.  This allows you to say, for example,
24706  {}.update(UserDict())
24707
24708- Iterators were added; this is a generalized way of providing values
24709  to a for loop.  See PEP 234.  There's a new built-in function iter()
24710  to return an iterator.  There's a new protocol to get the next value
24711  from an iterator using the next() method (in Python) or the
24712  tp_iternext slot (in C).  There's a new protocol to get iterators
24713  using the __iter__() method (in Python) or the tp_iter slot (in C).
24714  Iterating (i.e. a for loop) over a dictionary generates its keys.
24715  Iterating over a file generates its lines.
24716
24717- The following functions were generalized to work nicely with iterator
24718  arguments::
24719
24720    map(), filter(), reduce(), zip()
24721    list(), tuple() (PySequence_Tuple() and PySequence_Fast() in C API)
24722    max(), min()
24723    join() method of strings
24724    extend() method of lists
24725    'x in y' and 'x not in y' (PySequence_Contains() in C API)
24726    operator.countOf() (PySequence_Count() in C API)
24727    right-hand side of assignment statements with multiple targets, such as ::
24728        x, y, z = some_iterable_object_returning_exactly_3_values
24729
24730- Accessing module attributes is significantly faster (for example,
24731  random.random or os.path or yourPythonModule.yourAttribute).
24732
24733- Comparing dictionary objects via == and != is faster, and now works even
24734  if the keys and values don't support comparisons other than ==.
24735
24736- Comparing dictionaries in ways other than == and != is slower:  there were
24737  insecurities in the dict comparison implementation that could cause Python
24738  to crash if the element comparison routines for the dict keys and/or
24739  values mutated the dicts.  Making the code bulletproof slowed it down.
24740
24741- Collisions in dicts are resolved via a new approach, which can help
24742  dramatically in bad cases.  For example, looking up every key in a dict
24743  d with d.keys() == [i << 16 for i in range(20000)] is approximately 500x
24744  faster now.  Thanks to Christian Tismer for pointing out the cause and
24745  the nature of an effective cure (last December! better late than never).
24746
24747- repr() is much faster for large containers (dict, list, tuple).
24748
24749
24750Library
24751-------
24752
24753- The constants ascii_letters, ascii_lowercase. and ascii_uppercase
24754  were added to the string module.  These a locale-independent
24755  constants, unlike letters, lowercase, and uppercase.  These are now
24756  use in appropriate locations in the standard library.
24757
24758- The flags used in dlopen calls can now be configured using
24759  sys.setdlopenflags and queried using sys.getdlopenflags.
24760
24761- Fredrik Lundh's xmlrpclib is now a standard library module.  This
24762  provides full client-side XML-RPC support.  In addition,
24763  Demo/xmlrpc/ contains two server frameworks (one SocketServer-based,
24764  one asyncore-based).  Thanks to Eric Raymond for the documentation.
24765
24766- The xrange() object is simplified: it no longer supports slicing,
24767  repetition, comparisons, efficient 'in' checking, the tolist()
24768  method, or the start, stop and step attributes.  See PEP 260.
24769
24770- A new function fnmatch.filter to filter lists of file names was added.
24771
24772- calendar.py uses month and day names based on the current locale.
24773
24774- strop is now *really* obsolete (this was announced before with 1.6),
24775  and issues DeprecationWarning when used (except for the four items
24776  that are still imported into string.py).
24777
24778- Cookie.py now sorts key+value pairs by key in output strings.
24779
24780- pprint.isrecursive(object) didn't correctly identify recursive objects.
24781  Now it does.
24782
24783- pprint functions now much faster for large containers (tuple, list, dict).
24784
24785- New 'q' and 'Q' format codes in the struct module, corresponding to C
24786  types "long long" and "unsigned long long" (on Windows, __int64).  In
24787  native mode, these can be used only when the platform C compiler supports
24788  these types (when HAVE_LONG_LONG is #define'd by the Python config
24789  process), and then they inherit the sizes and alignments of the C types.
24790  In standard mode, 'q' and 'Q' are supported on all platforms, and are
24791  8-byte integral types.
24792
24793- The site module installs a new built-in function 'help' that invokes
24794  pydoc.help.  It must be invoked as 'help()'; when invoked as 'help',
24795  it displays a message reminding the user to use 'help()' or
24796  'help(object)'.
24797
24798Tests
24799-----
24800
24801- New test_mutants.py runs dict comparisons where the key and value
24802  comparison operators mutate the dicts randomly during comparison.  This
24803  rapidly causes Python to crash under earlier releases (not for the faint
24804  of heart:  it can also cause Win9x to freeze or reboot!).
24805
24806- New test_pprint.py verifies that pprint.isrecursive() and
24807  pprint.isreadable() return sensible results.  Also verifies that simple
24808  cases produce correct output.
24809
24810C API
24811-----
24812
24813- Removed the unused last_is_sticky argument from the internal
24814  _PyTuple_Resize().  If this affects you, you were cheating.
24815
24816What's New in Python 2.1 (final)?
24817=================================
24818
24819We only changed a few things since the last release candidate, all in
24820Python library code:
24821
24822- A bug in the locale module was fixed that affected locales which
24823  define no grouping for numeric formatting.
24824
24825- A few bugs in the weakref module's implementations of weak
24826  dictionaries (WeakValueDictionary and WeakKeyDictionary) were fixed,
24827  and the test suite was updated to check for these bugs.
24828
24829- An old bug in the os.path.walk() function (introduced in Python
24830  2.0!) was fixed: a non-existent file would cause an exception
24831  instead of being ignored.
24832
24833- Fixed a few bugs in the new symtable module found by Neil Norwitz's
24834  PyChecker.
24835
24836
24837What's New in Python 2.1c2?
24838===========================
24839
24840A flurry of small changes, and one showstopper fixed in the nick of
24841time made it necessary to release another release candidate.  The list
24842here is the *complete* list of patches (except version updates):
24843
24844Core
24845
24846- Tim discovered a nasty bug in the dictionary code, caused by
24847  PyDict_Next() calling dict_resize(), and the GC code's use of
24848  PyDict_Next() violating an assumption in dict_items().  This was
24849  fixed with considerable amounts of band-aid, but the net effect is a
24850  saner and more robust implementation.
24851
24852- Made a bunch of symbols static that were accidentally global.
24853
24854Build and Ports
24855
24856- The setup.py script didn't check for a new enough version of zlib
24857  (1.1.3 is needed).  Now it does.
24858
24859- Changed "make clean" target to also remove shared libraries.
24860
24861- Added a more general warning about the SGI Irix optimizer to README.
24862
24863Library
24864
24865- Fix a bug in urllib.basejoin("http://host", "../file.html") which
24866  omitted the slash between host and file.html.
24867
24868- The mailbox module's _Mailbox class contained a completely broken
24869  and undocumented seek() method.  Ripped it out.
24870
24871- Fixed a bunch of typos in various library modules (urllib2, smtpd,
24872  sgmllib, netrc, chunk) found by Neil Norwitz's PyChecker.
24873
24874- Fixed a few last-minute bugs in unittest.
24875
24876Extensions
24877
24878- Reverted the patch to the OpenSSL code in socketmodule.c to support
24879  RAND_status() and the EGD, and the subsequent patch that tried to
24880  fix it for pre-0.9.5 versions; the problem with the patch is that on
24881  some systems it issues a warning whenever socket is imported, and
24882  that's unacceptable.
24883
24884Tests
24885
24886- Fixed the pickle tests to work with "import test.test_pickle".
24887
24888- Tweaked test_locale.py to actually run the test Windows.
24889
24890- In distutils/archive_util.py, call zipfile.ZipFile() with mode "w",
24891  not "wb" (which is not a valid mode at all).
24892
24893- Fix pstats browser crashes.  Import readline if it exists to make
24894  the user interface nicer.
24895
24896- Add "import thread" to the top of test modules that import the
24897  threading module (test_asynchat and test_threadedtempfile).  This
24898  prevents test failures caused by a broken threading module resulting
24899  from a previously caught failed import.
24900
24901- Changed test_asynchat.py to set the SO_REUSEADDR option; this was
24902  needed on some platforms (e.g. Solaris 8) when the tests are run
24903  twice in succession.
24904
24905- Skip rather than fail test_sunaudiodev if no audio device is found.
24906
24907
24908What's New in Python 2.1c1?
24909===========================
24910
24911This list was significantly updated when 2.1c2 was released; the 2.1c1
24912release didn't mention most changes that were actually part of 2.1c1:
24913
24914Legal
24915
24916- Copyright was assigned to the Python Software Foundation (PSF) and a
24917  PSF license (very similar to the CNRI license) was added.
24918
24919- The CNRI copyright notice was updated to include 2001.
24920
24921Core
24922
24923- After a public outcry, assignment to __debug__ is no longer illegal;
24924  instead, a warning is issued.  It will become illegal in 2.2.
24925
24926- Fixed a core dump with "%#x" % 0, and changed the semantics so that
24927  "%#x" now always prepends "0x", even if the value is zero.
24928
24929- Fixed some nits in the bytecode compiler.
24930
24931- Fixed core dumps when calling certain kinds of non-functions.
24932
24933- Fixed various core dumps caused by reference count bugs.
24934
24935Build and Ports
24936
24937- Use INSTALL_SCRIPT to install script files.
24938
24939- New port: SCO Unixware 7, by Billy G. Allie.
24940
24941- Updated RISCOS port.
24942
24943- Updated BeOS port and notes.
24944
24945- Various other porting problems resolved.
24946
24947Library
24948
24949- The TERMIOS and SOCKET modules are now truly obsolete and
24950  unnecessary.  Their symbols are incorporated in the termios and
24951  socket modules.
24952
24953- Fixed some 64-bit bugs in pickle, cPickle, and struct, and added
24954  better tests for pickling.
24955
24956- threading: make Condition.wait() robust against KeyboardInterrupt.
24957
24958- zipfile: add support to zipfile to support opening an archive
24959  represented by an open file rather than a file name.  Fix bug where
24960  the archive was not properly closed.  Fixed a bug in this bugfix
24961  where flush() was called for a read-only file.
24962
24963- imputil: added an uninstall() method to the ImportManager.
24964
24965- Canvas: fixed bugs in lower() and tkraise() methods.
24966
24967- SocketServer: API change (added overridable close_request() method)
24968  so that the TCP server can explicitly close the request.
24969
24970- pstats: Eric Raymond added a simple interactive statistics browser,
24971  invoked when the module is run as a script.
24972
24973- locale: fixed a problem in format().
24974
24975- webbrowser: made it work when the BROWSER environment variable has a
24976  value like "/usr/bin/netscape".  Made it auto-detect Konqueror for
24977  KDE 2.  Fixed some other nits.
24978
24979- unittest: changes to allow using a different exception than
24980  AssertionError, and added a few more function aliases.  Some other
24981  small changes.
24982
24983- urllib, urllib2: fixed redirect problems and a coupleof other nits.
24984
24985- asynchat: fixed a critical bug in asynchat that slipped through the
24986  2.1b2 release.  Fixed another rare bug.
24987
24988- Fix some unqualified except: clauses (always a bad code example).
24989
24990XML
24991
24992- pyexpat: new API get_version_string().
24993
24994- Fixed some minidom bugs.
24995
24996Extensions
24997
24998- Fixed a core dump in _weakref.  Removed the weakref.mapping()
24999  function (it adds nothing to the API).
25000
25001- Rationalized the use of header files in the readline module, to make
25002  it compile (albeit with some warnings) with the very recent readline
25003  4.2, without breaking for earlier versions.
25004
25005- Hopefully fixed a buffering problem in linuxaudiodev.
25006
25007- Attempted a fix to make the OpenSSL support in the socket module
25008  work again with pre-0.9.5 versions of OpenSSL.
25009
25010Tests
25011
25012- Added a test case for asynchat and asyncore.
25013
25014- Removed coupling between tests where one test failing could break
25015  another.
25016
25017Tools
25018
25019- Ping added an interactive help browser to pydoc, fixed some nits
25020  in the rest of the pydoc code, and added some features to his
25021  inspect module.
25022
25023- An updated python-mode.el version 4.1 which integrates Ken
25024  Manheimer's pdbtrack.el.  This makes debugging Python code via pdb
25025  much nicer in XEmacs and Emacs.  When stepping through your program
25026  with pdb, in either the shell window or the *Python* window, the
25027  source file and line will be tracked by an arrow.  Very cool!
25028
25029- IDLE: syntax warnings in interactive mode are changed into errors.
25030
25031- Some improvements to Tools/webchecker (ignore some more URL types,
25032  follow some more links).
25033
25034- Brought the Tools/compiler package up to date.
25035
25036
25037What's New in Python 2.1 beta 2?
25038================================
25039
25040(Unlisted are many fixed bugs, more documentation, etc.)
25041
25042Core language, builtins, and interpreter
25043
25044- The nested scopes work (enabled by "from __future__ import
25045  nested_scopes") is completed; in particular, the future now extends
25046  into code executed through exec, eval() and execfile(), and into the
25047  interactive interpreter.
25048
25049- When calling a base class method (e.g. BaseClass.__init__(self)),
25050  this is now allowed even if self is not strictly spoken a class
25051  instance (e.g. when using metaclasses or the Don Beaudry hook).
25052
25053- Slice objects are now comparable but not hashable; this prevents
25054  dict[:] from being accepted but meaningless.
25055
25056- Complex division is now calculated using less braindead algorithms.
25057  This doesn't change semantics except it's more likely to give useful
25058  results in extreme cases.  Complex repr() now uses full precision
25059  like float repr().
25060
25061- sgmllib.py now calls handle_decl() for simple <!...> declarations.
25062
25063- It is illegal to assign to the name __debug__, which is set when the
25064  interpreter starts.  It is effectively a compile-time constant.
25065
25066- A warning will be issued if a global statement for a variable
25067  follows a use or assignment of that variable.
25068
25069Standard library
25070
25071- unittest.py, a unit testing framework by Steve Purcell (PyUNIT,
25072  inspired by JUnit), is now part of the standard library.  You now
25073  have a choice of two testing frameworks: unittest requires you to
25074  write testcases as separate code, doctest gathers them from
25075  docstrings.  Both approaches have their advantages and
25076  disadvantages.
25077
25078- A new module Tix was added, which wraps the Tix extension library
25079  for Tk.  With that module, it is not necessary to statically link
25080  Tix with _tkinter, since Tix will be loaded with Tcl's "package
25081  require" command.  See Demo/tix/.
25082
25083- tzparse.py is now obsolete.
25084
25085- In gzip.py, the seek() and tell() methods are removed -- they were
25086  non-functional anyway, and it's better if callers can test for their
25087  existence with hasattr().
25088
25089Python/C API
25090
25091- PyDict_Next(): it is now safe to call PyDict_SetItem() with a key
25092  that's already in the dictionary during a PyDict_Next() iteration.
25093  This used to fail occasionally when a dictionary resize operation
25094  could be triggered that would rehash all the keys.  All other
25095  modifications to the dictionary are still off-limits during a
25096  PyDict_Next() iteration!
25097
25098- New extended APIs related to passing compiler variables around.
25099
25100- New abstract APIs PyObject_IsInstance(), PyObject_IsSubclass()
25101  implement isinstance() and issubclass().
25102
25103- Py_BuildValue() now has a "D" conversion to create a Python complex
25104  number from a Py_complex C value.
25105
25106- Extensions types which support weak references must now set the
25107  field allocated for the weak reference machinery to NULL themselves;
25108  this is done to avoid the cost of checking each object for having a
25109  weakly referencable type in PyObject_INIT(), since most types are
25110  not weakly referencable.
25111
25112- PyFrame_FastToLocals() and PyFrame_LocalsToFast() copy bindings for
25113  free variables and cell variables to and from the frame's f_locals.
25114
25115- Variants of several functions defined in pythonrun.h have been added
25116  to support the nested_scopes future statement.  The variants all end
25117  in Flags and take an extra argument, a PyCompilerFlags *; examples:
25118  PyRun_AnyFileExFlags(), PyRun_InteractiveLoopFlags().  These
25119  variants may be removed in Python 2.2, when nested scopes are
25120  mandatory.
25121
25122Distutils
25123
25124- the sdist command now writes a PKG-INFO file, as described in PEP 241,
25125  into the release tree.
25126
25127- several enhancements to the bdist_wininst command from Thomas Heller
25128  (an uninstaller, more customization of the installer's display)
25129
25130- from Jack Jansen: added Mac-specific code to generate a dialog for
25131  users to specify the command-line (because providing a command-line with
25132  MacPython is awkward).  Jack also made various fixes for the Mac
25133  and the Metrowerks compiler.
25134
25135- added 'platforms' and 'keywords' to the set of metadata that can be
25136  specified for a distribution.
25137
25138- applied patches from Jason Tishler to make the compiler class work with
25139  Cygwin.
25140
25141
25142What's New in Python 2.1 beta 1?
25143================================
25144
25145Core language, builtins, and interpreter
25146
25147- Following an outcry from the community about the amount of code
25148  broken by the nested scopes feature introduced in 2.1a2, we decided
25149  to make this feature optional, and to wait until Python 2.2 (or at
25150  least 6 months) to make it standard.  The option can be enabled on a
25151  per-module basis by adding "from __future__ import nested_scopes" at
25152  the beginning of a module (before any other statements, but after
25153  comments and an optional docstring).  See PEP 236 (Back to the
25154  __future__) for a description of the __future__ statement.  PEP 227
25155  (Statically Nested Scopes) has been updated to reflect this change,
25156  and to clarify the semantics in a number of endcases.
25157
25158- The nested scopes code, when enabled, has been hardened, and most
25159  bugs and memory leaks in it have been fixed.
25160
25161- Compile-time warnings are now generated for a number of conditions
25162  that will break or change in meaning when nested scopes are enabled:
25163
25164  - Using "from...import *" or "exec" without in-clause in a function
25165    scope that also defines a lambda or nested function with one or
25166    more free (non-local) variables.  The presence of the import* or
25167    bare exec makes it impossible for the compiler to determine the
25168    exact set of local variables in the outer scope, which makes it
25169    impossible to determine the bindings for free variables in the
25170    inner scope.  To avoid the warning about import *, change it into
25171    an import of explicitly name object, or move the import* statement
25172    to the global scope; to avoid the warning about bare exec, use
25173    exec...in... (a good idea anyway -- there's a possibility that
25174    bare exec will be deprecated in the future).
25175
25176  - Use of a global variable in a nested scope with the same name as a
25177    local variable in a surrounding scope.  This will change in
25178    meaning with nested scopes: the name in the inner scope will
25179    reference the variable in the outer scope rather than the global
25180    of the same name.  To avoid the warning, either rename the outer
25181    variable, or use a global statement in the inner function.
25182
25183- An optional object allocator has been included.  This allocator is
25184  optimized for Python objects and should be faster and use less memory
25185  than the standard system allocator.  It is not enabled by default
25186  because of possible thread safety problems.  The allocator is only
25187  protected by the Python interpreter lock and it is possible that some
25188  extension modules require a thread safe allocator.  The object
25189  allocator can be enabled by providing the "--with-pymalloc" option to
25190  configure.
25191
25192Standard library
25193
25194- pyexpat now detects the expat version if expat.h defines it. A
25195  number of additional handlers are provided, which are only available
25196  since expat 1.95. In addition, the methods SetParamEntityParsing and
25197  GetInputContext of Parser objects are available with 1.95.x
25198  only. Parser objects now provide the ordered_attributes and
25199  specified_attributes attributes. A new module expat.model was added,
25200  which offers a number of additional constants if 1.95.x is used.
25201
25202- xml.dom offers the new functions registerDOMImplementation and
25203  getDOMImplementation.
25204
25205- xml.dom.minidom offers a toprettyxml method. A number of DOM
25206  conformance issues have been resolved. In particular, Element now
25207  has a hasAttributes method, and the handling of namespaces was
25208  improved.
25209
25210- Ka-Ping Yee contributed two new modules: inspect.py, a module for
25211  getting information about live Python code, and pydoc.py, a module
25212  for interactively converting docstrings to HTML or text.
25213  Tools/scripts/pydoc, which is now automatically installed into
25214  <prefix>/bin, uses pydoc.py to display documentation; try running
25215  "pydoc -h" for instructions.  "pydoc -g" pops up a small GUI that
25216  lets you browse the module docstrings using a web browser.
25217
25218- New library module difflib.py, primarily packaging the SequenceMatcher
25219  class at the heart of the popular ndiff.py file-comparison tool.
25220
25221- doctest.py (a framework for verifying Python code examples in docstrings)
25222  is now part of the std library.
25223
25224Windows changes
25225
25226- A new entry in the Start menu, "Module Docs", runs "pydoc -g" -- a
25227  small GUI that lets you browse the module docstrings using your
25228  default web browser.
25229
25230- Import is now case-sensitive.  PEP 235 (Import on Case-Insensitive
25231  Platforms) is implemented.  See
25232
25233      http://python.sourceforge.net/peps/pep-0235.html
25234
25235  for full details, especially the "Current Lower-Left Semantics" section.
25236  The new Windows import rules are simpler than before:
25237
25238  A. If the PYTHONCASEOK environment variable exists, same as
25239     before:  silently accept the first case-insensitive match of any
25240     kind; raise ImportError if none found.
25241
25242  B. Else search sys.path for the first case-sensitive match; raise
25243     ImportError if none found.
25244
25245  The same rules have been implemented on other platforms with case-
25246  insensitive but case-preserving filesystems too (including Cygwin, and
25247  several flavors of Macintosh operating systems).
25248
25249- winsound module:  Under Win9x, winsound.Beep() now attempts to simulate
25250  what it's supposed to do (and does do under NT and 2000) via direct
25251  port manipulation.  It's unknown whether this will work on all systems,
25252  but it does work on my Win98SE systems now and was known to be useless on
25253  all Win9x systems before.
25254
25255- Build:  Subproject _test (effectively) renamed to _testcapi.
25256
25257New platforms
25258
25259- 2.1 should compile and run out of the box under MacOS X, even using HFS+.
25260  Thanks to Steven Majewski!
25261
25262- 2.1 should compile and run out of the box on Cygwin.  Thanks to Jason
25263  Tishler!
25264
25265- 2.1 contains new files and patches for RISCOS, thanks to Dietmar
25266  Schwertberger!  See RISCOS/README for more information -- it seems
25267  that because of the bizarre filename conventions on RISCOS, no port
25268  to that platform is easy.
25269
25270
25271What's New in Python 2.1 alpha 2?
25272=================================
25273
25274Core language, builtins, and interpreter
25275
25276- Scopes nest.  If a name is used in a function or class, but is not
25277  local, the definition in the nearest enclosing function scope will
25278  be used.  One consequence of this change is that lambda statements
25279  could reference variables in the namespaces where the lambda is
25280  defined.  In some unusual cases, this change will break code.
25281
25282  In all previous version of Python, names were resolved in exactly
25283  three namespaces -- the local namespace, the global namespace, and
25284  the builtins namespace.  According to this old definition, if a
25285  function A is defined within a function B, the names bound in B are
25286  not visible in A.  The new rules make names bound in B visible in A,
25287  unless A contains a name binding that hides the binding in B.
25288
25289  Section 4.1 of the reference manual describes the new scoping rules
25290  in detail.  The test script in Lib/test/test_scope.py demonstrates
25291  some of the effects of the change.
25292
25293  The new rules will cause existing code to break if it defines nested
25294  functions where an outer function has local variables with the same
25295  name as globals or builtins used by the inner function.  Example:
25296
25297    def munge(str):
25298        def helper(x):
25299            return str(x)
25300        if type(str) != type(''):
25301            str = helper(str)
25302        return str.strip()
25303
25304  Under the old rules, the name str in helper() is bound to the
25305  built-in function str().  Under the new rules, it will be bound to
25306  the argument named str and an error will occur when helper() is
25307  called.
25308
25309- The compiler will report a SyntaxError if "from ... import *" occurs
25310  in a function or class scope.  The language reference has documented
25311  that this case is illegal, but the compiler never checked for it.
25312  The recent introduction of nested scope makes the meaning of this
25313  form of name binding ambiguous.  In a future release, the compiler
25314  may allow this form when there is no possibility of ambiguity.
25315
25316- repr(string) is easier to read, now using hex escapes instead of octal,
25317  and using \t, \n and \r instead of \011, \012 and \015 (respectively):
25318
25319  >>> "\texample \r\n" + chr(0) + chr(255)
25320  '\texample \r\n\x00\xff'         # in 2.1
25321  '\011example \015\012\000\377'   # in 2.0
25322
25323- Functions are now compared and hashed by identity, not by value, since
25324  the func_code attribute is writable.
25325
25326- Weak references (PEP 205) have been added.  This involves a few
25327  changes in the core, an extension module (_weakref), and a Python
25328  module (weakref).  The weakref module is the public interface.  It
25329  includes support for "explicit" weak references, proxy objects, and
25330  mappings with weakly held values.
25331
25332- A 'continue' statement can now appear in a try block within the body
25333  of a loop.  It is still not possible to use continue in a finally
25334  clause.
25335
25336Standard library
25337
25338- mailbox.py now has a new class, PortableUnixMailbox which is
25339  identical to UnixMailbox but uses a more portable scheme for
25340  determining From_ separators.  Also, the constructors for all the
25341  classes in this module have a new optional `factory' argument, which
25342  is a callable used when new message classes must be instantiated by
25343  the next() method.
25344
25345- random.py is now self-contained, and offers all the functionality of
25346  the now-deprecated whrandom.py.  See the docs for details.  random.py
25347  also supports new functions getstate() and setstate(), for saving
25348  and restoring the internal state of the generator; and jumpahead(n),
25349  for quickly forcing the internal state to be the same as if n calls to
25350  random() had been made.  The latter is particularly useful for multi-
25351  threaded programs, creating one instance of the random.Random() class for
25352  each thread, then using .jumpahead() to force each instance to use a
25353  non-overlapping segment of the full period.
25354
25355- random.py's seed() function is new.  For bit-for-bit compatibility with
25356  prior releases, use the whseed function instead.  The new seed function
25357  addresses two problems:  (1) The old function couldn't produce more than
25358  about 2**24 distinct internal states; the new one about 2**45 (the best
25359  that can be done in the Wichmann-Hill generator).  (2) The old function
25360  sometimes produced identical internal states when passed distinct
25361  integers, and there was no simple way to predict when that would happen;
25362  the new one guarantees to produce distinct internal states for all
25363  arguments in [0, 27814431486576L).
25364
25365- The socket module now supports raw packets on Linux.  The socket
25366  family is AF_PACKET.
25367
25368- test_capi.py is a start at running tests of the Python C API.  The tests
25369  are implemented by the new Modules/_testmodule.c.
25370
25371- A new extension module, _symtable, provides provisional access to the
25372  internal symbol table used by the Python compiler.  A higher-level
25373  interface will be added on top of _symtable in a future release.
25374
25375- Removed the obsolete soundex module.
25376
25377- xml.dom.minidom now uses the standard DOM exceptions. Node supports
25378  the isSameNode method; NamedNodeMap the get method.
25379
25380- xml.sax.expatreader supports the lexical handler property; it
25381  generates comment, startCDATA, and endCDATA events.
25382
25383Windows changes
25384
25385- Build procedure:  the zlib project is built in a different way that
25386  ensures the zlib header files used can no longer get out of synch with
25387  the zlib binary used.  See PCbuild\readme.txt for details.  Your old
25388  zlib-related directories can be deleted; you'll need to download fresh
25389  source for zlib and unpack it into a new directory.
25390
25391- Build:  New subproject _test for the benefit of test_capi.py (see above).
25392
25393- Build:  New subproject _symtable, for new DLL _symtable.pyd (a nascent
25394  interface to some Python compiler internals).
25395
25396- Build:  Subproject ucnhash is gone, since the code was folded into the
25397  unicodedata subproject.
25398
25399What's New in Python 2.1 alpha 1?
25400=================================
25401
25402Core language, builtins, and interpreter
25403
25404- There is a new Unicode companion to the PyObject_Str() API
25405  called PyObject_Unicode(). It behaves in the same way as the
25406  former, but assures that the returned value is a Unicode object
25407  (applying the usual coercion if necessary).
25408
25409- The comparison operators support "rich comparison overloading" (PEP
25410  207).  C extension types can provide a rich comparison function in
25411  the new tp_richcompare slot in the type object.  The cmp() function
25412  and the C function PyObject_Compare() first try the new rich
25413  comparison operators before trying the old 3-way comparison.  There
25414  is also a new C API PyObject_RichCompare() (which also falls back on
25415  the old 3-way comparison, but does not constrain the outcome of the
25416  rich comparison to a Boolean result).
25417
25418  The rich comparison function takes two objects (at least one of
25419  which is guaranteed to have the type that provided the function) and
25420  an integer indicating the opcode, which can be Py_LT, Py_LE, Py_EQ,
25421  Py_NE, Py_GT, Py_GE (for <, <=, ==, !=, >, >=), and returns a Python
25422  object, which may be NotImplemented (in which case the tp_compare
25423  slot function is used as a fallback, if defined).
25424
25425  Classes can overload individual comparison operators by defining one
25426  or more of the methods__lt__, __le__, __eq__, __ne__, __gt__,
25427  __ge__.  There are no explicit "reflected argument" versions of
25428  these; instead, __lt__ and __gt__ are each other's reflection,
25429  likewise for__le__ and __ge__; __eq__ and __ne__ are their own
25430  reflection (similar at the C level).  No other implications are
25431  made; in particular, Python does not assume that == is the Boolean
25432  inverse of !=, or that < is the Boolean inverse of >=.  This makes
25433  it possible to define types with partial orderings.
25434
25435  Classes or types that want to implement (in)equality tests but not
25436  the ordering operators (i.e. unordered types) should implement ==
25437  and !=, and raise an error for the ordering operators.
25438
25439  It is possible to define types whose rich comparison results are not
25440  Boolean; e.g. a matrix type might want to return a matrix of bits
25441  for A < B, giving elementwise comparisons.  Such types should ensure
25442  that any interpretation of their value in a Boolean context raises
25443  an exception, e.g. by defining __nonzero__ (or the tp_nonzero slot
25444  at the C level) to always raise an exception.
25445
25446- Complex numbers use rich comparisons to define == and != but raise
25447  an exception for <, <=, > and >=.  Unfortunately, this also means
25448  that cmp() of two complex numbers raises an exception when the two
25449  numbers differ.  Since it is not mathematically meaningful to compare
25450  complex numbers except for equality, I hope that this doesn't break
25451  too much code.
25452
25453- The outcome of comparing non-numeric objects of different types is
25454  not defined by the language, other than that it's arbitrary but
25455  consistent (see the Reference Manual).  An implementation detail changed
25456  in 2.1a1 such that None now compares less than any other object.  Code
25457  relying on this new behavior (like code that relied on the previous
25458  behavior) does so at its own risk.
25459
25460- Functions and methods now support getting and setting arbitrarily
25461  named attributes (PEP 232).  Functions have a new __dict__
25462  (a.k.a. func_dict) which hold the function attributes.  Methods get
25463  and set attributes on their underlying im_func.  It is a TypeError
25464  to set an attribute on a bound method.
25465
25466- The xrange() object implementation has been improved so that
25467  xrange(sys.maxint) can be used on 64-bit platforms.  There's still a
25468  limitation that in this case len(xrange(sys.maxint)) can't be
25469  calculated, but the common idiom "for i in xrange(sys.maxint)" will
25470  work fine as long as the index i doesn't actually reach 2**31.
25471  (Python uses regular ints for sequence and string indices; fixing
25472  that is much more work.)
25473
25474- Two changes to from...import:
25475
25476  1) "from M import X" now works even if (after loading module M)
25477     sys.modules['M'] is not a real module; it's basically a getattr()
25478     operation with AttributeError exceptions changed into ImportError.
25479
25480  2) "from M import *" now looks for M.__all__ to decide which names to
25481     import; if M.__all__ doesn't exist, it uses M.__dict__.keys() but
25482     filters out names starting with '_' as before.  Whether or not
25483     __all__ exists, there's no restriction on the type of M.
25484
25485- File objects have a new method, xreadlines().  This is the fastest
25486  way to iterate over all lines in a file:
25487
25488  for line in file.xreadlines():
25489      ...do something to line...
25490
25491  See the xreadlines module (mentioned below) for how to do this for
25492  other file-like objects.
25493
25494- Even if you don't use file.xreadlines(), you may expect a speedup on
25495  line-by-line input.  The file.readline() method has been optimized
25496  quite a bit in platform-specific ways:  on systems (like Linux) that
25497  support flockfile(), getc_unlocked(), and funlockfile(), those are
25498  used by default.  On systems (like Windows) without getc_unlocked(),
25499  a complicated (but still thread-safe) method using fgets() is used by
25500  default.
25501
25502  You can force use of the fgets() method by #define'ing
25503  USE_FGETS_IN_GETLINE at build time (it may be faster than
25504  getc_unlocked()).
25505
25506  You can force fgets() not to be used by #define'ing
25507  DONT_USE_FGETS_IN_GETLINE (this is the first thing to try if std test
25508  test_bufio.py fails -- and let us know if it does!).
25509
25510- In addition, the fileinput module, while still slower than the other
25511  methods on most platforms, has been sped up too, by using
25512  file.readlines(sizehint).
25513
25514- Support for run-time warnings has been added, including a new
25515  command line option (-W) to specify the disposition of warnings.
25516  See the description of the warnings module below.
25517
25518- Extensive changes have been made to the coercion code.  This mostly
25519  affects extension modules (which can now implement mixed-type
25520  numerical operators without having to use coercion), but
25521  occasionally, in boundary cases the coercion semantics have changed
25522  subtly.  Since this was a terrible gray area of the language, this
25523  is considered an improvement.  Also note that __rcmp__ is no longer
25524  supported -- instead of calling __rcmp__, __cmp__ is called with
25525  reflected arguments.
25526
25527- In connection with the coercion changes, a new built-in singleton
25528  object, NotImplemented is defined.  This can be returned for
25529  operations that wish to indicate they are not implemented for a
25530  particular combination of arguments.  From C, this is
25531  Py_NotImplemented.
25532
25533- The interpreter accepts now bytecode files on the command line even
25534  if they do not have a .pyc or .pyo extension. On Linux, after executing
25535
25536import imp,sys,string
25537magic = string.join(["\\x%.2x" % ord(c) for c in imp.get_magic()],"")
25538reg = ':pyc:M::%s::%s:' % (magic, sys.executable)
25539open("/proc/sys/fs/binfmt_misc/register","wb").write(reg)
25540
25541  any byte code file can be used as an executable (i.e. as an argument
25542  to execve(2)).
25543
25544- %[xXo] formats of negative Python longs now produce a sign
25545  character.  In 1.6 and earlier, they never produced a sign,
25546  and raised an error if the value of the long was too large
25547  to fit in a Python int.  In 2.0, they produced a sign if and
25548  only if too large to fit in an int.  This was inconsistent
25549  across platforms (because the size of an int varies across
25550  platforms), and inconsistent with hex() and oct().  Example:
25551
25552  >>> "%x" % -0x42L
25553  '-42'      # in 2.1
25554  'ffffffbe' # in 2.0 and before, on 32-bit machines
25555  >>> hex(-0x42L)
25556  '-0x42L'   # in all versions of Python
25557
25558  The behavior of %d formats for negative Python longs remains
25559  the same as in 2.0 (although in 1.6 and before, they raised
25560  an error if the long didn't fit in a Python int).
25561
25562  %u formats don't make sense for Python longs, but are allowed
25563  and treated the same as %d in 2.1.  In 2.0, a negative long
25564  formatted via %u produced a sign if and only if too large to
25565  fit in an int.  In 1.6 and earlier, a negative long formatted
25566  via %u raised an error if it was too big to fit in an int.
25567
25568- Dictionary objects have an odd new method, popitem().  This removes
25569  an arbitrary item from the dictionary and returns it (in the form of
25570  a (key, value) pair).  This can be useful for algorithms that use a
25571  dictionary as a bag of "to do" items and repeatedly need to pick one
25572  item.  Such algorithms normally end up running in quadratic time;
25573  using popitem() they can usually be made to run in linear time.
25574
25575Standard library
25576
25577- In the time module, the time argument to the functions strftime,
25578  localtime, gmtime, asctime and ctime is now optional, defaulting to
25579  the current time (in the local timezone).
25580
25581- The ftplib module now defaults to passive mode, which is deemed a
25582  more useful default given that clients are often inside firewalls
25583  these days.  Note that this could break if ftplib is used to connect
25584  to a *server* that is inside a firewall, from outside; this is
25585  expected to be a very rare situation.  To fix that, you can call
25586  ftp.set_pasv(0).
25587
25588- The module site now treats .pth files not only for path configuration,
25589  but also supports extensions to the initialization code: Lines starting
25590  with import are executed.
25591
25592- There's a new module, warnings, which implements a mechanism for
25593  issuing and filtering warnings.  There are some new built-in
25594  exceptions that serve as warning categories, and a new command line
25595  option, -W, to control warnings (e.g. -Wi ignores all warnings, -We
25596  turns warnings into errors).  warnings.warn(message[, category])
25597  issues a warning message; this can also be called from C as
25598  PyErr_Warn(category, message).
25599
25600- A new module xreadlines was added.  This exports a single factory
25601  function, xreadlines().  The intention is that this code is the
25602  absolutely fastest way to iterate over all lines in an open
25603  file(-like) object:
25604
25605  import xreadlines
25606  for line in xreadlines.xreadlines(file):
25607      ...do something to line...
25608
25609  This is equivalent to the previous the speed record holder using
25610  file.readlines(sizehint).  Note that if file is a real file object
25611  (as opposed to a file-like object), this is equivalent:
25612
25613  for line in file.xreadlines():
25614      ...do something to line...
25615
25616- The bisect module has new functions bisect_left, insort_left,
25617  bisect_right and insort_right.  The old names bisect and insort
25618  are now aliases for bisect_right and insort_right.  XXX_right
25619  and XXX_left methods differ in what happens when the new element
25620  compares equal to one or more elements already in the list:  the
25621  XXX_left methods insert to the left, the XXX_right methods to the
25622  right.  Code that doesn't care where equal elements end up should
25623  continue to use the old, short names ("bisect" and "insort").
25624
25625- The new curses.panel module wraps the panel library that forms part
25626  of SYSV curses and ncurses.  Contributed by Thomas Gellekum.
25627
25628- The SocketServer module now sets the allow_reuse_address flag by
25629  default in the TCPServer class.
25630
25631- A new function, sys._getframe(), returns the stack frame pointer of
25632  the caller.  This is intended only as a building block for
25633  higher-level mechanisms such as string interpolation.
25634
25635- The pyexpat module supports a number of new handlers, which are
25636  available only in expat 1.2. If invocation of a callback fails, it
25637  will report an additional frame in the traceback. Parser objects
25638  participate now in garbage collection. If expat reports an unknown
25639  encoding, pyexpat will try to use a Python codec; that works only
25640  for single-byte charsets. The parser type objects is exposed as
25641  XMLParserObject.
25642
25643- xml.dom now offers standard definitions for symbolic node type and
25644  exception code constants, and a hierarchy of DOM exceptions. minidom
25645  was adjusted to use them.
25646
25647- The conformance of xml.dom.minidom to the DOM specification was
25648  improved. It detects a number of additional error cases; the
25649  previous/next relationship works even when the tree is modified;
25650  Node supports the normalize() method; NamedNodeMap, DocumentType and
25651  DOMImplementation classes were added; Element supports the
25652  hasAttribute and hasAttributeNS methods; and Text supports the splitText
25653  method.
25654
25655Build issues
25656
25657- For Unix (and Unix-compatible) builds, configuration and building of
25658  extension modules is now greatly automated.  Rather than having to
25659  edit the Modules/Setup file to indicate which modules should be
25660  built and where their include files and libraries are, a
25661  distutils-based setup.py script now takes care of building most
25662  extension modules.  All extension modules built this way are built
25663  as shared libraries.  Only a few modules that must be linked
25664  statically are still listed in the Setup file; you won't need to
25665  edit their configuration.
25666
25667- Python should now build out of the box on Cygwin.  If it doesn't,
25668  mail to Jason Tishler (jlt63 at users.sourceforge.net).
25669
25670- Python now always uses its own (renamed) implementation of getopt()
25671  -- there's too much variation among C library getopt()
25672  implementations.
25673
25674- C++ compilers are better supported; the CXX macro is always set to a
25675  C++ compiler if one is found.
25676
25677Windows changes
25678
25679- select module:  By default under Windows, a select() call
25680  can specify no more than 64 sockets.  Python now boosts
25681  this Microsoft default to 512.  If you need even more than
25682  that, see the MS docs (you'll need to #define FD_SETSIZE
25683  and recompile Python from source).
25684
25685- Support for Windows 3.1, DOS and OS/2 is gone.  The Lib/dos-8x3
25686  subdirectory is no more!
25687
25688
25689What's New in Python 2.0?
25690=========================
25691
25692Below is a list of all relevant changes since release 1.6.  Older
25693changes are in the file HISTORY.  If you are making the jump directly
25694from Python 1.5.2 to 2.0, make sure to read the section for 1.6 in the
25695HISTORY file!  Many important changes listed there.
25696
25697Alternatively, a good overview of the changes between 1.5.2 and 2.0 is
25698the document "What's New in Python 2.0" by Kuchling and Moshe Zadka:
25699http://www.amk.ca/python/2.0/.
25700
25701--Guido van Rossum (home page: http://www.pythonlabs.com/~guido/)
25702
25703======================================================================
25704
25705What's new in 2.0 (since release candidate 1)?
25706==============================================
25707
25708Standard library
25709
25710- The copy_reg module was modified to clarify its intended use: to
25711  register pickle support for extension types, not for classes.
25712  pickle() will raise a TypeError if it is passed a class.
25713
25714- Fixed a bug in gettext's "normalize and expand" code that prevented
25715  it from finding an existing .mo file.
25716
25717- Restored support for HTTP/0.9 servers in httplib.
25718
25719- The math module was changed to stop raising OverflowError in case of
25720  underflow, and return 0 instead in underflow cases.  Whether Python
25721  used to raise OverflowError in case of underflow was platform-
25722  dependent (it did when the platform math library set errno to ERANGE
25723  on underflow).
25724
25725- Fixed a bug in StringIO that occurred when the file position was not
25726  at the end of the file and write() was called with enough data to
25727  extend past the end of the file.
25728
25729- Fixed a bug that caused Tkinter error messages to get lost on
25730  Windows.  The bug was fixed by replacing direct use of
25731  interp->result with Tcl_GetStringResult(interp).
25732
25733- Fixed bug in urllib2 that caused it to fail when it received an HTTP
25734  redirect response.
25735
25736- Several changes were made to distutils: Some debugging code was
25737  removed from util.  Fixed the installer used when an external zip
25738  program (like WinZip) is not found; the source code for this
25739  installer is in Misc/distutils.  check_lib() was modified to behave
25740  more like AC_CHECK_LIB by add other_libraries() as a parameter.  The
25741  test for whether installed modules are on sys.path was changed to
25742  use both normcase() and normpath().
25743
25744- Several minor bugs were fixed in the xml package (the minidom,
25745  pulldom, expatreader, and saxutils modules).
25746
25747- The regression test driver (regrtest.py) behavior when invoked with
25748  -l changed: It now reports a count of objects that are recognized as
25749  garbage but not freed by the garbage collector.
25750
25751- The regression test for the math module was changed to test
25752  exceptional behavior when the test is run in verbose mode.  Python
25753  cannot yet guarantee consistent exception behavior across platforms,
25754  so the exception part of test_math is run only in verbose mode, and
25755  may fail on your platform.
25756
25757Internals
25758
25759- PyOS_CheckStack() has been disabled on Win64, where it caused
25760  test_sre to fail.
25761
25762Build issues
25763
25764- Changed compiler flags, so that gcc is always invoked with -Wall and
25765  -Wstrict-prototypes.  Users compiling Python with GCC should see
25766  exactly one warning, except if they have passed configure the
25767  --with-pydebug flag.  The expected warning is for getopt() in
25768  Modules/main.c.  This warning will be fixed for Python 2.1.
25769
25770- Fixed configure to add -threads argument during linking on OSF1.
25771
25772Tools and other miscellany
25773
25774- The compiler in Tools/compiler was updated to support the new
25775  language features introduced in 2.0: extended print statement, list
25776  comprehensions, and augmented assignments.  The new compiler should
25777  also be backwards compatible with Python 1.5.2; the compiler will
25778  always generate code for the version of the interpreter it runs
25779  under.
25780
25781What's new in 2.0 release candidate 1 (since beta 2)?
25782=====================================================
25783
25784What is release candidate 1?
25785
25786We believe that release candidate 1 will fix all known bugs that we
25787intend to fix for the 2.0 final release.  This release should be a bit
25788more stable than the previous betas.  We would like to see even more
25789widespread testing before the final release, so we are producing this
25790release candidate.  The final release will be exactly the same unless
25791any show-stopping (or brown bag) bugs are found by testers of the
25792release candidate.
25793
25794All the changes since the last beta release are bug fixes or changes
25795to support building Python for specific platforms.
25796
25797Core language, builtins, and interpreter
25798
25799- A bug that caused crashes when __coerce__ was used with augmented
25800  assignment, e.g. +=, was fixed.
25801
25802- Raise ZeroDivisionError when raising zero to a negative number,
25803  e.g. 0.0 ** -2.0.  Note that math.pow is unrelated to the built-in
25804  power operator and the result of math.pow(0.0, -2.0) will vary by
25805  platform.  On Linux, it raises a ValueError.
25806
25807- A bug in Unicode string interpolation was fixed that occasionally
25808  caused errors with formats including "%%".  For example, the
25809  following expression "%% %s" % u"abc" no longer raises a TypeError.
25810
25811- Compilation of deeply nested expressions raises MemoryError instead
25812  of SyntaxError, e.g. eval("[" * 50 + "]" * 50).
25813
25814- In 2.0b2 on Windows, the interpreter wrote .pyc files in text mode,
25815  rendering them useless.  They are now written in binary mode again.
25816
25817Standard library
25818
25819- Keyword arguments are now accepted for most pattern and match object
25820  methods in SRE, the standard regular expression engine.
25821
25822- In SRE, fixed error with negative lookahead and lookbehind that
25823  manifested itself as a runtime error in patterns like "(?<!abc)(def)".
25824
25825- Several bugs in the Unicode handling and error handling in _tkinter
25826  were fixed.
25827
25828- Fix memory management errors in Merge() and Tkapp_Call() routines.
25829
25830- Several changes were made to cStringIO to make it compatible with
25831  the file-like object interface and with StringIO.  If operations are
25832  performed on a closed object, an exception is raised.  The truncate
25833  method now accepts a position argument and readline accepts a size
25834  argument.
25835
25836- There were many changes made to the linuxaudiodev module and its
25837  test suite; as a result, a short, unexpected audio sample should now
25838  play when the regression test is run.
25839
25840  Note that this module is named poorly, because it should work
25841  correctly on any platform that supports the Open Sound System
25842  (OSS).
25843
25844  The module now raises exceptions when errors occur instead of
25845  crashing.  It also defines the AFMT_A_LAW format (logarithmic A-law
25846  audio) and defines a getptr() method that calls the
25847  SNDCTL_DSP_GETxPTR ioctl defined in the OSS Programmer's Guide.
25848
25849- The library_version attribute, introduced in an earlier beta, was
25850  removed because it can not be supported with early versions of the C
25851  readline library, which provides no way to determine the version at
25852  compile-time.
25853
25854- The binascii module is now enabled on Win64.
25855
25856- tokenize.py no longer suffers "recursion depth" errors when parsing
25857  programs with very long string literals.
25858
25859Internals
25860
25861- Fixed several buffer overflow vulnerabilities in calculate_path(),
25862  which is called when the interpreter starts up to determine where
25863  the standard library is installed.  These vulnerabilities affect all
25864  previous versions of Python and can be exploited by setting very
25865  long values for PYTHONHOME or argv[0].  The risk is greatest for a
25866  setuid Python script, although use of the wrapper in
25867  Misc/setuid-prog.c will eliminate the vulnerability.
25868
25869- Fixed garbage collection bugs in instance creation that were
25870  triggered when errors occurred during initialization.  The solution,
25871  applied in cPickle and in PyInstance_New(), is to call
25872  PyObject_GC_Init() after the initialization of the object's
25873  container attributes is complete.
25874
25875- pyexpat adds definitions of PyModule_AddStringConstant and
25876  PyModule_AddObject if the Python version is less than 2.0, which
25877  provides compatibility with PyXML on Python 1.5.2.
25878
25879- If the platform has a bogus definition for LONG_BIT (the number of
25880  bits in a long), an error will be reported at compile time.
25881
25882- Fix bugs in _PyTuple_Resize() which caused hard-to-interpret garbage
25883  collection crashes and possibly other, unreported crashes.
25884
25885- Fixed a memory leak in _PyUnicode_Fini().
25886
25887Build issues
25888
25889- configure now accepts a --with-suffix option that specifies the
25890  executable suffix.  This is useful for builds on Cygwin and Mac OS
25891  X, for example.
25892
25893- The mmap.PAGESIZE constant is now initialized using sysconf when
25894  possible, which eliminates a dependency on -lucb for Reliant UNIX.
25895
25896- The md5 file should now compile on all platforms.
25897
25898- The select module now compiles on platforms that do not define
25899  POLLRDNORM and related constants.
25900
25901- Darwin (Mac OS X):  Initial support for static builds on this
25902  platform.
25903
25904- BeOS: A number of changes were made to the build and installation
25905  process.  ar-fake now operates on a directory of object files.
25906  dl_export.h is gone, and its macros now appear on the mwcc command
25907  line during build on PPC BeOS.
25908
25909- Platform directory in lib/python2.0 is "plat-beos5" (or
25910  "plat-beos4", if building on BeOS 4.5), rather than "plat-beos".
25911
25912- Cygwin: Support for shared libraries, Tkinter, and sockets.
25913
25914- SunOS 4.1.4_JL: Fix test for directory existence in configure.
25915
25916Tools and other miscellany
25917
25918- Removed debugging prints from main used with freeze.
25919
25920- IDLE auto-indent no longer crashes when it encounters Unicode
25921  characters.
25922
25923What's new in 2.0 beta 2 (since beta 1)?
25924========================================
25925
25926Core language, builtins, and interpreter
25927
25928- Add support for unbounded ints in %d,i,u,x,X,o formats; for example
25929  "%d" % 2L**64 == "18446744073709551616".
25930
25931- Add -h and -V command line options to print the usage message and
25932  Python version number and exit immediately.
25933
25934- eval() and exec accept Unicode objects as code parameters.
25935
25936- getattr() and setattr() now also accept Unicode objects for the
25937  attribute name, which are converted to strings using the default
25938  encoding before lookup.
25939
25940- Multiplication on string and Unicode now does proper bounds
25941  checking; e.g. 'a' * 65536 * 65536 will raise ValueError, "repeated
25942  string is too long."
25943
25944- Better error message when continue is found in try statement in a
25945  loop.
25946
25947
25948Standard library and extensions
25949
25950- socket module: the OpenSSL code now adds support for RAND_status()
25951  and EGD (Entropy Gathering Device).
25952
25953- array: reverse() method of array now works.  buffer_info() now does
25954  argument checking; it still takes no arguments.
25955
25956- asyncore/asynchat: Included most recent version from Sam Rushing.
25957
25958- cgi: Accept '&' or ';' as separator characters when parsing form data.
25959
25960- CGIHTTPServer: Now works on Windows (and perhaps even Mac).
25961
25962- ConfigParser: When reading the file, options spelled in upper case
25963  letters are now correctly converted to lowercase.
25964
25965- copy: Copy Unicode objects atomically.
25966
25967- cPickle: Fail gracefully when copy_reg can't be imported.
25968
25969- cStringIO: Implemented readlines() method.
25970
25971- dbm: Add get() and setdefault() methods to dbm object.  Add constant
25972  `library' to module that names the library used.  Added doc strings
25973  and method names to error messages.  Uses configure to determine
25974  which ndbm.h file to include; Berkeley DB's nbdm and GDBM's ndbm is
25975  now available options.
25976
25977- distutils: Update to version 0.9.3.
25978
25979- dl: Add several dl.RTLD_ constants.
25980
25981- fpectl: Now supported on FreeBSD.
25982
25983- gc: Add DEBUG_SAVEALL option.  When enabled all garbage objects
25984  found by the collector will be saved in gc.garbage.  This is useful
25985  for debugging a program that creates reference cycles.
25986
25987- httplib: Three changes: Restore support for set_debuglevel feature
25988  of HTTP class.  Do not close socket on zero-length response.  Do not
25989  crash when server sends invalid content-length header.
25990
25991- mailbox: Mailbox class conforms better to qmail specifications.
25992
25993- marshal: When reading a short, sign-extend on platforms where shorts
25994  are bigger than 16 bits.  When reading a long, repair the unportable
25995  sign extension that was being done for 64-bit machines.  (It assumed
25996  that signed right shift sign-extends.)
25997
25998- operator: Add contains(), invert(), __invert__() as aliases for
25999  __contains__(), inv(), and __inv__() respectively.
26000
26001- os: Add support for popen2() and popen3() on all platforms where
26002  fork() exists.  (popen4() is still in the works.)
26003
26004- os: (Windows only:) Add startfile() function that acts like double-
26005  clicking on a file in Explorer (or passing the file name to the
26006  DOS "start" command).
26007
26008- os.path: (Windows, DOS:) Treat trailing colon correctly in
26009  os.path.join.  os.path.join("a:", "b") yields "a:b".
26010
26011- pickle: Now raises ValueError when an invalid pickle that contains
26012  a non-string repr where a string repr was expected.  This behavior
26013  matches cPickle.
26014
26015- posixfile: Remove broken __del__() method.
26016
26017- py_compile: support CR+LF line terminators in source file.
26018
26019- readline: Does not immediately exit when ^C is hit when readline and
26020  threads are configured.  Adds definition of rl_library_version.  (The
26021  latter addition requires GNU readline 2.2 or later.)
26022
26023- rfc822: Domain literals returned by AddrlistClass method
26024  getdomainliteral() are now properly wrapped in brackets.
26025
26026- site: sys.setdefaultencoding() should only be called in case the
26027  standard default encoding ("ascii") is changed. This saves quite a
26028  few cycles during startup since the first call to
26029  setdefaultencoding() will initialize the codec registry and the
26030  encodings package.
26031
26032- socket: Support for size hint in readlines() method of object returned
26033  by makefile().
26034
26035- sre: Added experimental expand() method to match objects.  Does not
26036  use buffer interface on Unicode strings.  Does not hang if group id
26037  is followed by whitespace.
26038
26039- StringIO: Size hint in readlines() is now supported as documented.
26040
26041- struct: Check ranges for bytes and shorts.
26042
26043- urllib: Improved handling of win32 proxy settings. Fixed quote and
26044  quote_plus functions so that the always encode a comma.
26045
26046- Tkinter: Image objects are now guaranteed to have unique ids.  Set
26047  event.delta to zero if Tk version doesn't support mousewheel.
26048  Removed some debugging prints.
26049
26050- UserList: now implements __contains__().
26051
26052- webbrowser: On Windows, use os.startfile() instead of os.popen(),
26053  which works around a bug in Norton AntiVirus 2000 that leads directly
26054  to a Blue Screen freeze.
26055
26056- xml: New version detection code allows PyXML to override standard
26057  XML package if PyXML version is greater than 0.6.1.
26058
26059- xml.dom: DOM level 1 support for basic XML.  Includes xml.dom.minidom
26060  (conventional DOM), and xml.dom.pulldom, which allows building the DOM
26061  tree only for nodes which are sufficiently interesting to a specific
26062  application.  Does not provide the HTML-specific extensions.  Still
26063  undocumented.
26064
26065- xml.sax: SAX 2 support for Python, including all the handler
26066  interfaces needed to process XML 1.0 compliant XML.  Some
26067  documentation is already available.
26068
26069- pyexpat: Renamed to xml.parsers.expat since this is part of the new,
26070  packagized XML support.
26071
26072
26073C API
26074
26075- Add three new convenience functions for module initialization --
26076  PyModule_AddObject(), PyModule_AddIntConstant(), and
26077  PyModule_AddStringConstant().
26078
26079- Cleaned up definition of NULL in C source code; all definitions were
26080  removed and add #error to Python.h if NULL isn't defined after
26081  #include of stdio.h.
26082
26083- Py_PROTO() macros that were removed in 2.0b1 have been restored for
26084  backwards compatibility (at the source level) with old extensions.
26085
26086- A wrapper API was added for signal() and sigaction().  Instead of
26087  either function, always use PyOS_getsig() to get a signal handler
26088  and PyOS_setsig() to set one.  A new convenience typedef
26089  PyOS_sighandler_t is defined for the type of signal handlers.
26090
26091- Add PyString_AsStringAndSize() function that provides access to the
26092  internal data buffer and size of a string object -- or the default
26093  encoded version of a Unicode object.
26094
26095- PyString_Size() and PyString_AsString() accept Unicode objects.
26096
26097- The standard header <limits.h> is now included by Python.h (if it
26098  exists).  INT_MAX and LONG_MAX will always be defined, even if
26099  <limits.h> is not available.
26100
26101- PyFloat_FromString takes a second argument, pend, that was
26102  effectively useless.  It is now officially useless but preserved for
26103  backwards compatibility.  If the pend argument is not NULL, *pend is
26104  set to NULL.
26105
26106- PyObject_GetAttr() and PyObject_SetAttr() now accept Unicode objects
26107  for the attribute name.  See note on getattr() above.
26108
26109- A few bug fixes to argument processing for Unicode.
26110  PyArg_ParseTupleAndKeywords() now accepts "es#" and "es".
26111  PyArg_Parse() special cases "s#" for Unicode objects; it returns a
26112  pointer to the default encoded string data instead of to the raw
26113  UTF-16.
26114
26115- Py_BuildValue accepts B format (for bgen-generated code).
26116
26117
26118Internals
26119
26120- On Unix, fix code for finding Python installation directory so that
26121  it works when argv[0] is a relative path.
26122
26123- Added a true unicode_internal_encode() function and fixed the
26124  unicode_internal_decode function() to support Unicode objects directly
26125  rather than by generating a copy of the object.
26126
26127- Several of the internal Unicode tables are much smaller now, and
26128  the source code should be much friendlier to weaker compilers.
26129
26130- In the garbage collector: Fixed bug in collection of tuples.  Fixed
26131  bug that caused some instances to be removed from the container set
26132  while they were still live.  Fixed parsing in gc.set_debug() for
26133  platforms where sizeof(long) > sizeof(int).
26134
26135- Fixed refcount problem in instance deallocation that only occurred
26136  when Py_REF_DEBUG was defined and Py_TRACE_REFS was not.
26137
26138- On Windows, getpythonregpath is now protected against null data in
26139  registry key.
26140
26141- On Unix, create .pyc/.pyo files with O_EXCL flag to avoid a race
26142  condition.
26143
26144
26145Build and platform-specific issues
26146
26147- Better support of GNU Pth via --with-pth configure option.
26148
26149- Python/C API now properly exposed to dynamically-loaded extension
26150  modules on Reliant UNIX.
26151
26152- Changes for the benefit of SunOS 4.1.4 (really!).  mmapmodule.c:
26153  Don't define MS_SYNC to be zero when it is undefined.  Added missing
26154  prototypes in posixmodule.c.
26155
26156- Improved support for HP-UX build.  Threads should now be correctly
26157  configured (on HP-UX 10.20 and 11.00).
26158
26159- Fix largefile support on older NetBSD systems and OpenBSD by adding
26160  define for TELL64.
26161
26162
26163Tools and other miscellany
26164
26165- ftpmirror: Call to main() is wrapped in if __name__ == "__main__".
26166
26167- freeze: The modulefinder now works with 2.0 opcodes.
26168
26169- IDLE:
26170  Move hackery of sys.argv until after the Tk instance has been
26171  created, which allows the application-specific Tkinter
26172  initialization to be executed if present; also pass an explicit
26173  className parameter to the Tk() constructor.
26174
26175
26176What's new in 2.0 beta 1?
26177=========================
26178
26179Source Incompatibilities
26180------------------------
26181
26182None.  Note that 1.6 introduced several incompatibilities with 1.5.2,
26183such as single-argument append(), connect() and bind(), and changes to
26184str(long) and repr(float).
26185
26186
26187Binary Incompatibilities
26188------------------------
26189
26190- Third party extensions built for Python 1.5.x or 1.6 cannot be used
26191with Python 2.0; these extensions will have to be rebuilt for Python
261922.0.
26193
26194- On Windows, attempting to import a third party extension built for
26195Python 1.5.x or 1.6 results in an immediate crash; there's not much we
26196can do about this.  Check your PYTHONPATH environment variable!
26197
26198- Python bytecode files (*.pyc and *.pyo) are not compatible between
26199releases.
26200
26201
26202Overview of Changes Since 1.6
26203-----------------------------
26204
26205There are many new modules (including brand new XML support through
26206the xml package, and i18n support through the gettext module); a list
26207of all new modules is included below.  Lots of bugs have been fixed.
26208
26209The process for making major new changes to the language has changed
26210since Python 1.6.  Enhancements must now be documented by a Python
26211Enhancement Proposal (PEP) before they can be accepted.
26212
26213There are several important syntax enhancements, described in more
26214detail below:
26215
26216  - Augmented assignment, e.g. x += 1
26217
26218  - List comprehensions, e.g. [x**2 for x in range(10)]
26219
26220  - Extended import statement, e.g. import Module as Name
26221
26222  - Extended print statement, e.g. print >> file, "Hello"
26223
26224Other important changes:
26225
26226  - Optional collection of cyclical garbage
26227
26228Python Enhancement Proposal (PEP)
26229---------------------------------
26230
26231PEP stands for Python Enhancement Proposal.  A PEP is a design
26232document providing information to the Python community, or describing
26233a new feature for Python.  The PEP should provide a concise technical
26234specification of the feature and a rationale for the feature.
26235
26236We intend PEPs to be the primary mechanisms for proposing new
26237features, for collecting community input on an issue, and for
26238documenting the design decisions that have gone into Python.  The PEP
26239author is responsible for building consensus within the community and
26240documenting dissenting opinions.
26241
26242The PEPs are available at http://python.sourceforge.net/peps/.
26243
26244Augmented Assignment
26245--------------------
26246
26247This must have been the most-requested feature of the past years!
26248Eleven new assignment operators were added:
26249
26250    += -= *= /= %= **= <<= >>= &= ^= |=
26251
26252For example,
26253
26254    A += B
26255
26256is similar to
26257
26258    A = A + B
26259
26260except that A is evaluated only once (relevant when A is something
26261like dict[index].attr).
26262
26263However, if A is a mutable object, A may be modified in place.  Thus,
26264if A is a number or a string, A += B has the same effect as A = A+B
26265(except A is only evaluated once); but if a is a list, A += B has the
26266same effect as A.extend(B)!
26267
26268Classes and built-in object types can override the new operators in
26269order to implement the in-place behavior; the not-in-place behavior is
26270used automatically as a fallback when an object doesn't implement the
26271in-place behavior.  For classes, the method name is derived from the
26272method name for the corresponding not-in-place operator by inserting
26273an 'i' in front of the name, e.g. __iadd__ implements in-place
26274__add__.
26275
26276Augmented assignment was implemented by Thomas Wouters.
26277
26278
26279List Comprehensions
26280-------------------
26281
26282This is a flexible new notation for lists whose elements are computed
26283from another list (or lists).  The simplest form is:
26284
26285    [<expression> for <variable> in <sequence>]
26286
26287For example, [i**2 for i in range(4)] yields the list [0, 1, 4, 9].
26288This is more efficient than a for loop with a list.append() call.
26289
26290You can also add a condition:
26291
26292    [<expression> for <variable> in <sequence> if <condition>]
26293
26294For example, [w for w in words if w == w.lower()] would yield the list
26295of words that contain no uppercase characters.  This is more efficient
26296than a for loop with an if statement and a list.append() call.
26297
26298You can also have nested for loops and more than one 'if' clause.  For
26299example, here's a function that flattens a sequence of sequences::
26300
26301    def flatten(seq):
26302        return [x for subseq in seq for x in subseq]
26303
26304    flatten([[0], [1,2,3], [4,5], [6,7,8,9], []])
26305
26306This prints
26307
26308    [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
26309
26310List comprehensions originated as a patch set from Greg Ewing; Skip
26311Montanaro and Thomas Wouters also contributed.  Described by PEP 202.
26312
26313
26314Extended Import Statement
26315-------------------------
26316
26317Many people have asked for a way to import a module under a different
26318name.  This can be accomplished like this:
26319
26320    import foo
26321    bar = foo
26322    del foo
26323
26324but this common idiom gets old quickly.  A simple extension of the
26325import statement now allows this to be written as follows:
26326
26327    import foo as bar
26328
26329There's also a variant for 'from ... import':
26330
26331    from foo import bar as spam
26332
26333This also works with packages; e.g. you can write this:
26334
26335    import test.regrtest as regrtest
26336
26337Note that 'as' is not a new keyword -- it is recognized only in this
26338context (this is only possible because the syntax for the import
26339statement doesn't involve expressions).
26340
26341Implemented by Thomas Wouters.  Described by PEP 221.
26342
26343
26344Extended Print Statement
26345------------------------
26346
26347Easily the most controversial new feature, this extension to the print
26348statement adds an option to make the output go to a different file
26349than the default sys.stdout.
26350
26351For example, to write an error message to sys.stderr, you can now
26352write:
26353
26354    print >> sys.stderr, "Error: bad dog!"
26355
26356As a special feature, if the expression used to indicate the file
26357evaluates to None, the current value of sys.stdout is used.  Thus:
26358
26359    print >> None, "Hello world"
26360
26361is equivalent to
26362
26363    print "Hello world"
26364
26365Design and implementation by Barry Warsaw.  Described by PEP 214.
26366
26367
26368Optional Collection of Cyclical Garbage
26369---------------------------------------
26370
26371Python is now equipped with a garbage collector that can hunt down
26372cyclical references between Python objects.  It's no replacement for
26373reference counting; in fact, it depends on the reference counts being
26374correct, and decides that a set of objects belong to a cycle if all
26375their reference counts can be accounted for from their references to
26376each other.  This devious scheme was first proposed by Eric Tiedemann,
26377and brought to implementation by Neil Schemenauer.
26378
26379There's a module "gc" that lets you control some parameters of the
26380garbage collection.  There's also an option to the configure script
26381that lets you enable or disable the garbage collection.  In 2.0b1,
26382it's on by default, so that we (hopefully) can collect decent user
26383experience with this new feature.  There are some questions about its
26384performance.  If it proves to be too much of a problem, we'll turn it
26385off by default in the final 2.0 release.
26386
26387
26388Smaller Changes
26389---------------
26390
26391A new function zip() was added.  zip(seq1, seq2, ...) is equivalent to
26392map(None, seq1, seq2, ...) when the sequences have the same length;
26393i.e. zip([1,2,3], [10,20,30]) returns [(1,10), (2,20), (3,30)].  When
26394the lists are not all the same length, the shortest list wins:
26395zip([1,2,3], [10,20]) returns [(1,10), (2,20)].  See PEP 201.
26396
26397sys.version_info is a tuple (major, minor, micro, level, serial).
26398
26399Dictionaries have an odd new method, setdefault(key, default).
26400dict.setdefault(key, default) returns dict[key] if it exists; if not,
26401it sets dict[key] to default and returns that value.  Thus:
26402
26403    dict.setdefault(key, []).append(item)
26404
26405does the same work as this common idiom:
26406
26407    if not dict.has_key(key):
26408        dict[key] = []
26409    dict[key].append(item)
26410
26411There are two new variants of SyntaxError that are raised for
26412indentation-related errors: IndentationError and TabError.
26413
26414Changed \x to consume exactly two hex digits; see PEP 223.  Added \U
26415escape that consumes exactly eight hex digits.
26416
26417The limits on the size of expressions and file in Python source code
26418have been raised from 2**16 to 2**32.  Previous versions of Python
26419were limited because the maximum argument size the Python VM accepted
26420was 2**16.  This limited the size of object constructor expressions,
26421e.g. [1,2,3] or {'a':1, 'b':2}, and the size of source files.  This
26422limit was raised thanks to a patch by Charles Waldman that effectively
26423fixes the problem.  It is now much more likely that you will be
26424limited by available memory than by an arbitrary limit in Python.
26425
26426The interpreter's maximum recursion depth can be modified by Python
26427programs using sys.getrecursionlimit and sys.setrecursionlimit.  This
26428limit is the maximum number of recursive calls that can be made by
26429Python code.  The limit exists to prevent infinite recursion from
26430overflowing the C stack and causing a core dump.  The default value is
264311000.  The maximum safe value for a particular platform can be found
26432by running Tools/scripts/find_recursionlimit.py.
26433
26434New Modules and Packages
26435------------------------
26436
26437atexit - for registering functions to be called when Python exits.
26438
26439imputil - Greg Stein's alternative API for writing custom import
26440hooks.
26441
26442pyexpat - an interface to the Expat XML parser, contributed by Paul
26443Prescod.
26444
26445xml - a new package with XML support code organized (so far) in three
26446subpackages: xml.dom, xml.sax, and xml.parsers.  Describing these
26447would fill a volume.  There's a special feature whereby a
26448user-installed package named _xmlplus overrides the standard
26449xmlpackage; this is intended to give the XML SIG a hook to distribute
26450backwards-compatible updates to the standard xml package.
26451
26452webbrowser - a platform-independent API to launch a web browser.
26453
26454
26455Changed Modules
26456---------------
26457
26458array -- new methods for array objects: count, extend, index, pop, and
26459remove
26460
26461binascii -- new functions b2a_hex and a2b_hex that convert between
26462binary data and its hex representation
26463
26464calendar -- Many new functions that support features including control
26465over which day of the week is the first day, returning strings instead
26466of printing them.  Also new symbolic constants for days of week,
26467e.g. MONDAY, ..., SUNDAY.
26468
26469cgi -- FieldStorage objects have a getvalue method that works like a
26470dictionary's get method and returns the value attribute of the object.
26471
26472ConfigParser -- The parser object has new methods has_option,
26473remove_section, remove_option, set, and write.  They allow the module
26474to be used for writing config files as well as reading them.
26475
26476ftplib -- ntransfercmd(), transfercmd(), and retrbinary() all now
26477optionally support the RFC 959 REST command.
26478
26479gzip -- readline and readlines now accept optional size arguments
26480
26481httplib -- New interfaces and support for HTTP/1.1 by Greg Stein.  See
26482the module doc strings for details.
26483
26484locale -- implement getdefaultlocale for Win32 and Macintosh
26485
26486marshal -- no longer dumps core when marshaling deeply nested or
26487recursive data structures
26488
26489os -- new functions isatty, seteuid, setegid, setreuid, setregid
26490
26491os/popen2 -- popen2/popen3/popen4 support under Windows.  popen2/popen3
26492support under Unix.
26493
26494os/pty -- support for openpty and forkpty
26495
26496os.path -- fix semantics of os.path.commonprefix
26497
26498smtplib -- support for sending very long messages
26499
26500socket -- new function getfqdn()
26501
26502readline -- new functions to read, write and truncate history files.
26503The readline section of the library reference manual contains an
26504example.
26505
26506select -- add interface to poll system call
26507
26508shutil -- new copyfileobj function
26509
26510SimpleHTTPServer, CGIHTTPServer -- Fix problems with buffering in the
26511HTTP server.
26512
26513Tkinter -- optimization of function flatten
26514
26515urllib -- scans environment variables for proxy configuration,
26516e.g. http_proxy.
26517
26518whichdb -- recognizes dumbdbm format
26519
26520
26521Obsolete Modules
26522----------------
26523
26524None.  However note that 1.6 made a whole slew of modules obsolete:
26525stdwin, soundex, cml, cmpcache, dircache, dump, find, grep, packmail,
26526poly, zmod, strop, util, whatsound.
26527
26528
26529Changed, New, Obsolete Tools
26530----------------------------
26531
26532None.
26533
26534
26535C-level Changes
26536---------------
26537
26538Several cleanup jobs were carried out throughout the source code.
26539
26540All C code was converted to ANSI C; we got rid of all uses of the
26541Py_PROTO() macro, which makes the header files a lot more readable.
26542
26543Most of the portability hacks were moved to a new header file,
26544pyport.h; several other new header files were added and some old
26545header files were removed, in an attempt to create a more rational set
26546of header files.  (Few of these ever need to be included explicitly;
26547they are all included by Python.h.)
26548
26549Trent Mick ensured portability to 64-bit platforms, under both Linux
26550and Win64, especially for the new Intel Itanium processor.  Mick also
26551added large file support for Linux64 and Win64.
26552
26553The C APIs to return an object's size have been update to consistently
26554use the form PyXXX_Size, e.g. PySequence_Size and PyDict_Size.  In
26555previous versions, the abstract interfaces used PyXXX_Length and the
26556concrete interfaces used PyXXX_Size.  The old names,
26557e.g. PyObject_Length, are still available for backwards compatibility
26558at the API level, but are deprecated.
26559
26560The PyOS_CheckStack function has been implemented on Windows by
26561Fredrik Lundh.  It prevents Python from failing with a stack overflow
26562on Windows.
26563
26564The GC changes resulted in creation of two new slots on object,
26565tp_traverse and tp_clear.  The augmented assignment changes result in
26566the creation of a new slot for each in-place operator.
26567
26568The GC API creates new requirements for container types implemented in
26569C extension modules.  See Include/objimpl.h for details.
26570
26571PyErr_Format has been updated to automatically calculate the size of
26572the buffer needed to hold the formatted result string.  This change
26573prevents crashes caused by programmer error.
26574
26575New C API calls: PyObject_AsFileDescriptor, PyErr_WriteUnraisable.
26576
26577PyRun_AnyFileEx, PyRun_SimpleFileEx, PyRun_FileEx -- New functions
26578that are the same as their non-Ex counterparts except they take an
26579extra flag argument that tells them to close the file when done.
26580
26581XXX There were other API changes that should be fleshed out here.
26582
26583
26584Windows Changes
26585---------------
26586
26587New popen2/popen3/peopen4 in os module (see Changed Modules above).
26588
26589os.popen is much more usable on Windows 95 and 98.  See Microsoft
26590Knowledge Base article Q150956.  The Win9x workaround described there
26591is implemented by the new w9xpopen.exe helper in the root of your
26592Python installation.  Note that Python uses this internally; it is not
26593a standalone program.
26594
26595Administrator privileges are no longer required to install Python
26596on Windows NT or Windows 2000.  If you have administrator privileges,
26597Python's registry info will be written under HKEY_LOCAL_MACHINE.
26598Otherwise the installer backs off to writing Python's registry info
26599under HKEY_CURRENT_USER.  The latter is sufficient for all "normal"
26600uses of Python, but will prevent some advanced uses from working
26601(for example, running a Python script as an NT service, or possibly
26602from CGI).
26603
26604[This was new in 1.6] The installer no longer runs a separate Tcl/Tk
26605installer; instead, it installs the needed Tcl/Tk files directly in the
26606Python directory.  If you already have a Tcl/Tk installation, this
26607wastes some disk space (about 4 Megs) but avoids problems with
26608conflicting Tcl/Tk installations, and makes it much easier for Python
26609to ensure that Tcl/Tk can find all its files.
26610
26611[This was new in 1.6] The Windows installer now installs by default in
26612\Python20\ on the default volume, instead of \Program Files\Python-2.0\.
26613
26614
26615Updates to the changes between 1.5.2 and 1.6
26616--------------------------------------------
26617
26618The 1.6 NEWS file can't be changed after the release is done, so here
26619is some late-breaking news:
26620
26621New APIs in locale.py: normalize(), getdefaultlocale(), resetlocale(),
26622and changes to getlocale() and setlocale().
26623
26624The new module is now enabled per default.
26625
26626It is not true that the encodings codecs cannot be used for normal
26627strings: the string.encode() (which is also present on 8-bit strings
26628!) allows using them for 8-bit strings too, e.g. to convert files from
26629cp1252 (Windows) to latin-1 or vice-versa.
26630
26631Japanese codecs are available from Tamito KAJIYAMA:
26632http://pseudo.grad.sccs.chukyo-u.ac.jp/~kajiyama/python/
26633
26634
26635======================================================================
26636
26637
26638=======================================
26639==> Release 1.6 (September 5, 2000) <==
26640=======================================
26641
26642What's new in release 1.6?
26643==========================
26644
26645Below is a list of all relevant changes since release 1.5.2.
26646
26647
26648Source Incompatibilities
26649------------------------
26650
26651Several small incompatible library changes may trip you up:
26652
26653  - The append() method for lists can no longer be invoked with more
26654  than one argument.  This used to append a single tuple made out of
26655  all arguments, but was undocumented.  To append a tuple, use
26656  e.g. l.append((a, b, c)).
26657
26658  - The connect(), connect_ex() and bind() methods for sockets require
26659  exactly one argument.  Previously, you could call s.connect(host,
26660  port), but this was undocumented. You must now write
26661  s.connect((host, port)).
26662
26663  - The str() and repr() functions are now different more often.  For
26664  long integers, str() no longer appends a 'L'.  Thus, str(1L) == '1',
26665  which used to be '1L'; repr(1L) is unchanged and still returns '1L'.
26666  For floats, repr() now gives 17 digits of precision, to ensure no
26667  precision is lost (on all current hardware).
26668
26669  - The -X option is gone.  Built-in exceptions are now always
26670  classes.  Many more library modules also have been converted to
26671  class-based exceptions.
26672
26673
26674Binary Incompatibilities
26675------------------------
26676
26677- Third party extensions built for Python 1.5.x cannot be used with
26678Python 1.6; these extensions will have to be rebuilt for Python 1.6.
26679
26680- On Windows, attempting to import a third party extension built for
26681Python 1.5.x results in an immediate crash; there's not much we can do
26682about this.  Check your PYTHONPATH environment variable!
26683
26684
26685Overview of Changes since 1.5.2
26686-------------------------------
26687
26688For this overview, I have borrowed from the document "What's New in
26689Python 2.0" by Andrew Kuchling and Moshe Zadka:
26690http://www.amk.ca/python/2.0/ .
26691
26692There are lots of new modules and lots of bugs have been fixed.  A
26693list of all new modules is included below.
26694
26695Probably the most pervasive change is the addition of Unicode support.
26696We've added a new fundamental datatype, the Unicode string, a new
26697built-in function unicode(), and numerous C APIs to deal with Unicode
26698and encodings.  See the file Misc/unicode.txt for details, or
26699http://starship.python.net/crew/lemburg/unicode-proposal.txt.
26700
26701Two other big changes, related to the Unicode support, are the
26702addition of string methods and (yet another) new regular expression
26703engine.
26704
26705  - String methods mean that you can now say s.lower() etc. instead of
26706  importing the string module and saying string.lower(s) etc.  One
26707  peculiarity is that the equivalent of string.join(sequence,
26708  delimiter) is delimiter.join(sequence).  Use " ".join(sequence) for
26709  the effect of string.join(sequence); to make this more readable, try
26710  space=" " first.  Note that the maxsplit argument defaults in
26711  split() and replace() have changed from 0 to -1.
26712
26713  - The new regular expression engine, SRE by Fredrik Lundh, is fully
26714  backwards compatible with the old engine, and is in fact invoked
26715  using the same interface (the "re" module).  You can explicitly
26716  invoke the old engine by import pre, or the SRE engine by importing
26717  sre.  SRE is faster than pre, and supports Unicode (which was the
26718  main reason to put effort in yet another new regular expression
26719  engine -- this is at least the fourth!).
26720
26721
26722Other Changes
26723-------------
26724
26725Other changes that won't break code but are nice to know about:
26726
26727Deleting objects is now safe even for deeply nested data structures.
26728
26729Long/int unifications: long integers can be used in seek() calls, as
26730slice indexes.
26731
26732String formatting (s % args) has a new formatting option, '%r', which
26733acts like '%s' but inserts repr(arg) instead of str(arg). (Not yet in
26734alpha 1.)
26735
26736Greg Ward's "distutils" package is included: this will make
26737installing, building and distributing third party packages much
26738simpler.
26739
26740There's now special syntax that you can use instead of the apply()
26741function.  f(*args, **kwds) is equivalent to apply(f, args, kwds).
26742You can also use variations f(a1, a2, *args, **kwds) and you can leave
26743one or the other out: f(*args), f(**kwds).
26744
26745The built-ins int() and long() take an optional second argument to
26746indicate the conversion base -- of course only if the first argument
26747is a string.  This makes string.atoi() and string.atol() obsolete.
26748(string.atof() was already obsolete).
26749
26750When a local variable is known to the compiler but undefined when
26751used, a new exception UnboundLocalError is raised.  This is a class
26752derived from NameError so code catching NameError should still work.
26753The purpose is to provide better diagnostics in the following example:
26754  x = 1
26755  def f():
26756      print x
26757      x = x+1
26758This used to raise a NameError on the print statement, which confused
26759even experienced Python programmers (especially if there are several
26760hundreds of lines of code between the reference and the assignment to
26761x :-).
26762
26763You can now override the 'in' operator by defining a __contains__
26764method.  Note that it has its arguments backwards: x in a causes
26765a.__contains__(x) to be called.  That's why the name isn't __in__.
26766
26767The exception AttributeError will have a more friendly error message,
26768e.g.: <code>'Spam' instance has no attribute 'eggs'</code>.  This may
26769<b>break code</b> that expects the message to be exactly the attribute
26770name.
26771
26772
26773New Modules in 1.6
26774------------------
26775
26776UserString - base class for deriving from the string type.
26777
26778distutils - tools for distributing Python modules.
26779
26780robotparser - parse a robots.txt file, for writing web spiders.
26781(Moved from Tools/webchecker/.)
26782
26783linuxaudiodev - audio for Linux.
26784
26785mmap - treat a file as a memory buffer.  (Windows and Unix.)
26786
26787sre - regular expressions (fast, supports unicode).  Currently, this
26788code is very rough.  Eventually, the re module will be reimplemented
26789using sre (without changes to the re API).
26790
26791filecmp - supersedes the old cmp.py and dircmp.py modules.
26792
26793tabnanny - check Python sources for tab-width dependence.  (Moved from
26794Tools/scripts/.)
26795
26796urllib2 - new and improved but incompatible version of urllib (still
26797experimental).
26798
26799zipfile - read and write zip archives.
26800
26801codecs - support for Unicode encoders/decoders.
26802
26803unicodedata - provides access to the Unicode 3.0 database.
26804
26805_winreg - Windows registry access.
26806
26807encodings - package which provides a large set of standard codecs --
26808currently only for the new Unicode support. It has a drop-in extension
26809mechanism which allows you to add new codecs by simply copying them
26810into the encodings package directory. Asian codec support will
26811probably be made available as separate distribution package built upon
26812this technique and the new distutils package.
26813
26814
26815Changed Modules
26816---------------
26817
26818readline, ConfigParser, cgi, calendar, posix, readline, xmllib, aifc,
26819chunk, wave, random, shelve, nntplib - minor enhancements.
26820
26821socket, httplib, urllib - optional OpenSSL support (Unix only).
26822
26823_tkinter - support for 8.0 up to 8.3.  Support for versions older than
268248.0 has been dropped.
26825
26826string - most of this module is deprecated now that strings have
26827methods.  This no longer uses the built-in strop module, but takes
26828advantage of the new string methods to provide transparent support for
26829both Unicode and ordinary strings.
26830
26831
26832Changes on Windows
26833------------------
26834
26835The installer no longer runs a separate Tcl/Tk installer; instead, it
26836installs the needed Tcl/Tk files directly in the Python directory.  If
26837you already have a Tcl/Tk installation, this wastes some disk space
26838(about 4 Megs) but avoids problems with conflincting Tcl/Tk
26839installations, and makes it much easier for Python to ensure that
26840Tcl/Tk can find all its files.  Note: the alpha installers don't
26841include the documentation.
26842
26843The Windows installer now installs by default in \Python16\ on the
26844default volume, instead of \Program Files\Python-1.6\.
26845
26846
26847Changed Tools
26848-------------
26849
26850IDLE - complete overhaul.  See the <a href="../idle/">IDLE home
26851page</a> for more information.  (Python 1.6 alpha 1 will come with
26852IDLE 0.6.)
26853
26854Tools/i18n/pygettext.py - Python equivalent of xgettext(1).  A message
26855text extraction tool used for internationalizing applications written
26856in Python.
26857
26858
26859Obsolete Modules
26860----------------
26861
26862stdwin and everything that uses it.  (Get Python 1.5.2 if you need
26863it. :-)
26864
26865soundex.  (Skip Montanaro has a version in Python but it won't be
26866included in the Python release.)
26867
26868cmp, cmpcache, dircmp.  (Replaced by filecmp.)
26869
26870dump.  (Use pickle.)
26871
26872find.  (Easily coded using os.walk().)
26873
26874grep.  (Not very useful as a library module.)
26875
26876packmail.  (No longer has any use.)
26877
26878poly, zmod.  (These were poor examples at best.)
26879
26880strop.  (No longer needed by the string module.)
26881
26882util.  (This functionality was long ago built in elsewhere).
26883
26884whatsound.  (Use sndhdr.)
26885
26886
26887Detailed Changes from 1.6b1 to 1.6
26888----------------------------------
26889
26890- Slight changes to the CNRI license.  A copyright notice has been
26891added; the requirement to indicate the nature of modifications now
26892applies when making a derivative work available "to others" instead of
26893just "to the public"; the version and date are updated.  The new
26894license has a new handle.
26895
26896- Added the Tools/compiler package.  This is a project led by Jeremy
26897Hylton to write the Python bytecode generator in Python.
26898
26899- The function math.rint() is removed.
26900
26901- In Python.h, "#define _GNU_SOURCE 1" was added.
26902
26903- Version 0.9.1 of Greg Ward's distutils is included (instead of
26904version 0.9).
26905
26906- A new version of SRE is included.  It is more stable, and more
26907compatible with the old RE module.  Non-matching ranges are indicated
26908by -1, not None.  (The documentation said None, but the PRE
26909implementation used -1; changing to None would break existing code.)
26910
26911- The winreg module has been renamed to _winreg.  (There are plans for
26912a higher-level API called winreg, but this has not yet materialized in
26913a form that is acceptable to the experts.)
26914
26915- The _locale module is enabled by default.
26916
26917- Fixed the configuration line for the _curses module.
26918
26919- A few crashes have been fixed, notably <file>.writelines() with a
26920list containing non-string objects would crash, and there were
26921situations where a lost SyntaxError could dump core.
26922
26923- The <list>.extend() method now accepts an arbitrary sequence
26924argument.
26925
26926- If __str__() or __repr__() returns a Unicode object, this is
26927converted to an 8-bit string.
26928
26929- Unicode string comparisons is no longer aware of UTF-16
26930encoding peculiarities; it's a straight 16-bit compare.
26931
26932- The Windows installer now installs the LICENSE file and no longer
26933registers the Python DLL version in the registry (this is no longer
26934needed).  It now uses Tcl/Tk 8.3.2.
26935
26936- A few portability problems have been fixed, in particular a
26937compilation error involving socklen_t.
26938
26939- The PC configuration is slightly friendlier to non-Microsoft
26940compilers.
26941
26942
26943======================================================================
26944
26945
26946======================================
26947==> Release 1.5.2 (April 13, 1999) <==
26948======================================
26949
26950From 1.5.2c1 to 1.5.2 (final)
26951=============================
26952
26953Tue Apr 13 15:44:49 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
26954
26955	* PCbuild/python15.wse: Bump version to 1.5.2 (final)
26956
26957	* PCbuild/python15.dsp: Added shamodule.c
26958
26959	* PC/config.c: Added sha module!
26960
26961	* README, Include/patchlevel.h: Prepare for final release.
26962
26963	* Misc/ACKS:
26964	More (Cameron Laird is honorary; the others are 1.5.2c1 testers).
26965
26966	* Python/thread_solaris.h:
26967	While I can't really test this thoroughly, Pat Knight and the Solaris
26968	man pages suggest that the proper thing to do is to add THR_NEW_LWP to
26969	the flags on thr_create(), and that there really isn't a downside, so
26970	I'll do that.
26971
26972	* Misc/ACKS:
26973	Bunch of new names who helped iron out the last wrinkles of 1.5.2.
26974
26975	* PC/python_nt.rc:
26976	Bump the myusterious M$ version number from 1,5,2,1 to 1,5,2,3.
26977	(I can't even display this on NT, maybe Win/98 can?)
26978
26979	* Lib/pstats.py:
26980	Fix mysterious references to jprofile that were in the source since
26981	its creation.  I'm assuming these were once valid references to "Jim
26982	Roskind's profile"...
26983
26984	* Lib/Attic/threading_api.py:
26985	Removed; since long subsumed in Doc/lib/libthreading.tex
26986
26987	* Modules/socketmodule.c:
26988	Put back __osf__ support for gethostbyname_r(); the real bug was that
26989	it was being used even without threads.  This of course might be an
26990	all-platform problem so now we only use the _r variant when we are
26991	using threads.
26992
26993Mon Apr 12 22:51:20 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
26994
26995	* Modules/cPickle.c:
26996	Fix accidentally reversed NULL test in load_mark().  Suggested by
26997	Tamito Kajiyama.  (This caused a bug only on platforms where malloc(0)
26998	returns NULL.)
26999
27000	* README:
27001	Add note about popen2 problem on Linux noticed by Pablo Bleyer.
27002
27003	* README: Add note about -D_REENTRANT for HP-UX 10.20.
27004
27005	* Modules/Makefile.pre.in: 'clean' target should remove hassignal.
27006
27007	* PC/Attic/vc40.mak, PC/readme.txt:
27008	Remove all VC++ info (except VC 1.5) from readme.txt;
27009	remove the VC++ 4.0 project file; remove the unused _tkinter extern defs.
27010
27011	* README: Clarify PC build instructions (point to PCbuild).
27012
27013	* Modules/zlibmodule.c: Cast added by Jack Jansen (for Mac port).
27014
27015	* Lib/plat-sunos5/CDIO.py, Lib/plat-linux2/CDROM.py:
27016	Forgot to add this file.  CDROM device parameters.
27017
27018	* Lib/gzip.py: Two different changes.
27019
27020	1. Jack Jansen reports that on the Mac, the time may be negative, and
27021	solves this by adding a write32u() function that writes an unsigned
27022	long.
27023
27024	2. On 64-bit platforms the CRC comparison fails; I've fixed this by
27025	casting both values to be compared to "unsigned long" i.e. modulo
27026	0x100000000L.
27027
27028Sat Apr 10 18:42:02 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27029
27030	* PC/Attic/_tkinter.def: No longer needed.
27031
27032	* Misc/ACKS: Correct missed character in Andrew Dalke's name.
27033
27034	* README: Add DEC Ultrix notes (from Donn Cave's email).
27035
27036	* configure: The usual
27037
27038	* configure.in:
27039	Quote a bunch of shell variables used in test, related to long-long.
27040
27041	* Objects/fileobject.c, Modules/shamodule.c, Modules/regexpr.c:
27042	casts for picky compilers.
27043
27044	* Modules/socketmodule.c:
27045	3-arg gethostbyname_r doesn't really work on OSF/1.
27046
27047	* PC/vc15_w31/_.c, PC/vc15_lib/_.c, Tools/pynche/__init__.py:
27048	Avoid totally empty files.
27049
27050Fri Apr  9 14:56:35 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27051
27052	* Tools/scripts/fixps.py: Use re instead of regex.
27053	Don't rewrite the file in place.
27054	(Reported by Andy Dustman.)
27055
27056	* Lib/netrc.py, Lib/shlex.py: Get rid of #! line
27057
27058Thu Apr  8 23:13:37 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27059
27060	* PCbuild/python15.wse: Use the Tcl 8.0.5 installer.
27061	Add a variable %_TCL_% that makes it easier to switch to a different version.
27062
27063
27064======================================================================
27065
27066
27067From 1.5.2b2 to 1.5.2c1
27068=======================
27069
27070Thu Apr  8 23:13:37 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27071
27072	* PCbuild/python15.wse:
27073	Release 1.5.2c1.  Add IDLE and Uninstall to program group.
27074	Don't distribute zlib.dll.  Tweak some comments.
27075
27076	* PCbuild/zlib.dsp: Now using static zlib 1.1.3
27077
27078	* Lib/dos-8x3/userdict.py, Lib/dos-8x3/userlist.py, Lib/dos-8x3/test_zli.py, Lib/dos-8x3/test_use.py, Lib/dos-8x3/test_pop.py, Lib/dos-8x3/test_pic.py, Lib/dos-8x3/test_ntp.py, Lib/dos-8x3/test_gzi.py, Lib/dos-8x3/test_fcn.py, Lib/dos-8x3/test_cpi.py, Lib/dos-8x3/test_bsd.py, Lib/dos-8x3/posixfil.py, Lib/dos-8x3/mimetype.py, Lib/dos-8x3/nturl2pa.py, Lib/dos-8x3/compilea.py, Lib/dos-8x3/exceptio.py, Lib/dos-8x3/basehttp.py:
27079	The usual
27080
27081	* Include/patchlevel.h: Release 1.5.2c1
27082
27083	* README: Release 1.5.2c1.
27084
27085	* Misc/NEWS: News for the 1.5.2c1 release.
27086
27087	* Lib/test/test_strftime.py:
27088	On Windows, we suddenly find, strftime() may return "" for an
27089	unsupported format string.  (I guess this is because the logic for
27090	deciding whether to reallocate the buffer or not has been improved.)
27091	This caused the test code to crash on result[0].  Fix this by assuming
27092	an empty result also means the format is not supported.
27093
27094	* Demo/tkinter/matt/window-creation-w-location.py:
27095	This demo imported some private code from Matt.  Make it cripple along.
27096
27097	* Lib/lib-tk/Tkinter.py:
27098	Delete an accidentally checked-in feature that actually broke more
27099	than was worth it: when deleting a canvas item, it would try to
27100	automatically delete the bindings for that item.  Since there's
27101	nothing that says you can't reuse the tag and still have the bindings,
27102	this is not correct.  Also, it broke at least one demo
27103	(Demo/tkinter/matt/rubber-band-box-demo-1.py).
27104
27105	* Python/thread_wince.h: Win/CE thread support by Mark Hammond.
27106
27107Wed Apr  7 20:23:17 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27108
27109	* Modules/zlibmodule.c:
27110	Patch by Andrew Kuchling to unflush() (flush() for deflating).
27111	Without this, if inflate() returned Z_BUF_ERROR asking for more output
27112	space, we would report the error; now, we increase the buffer size and
27113	try again, just as for Z_OK.
27114
27115	* Lib/test/test_gzip.py: Use binary mode for all gzip files we open.
27116
27117	* Tools/idle/ChangeLog: New change log.
27118
27119	* Tools/idle/README.txt, Tools/idle/NEWS.txt: New version.
27120
27121	* Python/pythonrun.c:
27122	Alas, get rid of the Win specific hack to ask the user to press Return
27123	before exiting when an error happened.  This didn't work right when
27124	Python is invoked from a daemon.
27125
27126	* Tools/idle/idlever.py: Version bump awaiting impending new release.
27127	(Not much has changed :-( )
27128
27129	* Lib/lib-tk/Tkinter.py:
27130	lower, tkraise/lift hide Misc.lower, Misc.tkraise/lift,
27131	so the preferred name for them is tag_lower, tag_raise
27132	(similar to tag_bind, and similar to the Text widget);
27133	unfortunately can't delete the old ones yet (maybe in 1.6)
27134
27135	* Python/thread.c, Python/strtod.c, Python/mystrtoul.c, Python/import.c, Python/ceval.c:
27136	Changes by Mark Hammond for Windows CE.  Mostly of the form
27137	  #ifdef DONT_HAVE_header_H ... #endif around #include <header.h>.
27138
27139	* Python/bltinmodule.c:
27140	Remove unused variable from complex_from_string() code.
27141
27142	* Include/patchlevel.h:
27143	Add the possibility of a gamma release (release candidate).
27144	Add '+' to string version number to indicate we're beyond b2 now.
27145
27146	* Modules/posixmodule.c: Add extern decl for fsync() for SunOS 4.x.
27147
27148	* Lib/smtplib.py: Changes by Per Cederquist and The Dragon.
27149
27150	Per writes:
27151
27152	"""
27153	The application where Signum Support uses smtplib needs to be able to
27154	report good error messages to the user when sending email fails.  To
27155	help in diagnosing problems it is useful to be able to report the
27156	entire message sent by the server, not only the SMTP error code of the
27157	offending command.
27158
27159	A lot of the functions in sendmail.py unfortunately discards the
27160	message, leaving only the code.  The enclosed patch fixes that
27161	problem.
27162
27163	The enclosed patch also introduces a base class for exceptions that
27164	include an SMTP error code and error message, and make the code and
27165	message available on separate attributes, so that surrounding code can
27166	deal with them in whatever way it sees fit.  I've also added some
27167	documentation to the exception classes.
27168
27169	The constructor will now raise an exception if it cannot connect to
27170	the SMTP server.
27171
27172	The data() method will raise an SMTPDataError if it doesn't receive
27173	the expected 354 code in the middle of the exchange.
27174
27175	According to section 5.2.10 of RFC 1123 a smtp client must accept "any
27176	text, including no text at all" after the error code.  If the response
27177	of a HELO command contains no text self.helo_resp will be set to the
27178	empty string ("").  The patch fixes the test in the sendmail() method
27179	so that helo_resp is tested against None; if it has the empty string
27180	as value the sendmail() method would invoke the helo() method again.
27181
27182	The code no longer accepts a -1 reply from the ehlo() method in
27183	sendmail().
27184
27185	[Text about removing SMTPRecipientsRefused deleted --GvR]
27186	"""
27187
27188	and also:
27189
27190	"""
27191	smtplib.py appends an extra blank line to the outgoing mail if the
27192	`msg' argument to the sendmail method already contains a trailing
27193	newline.  This patch should fix the problem.
27194	"""
27195
27196	The Dragon writes:
27197
27198	"""
27199		Mostly I just re-added the SMTPRecipientsRefused exception
27200	(the exeption object now has the appropriate info in it ) [Per had
27201	removed this in his patch --GvR] and tweaked the behavior of the
27202	sendmail method whence it throws the newly added SMTPHeloException (it
27203	was closing the connection, which it shouldn't.  whatever catches the
27204	exception should do that. )
27205
27206		I pondered the change of the return values to tuples all around,
27207	and after some thinking I decided that regularizing the return values was
27208	too much of the Right Thing (tm) to not do.
27209
27210		My one concern is that code expecting an integer & getting a tuple
27211	may fail silently.
27212
27213	(i.e. if it's doing :
27214
27215	      x.somemethod() >= 400:
27216	expecting an integer, the expression will always be true if it gets a
27217	tuple instead. )
27218
27219		However, most smtplib code I've seen only really uses the
27220	sendmail() method, so this wouldn't bother it.  Usually code I've seen
27221	that calls the other methods usually only calls helo() and ehlo() for
27222	doing ESMTP, a feature which was not in the smtplib included with 1.5.1,
27223	and thus I would think not much code uses it yet.
27224	"""
27225
27226Tue Apr  6 19:38:18 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27227
27228	* Lib/test/test_ntpath.py:
27229	Fix the tests now that splitdrive() no longer treats UNC paths special.
27230	(Some tests converted to splitunc() tests.)
27231
27232	* Lib/ntpath.py:
27233	Withdraw the UNC support from splitdrive().  Instead, a new function
27234	splitunc() parses UNC paths.  The contributor of the UNC parsing in
27235	splitdrive() doesn't like it, but I haven't heard a good reason to
27236	keep it, and it causes some problems.  (I think there's a
27237	philosophical problem -- to me, the split*() functions are purely
27238	syntactical, and the fact that \\foo is not a valid path doesn't mean
27239	that it shouldn't be considered an absolute path.)
27240
27241	Also (quite separately, but strangely related to the philosophical
27242	issue above) fix abspath() so that if win32api exists, it doesn't fail
27243	when the path doesn't actually exist -- if GetFullPathName() fails,
27244	fall back on the old strategy (join with getcwd() if necessary, and
27245	then use normpath()).
27246
27247	* configure.in, configure, config.h.in, acconfig.h:
27248	For BeOS PowerPC.  Chris Herborth.
27249
27250Mon Apr  5 21:54:14 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27251
27252	* Modules/timemodule.c:
27253	Jonathan Giddy notes, and Chris Lawrence agrees, that some comments on
27254	#else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
27255
27256	* Misc/ACKS:
27257	Bunch of new contributors, including 9 who contributed to the Docs,
27258	reported by Fred.
27259
27260Mon Apr  5 18:37:59 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
27261
27262	* Lib/gzip.py:
27263	Oops, missed mode parameter to open().
27264
27265	* Lib/gzip.py:
27266	Made the default mode 'rb' instead of 'r', for better cross-platform
27267	support.  (Based on comment on the documentation by Bernhard Reiter
27268	<bernhard@csd.uwm.edu>).
27269
27270Fri Apr  2 22:18:25 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27271
27272	* Tools/scripts/dutree.py:
27273	For reasons I dare not explain, this script should always execute
27274	main() when imported (in other words, it is not usable as a module).
27275
27276Thu Apr  1 15:32:30 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27277
27278	* Lib/test/test_cpickle.py: Jonathan Giddy write:
27279
27280	In test_cpickle.py, the module os got imported, but the line to remove
27281	the temp file has gone missing.
27282
27283Tue Mar 30 20:17:31 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27284
27285	* Lib/BaseHTTPServer.py: Per Cederqvist writes:
27286
27287	If you send something like "PUT / HTTP/1.0" to something derived from
27288	BaseHTTPServer that doesn't define do_PUT, you will get a response
27289	that begins like this:
27290
27291		HTTP/1.0 501 Unsupported method ('do_PUT')
27292		Server: SimpleHTTP/0.3 Python/1.5
27293		Date: Tue, 30 Mar 1999 18:53:53 GMT
27294
27295	The server should complain about 'PUT' instead of 'do_PUT'.  This
27296	patch should fix the problem.
27297
27298Mon Mar 29 20:33:21 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27299
27300	* Lib/smtplib.py: Patch by Per Cederqvist, who writes:
27301
27302	"""
27303	 - It needlessly used the makefile() method for each response that is
27304	   read from the SMTP server.
27305
27306	 - If the remote SMTP server closes the connection unexpectedly the
27307	   code raised an IndexError.  It now raises an SMTPServerDisconnected
27308	   exception instead.
27309
27310	 - The code now checks that all lines in a multiline response actually
27311	   contains an error code.
27312	"""
27313
27314	The Dragon approves.
27315
27316Mon Mar 29 20:25:40 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
27317
27318	* Lib/compileall.py:
27319	When run as a script, report failures in the exit code as well.
27320	Patch largely based on changes by Andrew Dalke, as discussed in the
27321	distutils-sig.
27322
27323Mon Mar 29 20:23:41 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27324
27325	* Lib/urllib.py:
27326	Hack so that if a 302 or 301 redirect contains a relative URL, the
27327	right thing "just happens" (basejoin() with old URL).
27328
27329	* Modules/cPickle.c:
27330	Protection against picling to/from closed (real) file.
27331	The problem was reported by Moshe Zadka.
27332
27333	* Lib/test/test_cpickle.py:
27334	Test protection against picling to/from closed (real) file.
27335
27336	* Modules/timemodule.c: Chris Lawrence writes:
27337
27338	"""
27339	The GNU folks, in their infinite wisdom, have decided not to implement
27340	altzone in libc6; this would not be horrible, except that timezone
27341	(which is implemented) includes the current DST setting (i.e. timezone
27342	for Central is 18000 in summer and 21600 in winter).  So Python's
27343	timezone and altzone variables aren't set correctly during DST.
27344
27345	Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone
27346	show the "right" thing on Linux (by using the tm_gmtoff stuff
27347	available in BSD, which is how the GLIBC manual claims things should
27348	be done) and (b) should cope with the southern hemisphere.  In pursuit
27349	of (b), I also took the liberty of renaming the "summer" and "winter"
27350	variables to "july" and "jan".  This patch should also make certain
27351	time calculations on Linux actually work right (like the tz-aware
27352	functions in the rfc822 module).
27353
27354	(It's hard to find DST that's currently being used in the southern
27355	hemisphere; I tested using Africa/Windhoek.)
27356	"""
27357
27358	* Lib/test/output/test_gzip:
27359	Jonathan Giddy discovered this file was missing.
27360
27361	* Modules/shamodule.c:
27362	Avoid warnings from AIX compiler.  Reported by Vladimir (AIX is my
27363	middlename) Marangozov, patch coded by Greg Stein.
27364
27365	* Tools/idle/ScriptBinding.py, Tools/idle/PyShell.py:
27366	At Tim Peters' recommendation, add a dummy flush() method to PseudoFile.
27367
27368Sun Mar 28 17:55:32 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27369
27370	* Tools/scripts/ndiff.py: Tim Peters writes:
27371
27372	I should have waited overnight <wink/sigh>.  Nothing wrong with the one I
27373	sent, but I couldn't resist going on to add new -r1 / -r2 cmdline options
27374	for recreating the original files from ndiff's output.  That's attached, if
27375	you're game!  Us Windows guys don't usually have a sed sitting around
27376	<wink>.
27377
27378Sat Mar 27 13:34:01 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27379
27380	* Tools/scripts/ndiff.py: Tim Peters writes:
27381
27382	Attached is a cleaned-up version of ndiff (added useful module
27383	docstring, now echo'ed in case of cmd line mistake); added -q option
27384	to suppress initial file identification lines; + other minor cleanups,
27385	& a slightly faster match engine.
27386
27387Fri Mar 26 22:36:00 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
27388
27389	* Tools/scripts/dutree.py:
27390	During display, if EPIPE is raised, it's probably because a pager was
27391	killed.  Discard the error in that case, but propagate it otherwise.
27392
27393Fri Mar 26 16:20:45 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27394
27395	* Lib/test/output/test_userlist, Lib/test/test_userlist.py:
27396	Test suite for UserList.
27397
27398	* Lib/UserList.py: Use isinstance() where appropriate.
27399	Reformatted with 4-space indent.
27400
27401Fri Mar 26 16:11:40 1999  Barry Warsaw  <bwarsaw@eric.cnri.reston.va.us>
27402
27403	* Tools/pynche/PyncheWidget.py:
27404	Helpwin.__init__(): The text widget should get focus.
27405
27406	* Tools/pynche/pyColorChooser.py:
27407	Removed unnecessary import `from PyncheWidget import PyncheWidget'
27408
27409Fri Mar 26 15:32:05 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27410
27411	* Lib/test/output/test_userdict, Lib/test/test_userdict.py:
27412	Test suite for UserDict
27413
27414	* Lib/UserDict.py: Improved a bunch of things.
27415	The constructor now takes an optional dictionary.
27416	Use isinstance() where appropriate.
27417
27418Thu Mar 25 22:38:49 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27419
27420	* Lib/test/output/test_pickle, Lib/test/output/test_cpickle, Lib/test/test_pickle.py, Lib/test/test_cpickle.py:
27421	Basic regr tests for pickle/cPickle
27422
27423	* Lib/pickle.py:
27424	Don't use "exec" in find_class().  It's slow, unnecessary, and (as AMK
27425	points out) it doesn't work in JPython Applets.
27426
27427Thu Mar 25 21:50:27 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us>
27428
27429	* Lib/test/test_gzip.py:
27430	Added a simple test suite for gzip.  It simply opens a temp file,
27431	writes a chunk of compressed data, closes it, writes another chunk, and
27432	reads the contents back to verify that they are the same.
27433
27434	* Lib/gzip.py:
27435	Based on a suggestion from bruce@hams.com, make a trivial change to
27436	allow using the 'a' flag as a mode for opening a GzipFile.  gzip
27437	files, surprisingly enough, can be concatenated and then decompressed;
27438	the effect is to concatenate the two chunks of data.
27439
27440	If we support it on writing, it should also be supported on reading.
27441	This *wasn't* trivial, and required rearranging the code in the
27442	reading path, particularly the _read() method.
27443
27444	Raise IOError instead of RuntimeError in two cases, 'Not a gzipped file'
27445	and 'Unknown compression method'
27446
27447Thu Mar 25 21:25:01 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27448
27449	* Lib/test/test_b1.py:
27450	Add tests for float() and complex() with string args (Nick/Stephanie
27451	Lockwood).
27452
27453Thu Mar 25 21:21:08 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us>
27454
27455	* Modules/zlibmodule.c:
27456	Add an .unused_data attribute to decompressor objects.  If .unused_data
27457	is not an empty string, this means that you have arrived at the
27458	end of the stream of compressed data, and the contents of .unused_data are
27459	whatever follows the compressed stream.
27460
27461Thu Mar 25 21:16:07 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27462
27463	* Python/bltinmodule.c:
27464	Patch by Nick and Stephanie Lockwood to implement complex() with a string
27465	argument.  This closes TODO item 2.19.
27466
27467Wed Mar 24 19:09:00 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27468
27469	* Tools/webchecker/wcnew.py: Added Samuel Bayer's new webchecker.
27470	Unfortunately his code breaks wcgui.py in a way that's not easy
27471	to fix.  I expect that this is a temporary situation --
27472	eventually Sam's changes will be merged back in.
27473	(The changes add a -t option to specify exceptions to the -x
27474	option, and explicit checking for #foo style fragment ids.)
27475
27476	* Objects/dictobject.c:
27477	Vladimir Marangozov contributed updated comments.
27478
27479	* Objects/bufferobject.c: Folded long lines.
27480
27481	* Lib/test/output/test_sha, Lib/test/test_sha.py:
27482	Added Jeremy's test code for the sha module.
27483
27484	* Modules/shamodule.c, Modules/Setup.in:
27485	Added Greg Stein and Andrew Kuchling's sha module.
27486	Fix comments about zlib version and URL.
27487
27488	* Lib/test/test_bsddb.py: Remove the temp file when we're done.
27489
27490	* Include/pythread.h: Conform to standard boilerplate.
27491
27492	* configure.in, configure, BeOS/linkmodule, BeOS/ar-fake:
27493	Chris Herborth: the new compiler in R4.1 needs some new options to work...
27494
27495	* Modules/socketmodule.c:
27496	Implement two suggestions by Jonathan Giddy: (1) in AIX, clear the
27497	data struct before calling gethostby{name,addr}_r(); (2) ignore the
27498	3/5/6 args determinations made by the configure script and switch on
27499	platform identifiers instead:
27500
27501	AIX, OSF have 3 args
27502	Sun, SGI have 5 args
27503	Linux has 6 args
27504
27505	On all other platforms, undef HAVE_GETHOSTBYNAME_R altogether.
27506
27507	* Modules/socketmodule.c:
27508	Vladimir Marangozov implements the AIX 3-arg gethostbyname_r code.
27509
27510	* Lib/mailbox.py:
27511	Add readlines() to _Subfile class.  Not clear who would need it, but
27512	Chris Lawrence sent me a broken version; this one is a tad simpler and
27513	more conforming to the standard.
27514
27515Tue Mar 23 23:05:34 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us>
27516
27517	* Lib/gzip.py: use struct instead of bit-manipulate in Python
27518
27519Tue Mar 23 19:00:55 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27520
27521	* Modules/Makefile.pre.in:
27522	Add $(EXE) to various occurrences of python so it will work on Cygwin
27523	with egcs (after setting EXE=.exe).  Patch by Norman Vine.
27524
27525	* configure, configure.in:
27526	Ack!  It never defined HAVE_GETHOSTBYNAME_R so that code was never tested!
27527
27528Mon Mar 22 22:25:39 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27529
27530	* Include/thread.h:
27531	Adding thread.h -- unused but for b/w compatibility.
27532	As requested by Bill Janssen.
27533
27534	* configure.in, configure:
27535	Add code to test for all sorts of gethostbyname_r variants,
27536	donated by David Arnold.
27537
27538	* config.h.in, acconfig.h:
27539	Add symbols for gethostbyname_r variants (sigh).
27540
27541	* Modules/socketmodule.c: Clean up pass for the previous patches.
27542
27543	- Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and
27544	glibc2.
27545
27546	- If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R --
27547	don't know what code should be used.
27548
27549	- New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used.
27550
27551	- Modify the gethostbyaddr() code to also hold on to the lock until
27552	after it is safe to release, overlapping with the Python lock.
27553
27554	(Note: I think that it could in theory be possible that Python code
27555	executed while gethostbyname_lock is held could attempt to reacquire
27556	the lock -- e.g. in a signal handler or destructor.  I will simply say
27557	"don't do that then.")
27558
27559	* Modules/socketmodule.c: Jonathan Giddy writes:
27560
27561	Here's a patch to fix the race condition, which wasn't fixed by Rob's
27562	patch.  It holds the gethostbyname lock until the results are copied out,
27563	which means that this lock and the Python global lock are held at the same
27564	time.  This shouldn't be a problem as long as the gethostbyname lock is
27565	always acquired when the global lock is not held.
27566
27567Mon Mar 22 19:25:30 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us>
27568
27569	* Modules/zlibmodule.c:
27570	Fixed the flush() method of compression objects; the test for
27571	    the end of loop was incorrect, and failed when the flushmode != Z_FINISH.
27572	    Logic cleaned up and commented.
27573
27574	* Lib/test/test_zlib.py:
27575	Added simple test for the flush() method of compression objects, trying the
27576	    different flush values Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH.
27577
27578Mon Mar 22 15:28:08 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27579
27580	* Lib/shlex.py:
27581	Bug reported by Tobias Thelen: missing "self." in assignment target.
27582
27583Fri Mar 19 21:50:11 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27584
27585	* Modules/arraymodule.c:
27586	Use an unsigned cast to avoid a warning in VC++.
27587
27588	* Lib/dospath.py, Lib/ntpath.py:
27589	New code for split() by Tim Peters, behaves more like posixpath.split().
27590
27591	* Objects/floatobject.c:
27592	Fix a problem with Vladimir's PyFloat_Fini code: clear the free list; if
27593	a block cannot be freed, add its free items back to the free list.
27594	This is necessary to avoid leaking when Python is reinitialized later.
27595
27596	* Objects/intobject.c:
27597	Fix a problem with Vladimir's PyInt_Fini code: clear the free list; if
27598	a block cannot be freed, add its free items back to the free list, and
27599	add its valid ints back to the small_ints array if they are in range.
27600	This is necessary to avoid leaking when Python is reinitialized later.
27601
27602	* Lib/types.py:
27603	Added BufferType, the type returned by the new builtin buffer().  Greg Stein.
27604
27605	* Python/bltinmodule.c:
27606	New builtin buffer() creates a derived read-only buffer from any
27607	object that supports the buffer interface (e.g. strings, arrays).
27608
27609	* Objects/bufferobject.c:
27610	Added check for negative offset for PyBuffer_FromObject and check for
27611	negative size for PyBuffer_FromMemory.  Greg Stein.
27612
27613Thu Mar 18 15:10:44 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27614
27615	* Lib/urlparse.py: Sjoerd Mullender writes:
27616
27617	If a filename on Windows starts with \\, it is converted to a URL
27618	which starts with ////.  If this URL is passed to urlparse.urlparse
27619	you get a path that starts with // (and an empty netloc).  If you pass
27620	the result back to urlparse.urlunparse, you get a URL that starts with
27621	//, which is parsed differently by urlparse.urlparse.  The fix is to
27622	add the (empty) netloc with accompanying slashes if the path in
27623	urlunparse starts with //.  Do this for all schemes that use a netloc.
27624
27625	* Lib/nturl2path.py: Sjoerd Mullender writes:
27626
27627	Pathnames of files on other hosts in the same domain
27628	(\\host\path\to\file) are not translated correctly to URLs and back.
27629	The URL should be something like file:////host/path/to/file.
27630	Note that a combination of drive letter and remote host is not
27631	possible.
27632
27633Wed Mar 17 22:30:10 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27634
27635	* Lib/urlparse.py:
27636	Delete non-standard-conforming code in urljoin() that would use the
27637	netloc from the base url as the default netloc for the resulting url
27638	even if the schemes differ.
27639
27640	Once upon a time, when the web was wild, this was a valuable hack
27641	because some people had a URL referencing an ftp server colocated with
27642	an http server without having the host in the ftp URL (so they could
27643	replicate it or change the hostname easily).
27644
27645	More recently, after the file: scheme got added back to the list of
27646	schemes that accept a netloc, it turns out that this caused weirdness
27647	when joining an http: URL with a file: URL -- the resulting file: URL
27648	would always inherit the host from the http: URL because the file:
27649	scheme supports a netloc but in practice never has one.
27650
27651	There are two reasons to get rid of the old, once-valuable hack,
27652	instead of removing the file: scheme from the uses_netloc list.  One,
27653	the RFC says that file: uses the netloc syntax, and does not endorse
27654	the old hack.  Two, neither netscape 4.5 nor IE 4.0 support the old
27655	hack.
27656
27657	* Include/ceval.h, Include/abstract.h:
27658	Add DLL level b/w compat for PySequence_In and PyEval_CallObject
27659
27660Tue Mar 16 21:54:50 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27661
27662	* Lib/lib-tk/Tkinter.py: Bug reported by Jim Robinson:
27663
27664	An attempt to execute grid_slaves with arguments (0,0) results in
27665	*all* of the slaves being returned, not just the slave associated with
27666	row 0, column 0.  This is because the test for arguments in the method
27667	does not test to see if row (and column) does not equal None, but
27668	rather just whether is evaluates to non-false.  A value of 0 fails
27669	this test.
27670
27671Tue Mar 16 14:17:48 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
27672
27673	* Modules/cmathmodule.c:
27674	Docstring fix:  acosh() returns the hyperbolic arccosine, not the
27675	hyperbolic cosine.  Problem report via David Ascher by one of his
27676	students.
27677
27678Mon Mar 15 21:40:59 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27679
27680	* configure.in:
27681	Should test for gethost*by*name_r, not for gethostname_r (which
27682	doesn't exist and doesn't make sense).
27683
27684	* Modules/socketmodule.c:
27685	Patch by Rob Riggs for Linux -- glibc2 has a different argument
27686	converntion for gethostbyname_r() etc. than Solaris!
27687
27688	* Python/thread_pthread.h: Rob Riggs wrote:
27689
27690	"""
27691	Spec says that on success pthread_create returns 0. It does not say
27692	that an error code will be < 0. Linux glibc2 pthread_create() returns
27693	ENOMEM (12) when one exceed process limits. (It looks like it should
27694	return EAGAIN, but that's another story.)
27695
27696	For reference, see:
27697	http://www.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html
27698	"""
27699
27700	[I have a feeling that similar bugs were fixed before; perhaps someone
27701	could check that all error checks no check for != 0?]
27702
27703	* Tools/bgen/bgen/bgenObjectDefinition.py:
27704	New mixin class that defines cmp and hash that use
27705	the ob_itself pointer.  This allows (when using the mixin)
27706	different Python objects pointing to the same C object and
27707	behaving well as dictionary keys.
27708
27709	Or so sez Jack Jansen...
27710
27711	* Lib/urllib.py: Yet another patch by Sjoerd Mullender:
27712
27713	Don't convert URLs to URLs using pathname2url.
27714
27715Fri Mar 12 22:15:43 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27716
27717	* Lib/cmd.py: Patch by Michael Scharf.  He writes:
27718
27719	    The module cmd requires for each do_xxx command a help_xxx
27720	    function. I think this is a little old fashioned.
27721
27722	    Here is a patch: use the docstring as help if no help_xxx
27723	    function can be found.
27724
27725	[I'm tempted to rip out all the help_* functions from pdb, but I'll
27726	resist it.  Any takers?  --Guido]
27727
27728	* Tools/freeze/freeze.py: Bug submitted by Wayne Knowles, who writes:
27729
27730	   Under Windows, python freeze.py -o hello hello.py
27731	   creates all the correct files in the hello subdirectory, but the
27732	   Makefile has the directory prefix in it for frozen_extensions.c
27733	   nmake fails because it tries to locate hello/frozen_extensions.c
27734
27735	(His fix adds a call to os.path.basename() in the appropriate place.)
27736
27737	* Objects/floatobject.c, Objects/intobject.c:
27738	Vladimir has restructured his code somewhat so that the blocks are now
27739	represented by an explicit structure.  (There are still too many casts
27740	in the code, but that may be unavoidable.)
27741
27742	Also added code so that with -vv it is very chatty about what it does.
27743
27744	* Demo/zlib/zlibdemo.py, Demo/zlib/minigzip.py:
27745	Change #! line to modern usage; also chmod +x
27746
27747	* Demo/pdist/rrcs, Demo/pdist/rcvs, Demo/pdist/rcsbump:
27748	Change #! line to modern usage
27749
27750	* Lib/nturl2path.py, Lib/urllib.py: From: Sjoerd Mullender
27751
27752	The filename to URL conversion didn't properly quote special
27753	characters.
27754	The URL to filename didn't properly unquote special chatacters.
27755
27756	* Objects/floatobject.c:
27757	OK, try again.  Vladimir gave me a fix for the alignment bus error,
27758	so here's his patch again.  This time it works (at least on Solaris,
27759	Linux and Irix).
27760
27761Thu Mar 11 23:21:23 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27762
27763	* Tools/idle/PathBrowser.py:
27764	Don't crash when sys.path contains an empty string.
27765
27766	* Tools/idle/PathBrowser.py:
27767	- Don't crash in the case where a superclass is a string instead of a
27768	pyclbr.Class object; this can happen when the superclass is
27769	unrecognizable (to pyclbr), e.g. when module renaming is used.
27770
27771	- Show a watch cursor when calling pyclbr (since it may take a while
27772	recursively parsing imported modules!).
27773
27774Thu Mar 11 16:04:04 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
27775
27776	* Lib/mimetypes.py:
27777	Added .rdf and .xsl as application/xml types.  (.rdf is for the
27778	Resource Description Framework, a metadata encoding, and .xsl is for
27779	the Extensible Stylesheet Language.)
27780
27781Thu Mar 11 13:26:23 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27782
27783	* Lib/test/output/test_popen2, Lib/test/test_popen2.py:
27784	Test for popen2 module, by Chris Tismer.
27785
27786	* Objects/floatobject.c:
27787	Alas, Vladimir's patch caused a bus error (probably double
27788	alignment?), and I didn't test it.  Withdrawing it for now.
27789
27790Wed Mar 10 22:55:47 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27791
27792	* Objects/floatobject.c:
27793	Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
27794	floats on finalization.
27795
27796	* Objects/intobject.c:
27797	Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
27798	integers on finalization.
27799
27800	* Tools/idle/EditorWindow.py, Tools/idle/Bindings.py:
27801	Add PathBrowser to File module
27802
27803	* Tools/idle/PathBrowser.py:
27804	"Path browser" - 4 scrolled lists displaying:
27805	    directories on sys.path
27806	    modules in selected directory
27807	    classes in selected module
27808	    methods of selected class
27809
27810	Sinlge clicking in a directory, module or class item updates the next
27811	column with info about the selected item.  Double clicking in a
27812	module, class or method item opens the file (and selects the clicked
27813	item if it is a class or method).
27814
27815	I guess eventually I should be using a tree widget for this, but the
27816	ones I've seen don't work well enough, so for now I use the old
27817	Smalltalk or NeXT style multi-column hierarchical browser.
27818
27819	* Tools/idle/MultiScrolledLists.py:
27820	New utility: multiple scrolled lists in parallel
27821
27822	* Tools/idle/ScrolledList.py: - White background.
27823	- Display "(None)" (or text of your choosing) when empty.
27824	- Don't set the focus.
27825
27826Tue Mar  9 19:31:21 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27827
27828	* Lib/urllib.py:
27829	open_http also had the 'data is None' test backwards.  don't call with the
27830	extra argument if data is None.
27831
27832	* Demo/embed/demo.c:
27833	Call Py_SetProgramName() instead of redefining getprogramname(),
27834	reflecting changes in the runtime around 1.5 or earlier.
27835
27836	* Python/ceval.c:
27837	Always test for an error return (usually NULL or -1) without setting
27838	an exception.
27839
27840	* Modules/timemodule.c: Patch by Chris Herborth for BeOS code.
27841	He writes:
27842
27843	I had an off-by-1000 error in floatsleep(),
27844	and the problem with time.clock() is that it's not implemented properly
27845	on QNX... ANSI says it's supposed to return _CPU_ time used by the
27846	process, but on QNX it returns the amount of real time used... so I was
27847	confused.
27848
27849	* Tools/bgen/bgen/macsupport.py: Small change by Jack Jansen.
27850	Test for self.returntype behaving like OSErr rather than being it.
27851
27852Thu Feb 25 16:14:58 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us>
27853
27854	* Lib/urllib.py:
27855	http_error had the 'data is None' test backwards.  don't call with the
27856	extra argument if data is None.
27857
27858	* Lib/urllib.py: change indentation from 8 spaces to 4 spaces
27859
27860	* Lib/urllib.py: pleasing the tabnanny
27861
27862Thu Feb 25 14:26:02 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
27863
27864	* Lib/colorsys.py:
27865	Oops, one more "x, y, z" to convert...
27866
27867	* Lib/colorsys.py:
27868	Adjusted comment at the top to be less confusing, following Fredrik
27869	Lundh's example.
27870
27871	Converted comment to docstring.
27872
27873Wed Feb 24 18:49:15 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
27874
27875	* Lib/toaiff.py:
27876	Use sndhdr instead of the obsolete whatsound module.
27877
27878Wed Feb 24 18:42:38 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us>
27879
27880	* Lib/urllib.py:
27881	When performing a POST request, i.e. when the second argument to
27882	urlopen is used to specify form data, make sure the second argument is
27883	threaded through all of the http_error_NNN calls.  This allows error
27884	handlers like the redirect and authorization handlers to properly
27885	re-start the connection.
27886
27887Wed Feb 24 16:25:17 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27888
27889	* Lib/mhlib.py: Patch by Lars Wirzenius:
27890
27891		o the initial comment is wrong: creating messages is already
27892		  implemented
27893
27894		o Message.getbodytext: if the mail or it's part contains an
27895		  empty content-transfer-encoding header, the code used to
27896		  break; the change below treats an empty encoding value the same
27897		  as the other types that do not need decoding
27898
27899		o SubMessage.getbodytext was missing the decode argument; the
27900		  change below adds it; I also made it unconditionally return
27901		  the raw text if decoding was not desired, because my own
27902		  routines needed that (and it was easier than rewriting my
27903		  own routines ;-)
27904
27905Wed Feb 24 00:35:43 1999  Barry Warsaw  <bwarsaw@eric.cnri.reston.va.us>
27906
27907	* Python/bltinmodule.c (initerrors):
27908	Make sure that the exception tuples ("base-classes" when
27909	string-based exceptions are used) reflect the real class hierarchy,
27910	i.e. that SystemExit derives from Exception not StandardError.
27911
27912	* Lib/exceptions.py:
27913	Document the correct class hierarchy for SystemExit.  It is not an
27914	error and so it derives from Exception and not SystemError.  The
27915	docstring was incorrect but the implementation was fine.
27916
27917Tue Feb 23 23:07:51 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27918
27919	* Lib/shutil.py:
27920	Add import sys, needed by reference to sys.exc_info() in rmtree().
27921	Discovered by Mitch Chapman.
27922
27923	* config.h.in:
27924	Now that we don't have AC_CHECK_LIB(m, pow), the HAVE_LIBM symbol
27925	disappears.  It wasn't used anywhere anyway...
27926
27927	* Modules/arraymodule.c:
27928	Carefully check for overflow when allocating the memory for fromfile
27929	-- someone tried to pass in sys.maxint and got bitten by the bogus
27930	calculations.
27931
27932	* configure.in:
27933	Get rid of AC_CHECK_LIB(m, pow) since this is taken care of later with
27934	LIBM (from --with-libm=...); this actually broke the customizability
27935	offered by the latter option.  Thanks go to Clay Spence for reporting
27936	this.
27937
27938	* Lib/test/test_dl.py:
27939	1. Print the error message (carefully) when a dl.open() fails in verbose mode.
27940	2. When no test case worked, raise ImportError instead of failing.
27941
27942	* Python/bltinmodule.c:
27943	Patch by Tim Peters to improve the range checks for range() and
27944	xrange(), especially for platforms where int and long are different
27945	sizes (so sys.maxint isn't actually the theoretical limit for the
27946	length of a list, but the largest C int is -- sys.maxint is the
27947	largest Python int, which is actually a C long).
27948
27949	* Makefile.in:
27950	1. Augment the DG/UX rule so it doesn't break the BeOS build.
27951	2. Add $(EXE) to various occurrences of python so it will work on
27952	   Cygwin with egcs (after setting EXE=.exe).  These patches by
27953	   Norman Vine.
27954
27955	* Lib/posixfile.py:
27956	According to Jeffrey Honig, bsd/os 2.0 - 4.0 should be added to the
27957	list (of bsd variants that have a different lock structure).
27958
27959	* Lib/test/test_fcntl.py:
27960	According to Jeffrey Honig, bsd/os 4.0 should be added to the list.
27961
27962	* Modules/timemodule.c:
27963	Patch by Tadayoshi Funaba (with some changes) to be smarter about
27964	guessing what happened when strftime() returns 0.  Is it buffer
27965	overflow or was the result simply 0 bytes long?  (This happens for an
27966	empty format string, or when the format string is a single %Z and the
27967	timezone is unknown.)  if the buffer is at least 256 times as long as
27968	the format, assume the latter.
27969
27970Mon Feb 22 19:01:42 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27971
27972	* Lib/urllib.py:
27973	As Des Barry points out, we need to call pathname2url(file) in two
27974	calls to addinfourl() in open_file().
27975
27976	* Modules/Setup.in: Document *static* -- in two places!
27977
27978	* Modules/timemodule.c:
27979	We don't support leap seconds, so the seconds field of a time 9-tuple
27980	should be in the range [0-59].  Noted by Tadayoshi Funaba.
27981
27982	* Modules/stropmodule.c:
27983	In atoi(), don't use isxdigit() to test whether the last character
27984	converted was a "digit" -- use isalnum().  This test is there only to
27985	guard against "+" or "-" being interpreted as a valid int literal.
27986	Reported by Takahiro Nakayama.
27987
27988	* Lib/os.py:
27989	As Finn Bock points out, _P_WAIT etc. don't have a leading underscore
27990	so they don't need to be treated specially here.
27991
27992Mon Feb 22 15:38:58 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
27993
27994	* Misc/NEWS:
27995	Typo:  "apparentlt" --> "apparently"
27996
27997Mon Feb 22 15:38:46 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us>
27998
27999	* Lib/urlparse.py: Steve Clift pointed out that 'file' allows a netloc.
28000
28001	* Modules/posixmodule.c:
28002	The docstring for ttyname(..) claims a second "mode" argument. The
28003	actual code does not allow such an argument.  (Finn Bock.)
28004
28005	* Lib/lib-old/poly.py:
28006	Dang.  Even though this is obsolete code, somebody found a bug, and I
28007	fix it.  Oh well.
28008
28009Thu Feb 18 20:51:50 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us>
28010
28011	* Lib/pyclbr.py:
28012	Bow to font-lock at the end of the docstring, since it throws stuff
28013	off.
28014
28015	Make sure the path parameter to readmodule() is a list before adding it
28016	with sys.path, or the addition could fail.
28017
28018
28019======================================================================
28020
28021
28022From 1.5.2b1 to 1.5.2b2
28023=======================
28024
28025General
28026-------
28027
28028- Many memory leaks fixed.
28029
28030- Many small bugs fixed.
28031
28032- Command line option -OO (or -O -O) suppresses inclusion of doc
28033strings in resulting bytecode.
28034
28035Windows-specific changes
28036------------------------
28037
28038- New built-in module winsound provides an interface to the Win32
28039PlaySound() call.
28040
28041- Re-enable the audioop module in the config.c file.
28042
28043- On Windows, support spawnv() and associated P_* symbols.
28044
28045- Fixed the conversion of times() return values on Windows.
28046
28047- Removed freeze from the installer -- it doesn't work without the
28048source tree.  (See FAQ 8.11.)
28049
28050- On Windows 95/98, the Tkinter module now is smart enough to find
28051Tcl/Tk even when the PATH environment variable hasn't been set -- when
28052the import of _tkinter fails, it searches in a standard locations,
28053patches os.environ["PATH"], and tries again.  When it still fails, a
28054clearer error message is produced.  This should avoid most
28055installation problems with Tkinter use (e.g. in IDLE).
28056
28057- The -i option doesn't make any calls to set[v]buf() for stdin --
28058this apparently screwed up _kbhit() and the _tkinter main loop.
28059
28060- The ntpath module (and hence, os.path on Windows) now parses out UNC
28061paths (e.g. \\host\mountpoint\dir\file) as "drive letters", so that
28062splitdrive() will \\host\mountpoint as the drive and \dir\file as the
28063path.  ** EXPERIMENTAL **
28064
28065- Added a hack to the exit code so that if (1) the exit status is
28066nonzero and (2) we think we have our own DOS box (i.e. we're not
28067started from a command line shell), we print a message and wait for
28068the user to hit a key before the DOS box is closed.
28069
28070- Updated the installer to WISE 5.0g.  Added a dialog warning about
28071the imminent Tcl installation.  Added a dialog to specify the program
28072group name in the start menu.  Upgraded the Tcl installer to Tcl
280738.0.4.
28074
28075Changes to intrinsics
28076---------------------
28077
28078- The repr() or str() of a module object now shows the __file__
28079attribute (i.e., the file which it was loaded), or the string
28080"(built-in)" if there is no __file__ attribute.
28081
28082- The range() function now avoids overflow during its calculations (if
28083at all possible).
28084
28085- New info string sys.hexversion, which is an integer encoding the
28086version in hexadecimal.  In other words, hex(sys.hexversion) ==
280870x010502b2 for Python 1.5.2b2.
28088
28089New or improved ports
28090---------------------
28091
28092- Support for Nextstep descendants (future Mac systems).
28093
28094- Improved BeOS support.
28095
28096- Support dynamic loading of shared libraries on NetBSD platforms that
28097use ELF (i.e., MIPS and Alpha systems).
28098
28099Configuration/build changes
28100---------------------------
28101
28102- The Lib/test directory is no longer included in the default module
28103search path (sys.path) -- "test" has been a package ever since 1.5.
28104
28105- Now using autoconf 2.13.
28106
28107New library modules
28108-------------------
28109
28110- New library modules asyncore and asynchat: these form Sam Rushing's
28111famous asynchronous socket library.  Sam has gracefully allowed me to
28112incorporate these in the standard Python library.
28113
28114- New module statvfs contains indexing constants for [f]statvfs()
28115return tuple.
28116
28117Changes to the library
28118----------------------
28119
28120- The wave module (platform-independent support for Windows sound
28121files) has been fixed to actually make it work.
28122
28123- The sunau module (platform-independent support for Sun/NeXT sound
28124files) has been fixed to work across platforms.  Also, a weird
28125encoding bug in the header of the audio test data file has been
28126corrected.
28127
28128- Fix a bug in the urllib module that occasionally tripped up
28129webchecker and other ftp retrieves.
28130
28131- ConfigParser's get() method now accepts an optional keyword argument
28132(vars) that is substituted on top of the defaults that were setup in
28133__init__.  You can now also have recusive references in your
28134configuration file.
28135
28136- Some improvements to the Queue module, including a put_nowait()
28137module and an optional "block" second argument, to get() and put(),
28138defaulting to 1.
28139
28140- The updated xmllib module is once again compatible with the version
28141present in Python 1.5.1 (this was accidentally broken in 1.5.2b1).
28142
28143- The bdb module (base class for the debugger) now supports
28144canonicalizing pathnames used in breakpoints.  The derived class must
28145override the new canonical() method for this to work.  Also changed
28146clear_break() to the backwards compatible old signature, and added
28147clear_bpbynumber() for the new functionality.
28148
28149- In sgmllib (and hence htmllib), recognize attributes even if they
28150don't have space in front of them.  I.e.  '<a
28151name="foo"href="bar.html">' will now have two attributes recognized.
28152
28153- In the debugger (pdb), change clear syntax to support three
28154alternatives: clear; clear file:line; clear bpno bpno ...
28155
28156- The os.path module now pretends to be a submodule within the os
28157"package", so you can do things like "from os.path import exists".
28158
28159- The standard exceptions now have doc strings.
28160
28161- In the smtplib module, exceptions are now classes.  Also avoid
28162inserting a non-standard space after "TO" in rcpt() command.
28163
28164- The rfc822 module's getaddrlist() method now uses all occurrences of
28165the specified header instead of just the first.  Some other bugfixes
28166too (to handle more weird addresses found in a very large test set,
28167and to avoid crashes on certain invalid dates), and a small test
28168module has been added.
28169
28170- Fixed bug in urlparse in the common-case code for HTTP URLs; it
28171would lose the query, fragment, and/or parameter information.
28172
28173- The sndhdr module no longer supports whatraw() -- it depended on a
28174rare extenral program.
28175
28176- The UserList module/class now supports the extend() method, like
28177real list objects.
28178
28179- The uu module now deals better with trailing garbage generated by
28180some broke uuencoders.
28181
28182- The telnet module now has a my_interact() method which uses threads
28183instead of select.  The interact() method uses this by default on
28184Windows (where the single-threaded version doesn't work).
28185
28186- Add a class to mailbox.py for dealing with qmail directory
28187mailboxes.  The test code was extended to notice these being used as
28188well.
28189
28190Changes to extension modules
28191----------------------------
28192
28193- Support for the [f]statvfs() system call, where it exists.
28194
28195- Fixed some bugs in cPickle where bad input could cause it to dump
28196core.
28197
28198- Fixed cStringIO to make the writelines() function actually work.
28199
28200- Added strop.expandtabs() so string.expandtabs() is now much faster.
28201
28202- Added fsync() and fdatasync(), if they appear to exist.
28203
28204- Support for "long files" (64-bit seek pointers).
28205
28206- Fixed a bug in the zlib module's flush() function.
28207
28208- Added access() system call.  It returns 1 if access granted, 0 if
28209not.
28210
28211- The curses module implements an optional nlines argument to
28212w.scroll().  (It then calls wscrl(win, nlines) instead of scoll(win).)
28213
28214Changes to tools
28215----------------
28216
28217- Some changes to IDLE; see Tools/idle/NEWS.txt.
28218
28219- Latest version of Misc/python-mode.el included.
28220
28221Changes to Tkinter
28222------------------
28223
28224- Avoid tracebacks when an image is deleted after its root has been
28225destroyed.
28226
28227Changes to the Python/C API
28228---------------------------
28229
28230- When parentheses are used in a PyArg_Parse[Tuple]() call, any
28231sequence is now accepted, instead of requiring a tuple.  This is in
28232line with the general trend towards accepting arbitrary sequences.
28233
28234- Added PyModule_GetFilename().
28235
28236- In PyNumber_Power(), remove unneeded and even harmful test for float
28237to the negative power (which is already and better done in
28238floatobject.c).
28239
28240- New version identification symbols; read patchlevel.h for info.  The
28241version numbers are now exported by Python.h.
28242
28243- Rolled back the API version change -- it's back to 1007!
28244
28245- The frozenmain.c function calls PyInitFrozenExtensions().
28246
28247- Added 'N' format character to Py_BuildValue -- like 'O' but doesn't
28248INCREF.
28249
28250
28251======================================================================
28252
28253
28254From 1.5.2a2 to 1.5.2b1
28255=======================
28256
28257Changes to intrinsics
28258---------------------
28259
28260- New extension NotImplementedError, derived from RuntimeError.  Not
28261used, but recommended use is for "abstract" methods to raise this.
28262
28263- The parser will now spit out a warning or error when -t or -tt is
28264used for parser input coming from a string, too.
28265
28266- The code generator now inserts extra SET_LINENO opcodes when
28267compiling multi-line argument lists.
28268
28269- When comparing bound methods, use identity test on the objects, not
28270equality test.
28271
28272New or improved ports
28273---------------------
28274
28275- Chris Herborth has redone his BeOS port; it now works on PowerPC
28276(R3/R4) and x86 (R4 only).  Threads work too in this port.
28277
28278Renaming
28279--------
28280
28281- Thanks to Chris Herborth, the thread primitives now have proper Py*
28282names in the source code (they already had those for the linker,
28283through some smart macros; but the source still had the old, un-Py
28284names).
28285
28286Configuration/build changes
28287---------------------------
28288
28289- Improved support for FreeBSD/3.
28290
28291- Check for pthread_detach instead of pthread_create in libc.
28292
28293- The makesetup script now searches EXECINCLUDEPY before INCLUDEPY.
28294
28295- Misc/Makefile.pre.in now also looks at Setup.thread and Setup.local.
28296Otherwise modules such as thread didn't get incorporated in extensions.
28297
28298New library modules
28299-------------------
28300
28301- shlex.py by Eric Raymond provides a lexical analyzer class for
28302simple shell-like syntaxes.
28303
28304- netrc.py by Eric Raymond provides a parser for .netrc files.  (The
28305undocumented Netrc class in ftplib.py is now obsolete.)
28306
28307- codeop.py is a new module that contains the compile_command()
28308function that was previously in code.py.  This is so that JPython can
28309provide its own version of this function, while still sharing the
28310higher-level classes in code.py.
28311
28312- turtle.py is a new module for simple turtle graphics.  I'm still
28313working on it; let me know if you use this to teach Python to children
28314or other novices without prior programming experience.
28315
28316Obsoleted library modules
28317-------------------------
28318
28319- poly.py and zmod.py have been moved to Lib/lib-old to emphasize
28320their status of obsoleteness.  They don't do a particularly good job
28321and don't seem particularly relevant to the Python core.
28322
28323New tools
28324---------
28325
28326- I've added IDLE: my Integrated DeveLopment Environment for Python.
28327Requires Tcl/Tk (and Tkinter).  Works on Windows and Unix (and should
28328work on Macintosh, but I haven't been able to test it there; it does
28329depend on new features in 1.5.2 and perhaps even new features in
283301.5.2b1, especially the new code module).  This is very much a work in
28331progress.  I'd like to hear how people like it compared to PTUI (or
28332any other IDE they are familiar with).
28333
28334- New tools by Barry Warsaw:
28335
28336  = audiopy: controls the Solaris Audio device
28337  = pynche:  The PYthonically Natural Color and Hue Editor
28338  = world:   Print mappings between country names and DNS country codes
28339
28340New demos
28341---------
28342
28343- Demo/scripts/beer.py prints the lyrics to an arithmetic drinking
28344song.
28345
28346- Demo/tkinter/guido/optionmenu.py shows how to do an option menu in
28347Tkinter.  (By Fredrik Lundh -- not by me!)
28348
28349Changes to the library
28350----------------------
28351
28352- compileall.py now avoids recompiling .py files that haven't changed;
28353it adds a -f option to force recompilation.
28354
28355- New version of xmllib.py by Sjoerd Mullender (0.2 with latest
28356patches).
28357
28358- nntplib.py: statparse() no longer lowercases the message-id.
28359
28360- types.py: use type(__stdin__) for FileType.
28361
28362- urllib.py: fix translations for filenames with "funny" characters.
28363Patch by Sjoerd Mullender.  Note that if you subclass one of the
28364URLopener classes, and you have copied code from the old urllib.py,
28365your subclass may stop working.  A long-term solution is to provide
28366more methods so that you don't have to copy code.
28367
28368- cgi.py: In read_multi, allow a subclass to override the class we
28369instantiate when we create a recursive instance, by setting the class
28370variable 'FieldStorageClass' to the desired class.  By default, this
28371is set to None, in which case we use self.__class__ (as before).
28372Also, a patch by Jim Fulton to pass additional arguments to recursive
28373calls to the FieldStorage constructor from its read_multi method.
28374
28375- UserList.py: In __getslice__, use self.__class__ instead of
28376UserList.
28377
28378- In SimpleHTTPServer.py, the server specified in test() should be
28379BaseHTTPServer.HTTPServer, in case the request handler should want to
28380reference the two attributes added by BaseHTTPServer.server_bind.  (By
28381Jeff Rush, for Bobo).  Also open the file in binary mode, so serving
28382images from a Windows box might actually work.
28383
28384- In CGIHTTPServer.py, the list of acceptable formats is -split-
28385on spaces but -joined- on commas, resulting in double commas
28386in the joined text.  (By Jeff Rush.)
28387
28388- SocketServer.py, patch by Jeff Bauer: a minor change to declare two
28389new threaded versions of Unix Server classes, using the ThreadingMixIn
28390class: ThreadingUnixStreamServer, ThreadingUnixDatagramServer.
28391
28392- bdb.py: fix bomb on deleting a temporary breakpoint: there's no
28393method do_delete(); do_clear() was meant.  By Greg Ward.
28394
28395- getopt.py: accept a non-list sequence for the long options (request
28396by Jack Jansen).  Because it might be a common mistake to pass a
28397single string, this situation is treated separately.  Also added
28398docstrings (copied from the library manual) and removed the (now
28399redundant) module comments.
28400
28401- tempfile.py: improvements to avoid security leaks.
28402
28403- code.py: moved compile_command() to new module codeop.py.
28404
28405- pickle.py: support pickle format 1.3 (binary float added).  By Jim
28406Fulton. Also get rid of the undocumented obsolete Pickler dump_special
28407method.
28408
28409- uu.py: Move 'import sys' to top of module, as noted by Tim Peters.
28410
28411- imaplib.py: fix problem with some versions of IMAP4 servers that
28412choose to mix the case in their CAPABILITIES response.
28413
28414- cmp.py: use (f1, f2) as cache key instead of f1 + ' ' + f2.  Noted
28415by Fredrik Lundh.
28416
28417Changes to extension modules
28418----------------------------
28419
28420- More doc strings for several modules were contributed by Chris
28421Petrilli: math, cmath, fcntl.
28422
28423- Fixed a bug in zlibmodule.c that could cause core dumps on
28424decompression of rarely occurring input.
28425
28426- cPickle.c: new version from Jim Fulton, with Open Source copyright
28427notice.  Also, initialize self->safe_constructors early on to prevent
28428crash in early dealloc.
28429
28430- cStringIO.c: new version from Jim Fulton, with Open Source copyright
28431notice.  Also fixed a core dump in cStringIO.c when doing seeks.
28432
28433- mpzmodule.c: fix signed character usage in mpz.mpz(stringobjecty).
28434
28435- readline.c: Bernard Herzog pointed out that rl_parse_and_bind
28436modifies its argument string (bad function!), so we make a temporary
28437copy.
28438
28439- sunaudiodev.c: Barry Warsaw added more smarts to get the device and
28440control pseudo-device, per audio(7I).
28441
28442Changes to tools
28443----------------
28444
28445- New, improved version of Barry Warsaw's Misc/python-mode.el (editing
28446support for Emacs).
28447
28448- tabnanny.py: added a -q ('quiet') option to tabnanny, which causes
28449only the names of offending files to be printed.
28450
28451- freeze: when printing missing modules, also print the module they
28452were imported from.
28453
28454- untabify.py: patch by Detlef Lannert to implement -t option
28455(set tab size).
28456
28457Changes to Tkinter
28458------------------
28459
28460- grid_bbox(): support new Tk API: grid bbox ?column row? ?column2
28461row2?
28462
28463- _tkinter.c: RajGopal Srinivasan noted that the latest code (1.5.2a2)
28464doesn't work when running in a non-threaded environment.  He added
28465some #ifdefs that fix this.
28466
28467Changes to the Python/C API
28468---------------------------
28469
28470- Bumped API version number to 1008 -- enough things have changed!
28471
28472- There's a new macro, PyThreadState_GET(), which does the same work
28473as PyThreadState_Get() without the overhead of a function call (it
28474also avoids the error check).  The two top calling locations of
28475PyThreadState_Get() have been changed to use this macro.
28476
28477- All symbols intended for export from a DLL or shared library are now
28478marked as such (with the DL_IMPORT() macro) in the header file that
28479declares them.  This was needed for the BeOS port, and should also
28480make some other ports easier.  The PC port no longer needs the file
28481with exported symbols (PC/python_nt.def).  There's also a DL_EXPORT
28482macro which is only used for init methods in extension modules, and
28483for Py_Main().
28484
28485Invisible changes to internals
28486------------------------------
28487
28488- Fixed a bug in new_buffersize() in fileobject.c which could
28489return a buffer size that was way too large.
28490
28491- Use PySys_WriteStderr instead of fprintf in most places.
28492
28493- dictobject.c: remove dead code discovered by Vladimir Marangozov.
28494
28495- tupleobject.c: make tuples less hungry -- an extra item was
28496allocated but never used.  Tip by Vladimir Marangozov.
28497
28498- mymath.h: Metrowerks PRO4 finally fixes the hypot snafu.  (Jack
28499Jansen)
28500
28501- import.c: Jim Fulton fixes a reference count bug in
28502PyEval_GetGlobals.
28503
28504- glmodule.c: check in the changed version after running the stubber
28505again -- this solves the conflict with curses over the 'clear' entry
28506point much nicer.  (Jack Jansen had checked in the changes to cstubs
28507eons ago, but I never regenrated glmodule.c :-( )
28508
28509- frameobject.c: fix reference count bug in PyFrame_New.  Vladimir
28510Marangozov.
28511
28512- stropmodule.c: add a missing DECREF in an error exit.  Submitted by
28513Jonathan Giddy.
28514
28515
28516======================================================================
28517
28518
28519From 1.5.2a1 to 1.5.2a2
28520=======================
28521
28522General
28523-------
28524
28525- It is now a syntax error to have a function argument without a
28526default following one with a default.
28527
28528- __file__ is now set to the .py file if it was parsed (it used to
28529always be the .pyc/.pyo file).
28530
28531- Don't exit with a fatal error during initialization when there's a
28532problem with the exceptions.py module.
28533
28534- New environment variable PYTHONOPTIMIZE can be used to set -O.
28535
28536- New version of python-mode.el for Emacs.
28537
28538Miscellaneous fixed bugs
28539------------------------
28540
28541- No longer print the (confusing) error message about stack underflow
28542while compiling.
28543
28544- Some threading and locking bugs fixed.
28545
28546- When errno is zero, report "Error", not "Success".
28547
28548Documentation
28549-------------
28550
28551- Documentation will be released separately.
28552
28553- Doc strings added to array and md5 modules by Chris Petrilli.
28554
28555Ports and build procedure
28556-------------------------
28557
28558- Stop installing when a move or copy fails.
28559
28560- New version of the OS/2 port code by Jeff Rush.
28561
28562- The makesetup script handles absolute filenames better.
28563
28564- The 'new' module is now enabled by default in the Setup file.
28565
28566- I *think* I've solved the problem with the Linux build blowing up
28567sometimes due to a conflict between sigcheck/intrcheck and
28568signalmodule.
28569
28570Built-in functions
28571------------------
28572
28573- The second argument to apply() can now be any sequence, not just a
28574tuple.
28575
28576Built-in types
28577--------------
28578
28579- Lists have a new method: L1.extend(L2) is equivalent to the common
28580idiom L1[len(L1):] = L2.
28581
28582- Better error messages when a sequence is indexed with a non-integer.
28583
28584- Bettter error message when calling a non-callable object (include
28585the type in the message).
28586
28587Python services
28588---------------
28589
28590- New version of cPickle.c fixes some bugs.
28591
28592- pickle.py: improved instantiation error handling.
28593
28594- code.py: reworked quite a bit.  New base class
28595InteractiveInterpreter and derived class InteractiveConsole.  Fixed
28596several problems in compile_command().
28597
28598- py_compile.py: print error message and continue on syntax errors.
28599Also fixed an old bug with the fstat code (it was never used).
28600
28601- pyclbr.py: support submodules of packages.
28602
28603String Services
28604---------------
28605
28606- StringIO.py: raise the right exception (ValueError) for attempted
28607I/O on closed StringIO objects.
28608
28609- re.py: fixed a bug in subn(), which caused .groups() to fail inside
28610the replacement function called by sub().
28611
28612- The struct module has a new format 'P': void * in native mode.
28613
28614Generic OS Services
28615-------------------
28616
28617- Module time: Y2K robustness.  2-digit year acceptance depends on
28618value of time.accept2dyear, initialized from env var PYTHONY2K,
28619default 0.  Years 00-68 mean 2000-2068, while 69-99 mean 1969-1999
28620(POSIX or X/Open recommendation).
28621
28622- os.path: normpath(".//x") should return "x", not "/x".
28623
28624- getpass.py: fall back on default_getpass() when sys.stdin.fileno()
28625doesn't work.
28626
28627- tempfile.py: regenerate the template after a fork() call.
28628
28629Optional OS Services
28630--------------------
28631
28632- In the signal module, disable restarting interrupted system calls
28633when we have siginterrupt().
28634
28635Debugger
28636--------
28637
28638- No longer set __args__; this feature is no longer supported and can
28639affect the debugged code.
28640
28641- cmd.py, pdb.py and bdb.py have been overhauled by Richard Wolff, who
28642added aliases and some other useful new features, e.g. much better
28643breakpoint support: temporary breakpoint, disabled breakpoints,
28644breakpoints with ignore counts, and conditions; breakpoints can be set
28645on a file before it is loaded.
28646
28647Profiler
28648--------
28649
28650- Changes so that JPython can use it.  Also fix the calibration code
28651so it actually works again
28652.
28653Internet Protocols and Support
28654------------------------------
28655
28656- imaplib.py: new version from Piers Lauder.
28657
28658- smtplib.py: change sendmail() method to accept a single string or a
28659list or strings as the destination (commom newbie mistake).
28660
28661- poplib.py: LIST with a msg argument fixed.
28662
28663- urlparse.py: some optimizations for common case (http).
28664
28665- urllib.py: support content-length in info() for ftp protocol;
28666support for a progress meter through a third argument to
28667urlretrieve(); commented out gopher test (the test site is dead).
28668
28669Internet Data handling
28670----------------------
28671
28672- sgmllib.py: support tags with - or . in their name.
28673
28674- mimetypes.py: guess_type() understands 'data' URLs.
28675
28676Restricted Execution
28677--------------------
28678
28679- The classes rexec.RModuleLoader and rexec.RModuleImporter no
28680longer exist.
28681
28682Tkinter
28683-------
28684
28685- When reporting an exception, store its info in sys.last_*.  Also,
28686write all of it to stderr.
28687
28688- Added NS, EW, and NSEW constants, for grid's sticky option.
28689
28690- Fixed last-minute bug in 1.5.2a1 release: need to include "mytime.h".
28691
28692- Make bind variants without a sequence return a tuple of sequences
28693(formerly it returned a string, which wasn't very convenient).
28694
28695- Add image commands to the Text widget (these are new in Tk 8.0).
28696
28697- Added new listbox and canvas methods: {xview,yview}_{scroll,moveto}.)
28698
28699- Improved the thread code (but you still can't call update() from
28700another thread on Windows).
28701
28702- Fixed unnecessary references to _default_root in the new dialog
28703modules.
28704
28705- Miscellaneous problems fixed.
28706
28707
28708Windows General
28709---------------
28710
28711- Call LoadLibraryEx(..., ..., LOAD_WITH_ALTERED_SEARCH_PATH) to
28712search for dependent dlls in the directory containing the .pyd.
28713
28714- In debugging mode, call DebugBreak() in Py_FatalError().
28715
28716Windows Installer
28717-----------------
28718
28719- Install zlib.dll in the DLLs directory instead of in the win32
28720system directory, to avoid conflicts with other applications that have
28721their own zlib.dll.
28722
28723Test Suite
28724----------
28725
28726- test_long.py: new test for long integers, by Tim Peters.
28727
28728- regrtest.py: improved so it can be used for other test suites as
28729well.
28730
28731- test_strftime.py: use re to compare test results, to support legal
28732variants (e.g. on Linux).
28733
28734Tools and Demos
28735---------------
28736
28737- Four new scripts in Tools/scripts: crlf.py and lfcr.py (to
28738remove/add Windows style '\r\n' line endings), untabify.py (to remove
28739tabs), and rgrep.yp (reverse grep).
28740
28741- Improvements to Tools/freeze/.  Each Python module is now written to
28742its own C file.  This prevents some compilers or assemblers from
28743blowing up on large frozen programs, and saves recompilation time if
28744only a few modules are changed.  Other changes too, e.g. new command
28745line options -x and -i.
28746
28747- Much improved (and smaller!) version of Tools/scripts/mailerdaemon.py.
28748
28749Python/C API
28750------------
28751
28752- New mechanism to support extensions of the type object while
28753remaining backward compatible with extensions compiled for previous
28754versions of Python 1.5.  A flags field indicates presence of certain
28755fields.
28756
28757- Addition to the buffer API to differentiate access to bytes and
287588-bit characters (in anticipation of Unicode characters).
28759
28760- New argument parsing format t# ("text") to indicate 8-bit
28761characters; s# simply means 8-bit bytes, for backwards compatibility.
28762
28763- New object type, bufferobject.c is an example and can be used to
28764create buffers from memory.
28765
28766- Some support for 64-bit longs, including some MS platforms.
28767
28768- Many calls to fprintf(stderr, ...) have been replaced with calls to
28769PySys_WriteStderr(...).
28770
28771- The calling context for PyOS_Readline() has changed: it must now be
28772called with the interpreter lock held!  It releases the lock around
28773the call to the function pointed to by PyOS_ReadlineFunctionPointer
28774(default PyOS_StdioReadline()).
28775
28776- New APIs PyLong_FromVoidPtr() and PyLong_AsVoidPtr().
28777
28778- Renamed header file "thread.h" to "pythread.h".
28779
28780- The code string of code objects may now be anything that supports the
28781buffer API.
28782
28783
28784======================================================================
28785
28786
28787From 1.5.1 to 1.5.2a1
28788=====================
28789
28790General
28791-------
28792
28793- When searching for the library, a landmark that is a compiled module
28794(string.pyc or string.pyo) is also accepted.
28795
28796- When following symbolic links to the python executable, use a loop
28797so that a symlink to a symlink can work.
28798
28799- Added a hack so that when you type 'quit' or 'exit' at the
28800interpreter, you get a friendly explanation of how to press Ctrl-D (or
28801Ctrl-Z) to exit.
28802
28803- New and improved Misc/python-mode.el (Python mode for Emacs).
28804
28805- Revert a new feature in Unix dynamic loading: for one or two
28806revisions, modules were loaded using the RTLD_GLOBAL flag.  It turned
28807out to be a bad idea.
28808
28809Miscellaneous fixed bugs
28810------------------------
28811
28812- All patches on the patch page have been integrated.  (But much more
28813has been done!)
28814
28815- Several memory leaks plugged (e.g. the one for classes with a
28816__getattr__ method).
28817
28818- Removed the only use of calloc().  This triggered an obscure bug on
28819multiprocessor Sparc Solaris 2.6.
28820
28821- Fix a peculiar bug that would allow "import sys.time" to succeed
28822(believing the built-in time module to be a part of the sys package).
28823
28824- Fix a bug in the overflow checking when converting a Python long to
28825a C long (failed to convert -2147483648L, and some other cases).
28826
28827Documentation
28828-------------
28829
28830- Doc strings have been added to many extension modules: __builtin__,
28831errno, select, signal, socket, sys, thread, time.  Also to methods of
28832list objects (try [].append.__doc__).  A doc string on a type will now
28833automatically be propagated to an instance if the instance has methods
28834that are accessed in the usual way.
28835
28836- The documentation has been expanded and the formatting improved.
28837(Remember that the documentation is now unbundled and has its own
28838release cycle though; see http://www.python.org/doc/.)
28839
28840- Added Misc/Porting -- a mini-FAQ on porting to a new platform.
28841
28842Ports and build procedure
28843-------------------------
28844
28845- The BeOS port is now integrated.  Courtesy Chris Herborth.
28846
28847- Symbol files for FreeBSD 2.x and 3.x have been contributed
28848(Lib/plat-freebsd[23]/*).
28849
28850- Support HPUX 10.20 DCE threads.
28851
28852- Finally fixed the configure script so that (on SGI) if -OPT:Olimit=0
28853works, it won't also use -Olimit 1500 (which gives a warning for every
28854file).  Also support the SGI_ABI environment variable better.
28855
28856- The makesetup script now understands absolute pathnames ending in .o
28857in the module -- it assumes it's a file for which we have no source.
28858
28859- Other miscellaneous improvements to the configure script and
28860Makefiles.
28861
28862- The test suite now uses a different sound sample.
28863
28864Built-in functions
28865------------------
28866
28867- Better checks for invalid input to int(), long(), string.atoi(),
28868string.atol().  (Formerly, a sign without digits would be accepted as
28869a legal ways to spell zero.)
28870
28871- Changes to map() and filter() to use the length of a sequence only
28872as a hint -- if an IndexError happens earlier, take that.  (Formerly,
28873this was considered an error.)
28874
28875- Experimental feature in getattr(): a third argument can specify a
28876default (instead of raising AttributeError).
28877
28878- Implement round() slightly different, so that for negative ndigits
28879no additional errors happen in the last step.
28880
28881- The open() function now adds the filename to the exception when it
28882fails.
28883
28884Built-in exceptions
28885-------------------
28886
28887- New standard exceptions EnvironmentError and PosixError.
28888EnvironmentError is the base class for IOError and PosixError;
28889PosixError is the same as os.error.  All this so that either exception
28890class can be instantiated with a third argument indicating a filename.
28891The built-in function open() and most os/posix functions that take a
28892filename argument now use this.
28893
28894Built-in types
28895--------------
28896
28897- List objects now have an experimental pop() method; l.pop() returns
28898and removes the last item; l.pop(i) returns and removes the item at
28899i.  Also, the sort() method is faster again.  Sorting is now also
28900safer: it is impossible for the sorting function to modify the list
28901while the sort is going on (which could cause core dumps).
28902
28903- Changes to comparisons: numbers are now smaller than any other type.
28904This is done to prevent the circularity where [] < 0L < 1 < [] is
28905true.  As a side effect, cmp(None, 0) is now positive instead of
28906negative.  This *shouldn't* affect any working code, but I've found
28907that the change caused several "sleeping" bugs to become active, so
28908beware!
28909
28910- Instance methods may now have other callable objects than just
28911Python functions as their im_func.  Use new.instancemethod() or write
28912your own C code to create them; new.instancemethod() may be called
28913with None for the instance to create an unbound method.
28914
28915- Assignment to __name__, __dict__ or __bases__ of a class object is
28916now allowed (with stringent type checks); also allow assignment to
28917__getattr__ etc.  The cached values for __getattr__ etc. are
28918recomputed after such assignments (but not for derived classes :-( ).
28919
28920- Allow assignment to some attributes of function objects: func_code,
28921func_defaults and func_doc / __doc__.  (With type checks except for
28922__doc__ / func_doc .)
28923
28924Python services
28925---------------
28926
28927- New tests (in Lib/test): reperf.py (regular expression benchmark),
28928sortperf.py (list sorting benchmark), test_MimeWriter.py (test case
28929for the MimeWriter module).
28930
28931- Generalized test/regrtest.py so that it is useful for testing other
28932packages.
28933
28934- The ihooks.py module now understands package imports.
28935
28936- In code.py, add a class that subsumes Fredrik Lundh's
28937PythonInterpreter class.  The interact() function now uses this.
28938
28939- In rlcompleter.py, in completer(), return None instead of raising an
28940IndexError when there are no more completions left.
28941
28942- Fixed the marshal module to test for certain common kinds of invalid
28943input.  (It's still not foolproof!)
28944
28945- In the operator module, add an alias (now the preferred name)
28946"contains" for "sequenceincludes".
28947
28948String Services
28949---------------
28950
28951- In the string and strop modules, in the replace() function, treat an
28952empty pattern as an error (since it's not clear what was meant!).
28953
28954- Some speedups to re.py, especially the string substitution and split
28955functions.  Also added new function/method findall(), to find all
28956occurrences of a given substring.
28957
28958- In cStringIO, add better argument type checking and support the
28959readonly 'closed' attribute (like regular files).
28960
28961- In the struct module, unsigned 1-2 byte sized formats no longer
28962result in long integer values.
28963
28964Miscellaneous services
28965----------------------
28966
28967- In whrandom.py, added new method and function randrange(), same as
28968choice(range(start, stop, step)) but faster.  This addresses the
28969problem that randint() was accidentally defined as taking an inclusive
28970range.  Also, randint(a, b) is now redefined as randrange(a, b+1),
28971adding extra range and type checking to its arguments!
28972
28973- Add some semi-thread-safety to random.gauss() (it used to be able to
28974crash when invoked from separate threads; now the worst it can do is
28975give a duplicate result occasionally).
28976
28977- Some restructuring and generalization done to cmd.py.
28978
28979- Major upgrade to ConfigParser.py; converted to using 're', added new
28980exceptions, support underscore in section header and option name.  No
28981longer add 'name' option to every section; instead, add '__name__'.
28982
28983- In getpass.py, don't use raw_input() to ask for the password -- we
28984don't want it to show up in the readline history!  Also don't catch
28985interrupts (the try-finally already does all necessary cleanup).
28986
28987Generic OS Services
28988-------------------
28989
28990- New functions in os.py: makedirs(), removedirs(), renames().  New
28991variable: linesep (the line separator as found in binary files,
28992i.e. '\n' on Unix, '\r\n' on DOS/Windows, '\r' on Mac.  Do *not* use
28993this with files opened in (default) text mode; the line separator used
28994will always be '\n'!
28995
28996- Changes to the 'os.path' submodule of os.py: added getsize(),
28997getmtime(), getatime() -- these fetch the most popular items from the
28998stat return tuple.
28999
29000- In the time module, add strptime(), if it exists.  (This parses a
29001time according to a format -- the inverse of strftime().)  Also,
29002remove the call to mktime() from strftime() -- it messed up the
29003formatting of some non-local times.
29004
29005- In the socket module, added a new function gethostbyname_ex().
29006Also, don't use #ifdef to test for some symbols that are enums on some
29007platforms (and should exist everywhere).
29008
29009Optional OS Services
29010--------------------
29011
29012- Some fixes to gzip.py.  In particular, the readlines() method now
29013returns the lines *with* trailing newline characters, like readlines()
29014of regular file objects.  Also, it didn't work together with cPickle;
29015fixed that.
29016
29017- In whichdb.py, support byte-swapped dbhash (bsddb) files.
29018
29019- In anydbm.py, look at the type of an existing database to determine
29020which module to use to open it.  (The anydbm.error exception is now a
29021tuple.)
29022
29023Unix Services
29024-------------
29025
29026- In the termios module, in tcsetattr(), initialize the structure vy
29027calling tcgetattr().
29028
29029- Added some of the "wait status inspection" macros as functions to
29030the posix module (and thus to the os module): WEXITSTATUS(),
29031WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG().
29032
29033- In the syslog module, make the default facility more intuitive
29034(matching the docs).
29035
29036Debugger
29037--------
29038
29039- In pdb.py, support for setting breaks on files/modules that haven't
29040been loaded yet.
29041
29042Internet Protocols and Support
29043------------------------------
29044
29045- Changes in urllib.py; sped up unquote() and quote().  Fixed an
29046obscure bug in quote_plus().  Added urlencode(dict) -- convenience
29047function for sending a POST request with urlopen().  Use the getpass
29048module to ask for a password.  Rewrote the (test) main program so that
29049when used as a script, it can retrieve one or more URLs to stdout.
29050Use -t to run the self-test.  Made the proxy code work again.
29051
29052- In cgi.py, treat "HEAD" the same as "GET", so that CGI scripts don't
29053fail when someone asks for their HEAD.  Also, for POST, set the
29054default content-type to application/x-www-form-urlencoded.  Also, in
29055FieldStorage.__init__(), when method='GET', always get the query
29056string from environ['QUERY_STRING'] or sys.argv[1] -- ignore an
29057explicitly passed in fp.
29058
29059- The smtplib.py module now supports ESMTP and has improved standard
29060compliance, for picky servers.
29061
29062- Improved imaplib.py.
29063
29064- Fixed UDP support in SocketServer.py (it never worked).
29065
29066- Fixed a small bug in CGIHTTPServer.py.
29067
29068Internet Data handling
29069----------------------
29070
29071- In rfc822.py, add a new class AddressList.  Also support a new
29072overridable method, isheader().  Also add a get() method similar to
29073dictionaries (and make getheader() an alias for it).  Also, be smarter
29074about seekable (test whether fp.tell() works) and test for presence of
29075unread() method before trying seeks.
29076
29077- In sgmllib.py, restore the call to report_unbalanced() that was lost
29078long ago.  Also some other improvements: handle <? processing
29079instructions >, allow . and - in entity names, and allow \r\n as line
29080separator.
29081
29082- Some restructuring and generalization done to multifile.py; support
29083a 'seekable' flag.
29084
29085Restricted Execution
29086--------------------
29087
29088- Improvements to rexec.py: package support; support a (minimal)
29089sys.exc_info().  Also made the (test) main program a bit fancier (you
29090can now use it to run arbitrary Python scripts in restricted mode).
29091
29092Tkinter
29093-------
29094
29095- On Unix, Tkinter can now safely be used from a multi-threaded
29096application.  (Formerly, no threads would make progress while
29097Tkinter's mainloop() was active, because it didn't release the Python
29098interpreter lock.)  Unfortunately, on Windows, threads other than the
29099main thread should not call update() or update_idletasks() because
29100this will deadlock the application.
29101
29102- An interactive interpreter that uses readline and Tkinter no longer
29103uses up all available CPU time.
29104
29105- Even if readline is not used, Tk windows created in an interactive
29106interpreter now get continuously updated.  (This even works in Windows
29107as long as you don't hit a key.)
29108
29109- New demos in Demo/tkinter/guido/: brownian.py, redemo.py, switch.py.
29110
29111- No longer register Tcl_finalize() as a low-level exit handler.  It
29112may call back into Python, and that's a bad idea.
29113
29114- Allow binding of Tcl commands (given as a string).
29115
29116- Some minor speedups; replace explicitly coded getint() with int() in
29117most places.
29118
29119- In FileDialog.py, remember the directory of the selected file, if
29120given.
29121
29122- Change the names of all methods in the Wm class: they are now
29123wm_title(), etc.  The old names (title() etc.) are still defined as
29124aliases.
29125
29126- Add a new method of interpreter objects, interpaddr().  This returns
29127the address of the Tcl interpreter object, as an integer.  Not very
29128useful for the Python programmer, but this can be called by another C
29129extension that needs to make calls into the Tcl/Tk C API and needs to
29130get the address of the Tcl interpreter object.  A simple cast of the
29131return value to (Tcl_Interp *) will do the trick.
29132
29133Windows General
29134---------------
29135
29136- Don't insist on proper case for module source files if the filename
29137is all uppercase (e.g. FOO.PY now matches foo; but FOO.py still
29138doesn't).  This should address problems with this feature on
29139oldfashioned filesystems (Novell servers?).
29140
29141Windows Library
29142---------------
29143
29144- os.environ is now all uppercase, but accesses are case insensitive,
29145and the putenv() calls made as a side effect of changing os.environ
29146are case preserving.
29147
29148- Removed samefile(), sameopenfile(), samestat() from os.path (aka
29149ntpath.py) -- these cannot be made to work reliably (at least I
29150wouldn't know how).
29151
29152- Fixed os.pipe() so that it returns file descriptors acceptable to
29153os.read() and os.write() (like it does on Unix), rather than Windows
29154file handles.
29155
29156- Added a table of WSA error codes to socket.py.
29157
29158- In the select module, put the (huge) file descriptor arrays on the
29159heap.
29160
29161- The getpass module now raises KeyboardInterrupt when it sees ^C.
29162
29163- In mailbox.py, fix tell/seek when using files opened in text mode.
29164
29165- In rfc822.py, fix tell/seek when using files opened in text mode.
29166
29167- In the msvcrt extension module, release the interpreter lock for
29168calls that may block: _locking(), _getch(), _getche().  Also fix a
29169bogus error return when open_osfhandle() doesn't have the right
29170argument list.
29171
29172Windows Installer
29173-----------------
29174
29175- The registry key used is now "1.5" instead of "1.5.x" -- so future
29176versions of 1.5 and Mark Hammond's win32all installer don't need to be
29177resynchronized.
29178
29179Windows Tools
29180-------------
29181
29182- Several improvements to freeze specifically for Windows.
29183
29184Windows Build Procedure
29185-----------------------
29186
29187- The VC++ project files and the WISE installer have been moved to the
29188PCbuild subdirectory, so they are distributed in the same subdirectory
29189where they must be used.  This avoids confusion.
29190
29191- New project files for Windows 3.1 port by Jim Ahlstrom.
29192
29193- Got rid of the obsolete subdirectory PC/setup_nt/.
29194
29195- The projects now use distinct filenames for the .exe, .dll, .lib and
29196.pyd files built in debug mode (by appending "_d" to the base name,
29197before the extension).  This makes it easier to switch between the two
29198and get the right versions.  There's a pragma in config.h that directs
29199the linker to include the appropriate .lib file (so python15.lib no
29200longer needs to be explicit in your project).
29201
29202- The installer now installs more files (e.g. config.h).  The idea is
29203that you shouldn't need the source distribution if you want build your
29204own extensions in C or C++.
29205
29206Tools and Demos
29207---------------
29208
29209- New script nm2def.py by Marc-Andre Lemburg, to construct
29210PC/python_nt.def automatically (some hand editing still required).
29211
29212- New tool ndiff.py: Tim Peters' text diffing tool.
29213
29214- Various and sundry improvements to the freeze script.
29215
29216- The script texi2html.py (which was part of the Doc tree but is no
29217longer used there) has been moved to the Tools/scripts subdirectory.
29218
29219- Some generalizations in the webchecker code.  There's now a
29220primnitive gui for websucker.py: wsgui.py.  (In Tools/webchecker/.)
29221
29222- The ftpmirror.py script now handles symbolic links properly, and
29223also files with multiple spaces in their names.
29224
29225- The 1.5.1 tabnanny.py suffers an assert error if fed a script whose
29226last line is both indented and lacks a newline.  This is now fixed.
29227
29228Python/C API
29229------------
29230
29231- Added missing prototypes for PyEval_CallFunction() and
29232PyEval_CallMethod().
29233
29234- New macro PyList_SET_ITEM().
29235
29236- New macros to access object members for PyFunction, PyCFunction
29237objects.
29238
29239- New APIs PyImport_AppendInittab() and PyImport_ExtendInittab() to
29240dynamically add one or many entries to the table of built-in modules.
29241
29242- New macro Py_InitModule3(name, methods, doc) which calls
29243Py_InitModule4() with appropriate arguments.  (The -4 variant requires
29244you to pass an obscure version number constant which is always the same.)
29245
29246- New APIs PySys_WriteStdout() and PySys_WriteStderr() to write to
29247sys.stdout or sys.stderr using a printf-like interface.  (Used in
29248_tkinter.c, for example.)
29249
29250- New APIs for conversion between Python longs and C 'long long' if
29251your compiler supports it.
29252
29253- PySequence_In() is now called PySequence_Contains().
29254(PySequence_In() is still supported for b/w compatibility; it is
29255declared obsolete because its argument order is confusing.)
29256
29257- PyDict_GetItem() and PyDict_GetItemString() are changed so that they
29258*never* raise an exception -- (even if the hash() fails, simply clear
29259the error).  This was necessary because there is lots of code out
29260there that already assumes this.
29261
29262- Changes to PySequence_Tuple() and PySequence_List() to use the
29263length of a sequence only as a hint -- if an IndexError happens
29264earlier, take that.  (Formerly, this was considered an error.)
29265
29266- Reformatted abstract.c to give it a more familiar "look" and fixed
29267many error checking bugs.
29268
29269- Add NULL pointer checks to all calls of a C function through a type
29270object and extensions (e.g. nb_add).
29271
29272- The code that initializes sys.path now calls Py_GetPythonHome()
29273instead of getenv("PYTHONHOME").  This, together with the new API
29274Py_SetPythonHome(), makes it easier for embedding applications to
29275change the notion of Python's "home" directory (where the libraries
29276etc. are sought).
29277
29278- Fixed a very old bug in the parsing of "O?" format specifiers.
29279
29280
29281======================================================================
29282
29283
29284========================================
29285==> Release 1.5.1 (October 31, 1998) <==
29286========================================
29287
29288From 1.5 to 1.5.1
29289=================
29290
29291General
29292-------
29293
29294- The documentation is now unbundled.  It has also been extensively
29295modified (mostly to implement a new and more uniform formatting
29296style).  We figure that most people will prefer to download one of the
29297preformatted documentation sets (HTML, PostScript or PDF) and that
29298only a minority have a need for the LaTeX or FrameMaker sources.  Of
29299course, the unbundled documentation sources still released -- just not
29300in the same archive file, and perhaps not on the same date.
29301
29302- All bugs noted on the errors page (and many unnoted) are fixed.  All
29303new bugs take their places.
29304
29305- No longer a core dump when attempting to print (or repr(), or str())
29306a list or dictionary that contains an instance of itself; instead, the
29307recursive entry is printed as [...] or {...}.  See Py_ReprEnter() and
29308Py_ReprLeave() below.  Comparisons of such objects still go beserk,
29309since this requires a different kind of fix; fortunately, this is a
29310less common scenario in practice.
29311
29312Syntax change
29313-------------
29314
29315- The raise statement can now be used without arguments, to re-raise
29316a previously set exception.  This should be used after catching an
29317exception with an except clause only, either in the except clause or
29318later in the same function.
29319
29320Import and module handling
29321--------------------------
29322
29323- The implementation of import has changed to use a mutex (when
29324threading is supported).  This means that when two threads
29325simultaneously import the same module, the import statements are
29326serialized.  Recursive imports are not affected.
29327
29328- Rewrote the finalization code almost completely, to be much more
29329careful with the order in which modules are destroyed.  Destructors
29330will now generally be able to reference built-in names such as None
29331without trouble.
29332
29333- Case-insensitive platforms such as Mac and Windows require the case
29334of a module's filename to match the case of the module name as
29335specified in the import statement (see below).
29336
29337- The code for figuring out the default path now distinguishes between
29338files, modules, executable files, and directories.  When expecting a
29339module, we also look for the .pyc or .pyo file.
29340
29341Parser/tokenizer changes
29342------------------------
29343
29344- The tokenizer can now warn you when your source code mixes tabs and
29345spaces for indentation in a manner that depends on how much a tab is
29346worth in spaces.  Use "python -t" or "python -v" to enable this
29347option.  Use "python -tt" to turn the warnings into errors.  (See also
29348tabnanny.py and tabpolice.py below.)
29349
29350- Return unsigned characters from tok_nextc(), so '\377' isn't
29351mistaken for an EOF character.
29352
29353- Fixed two pernicious bugs in the tokenizer that only affected AIX.
29354One was actually a general bug that was triggered by AIX's smaller I/O
29355buffer size.  The other was a bug in the AIX optimizer's loop
29356unrolling code; swapping two statements made the problem go away.
29357
29358Tools, demos and miscellaneous files
29359------------------------------------
29360
29361- There's a new version of Misc/python-mode.el (the Emacs mode for
29362Python) which is much smarter about guessing the indentation style
29363used in a particular file.  Lots of other cool features too!
29364
29365- There are two new tools in Tools/scripts: tabnanny.py and
29366tabpolice.py, implementing two different ways of checking whether a
29367file uses indentation in a way that is sensitive to the interpretation
29368of a tab.  The preferred module is tabnanny.py (by Tim Peters).
29369
29370- Some new demo programs:
29371
29372	Demo/tkinter/guido/paint.py -- Dave Mitchell
29373	Demo/sockets/unixserver.py -- Piet van Oostrum
29374
29375
29376- Much better freeze support.  The freeze script can now freeze
29377hierarchical module names (with a corresponding change to import.c),
29378and has a few extra options (e.g. to suppress freezing specific
29379modules).  It also does much more on Windows NT.
29380
29381- Version 1.0 of the faq wizard is included (only very small changes
29382since version 0.9.0).
29383
29384- New feature for the ftpmirror script: when removing local files
29385(i.e., only when -r is used), do a recursive delete.
29386
29387Configuring and building Python
29388-------------------------------
29389
29390- Get rid of the check for -linet -- recent Sequent Dynix systems don't
29391need this any more and apparently it screws up their configuration.
29392
29393- Some changes because gcc on SGI doesn't support '-all'.
29394
29395- Changed the build rules to use $(LIBRARY) instead of
29396  -L.. -lpython$(VERSION)
29397since the latter trips up the SunOS 4.1.x linker (sigh).
29398
29399- Fix the bug where the '# dgux is broken' comment in the Makefile
29400tripped over Make on some platforms.
29401
29402- Changes for AIX: install the python.exp file; properly use
29403$(srcdir); the makexp_aix script now removes C++ entries of the form
29404Class::method.
29405
29406- Deleted some Makefile targets only used by the (long obsolete)
29407gMakefile hacks.
29408
29409Extension modules
29410-----------------
29411
29412- Performance and threading improvements to the socket and bsddb
29413modules, by Christopher Lindblad of Infoseek.
29414
29415- Added operator.__not__ and operator.not_.
29416
29417- In the thread module, when a thread exits due to an unhandled
29418exception, don't store the exception information in sys.last_*; it
29419prevents proper calling of destructors of local variables.
29420
29421- Fixed a number of small bugs in the cPickle module.
29422
29423- Changed find() and rfind() in the strop module so that
29424find("x","",2) returns -1, matching the implementation in string.py.
29425
29426- In the time module, be more careful with the result of ctime(), and
29427test for HAVE_MKTIME before usinmg mktime().
29428
29429- Doc strings contributed by Mitch Chapman to the termios, pwd, gdbm
29430modules.
29431
29432- Added the LOG_SYSLOG constant to the syslog module, if defined.
29433
29434Standard library modules
29435------------------------
29436
29437- All standard library modules have been converted to an indentation
29438style using either only tabs or only spaces -- never a mixture -- if
29439they weren't already consistent according to tabnanny.  This means
29440that the new -t option (see above) won't complain about standard
29441library modules.
29442
29443- New standard library modules:
29444
29445	threading -- GvR and the thread-sig
29446		Java style thread objects -- USE THIS!!!
29447
29448	getpass -- Piers Lauder
29449		simple utilities to prompt for a password and to
29450		retrieve the current username
29451
29452	imaplib -- Piers Lauder
29453		interface for the IMAP4 protocol
29454
29455	poplib -- David Ascher, Piers Lauder
29456		interface for the POP3 protocol
29457
29458	smtplib -- Dragon De Monsyne
29459		interface for the SMTP protocol
29460
29461- Some obsolete modules moved to a separate directory (Lib/lib-old)
29462which is *not* in the default module search path:
29463
29464	Para
29465	addpack
29466	codehack
29467	fmt
29468	lockfile
29469	newdir
29470	ni
29471	rand
29472	tb
29473
29474- New version of the PCRE code (Perl Compatible Regular Expressions --
29475the re module and the supporting pcre extension) by Andrew Kuchling.
29476Incompatible new feature in re.sub(): the handling of escapes in the
29477replacement string has changed.
29478
29479- Interface change in the copy module: a __deepcopy__ method is now
29480called with the memo dictionary as an argument.
29481
29482- Feature change in the tokenize module: differentiate between NEWLINE
29483token (an official newline) and NL token (a newline that the grammar
29484ignores).
29485
29486- Several bugfixes to the urllib module.  It is now truly thread-safe,
29487and several bugs and a portability problem have been fixed.  New
29488features, all due to Sjoerd Mullender: When creating a temporary file,
29489it gives it an appropriate suffix.  Support the "data:" URL scheme.
29490The open() method uses the tempcache.
29491
29492- New version of the xmllib module (this time with a test suite!) by
29493Sjoerd Mullender.
29494
29495- Added debugging code to the telnetlib module, to be able to trace
29496the actual traffic.
29497
29498- In the rfc822 module, added support for deleting a header (still no
29499support for adding headers, though).  Also fixed a bug where an
29500illegal address would cause a crash in getrouteaddr(), fixed a
29501sign reversal in mktime_tz(), and use the local timezone by default
29502(the latter two due to Bill van Melle).
29503
29504- The normpath() function in the dospath and ntpath modules no longer
29505does case normalization -- for that, use the separate function
29506normcase() (which always existed); normcase() has been sped up and
29507fixed (it was the cause of a crash in Mark Hammond's installer in
29508certain locales).
29509
29510- New command supported by the ftplib module: rmd(); also fixed some
29511minor bugs.
29512
29513- The profile module now uses a different timer function by default --
29514time.clock() is generally better than os.times().  This makes it work
29515better on Windows NT, too.
29516
29517- The tempfile module now recovers when os.getcwd() raises an
29518exception.
29519
29520- Fixed some bugs in the random module; gauss() was subtly wrong, and
29521vonmisesvariate() should return a full circle.  Courtesy Mike Miller,
29522Lambert Meertens (gauss()), and Magnus Kessler (vonmisesvariate()).
29523
29524- Better default seed in the whrandom module, courtesy Andrew Kuchling.
29525
29526- Fix slow close() in shelve module.
29527
29528- The Unix mailbox class in the mailbox module is now more robust when
29529a line begins with the string "From " but is definitely not the start
29530of a new message.  The pattern used can be changed by overriding a
29531method or class variable.
29532
29533- Added a rmtree() function to the copy module.
29534
29535- Fixed several typos in the pickle module.  Also fixed problems when
29536unpickling in restricted execution environments.
29537
29538- Added docstrings and fixed a typo in the py_compile and compileall
29539modules.  At Mark Hammond's repeated request, py_compile now append a
29540newline to the source if it needs one.  Both modules support an extra
29541parameter to specify the purported source filename (to be used in
29542error messages).
29543
29544- Some performance tweaks by Jeremy Hylton to the gzip module.
29545
29546- Fixed a bug in the merge order of dictionaries in the ConfigParser
29547module.  Courtesy Barry Warsaw.
29548
29549- In the multifile module, support the optional second parameter to
29550seek() when possible.
29551
29552- Several fixes to the gopherlib module by Lars Marius Garshol.  Also,
29553urlparse now correctly handles Gopher URLs with query strings.
29554
29555- Fixed a tiny bug in format_exception() in the traceback module.
29556Also rewrite tb_lineno() to be compatible with JPython (and not
29557disturb the current exception!); by Jim Hugunin.
29558
29559- The httplib module is more robust when servers send a short response
29560-- courtesy Tim O'Malley.
29561
29562Tkinter and friends
29563-------------------
29564
29565- Various typos and bugs fixed.
29566
29567- New module Tkdnd implements a drag-and-drop protocol (within one
29568application only).
29569
29570- The event_*() widget methods have been restructured slightly -- they
29571no longer use the default root.
29572
29573- The interfaces for the bind*() and unbind() widget methods have been
29574redesigned; the bind*() methods now return the name of the Tcl command
29575created for the callback, and this can be passed as an optional
29576argument to unbind() in order to delete the command (normally, such
29577commands are automatically unbound when the widget is destroyed, but
29578for some applications this isn't enough).
29579
29580- Variable objects now have trace methods to interface to Tcl's
29581variable tracing facilities.
29582
29583- Image objects now have an optional keyword argument, 'master', to
29584specify a widget (tree) to which they belong.  The image_names() and
29585image_types() calls are now also widget methods.
29586
29587- There's a new global call, Tkinter.NoDefaultRoot(), which disables
29588all use of the default root by the Tkinter library.  This is useful to
29589debug applications that are in the process of being converted from
29590relying on the default root to explicit specification of the root
29591widget.
29592
29593- The 'exit' command is deleted from the Tcl interpreter, since it
29594provided a loophole by which one could (accidentally) exit the Python
29595interpreter without invoking any cleanup code.
29596
29597- Tcl_Finalize() is now registered as a Python low-level exit handle,
29598so Tcl will be finalized when Python exits.
29599
29600The Python/C API
29601----------------
29602
29603- New function PyThreadState_GetDict() returns a per-thread dictionary
29604intended for storing thread-local global variables.
29605
29606- New functions Py_ReprEnter() and Py_ReprLeave() use the per-thread
29607dictionary to allow recursive container types to detect recursion in
29608their repr(), str() and print implementations.
29609
29610- New function PyObject_Not(x) calculates (not x) according to Python's
29611standard rules (basically, it negates the outcome PyObject_IsTrue(x).
29612
29613- New function _PyModule_Clear(), which clears a module's dictionary
29614carefully without removing the __builtins__ entry.  This is implied
29615when a module object is deallocated (this used to clear the dictionary
29616completely).
29617
29618- New function PyImport_ExecCodeModuleEx(), which extends
29619PyImport_ExecCodeModule() by adding an extra parameter to pass it the
29620true file.
29621
29622- New functions Py_GetPythonHome() and Py_SetPythonHome(), intended to
29623allow embedded applications to force a different value for PYTHONHOME.
29624
29625- New global flag Py_FrozenFlag is set when this is a "frozen" Python
29626binary; it suppresses warnings about not being able to find the
29627standard library directories.
29628
29629- New global flag Py_TabcheckFlag is incremented by the -t option and
29630causes the tokenizer to issue warnings or errors about inconsistent
29631mixing of tabs and spaces for indentation.
29632
29633Miscellaneous minor changes and bug fixes
29634-----------------------------------------
29635
29636- Improved the error message when an attribute of an attribute-less
29637object is requested -- include the name of the attribute and the type
29638of the object in the message.
29639
29640- Sped up int(), long(), float() a bit.
29641
29642- Fixed a bug in list.sort() that would occasionally dump core.
29643
29644- Fixed a bug in PyNumber_Power() that caused numeric arrays to fail
29645when taken to the real power.
29646
29647- Fixed a number of bugs in the file reading code, at least one of
29648which could cause a core dump on NT, and one of which would
29649occasionally cause file.read() to return less than the full contents
29650of the file.
29651
29652- Performance hack by Vladimir Marangozov for stack frame creation.
29653
29654- Make sure setvbuf() isn't used unless HAVE_SETVBUF is defined.
29655
29656Windows 95/NT
29657-------------
29658
29659- The .lib files are now part of the distribution; they are collected
29660in the subdirectory "libs" of the installation directory.
29661
29662- The extension modules (.pyd files) are now collected in a separate
29663subdirectory of the installation directory named "DLLs".
29664
29665- The case of a module's filename must now match the case of the
29666module name as specified in the import statement.  This is an
29667experimental feature -- if it turns out to break in too many
29668situations, it will be removed (or disabled by default) in the future.
29669It can be disabled on a per-case basis by setting the environment
29670variable PYTHONCASEOK (to any value).
29671
29672
29673======================================================================
29674
29675
29676=====================================
29677==> Release 1.5 (January 3, 1998) <==
29678=====================================
29679
29680
29681From 1.5b2 to 1.5
29682=================
29683
29684- Newly documentated module: BaseHTTPServer.py, thanks to Greg Stein.
29685
29686- Added doc strings to string.py, stropmodule.c, structmodule.c,
29687thanks to Charles Waldman.
29688
29689- Many nits fixed in the manuals, thanks to Fred Drake and many others
29690(especially Rob Hooft and Andrew Kuchling).  The HTML version now uses
29691HTML markup instead of inline GIF images for tables; only two images
29692are left (for obscure bits of math).  The index of the HTML version has
29693also been much improved.  Finally, it is once again possible to
29694generate an Emacs info file from the library manual (but I don't
29695commit to supporting this in future versions).
29696
29697- New module: telnetlib.py (a simple telnet client library).
29698
29699- New tool: Tools/versioncheck/, by Jack Jansen.
29700
29701- Ported zlibmodule.c and bsddbmodule.c to NT; The project file for MS
29702DevStudio 5.0 now includes new subprojects to build the zlib and bsddb
29703extension modules.
29704
29705- Many small changes again to Tkinter.py -- mostly bugfixes and adding
29706missing routines.  Thanks to Greg McFarlane for reporting a bunch of
29707problems and proofreading my fixes.
29708
29709- The re module and its documentation are up to date with the latest
29710version released to the string-sig (Dec. 22).
29711
29712- Stop test_grp.py from failing when the /etc/group file is empty
29713(yes, this happens!).
29714
29715- Fix bug in integer conversion (mystrtoul.c) that caused
297164294967296==0 to be true!
29717
29718- The VC++ 4.2 project file should be complete again.
29719
29720- In tempfile.py, use a better template on NT, and add a new optional
29721argument "suffix" with default "" to specify a specific extension for
29722the temporary filename (needed sometimes on NT but perhaps also handy
29723elsewhere).
29724
29725- Fixed some bugs in the FAQ wizard, and converted it to use re
29726instead of regex.
29727
29728- Fixed a mysteriously undetected error in dlmodule.c (it was using a
29729totally bogus routine name to raise an exception).
29730
29731- Fixed bug in import.c which wasn't using the new "dos-8x3" name yet.
29732
29733- Hopefully harmless changes to the build process to support shared
29734libraries on DG/UX.  This adds a target to create
29735libpython$(VERSION).so; however this target is *only* for DG/UX.
29736
29737- Fixed a bug in the new format string error checking in getargs.c.
29738
29739- A simple fix for infinite recursion when printing __builtins__:
29740reset '_' to None before printing and set it to the printed variable
29741*after* printing (and only when printing is successful).
29742
29743- Fixed lib-tk/SimpleDialog.py to keep the dialog visible even if the
29744parent window is not (Skip Montanaro).
29745
29746- Fixed the two most annoying problems with ftp URLs in
29747urllib.urlopen(); an empty file now correctly raises an error, and it
29748is no longer required to explicitly close the returned "file" object
29749before opening another ftp URL to the same host and directory.
29750
29751
29752======================================================================
29753
29754
29755From 1.5b1 to 1.5b2
29756===================
29757
29758- Fixed a bug in cPickle.c that caused it to crash right away because
29759the version string had a different format.
29760
29761- Changes in pickle.py and cPickle.c: when unpickling an instance of a
29762class that doesn't define the __getinitargs__() method, the __init__()
29763constructor is no longer called.  This makes a much larger group of
29764classes picklable by default, but may occasionally change semantics.
29765To force calling __init__() on unpickling, define a __getinitargs__()
29766method.  Other changes too, in particular cPickle now handles classes
29767defined in packages correctly.  The same change applies to copying
29768instances with copy.py.  The cPickle.c changes and some pickle.py
29769changes are courtesy Jim Fulton.
29770
29771- Locale support in he "re" (Perl regular expressions) module.  Use
29772the flag re.L (or re.LOCALE) to enable locale-specific matching
29773rules for \w and \b.  The in-line syntax for this flag is (?L).
29774
29775- The built-in function isinstance(x, y) now also succeeds when y is
29776a type object and type(x) is y.
29777
29778- repr() and str() of class and instance objects now reflect the
29779package/module in which the class is defined.
29780
29781- Module "ni" has been removed.  (If you really need it, it's been
29782renamed to "ni1".  Let me know if this causes any problems for you.
29783Package authors are encouraged to write __init__.py files that
29784support both ni and 1.5 package support, so the same version can be
29785used with Python 1.4 as well as 1.5.)
29786
29787- The thread module is now automatically included when threads are
29788configured.  (You must remove it from your existing Setup file,
29789since it is now in its own Setup.thread file.)
29790
29791- New command line option "-x" to skip the first line of the script;
29792handy to make executable scripts on non-Unix platforms.
29793
29794- In importdl.c, add the RTLD_GLOBAL to the dlopen() flags.  I
29795haven't checked how this affects things, but it should make symbols
29796in one shared library available to the next one.
29797
29798- The Windows installer now installs in the "Program Files" folder on
29799the proper volume by default.
29800
29801- The Windows configuration adds a new main program, "pythonw", and
29802registers a new extension, ".pyw" that invokes this.  This is a
29803pstandard Python interpreter that does not pop up a console window;
29804handy for pure Tkinter applications.  All output to the original
29805stdout and stderr is lost; reading from the original stdin yields
29806EOF.  Also, both python.exe and pythonw.exe now have a pretty icon
29807(a green snake in a box, courtesy Mark Hammond).
29808
29809- Lots of improvements to emacs-mode.el again.  See Barry's web page:
29810http://www.python.org/ftp/emacs/pmdetails.html.
29811
29812- Lots of improvements and additions to the library reference manual;
29813many by Fred Drake.
29814
29815- Doc strings for the following modules: rfc822.py, posixpath.py,
29816ntpath.py, httplib.py.  Thanks to Mitch Chapman and Charles Waldman.
29817
29818- Some more regression testing.
29819
29820- An optional 4th (maxsplit) argument to strop.replace().
29821
29822- Fixed handling of maxsplit in string.splitfields().
29823
29824- Tweaked os.environ so it can be pickled and copied.
29825
29826- The portability problems caused by indented preprocessor commands
29827and C++ style comments should be gone now.
29828
29829- In random.py, added Pareto and Weibull distributions.
29830
29831- The crypt module is now disabled in Modules/Setup.in by default; it
29832is rarely needed and causes errors on some systems where users often
29833don't know how to deal with those.
29834
29835- Some improvements to the _tkinter build line suggested by Case Roole.
29836
29837- A full suite of platform specific files for NetBSD 1.x, submitted by
29838Anders Andersen.
29839
29840- New Solaris specific header STROPTS.py.
29841
29842- Moved a confusing occurrence of *shared* from the comments in
29843Modules/Setup.in (people would enable this one instead of the real
29844one, and get disappointing results).
29845
29846- Changed the default mode for directories to be group-writable when
29847the installation process creates them.
29848
29849- Check for pthread support in "-l_r" for FreeBSD/NetBSD, and support
29850shared libraries for both.
29851
29852- Support FreeBSD and NetBSD in posixfile.py.
29853
29854- Support for the "event" command, new in Tk 4.2.  By Case Roole.
29855
29856- Add Tix_SafeInit() support to tkappinit.c.
29857
29858- Various bugs fixed in "re.py" and "pcre.c".
29859
29860- Fixed a bug (broken use of the syntax table) in the old "regexpr.c".
29861
29862- In frozenmain.c, stdin is made unbuffered too when PYTHONUNBUFFERED
29863is set.
29864
29865- Provide default blocksize for retrbinary in ftplib.py (Skip
29866Montanaro).
29867
29868- In NT, pick the username up from different places in user.py (Jeff
29869Bauer).
29870
29871- Patch to urlparse.urljoin() for ".." and "..#1", Marc Lemburg.
29872
29873- Many small improvements to Jeff Rush' OS/2 support.
29874
29875- ospath.py is gone; it's been obsolete for so many years now...
29876
29877- The reference manual is now set up to prepare better HTML (still
29878using webmaker, alas).
29879
29880- Add special handling to /Tools/freeze for Python modules that are
29881imported implicitly by the Python runtime: 'site' and 'exceptions'.
29882
29883- Tools/faqwiz 0.8.3 -- add an option to suppress URL processing
29884inside <PRE>, by "Scott".
29885
29886- Added ConfigParser.py, a generic parser for sectioned configuration
29887files.
29888
29889- In _localemodule.c, LC_MESSAGES is not always defined; put it
29890between #ifdefs.
29891
29892- Typo in resource.c: RUSAGE_CHILDERN -> RUSAGE_CHILDREN.
29893
29894- Demo/scripts/newslist.py: Fix the way the version number is gotten
29895out of the RCS revision.
29896
29897- PyArg_Parse[Tuple] now explicitly check for bad characters at the
29898end of the format string.
29899
29900- Revamped PC/example_nt to support VC++ 5.x.
29901
29902- <listobject>.sort() now uses a modified quicksort by Raymund Galvin,
29903after studying the GNU libg++ quicksort.  This should be much faster
29904if there are lots of duplicates, and otherwise at least as good.
29905
29906- Added "uue" as an alias for "uuencode" to mimetools.py.  (Hm, the
29907uudecode bug where it complaints about trailing garbage is still there
29908:-( ).
29909
29910- pickle.py requires integers in text mode to be in decimal notation
29911(it used to accept octal and hex, even though it would only generate
29912decimal numbers).
29913
29914- In string.atof(), don't fail when the "re" module is unavailable.
29915Plug the ensuing security leak by supplying an empty __builtins__
29916directory to eval().
29917
29918- A bunch of small fixes and improvements to Tkinter.py.
29919
29920- Fixed a buffer overrun in PC/getpathp.c.
29921
29922
29923======================================================================
29924
29925
29926From 1.5a4 to 1.5b1
29927===================
29928
29929- The Windows NT/95 installer now includes full HTML of all manuals.
29930It also has a checkbox that lets you decide whether to install the
29931interpreter and library.  The WISE installer script for the installer
29932is included in the source tree as PC/python15.wse, and so are the
29933icons used for Python files.  The config.c file for the Windows build
29934is now complete with the pcre module.
29935
29936- sys.ps1 and sys.ps2 can now arbitrary objects; their str() is
29937evaluated for the prompt.
29938
29939- The reference manual is brought up to date (more or less -- it still
29940needs work, e.g. in the area of package import).
29941
29942- The icons used by latex2html are now included in the Doc
29943subdirectory (mostly so that tarring up the HTML files can be fully
29944automated).  A simple index.html is also added to Doc (it only works
29945after you have successfully run latex2html).
29946
29947- For all you would-be proselytizers out there: a new version of
29948Misc/BLURB describes Python more concisely, and Misc/comparisons
29949compares Python to several other languages.  Misc/BLURB.WINDOWS
29950contains a blurb specifically aimed at Windows programmers (by Mark
29951Hammond).
29952
29953- A new version of the Python mode for Emacs is included as
29954Misc/python-mode.el.  There are too many new features to list here.
29955See http://www.python.org/ftp/emacs/pmdetails.html for more info.
29956
29957- New module fileinput makes iterating over the lines of a list of
29958files easier.  (This still needs some more thinking to make it more
29959extensible.)
29960
29961- There's full OS/2 support, courtesy Jeff Rush.  To build the OS/2
29962version, see PC/readme.txt and PC/os2vacpp.  This is for IBM's Visual
29963Age C++ compiler.  I expect that Jeff will also provide a binary
29964release for this platform.
29965
29966- On Linux, the configure script now uses '-Xlinker -export-dynamic'
29967instead of '-rdynamic' to link the main program so that it exports its
29968symbols to shared libraries it loads dynamically.  I hope this doesn't
29969break on older Linux versions; it is needed for mklinux and appears to
29970work on Linux 2.0.30.
29971
29972- Some Tkinter resstructuring: the geometry methods that apply to a
29973master are now properly usable on toplevel master widgets.  There's a
29974new (internal) widget class, BaseWidget.  New, longer "official" names
29975for the geometry manager methods have been added,
29976e.g. "grid_columnconfigure()" instead of "columnconfigure()".  The old
29977shorter names still work, and where there's ambiguity, pack wins over
29978place wins over grid.  Also, the bind_class method now returns its
29979value.
29980
29981- New, RFC-822 conformant parsing of email addresses and address lists
29982in the rfc822 module, courtesy Ben Escoto.
29983
29984- New, revamped tkappinit.c with support for popular packages (PIL,
29985TIX, BLT, TOGL).  For the last three, you need to execute the Tcl
29986command "load {} Tix" (or Blt, or Togl) to gain access to them.
29987The Modules/Setup line for the _tkinter module has been rewritten
29988using the cool line-breaking feature of most Bourne shells.
29989
29990- New socket method connect_ex() returns the error code from connect()
29991instead of raising an exception on errors; this makes the logic
29992required for asynchronous connects simpler and more efficient.
29993
29994- New "locale" module with (still experimental) interface to the
29995standard C library locale interface, courtesy Martin von Löwis.  This
29996does not repeat my mistake in 1.5a4 of always calling
29997setlocale(LC_ALL, "").  In fact, we've pretty much decided that
29998Python's standard numerical formatting operations should always use
29999the conventions for the C locale; the locale module contains utility
30000functions to format numbers according to the user specified locale.
30001(All this is accomplished by an explicit call to setlocale(LC_NUMERIC,
30002"C") after locale-changing calls.)  See the library manual. (Alas, the
30003promised changes to the "re" module for locale support have not been
30004materialized yet.  If you care, volunteer!)
30005
30006- Memory leak plugged in Py_BuildValue when building a dictionary.
30007
30008- Shared modules can now live inside packages (hierarchical module
30009namespaces).  No changes to the shared module itself are needed.
30010
30011- Improved policy for __builtins__: this is a module in __main__ and a
30012dictionary everywhere else.
30013
30014- Python no longer catches SIGHUP and SIGTERM by default.  This was
30015impossible to get right in the light of thread contexts.  If you want
30016your program to clean up when a signal happens, use the signal module
30017to set up your own signal handler.
30018
30019- New Python/C API PyNumber_CoerceEx() does not return an exception
30020when no coercion is possible.  This is used to fix a problem where
30021comparing incompatible numbers for equality would raise an exception
30022rather than return false as in Python 1.4 -- it once again will return
30023false.
30024
30025- The errno module is changed again -- the table of error messages
30026(errorstr) is removed.  Instead, you can use os.strerror().  This
30027removes redundance and a potential locale dependency.
30028
30029- New module xmllib, to parse XML files.  By Sjoerd Mullender.
30030
30031- New C API PyOS_AfterFork() is called after fork() in posixmodule.c.
30032It resets the signal module's notion of what the current process ID
30033and thread are, so that signal handlers will work after (and across)
30034calls to os.fork().
30035
30036- Fixed most occurrences of fatal errors due to missing thread state.
30037
30038- For vgrind (a flexible source pretty printer) fans, there's a simple
30039Python definition in Misc/vgrindefs, courtesy Neale Pickett.
30040
30041- Fixed memory leak in exec statement.
30042
30043- The test.pystone module has a new function, pystones(loops=LOOPS),
30044which returns a (benchtime, stones) tuple.  The main() function now
30045calls this and prints the report.
30046
30047- Package directories now *require* the presence of an __init__.py (or
30048__init__.pyc) file before they are considered as packages.  This is
30049done to prevent accidental subdirectories with common names from
30050overriding modules with the same name.
30051
30052- Fixed some strange exceptions in __del__ methods in library modules
30053(e.g. urllib).  This happens because the built-in names are already
30054deleted by the time __del__ is called.  The solution (a hack, but it
30055works) is to set some instance variables to 0 instead of None.
30056
30057- The table of built-in module initializers is replaced by a pointer
30058variable.  This makes it possible to switch to a different table at
30059run time, e.g. when a collection of modules is loaded from a shared
30060library.  (No example code of how to do this is given, but it is
30061possible.)  The table is still there of course, its name prefixed with
30062an underscore and used to initialize the pointer.
30063
30064- The warning about a thread still having a frame now only happens in
30065verbose mode.
30066
30067- Change the signal finalization so that it also resets the signal
30068handlers.  After this has been called, our signal handlers are no
30069longer active!
30070
30071- New version of tokenize.py (by Ka-Ping Yee) recognizes raw string
30072literals.  There's now also a test fort this module.
30073
30074- The copy module now also uses __dict__.update(state) instead of
30075going through individual attribute assignments, for class instances
30076without a __setstate__ method.
30077
30078- New module reconvert translates old-style (regex module) regular
30079expressions to new-style (re module, Perl-style) regular expressions.
30080
30081- Most modules that used to use the regex module now use the re
30082module.  The grep module has a new pgrep() function which uses
30083Perl-style regular expressions.
30084
30085- The (very old, backwards compatibility) regexp.py module has been
30086deleted.
30087
30088- Restricted execution (rexec): added the pcre module (support for the
30089re module) to the list of trusted extension modules.
30090
30091- New version of Jim Fulton's CObject object type, adds
30092PyCObject_FromVoidPtrAndDesc() and PyCObject_GetDesc() APIs.
30093
30094- Some patches to Lee Busby's fpectl mods that accidentally didn't
30095make it into 1.5a4.
30096
30097- In the string module, add an optional 4th argument to count(),
30098matching find() etc.
30099
30100- Patch for the nntplib module by Charles Waldman to add optional user
30101and password arguments to NNTP.__init__(), for nntp servers that need
30102them.
30103
30104- The str() function for class objects now returns
30105"modulename.classname" instead of returning the same as repr().
30106
30107- The parsing of \xXX escapes no longer relies on sscanf().
30108
30109- The "sharedmodules" subdirectory of the installation is renamed to
30110"lib-dynload".  (You may have to edit your Modules/Setup file to fix
30111this in an existing installation!)
30112
30113- Fixed Don Beaudry's mess-up with the OPT test in the configure
30114script.  Certain SGI platforms will still issue a warning for each
30115compile; there's not much I can do about this since the compiler's
30116exit status doesn't indicate that I was using an obsolete option.
30117
30118- Fixed Barry's mess-up with {}.get(), and added test cases for it.
30119
30120- Shared libraries didn't quite work under AIX because of the change
30121in status of the GNU readline interface.  Fix due to by Vladimir
30122Marangozov.
30123
30124
30125======================================================================
30126
30127
30128From 1.5a3 to 1.5a4
30129===================
30130
30131- faqwiz.py: version 0.8; Recognize https:// as URL; <html>...</html>
30132feature; better install instructions; removed faqmain.py (which was an
30133older version).
30134
30135- nntplib.py: Fixed some bugs reported by Lars Wirzenius (to Debian)
30136about the treatment of lines starting with '.'.  Added a minimal test
30137function.
30138
30139- struct module: ignore most whitespace in format strings.
30140
30141- urllib.py: close the socket and temp file in URLopener.retrieve() so
30142that multiple retrievals using the same connection work.
30143
30144- All standard exceptions are now classes by default; use -X to make
30145them strings (for backward compatibility only).
30146
30147- There's a new standard exception hierarchy, defined in the standard
30148library module exceptions.py (which you never need to import
30149explicitly).  See
30150http://grail.cnri.reston.va.us/python/essays/stdexceptions.html for
30151more info.
30152
30153- Three new C API functions:
30154
30155  - int PyErr_GivenExceptionMatches(obj1, obj2)
30156
30157    Returns 1 if obj1 and obj2 are the same object, or if obj1 is an
30158    instance of type obj2, or of a class derived from obj2
30159
30160  - int PyErr_ExceptionMatches(obj)
30161
30162    Higher level wrapper around PyErr_GivenExceptionMatches() which uses
30163    PyErr_Occurred() as obj1.  This will be the more commonly called
30164    function.
30165
30166  - void PyErr_NormalizeException(typeptr, valptr, tbptr)
30167
30168    Normalizes exceptions, and places the normalized values in the
30169    arguments.  If type is not a class, this does nothing.  If type is a
30170    class, then it makes sure that value is an instance of the class by:
30171
30172    1. if instance is of the type, or a class derived from type, it does
30173       nothing.
30174
30175    2. otherwise it instantiates the class, using the value as an
30176       argument.  If value is None, it uses an empty arg tuple, and if
30177       the value is a tuple, it uses just that.
30178
30179- Another new C API function: PyErr_NewException() creates a new
30180exception class derived from Exception; when -X is given, it creates a
30181new string exception.
30182
30183- core interpreter: remove the distinction between tuple and list
30184unpacking; allow an arbitrary sequence on the right hand side of any
30185unpack instruction.  (UNPACK_LIST and UNPACK_TUPLE now do the same
30186thing, which should really be called UNPACK_SEQUENCE.)
30187
30188- classes: Allow assignments to an instance's __dict__ or __class__,
30189so you can change ivars (including shared ivars -- shock horror) and
30190change classes dynamically.  Also make the check on read-only
30191attributes of classes less draconic -- only the specials names
30192__dict__, __bases__, __name__ and __{get,set,del}attr__ can't be
30193assigned.
30194
30195- Two new built-in functions: issubclass() and isinstance().  Both
30196take classes as their second arguments.  The former takes a class as
30197the first argument and returns true iff first is second, or is a
30198subclass of second.  The latter takes any object as the first argument
30199and returns true iff first is an instance of the second, or any
30200subclass of second.
30201
30202- configure: Added configuration tests for presence of alarm(),
30203pause(), and getpwent().
30204
30205- Doc/Makefile: changed latex2html targets.
30206
30207- classes: Reverse the search order for the Don Beaudry hook so that
30208the first class with an applicable hook wins.  Makes more sense.
30209
30210- Changed the checks made in Py_Initialize() and Py_Finalize().  It is
30211now legal to call these more than once.  The first call to
30212Py_Initialize() initializes, the first call to Py_Finalize()
30213finalizes.  There's also a new API, Py_IsInitialized() which checks
30214whether we are already initialized (in case you want to leave things
30215as they were).
30216
30217- Completely disable the declarations for malloc(), realloc() and
30218free().  Any 90's C compiler has these in header files, and the tests
30219to decide whether to suppress the declarations kept failing on some
30220platforms.
30221
30222- *Before* (instead of after) signalmodule.o is added, remove both
30223intrcheck.o and sigcheck.o.  This should get rid of warnings in ar or
30224ld on various systems.
30225
30226- Added reop to PC/config.c
30227
30228- configure: Decided to use -Aa -D_HPUX_SOURCE on HP-UX platforms.
30229Removed outdated HP-UX comments from README.  Added Cray T3E comments.
30230
30231- Various renames of statically defined functions that had name
30232conflicts on some systems, e.g. strndup (GNU libc), join (Cray),
30233roundup (sys/types.h).
30234
30235- urllib.py: Interpret three slashes in file: URL as local file (for
30236Netscape on Windows/Mac).
30237
30238- copy.py: Make sure the objects returned by __getinitargs__() are
30239kept alive (in the memo) to avoid a certain kind of nasty crash.  (Not
30240easily reproducible because it requires a later call to
30241__getinitargs__() to return a tuple that happens to be allocated at
30242the same address.)
30243
30244- Added definition of AR to toplevel Makefile.  Renamed @buildno temp
30245file to buildno1.
30246
30247- Moved Include/assert.h to Parser/assert.h, which seems to be the
30248only place where it's needed.
30249
30250- Tweaked the dictionary lookup code again for some more speed
30251(Vladimir Marangozov).
30252
30253- NT build: Changed the way python15.lib is included in the other
30254projects.  Per Mark Hammond's suggestion, add it to the extra libs in
30255Settings instead of to the project's source files.
30256
30257- regrtest.py: Change default verbosity so that there are only three
30258levels left: -q, default and -v.  In default mode, the name of each
30259test is now printed.  -v is the same as the old -vv.  -q is more quiet
30260than the old default mode.
30261
30262- Removed the old FAQ from the distribution.  You now have to get it
30263from the web!
30264
30265- Removed the PC/make_nt.in file from the distribution; it is no
30266longer needed.
30267
30268- Changed the build sequence so that shared modules are built last.
30269This fixes things for AIX and doesn't hurt elsewhere.
30270
30271- Improved test for GNU MP v1 in mpzmodule.c
30272
30273- fileobject.c: ftell() on Linux discards all buffered data; changed
30274read() code to use lseek() instead to get the same effect
30275
30276- configure.in, configure, importdl.c: NeXT sharedlib fixes
30277
30278- tupleobject.c: PyTuple_SetItem asserts refcnt==1
30279
30280- resource.c: Different strategy regarding whether to declare
30281getrusage() and getpagesize() -- #ifdef doesn't work, Linux has
30282conflicting decls in its headers.  Choice: only declare the return
30283type, not the argument prototype, and not on Linux.
30284
30285- importdl.c, configure*: set sharedlib extensions properly for NeXT
30286
30287- configure*, Makefile.in, Modules/Makefile.pre.in: AIX shared libraries
30288fixed; moved addition of PURIFY to LINKCC to configure
30289
30290- reopmodule.c, regexmodule.c, regexpr.c, zlibmodule.c: needed casts
30291added to shup up various compilers.
30292
30293- _tkinter.c: removed buggy mac #ifndef
30294
30295- Doc: various Mac documentation changes, added docs for 'ic' module
30296
30297- PC/make_nt.in: deleted
30298
30299- test_time.py, test_strftime.py: tweaks to catch %Z (which may return
30300"")
30301
30302- test_rotor.py: print b -> print `b`
30303
30304- Tkinter.py: (tagOrId) -> (tagOrId,)
30305
30306- Tkinter.py: the Tk class now also has a configure() method and
30307friends (they have been moved to the Misc class to accomplish this).
30308
30309- dict.get(key[, default]) returns dict[key] if it exists, or default
30310if it doesn't.  The default defaults to None.  This is quicker for
30311some applications than using either has_key() or try:...except
30312KeyError:....
30313
30314- Tools/webchecker/: some small changes to webchecker.py; added
30315websucker.py (a simple web site mirroring script).
30316
30317- Dictionary objects now have a get() method (also in UserDict.py).
30318dict.get(key, default) returns dict[key] if it exists and default
30319otherwise; default defaults to None.
30320
30321- Tools/scripts/logmerge.py: print the author, too.
30322
30323- Changes to import: support for "import a.b.c" is now built in.  See
30324http://grail.cnri.reston.va.us/python/essays/packages.html
30325for more info.  Most important deviations from "ni.py": __init__.py is
30326executed in the package's namespace instead of as a submodule; and
30327there's no support for "__" or "__domain__".  Note that "ni.py" is not
30328changed to match this -- it is simply declared obsolete (while at the
30329same time, it is documented...:-( ).
30330Unfortunately, "ihooks.py" has not been upgraded (but see "knee.py"
30331for an example implementation of hierarchical module import written in
30332Python).
30333
30334- More changes to import: the site.py module is now imported by
30335default when Python is initialized; use -S to disable it.  The site.py
30336module extends the path with several more directories: site-packages
30337inside the lib/python1.5/ directory, site-python in the lib/
30338directory, and pathnames mentioned in *.pth files found in either of
30339those directories.  See
30340http://grail.cnri.reston.va.us/python/essays/packages.html
30341for more info.
30342
30343- Changes to standard library subdirectory names: those subdirectories
30344that are not packages have been renamed with a hyphen in their name,
30345e.g. lib-tk, lib-stdwin, plat-win, plat-linux2, plat-sunos5, dos-8x3.
30346The test suite is now a package -- to run a test, you must now use
30347"import test.test_foo".
30348
30349- A completely new re.py module is provided (thanks to Andrew
30350Kuchling, Tim Peters and Jeffrey Ollie) which uses Philip Hazel's
30351"pcre" re compiler and engine.  For a while, the "old" re.py (which
30352was new in 1.5a3!) will be kept around as re1.py.  The "old" regex
30353module and underlying parser and engine are still present -- while
30354regex is now officially obsolete, it will probably take several major
30355release cycles before it can be removed.
30356
30357- The posix module now has a strerror() function which translates an
30358error code to a string.
30359
30360- The emacs.py module (which was long obsolete) has been removed.
30361
30362- The universal makefile Misc/Makefile.pre.in now features an
30363"install" target.  By default, installed shared libraries go into
30364$exec_prefix/lib/python$VERSION/site-packages/.
30365
30366- The install-sh script is installed with the other configuration
30367specific files (in the config/ subdirectory).
30368
30369- It turns out whatsound.py and sndhdr.py were identical modules.
30370Since there's also an imghdr.py file, I propose to make sndhdr.py the
30371official one.  For compatibility, whatsound.py imports * from
30372sndhdr.py.
30373
30374- Class objects have a new attribute, __module__, giving the name of
30375the module in which they were declared.  This is useful for pickle and
30376for printing the full name of a class exception.
30377
30378- Many extension modules no longer issue a fatal error when their
30379initialization fails; the importing code now checks whether an error
30380occurred during module initialization, and correctly propagates the
30381exception to the import statement.
30382
30383- Most extension modules now raise class-based exceptions (except when
30384-X is used).
30385
30386- Subtle changes to PyEval_{Save,Restore}Thread(): always swap the
30387thread state -- just don't manipulate the lock if it isn't there.
30388
30389- Fixed a bug in Python/getopt.c that made it do the wrong thing when
30390an option was a single '-'.  Thanks to Andrew Kuchling.
30391
30392- New module mimetypes.py will guess a MIME type from a filename's
30393extension.
30394
30395- Windows: the DLL version is now settable via a resource rather than
30396being hardcoded.  This can be used for "branding" a binary Python
30397distribution.
30398
30399- urllib.py is now threadsafe -- it now uses re instead of regex, and
30400sys.exc_info() instead of sys.exc_{type,value}.
30401
30402- Many other library modules that used to use
30403sys.exc_{type,value,traceback} are now more thread-safe by virtue of
30404using sys.exc_info().
30405
30406- The functions in popen2 have an optional buffer size parameter.
30407Also, the command argument can now be either a string (passed to the
30408shell) or a list of arguments (passed directly to execv).
30409
30410- Alas, the thread support for _tkinter released with 1.5a3 didn't
30411work.  It's been rewritten.  The bad news is that it now requires a
30412modified version of a file in the standard Tcl distribution, which you
30413must compile with a -I option pointing to the standard Tcl source
30414tree.  For this reason, the thread support is disabled by default.
30415
30416- The errno extension module adds two tables: errorcode maps errno
30417numbers to errno names (e.g. EINTR), and errorstr maps them to
30418message strings.  (The latter is redundant because the new call
30419posix.strerror() now does the same, but alla...)  (Marc-Andre Lemburg)
30420
30421- The readline extension module now provides some interfaces to
30422internal readline routines that make it possible to write a completer
30423in Python.  An example completer, rlcompleter.py, is provided.
30424
30425	When completing a simple identifier, it completes keywords,
30426	built-ins and globals in __main__; when completing
30427	NAME.NAME..., it evaluates (!) the expression up to the last
30428	dot and completes its attributes.
30429
30430	It's very cool to do "import string" type "string.", hit the
30431	completion key (twice), and see the list of names defined by
30432	the string module!
30433
30434	Tip: to use the tab key as the completion key, call
30435
30436	    readline.parse_and_bind("tab: complete")
30437
30438- The traceback.py module has a new function tb_lineno() by Marc-Andre
30439Lemburg which extracts the line number from the linenumber table in
30440the code object.  Apparently the traceback object doesn't contain the
30441right linenumber when -O is used.  Rather than guessing whether -O is
30442on or off, the module itself uses tb_lineno() unconditionally.
30443
30444- Fixed Demo/tkinter/matt/canvas-moving-or-creating.py: change bind()
30445to tag_bind() so it works again.
30446
30447- The pystone script is now a standard library module.  Example use:
30448"import test.pystone; test.pystone.main()".
30449
30450- The import of the readline module in interactive mode is now also
30451attempted when -i is specified.  (Yes, I know, giving in to Marc-Andre
30452Lemburg, who asked for this. :-)
30453
30454- rfc822.py: Entirely rewritten parseaddr() function by Sjoerd
30455Mullender, to be closer to the standard.  This fixes the getaddr()
30456method.  Unfortunately, getaddrlist() is as broken as ever, since it
30457splits on commas without regard for RFC 822 quoting conventions.
30458
30459- pprint.py: correctly emit trailing "," in singleton tuples.
30460
30461- _tkinter.c: export names for its type objects, TkappType and
30462TkttType.
30463
30464- pickle.py: use __module__ when defined; fix a particularly hard to
30465reproduce bug that confuses the memo when temporary objects are
30466returned by custom pickling interfaces; and a semantic change: when
30467unpickling the instance variables of an instance, use
30468inst.__dict__.update(value) instead of a for loop with setattr() over
30469the value.keys().  This is more consistent (the pickling doesn't use
30470getattr() either but pickles inst.__dict__) and avoids problems with
30471instances that have a __setattr__ hook.  But it *is* a semantic change
30472(because the setattr hook is no longer used).  So beware!
30473
30474- config.h is now installed (at last) in
30475$exec_prefix/include/python1.5/.  For most sites, this means that it
30476is actually in $prefix/include/python1.5/, with all the other Python
30477include files, since $prefix and $exec_prefix are the same by
30478default.
30479
30480- The imp module now supports parts of the functionality to implement
30481import of hierarchical module names.  It now supports find_module()
30482and load_module() for all types of modules.  Docstrings have been
30483added for those functions in the built-in imp module that are still
30484relevant (some old interfaces are obsolete).  For a sample
30485implementation of hierarchical module import in Python, see the new
30486library module knee.py.
30487
30488- The % operator on string objects now allows arbitrary nested parens
30489in a %(...)X style format.  (Brad Howes)
30490
30491- Reverse the order in which Setup and Setup.local are passed to the
30492makesetup script.  This allows variable definitions in Setup.local to
30493override definitions in Setup.  (But you'll still have to edit Setup
30494if you want to disable modules that are enabled by default, or if such
30495modules need non-standard options.)
30496
30497- Added PyImport_ImportModuleEx(name, globals, locals, fromlist); this
30498is like PyImport_ImporModule(name) but receives the globals and locals
30499dict and the fromlist arguments as well.  (The name is a char*; the
30500others are PyObject*s).
30501
30502- The 'p' format in the struct extension module alloded to above is
30503new in 1.5a4.
30504
30505- The types.py module now uses try-except in a few places to make it
30506more likely that it can be imported in restricted mode.  Some type
30507names are undefined in that case, e.g. CodeType (inaccessible),
30508FileType (not always accessible), and TracebackType and FrameType
30509(inaccessible).
30510
30511- In urllib.py: added separate administration of temporary files
30512created y URLopener.retrieve() so cleanup() can properly remove them.
30513The old code removed everything in tempcache which was a bad idea if
30514the user had passed a non-temp file into it.  Also, in basejoin(),
30515interpret relative paths starting in "../".  This is necessary if the
30516server uses symbolic links.
30517
30518- The Windows build procedure and project files are now based on
30519Microsoft Visual C++ 5.x.  The build now takes place in the PCbuild
30520directory.  It is much more robust, and properly builds separate Debug
30521and Release versions.  (The installer will be added shortly.)
30522
30523- Added casts and changed some return types in regexpr.c to avoid
30524compiler warnings or errors on some platforms.
30525
30526- The AIX build tools for shared libraries now supports VPATH.  (Donn
30527Cave)
30528
30529- By default, disable the "portable" multimedia modules audioop,
30530imageop, and rgbimg, since they don't work on 64-bit platforms.
30531
30532- Fixed a nasty bug in cStringIO.c when code was actually using the
30533close() method (the destructors would try to free certain fields a
30534second time).
30535
30536- For those who think they need it, there's a "user.py" module.  This
30537is *not* imported by default, but can be imported to run user-specific
30538setup commands, ~/.pythonrc.py.
30539
30540- Various speedups suggested by Fredrik Lundh, Marc-Andre Lemburg,
30541Vladimir Marangozov, and others.
30542
30543- Added os.altsep; this is '/' on DOS/Windows, and None on systems
30544with a sane filename syntax.
30545
30546- os.py: Write out the dynamic OS choice, to avoid exec statements.
30547Adding support for a new OS is now a bit more work, but I bet that
30548'dos' or 'nt' will cover most situations...
30549
30550- The obsolete exception AccessError is now really gone.
30551
30552- Tools/faqwiz/: New installation instructions show how to maintain
30553multiple FAQs.  Removed bootstrap script from end of faqwiz.py module.
30554Added instructions to bootstrap script, too.  Version bumped to 0.8.1.
30555Added <html>...</html> feature suggested by Skip Montanaro.  Added
30556leading text for Roulette, default to 'Hit Reload ...'.  Fix typo in
30557default SRCDIR.
30558
30559- Documentation for the relatively new modules "keyword" and "symbol"
30560has been added (to the end of the section on the parser extension
30561module).
30562
30563- In module bisect.py, but functions have two optional argument 'lo'
30564and 'hi' which allow you to specify a subsequence of the array to
30565operate on.
30566
30567- In ftplib.py, changed most methods to return their status (even when
30568it is always "200 OK") rather than swallowing it.
30569
30570- main() now calls setlocale(LC_ALL, ""), if setlocale() and
30571<locale.h> are defined.
30572
30573- Changes to configure.in, the configure script, and both
30574Makefile.pre.in files, to support SGI's SGI_ABI platform selection
30575environment variable.
30576
30577
30578======================================================================
30579
30580
30581From 1.4 to 1.5a3
30582=================
30583
30584Security
30585--------
30586
30587- If you are using the setuid script C wrapper (Misc/setuid-prog.c),
30588please use the new version.  The old version has a huge security leak.
30589
30590Miscellaneous
30591-------------
30592
30593- Because of various (small) incompatible changes in the Python
30594bytecode interpreter, the magic number for .pyc files has changed
30595again.
30596
30597- The default module search path is now much saner.  Both on Unix and
30598Windows, it is essentially derived from the path to the executable
30599(which can be overridden by setting the environment variable
30600$PYTHONHOME).  The value of $PYTHONPATH on Windows is now inserted in
30601front of the default path, like in Unix (instead of overriding the
30602default path).  On Windows, the directory containing the executable is
30603added to the end of the path.
30604
30605- A new version of python-mode.el for Emacs has been included.  Also,
30606a new file ccpy-style.el has been added to configure Emacs cc-mode for
30607the preferred style in Python C sources.
30608
30609- On Unix, when using sys.argv[0] to insert the script directory in
30610front of sys.path, expand a symbolic link.  You can now install a
30611program in a private directory and have a symbolic link to it in a
30612public bin directory, and it will put the private directory in the
30613module search path.  Note that the symlink is expanded in sys.path[0]
30614but not in sys.argv[0], so you can still tell the name by which you
30615were invoked.
30616
30617- It is now recommended to use ``#!/usr/bin/env python'' instead of
30618``#!/usr/local/bin/python'' at the start of executable scripts, except
30619for CGI scripts.  It has been determined that the use of /usr/bin/env
30620is more portable than that of /usr/local/bin/python -- scripts almost
30621never have to be edited when the Python interpreter lives in a
30622non-standard place.  Note that this doesn't work for CGI scripts since
30623the python executable often doesn't live in the HTTP server's default
30624search path.
30625
30626- The silly -s command line option and the corresponding
30627PYTHONSUPPRESS environment variable (and the Py_SuppressPrint global
30628flag in the Python/C API) are gone.
30629
30630- Most problems on 64-bit platforms should now be fixed.  Andrew
30631Kuchling helped.  Some uncommon extension modules are still not
30632clean (image and audio ops?).
30633
30634- Fixed a bug where multiple anonymous tuple arguments would be mixed up
30635when using the debugger or profiler (reported by Just van Rossum).
30636The simplest example is ``def f((a,b),(c,d)): print a,b,c,d''; this
30637would print the wrong value when run under the debugger or profiler.
30638
30639- The hacks that the dictionary implementation used to speed up
30640repeated lookups of the same C string were removed; these were a
30641source of subtle problems and don't seem to serve much of a purpose
30642any longer.
30643
30644- All traces of support for the long dead access statement have been
30645removed from the sources.
30646
30647- Plugged the two-byte memory leak in the tokenizer when reading an
30648interactive EOF.
30649
30650- There's a -O option to the interpreter that removes SET_LINENO
30651instructions and assert statements (see below); it uses and produces
30652.pyo files instead of .pyc files.  The speedup is only a few percent
30653in most cases.  The line numbers are still available in the .pyo file,
30654as a separate table (which is also available in .pyc files).  However,
30655the removal of the SET_LINENO instructions means that the debugger
30656(pdb) can't set breakpoints on lines in -O mode.  The traceback module
30657contains a function to extract a line number from the code object
30658referenced in a traceback object.  In the future it should be possible
30659to write external bytecode optimizers that create better optimized
30660.pyo files, and there should be more control over optimization;
30661consider the -O option a "teaser".  Without -O, the assert statement
30662actually generates code that first checks __debug__; if this variable
30663is false, the assertion is not checked.  __debug__ is a built-in
30664variable whose value is initialized to track the -O flag (it's true
30665iff -O is not specified).  With -O, no code is generated for assert
30666statements, nor for code of the form ``if __debug__: <something>''.
30667Sorry, no further constant folding happens.
30668
30669
30670Performance
30671-----------
30672
30673- It's much faster (almost twice for pystone.py -- see
30674Tools/scripts).  See the entry on string interning below.
30675
30676- Some speedup by using separate free lists for method objects (both
30677the C and the Python variety) and for floating point numbers.
30678
30679- Big speedup by allocating frame objects with a single malloc() call.
30680The Python/C API for frames is changed (you shouldn't be using this
30681anyway).
30682
30683- Significant speedup by inlining some common opcodes for common operand
30684types (e.g.  i+i, i-i, and list[i]).  Fredrik Lundh.
30685
30686- Small speedup by reordering the method tables of some common
30687objects (e.g. list.append is now first).
30688
30689- Big optimization to the read() method of file objects.  A read()
30690without arguments now attempts to use fstat to allocate a buffer of
30691the right size; for pipes and sockets, it will fall back to doubling
30692the buffer size.  While that the improvement is real on all systems,
30693it is most dramatic on Windows.
30694
30695
30696Documentation
30697-------------
30698
30699- Many new pieces of library documentation were contributed, mostly by
30700Andrew Kuchling.  Even cmath is now documented!  There's also a
30701chapter of the library manual, "libundoc.tex", which provides a
30702listing of all undocumented modules, plus their status (e.g. internal,
30703obsolete, or in need of documentation).  Also contributions by Sue
30704Williams, Skip Montanaro, and some module authors who succumbed to
30705pressure to document their own contributed modules :-).  Note that
30706printing the documentation now kills fewer trees -- the margins have
30707been reduced.
30708
30709- I have started documenting the Python/C API. Unfortunately this project
30710hasn't been completed yet.  It will be complete before the final release of
30711Python 1.5, though.  At the moment, it's better to read the LaTeX source
30712than to attempt to run it through LaTeX and print the resulting dvi file.
30713
30714- The posix module (and hence os.py) now has doc strings!  Thanks to Neil
30715Schemenauer.  I received a few other contributions of doc strings.  In most
30716other places, doc strings are still wishful thinking...
30717
30718
30719Language changes
30720----------------
30721
30722- Private variables with leading double underscore are now a permanent
30723feature of the language.  (These were experimental in release 1.4.  I have
30724favorable experience using them; I can't label them "experimental"
30725forever.)
30726
30727- There's new string literal syntax for "raw strings".  Prefixing a string
30728literal with the letter r (or R) disables all escape processing in the
30729string; for example, r'\n' is a two-character string consisting of a
30730backslash followed by the letter n.  This combines with all forms of string
30731quotes; it is actually useful for triple quoted doc strings which might
30732contain references to \n or \t.  An embedded quote prefixed with a
30733backslash does not terminate the string, but the backslash is still
30734included in the string; for example, r'\'' is a two-character string
30735consisting of a backslash and a quote.  (Raw strings are also
30736affectionately known as Robin strings, after their inventor, Robin
30737Friedrich.)
30738
30739- There's a simple assert statement, and a new exception
30740AssertionError.  For example, ``assert foo > 0'' is equivalent to ``if
30741not foo > 0: raise AssertionError''.  Sorry, the text of the asserted
30742condition is not available; it would be too complicated to generate
30743code for this (since the code is generated from a parse tree).
30744However, the text is displayed as part of the traceback!
30745
30746- The raise statement has a new feature: when using "raise SomeClass,
30747somevalue" where somevalue is not an instance of SomeClass, it
30748instantiates SomeClass(somevalue).  In 1.5a4, if somevalue is an
30749instance of a *derived* class of SomeClass, the exception class raised
30750is set to somevalue.__class__, and SomeClass is ignored after that.
30751
30752- Duplicate keyword arguments are now detected at compile time;
30753f(a=1,a=2) is now a syntax error.
30754
30755
30756Changes to built-in features
30757----------------------------
30758
30759- There's a new exception FloatingPointError (used only by Lee Busby's
30760patches to catch floating point exceptions, at the moment).
30761
30762- The obsolete exception ConflictError (presumably used by the long
30763obsolete access statement) has been deleted.
30764
30765- There's a new function sys.exc_info() which returns the tuple
30766(sys.exc_type, sys.exc_value, sys.exc_traceback) in a thread-safe way.
30767
30768- There's a new variable sys.executable, pointing to the executable file
30769for the Python interpreter.
30770
30771- The sort() methods for lists no longer uses the C library qsort(); I
30772wrote my own quicksort implementation, with lots of help (in the form
30773of a kind of competition) from Tim Peters.  This solves a bug in
30774dictionary comparisons on some Solaris versions when Python is built
30775with threads, and makes sorting lists even faster.
30776
30777- The semantics of comparing two dictionaries have changed, to make
30778comparison of unequal dictionaries faster.  A shorter dictionary is
30779always considered smaller than a larger dictionary.  For dictionaries
30780of the same size, the smallest differing element determines the
30781outcome (which yields the same results as before in this case, without
30782explicit sorting).  Thanks to Aaron Watters for suggesting something
30783like this.
30784
30785- The semantics of try-except have changed subtly so that calling a
30786function in an exception handler that itself raises and catches an
30787exception no longer overwrites the sys.exc_* variables.  This also
30788alleviates the problem that objects referenced in a stack frame that
30789caught an exception are kept alive until another exception is caught
30790-- the sys.exc_* variables are restored to their previous value when
30791returning from a function that caught an exception.
30792
30793- There's a new "buffer" interface.  Certain objects (e.g. strings and
30794arrays) now support the "buffer" protocol.  Buffer objects are acceptable
30795whenever formerly a string was required for a write operation; mutable
30796buffer objects can be the target of a read operation using the call
30797f.readinto(buffer).  A cool feature is that regular expression matching now
30798also work on array objects.  Contribution by Jack Jansen.  (Needs
30799documentation.)
30800
30801- String interning: dictionary lookups are faster when the lookup
30802string object is the same object as the key in the dictionary, not
30803just a string with the same value.  This is done by having a pool of
30804"interned" strings.  Most names generated by the interpreter are now
30805automatically interned, and there's a new built-in function intern(s)
30806that returns the interned version of a string.  Interned strings are
30807not a different object type, and interning is totally optional, but by
30808interning most keys a speedup of about 15% was obtained for the
30809pystone benchmark.
30810
30811- Dictionary objects have several new methods; clear() and copy() have
30812the obvious semantics, while update(d) merges the contents of another
30813dictionary d into this one, overriding existing keys.  The dictionary
30814implementation file is now called dictobject.c rather than the
30815confusing mappingobject.c.
30816
30817- The intrinsic function dir() is much smarter; it looks in __dict__,
30818__members__ and __methods__.
30819
30820- The intrinsic functions int(), long() and float() can now take a
30821string argument and then do the same thing as string.atoi(),
30822string.atol(), and string.atof().  No second 'base' argument is
30823allowed, and complex() does not take a string (nobody cared enough).
30824
30825- When a module is deleted, its globals are now deleted in two phases.
30826In the first phase, all variables whose name begins with exactly one
30827underscore are replaced by None; in the second phase, all variables
30828are deleted.  This makes it possible to have global objects whose
30829destructors depend on other globals.  The deletion order within each
30830phase is still random.
30831
30832- It is no longer an error for a function to be called without a
30833global variable __builtins__ -- an empty directory will be provided
30834by default.
30835
30836- Guido's corollary to the "Don Beaudry hook": it is now possible to
30837do metaprogramming by using an instance as a base class.  Not for the
30838faint of heart; and undocumented as yet, but basically if a base class
30839is an instance, its class will be instantiated to create the new
30840class.  Jim Fulton will love it -- it also works with instances of his
30841"extension classes", since it is triggered by the presence of a
30842__class__ attribute on the purported base class.  See
30843Demo/metaclasses/index.html for an explanation and see that directory
30844for examples.
30845
30846- Another change is that the Don Beaudry hook is now invoked when
30847*any* base class is special.  (Up to 1.5a3, the *last* special base
30848class is used; in 1.5a4, the more rational choice of the *first*
30849special base class is used.)
30850
30851- New optional parameter to the readlines() method of file objects.
30852This indicates the number of bytes to read (the actual number of bytes
30853read will be somewhat larger due to buffering reading until the end of
30854the line).  Some optimizations have also been made to speed it up (but
30855not as much as read()).
30856
30857- Complex numbers no longer have the ".conj" pseudo attribute; use
30858z.conjugate() instead, or complex(z.real, -z.imag).  Complex numbers
30859now *do* support the __members__ and __methods__ special attributes.
30860
30861- The complex() function now looks for a __complex__() method on class
30862instances before giving up.
30863
30864- Long integers now support arbitrary shift counts, so you can now
30865write 1L<<1000000, memory permitting.  (Python 1.4 reports "outrageous
30866shift count for this.)
30867
30868- The hex() and oct() functions have been changed so that for regular
30869integers, they never emit a minus sign.  For example, on a 32-bit
30870machine, oct(-1) now returns '037777777777' and hex(-1) returns
30871'0xffffffff'.  While this may seem inconsistent, it is much more
30872useful.  (For long integers, a minus sign is used as before, to fit
30873the result in memory :-)
30874
30875- The hash() function computes better hashes for several data types,
30876including strings, floating point numbers, and complex numbers.
30877
30878
30879New extension modules
30880---------------------
30881
30882- New extension modules cStringIO.c and cPickle.c, written by Jim
30883Fulton and other folks at Digital Creations.  These are much more
30884efficient than their Python counterparts StringIO.py and pickle.py,
30885but don't support subclassing.  cPickle.c clocks up to 1000 times
30886faster than pickle.py; cStringIO.c's improvement is less dramatic but
30887still significant.
30888
30889- New extension module zlibmodule.c, interfacing to the free zlib
30890library (gzip compatible compression).  There's also a module gzip.py
30891which provides a higher level interface.  Written by Andrew Kuchling
30892and Jeremy Hylton.
30893
30894- New module readline; see the "miscellaneous" section above.
30895
30896- New Unix extension module resource.c, by Jeremy Hylton, provides
30897access to getrlimit(), getrusage(), setrusage(), getpagesize(), and
30898related symbolic constants.
30899
30900- New extension puremodule.c, by Barry Warsaw, which interfaces to the
30901Purify(TM) C API.  See also the file Misc/PURIFY.README.  It is also
30902possible to enable Purify by simply setting the PURIFY Makefile
30903variable in the Modules/Setup file.
30904
30905
30906Changes in extension modules
30907----------------------------
30908
30909- The struct extension module has several new features to control byte
30910order and word size.  It supports reading and writing IEEE floats even
30911on platforms where this is not the native format.  It uses uppercase
30912format codes for unsigned integers of various sizes (always using
30913Python long ints for 'I' and 'L'), 's' with a size prefix for strings,
30914and 'p' for "Pascal strings" (with a leading length byte, included in
30915the size; blame Hannu Krosing; new in 1.5a4).  A prefix '>' forces
30916big-endian data and '<' forces little-endian data; these also select
30917standard data sizes and disable automatic alignment (use pad bytes as
30918needed).
30919
30920- The array module supports uppercase format codes for unsigned data
30921formats (like the struct module).
30922
30923- The fcntl extension module now exports the needed symbolic
30924constants.  (Formerly these were in FCNTL.py which was not available
30925or correct for all platforms.)
30926
30927- The extension modules dbm, gdbm and bsddb now check that the
30928database is still open before making any new calls.
30929
30930- The dbhash module is no more.  Use bsddb instead.  (There's a third
30931party interface for the BSD 2.x code somewhere on the web; support for
30932bsddb will be deprecated.)
30933
30934- The gdbm module now supports a sync() method.
30935
30936- The socket module now has some new functions: getprotobyname(), and
30937the set {ntoh,hton}{s,l}().
30938
30939- Various modules now export their type object: socket.SocketType,
30940array.ArrayType.
30941
30942- The socket module's accept() method now returns unknown addresses as
30943a tuple rather than raising an exception.  (This can happen in
30944promiscuous mode.)  Theres' also a new function getprotobyname().
30945
30946- The pthread support for the thread module now works on most platforms.
30947
30948- STDWIN is now officially obsolete.  Support for it will eventually
30949be removed from the distribution.
30950
30951- The binascii extension module is now hopefully fully debugged.
30952(XXX Oops -- Fredrik Lundh promised me a uuencode fix that I never
30953received.)
30954
30955- audioop.c: added a ratecv() function; better handling of overflow in
30956add().
30957
30958- posixmodule.c: now exports the O_* flags (O_APPEND etc.).  On
30959Windows, also O_TEXT and O_BINARY.  The 'error' variable (the
30960exception is raises) is renamed -- its string value is now "os.error",
30961so newbies don't believe they have to import posix (or nt) to catch
30962it when they see os.error reported as posix.error.  The execve()
30963function now accepts any mapping object for the environment.
30964
30965- A new version of the al (audio library) module for SGI was
30966contributed by Sjoerd Mullender.
30967
30968- The regex module has a new function get_syntax() which retrieves the
30969syntax setting set by set_syntax().  The code was also sanitized,
30970removing worries about unclean error handling.  See also below for its
30971successor, re.py.
30972
30973- The "new" module (which creates new objects of various types) once
30974again has a fully functioning new.function() method.  Dangerous as
30975ever!  Also, new.code() has several new arguments.
30976
30977- A problem has been fixed in the rotor module: on systems with signed
30978characters, rotor-encoded data was not portable when the key contained
309798-bit characters.  Also, setkey() now requires its argument rather
30980than having broken code to default it.
30981
30982- The sys.builtin_module_names variable is now a tuple.  Another new
30983variables in sys is sys.executable (the full path to the Python
30984binary, if known).
30985
30986- The specs for time.strftime() have undergone some revisions.  It
30987appears that not all format characters are supported in the same way
30988on all platforms.  Rather than reimplement it, we note these
30989differences in the documentation, and emphasize the shared set of
30990features.  There's also a thorough test set (that occasionally finds
30991problems in the C library implementation, e.g. on some Linuxes),
30992thanks to Skip Montanaro.
30993
30994- The nis module seems broken when used with NIS+; unfortunately
30995nobody knows how to fix it.  It should still work with old NIS.
30996
30997
30998New library modules
30999-------------------
31000
31001- New (still experimental) Perl-style regular expression module,
31002re.py, which uses a new interface for matching as well as a new
31003syntax; the new interface avoids the thread-unsafety of the regex
31004interface.  This comes with a helper extension reopmodule.c and vastly
31005rewritten regexpr.c.  Most work on this was done by Jeffrey Ollie, Tim
31006Peters, and Andrew Kuchling.  See the documentation libre.tex.  In
310071.5, the old regex module is still fully supported; in the future, it
31008will become obsolete.
31009
31010- New module gzip.py; see zlib above.
31011
31012- New module keyword.py exports knowledge about Python's built-in
31013keywords.  (New version by Ka-Ping Yee.)
31014
31015- New module pprint.py (with documentation) which supports
31016pretty-printing of lists, tuples, & dictionaries recursively.  By Fred
31017Drake.
31018
31019- New module code.py.  The function code.compile_command() can
31020determine whether an interactively entered command is complete or not,
31021distinguishing incomplete from invalid input.  (XXX Unfortunately,
31022this seems broken at this moment, and I don't have the time to fix
31023it.  It's probably better to add an explicit interface to the parser
31024for this.)
31025
31026- There is now a library module xdrlib.py which can read and write the
31027XDR data format as used by Sun RPC, for example.  It uses the struct
31028module.
31029
31030
31031Changes in library modules
31032--------------------------
31033
31034- Module codehack.py is now completely obsolete.
31035
31036- The pickle.py module has been updated to make it compatible with the
31037new binary format that cPickle.c produces.  By default it produces the
31038old all-ASCII format compatible with the old pickle.py, still much
31039faster than pickle.py; it will read both formats automatically.  A few
31040other updates have been made.
31041
31042- A new helper module, copy_reg.py, is provided to register extensions
31043to the pickling code.
31044
31045- Revamped module tokenize.py is much more accurate and has an
31046interface that makes it a breeze to write code to colorize Python
31047source code.  Contributed by Ka-Ping Yee.
31048
31049- In ihooks.py, ModuleLoader.load_module() now closes the file under
31050all circumstances.
31051
31052- The tempfile.py module has a new class, TemporaryFile, which creates
31053an open temporary file that will be deleted automatically when
31054closed.  This works on Windows and MacOS as well as on Unix.  (Jim
31055Fulton.)
31056
31057- Changes to the cgi.py module: Most imports are now done at the
31058top of the module, which provides a speedup when using ni (Jim
31059Fulton).  The problem with file upload to a Windows platform is solved
31060by using the new tempfile.TemporaryFile class; temporary files are now
31061always opened in binary mode (Jim Fulton).  The cgi.escape() function
31062now takes an optional flag argument that quotes '"' to '&quot;'.  It
31063is now possible to invoke cgi.py from a command line script, to test
31064cgi scripts more easily outside an http server.  There's an optional
31065limit to the size of uploads to POST (Skip Montanaro).  Added a
31066'strict_parsing' option to all parsing functions (Jim Fulton).  The
31067function parse_qs() now uses urllib.unquote() on the name as well as
31068the value of fields (Clarence Gardner).  The FieldStorage class now
31069has a __len__() method.
31070
31071- httplib.py: the socket object is no longer closed; all HTTP/1.*
31072responses are now accepted; and it is now thread-safe (by not using
31073the regex module).
31074
31075- BaseHTTPModule.py: treat all HTTP/1.* versions the same.
31076
31077- The popen2.py module is now rewritten using a class, which makes
31078access to the standard error stream and the process id of the
31079subprocess possible.
31080
31081- Added timezone support to the rfc822.py module, in the form of a
31082getdate_tz() method and a parsedate_tz() function; also a mktime_tz().
31083Also added recognition of some non-standard date formats, by Lars
31084Wirzenius, and RFC 850 dates (Chris Lawrence).
31085
31086- mhlib.py: various enhancements, including almost compatible parsing
31087of message sequence specifiers without invoking a subprocess.  Also
31088added a createmessage() method by Lars Wirzenius.
31089
31090- The StringIO.StringIO class now supports readline(nbytes).  (Lars
31091Wirzenius.)  (Of course, you should be using cStringIO for performance.)
31092
31093- UserDict.py supports the new dictionary methods as well.
31094
31095- Improvements for whrandom.py by Tim Peters: use 32-bit arithmetic to
31096speed it up, and replace 0 seed values by 1 to avoid degeneration.
31097A bug was fixed in the test for invalid arguments.
31098
31099- Module ftplib.py: added support for parsing a .netrc file (Fred
31100Drake).  Also added an ntransfercmd() method to the FTP class, which
31101allows access to the expected size of a transfer when available, and a
31102parse150() function to the module which parses the corresponding 150
31103response.
31104
31105- urllib.py: the ftp cache is now limited to 10 entries.  Added
31106quote_plus() and unquote_plus() functions which are like quote() and
31107unquote() but also replace spaces with '+' or vice versa, for
31108encoding/decoding CGI form arguments.  Catch all errors from the ftp
31109module.  HTTP requests now add the Host: header line.  The proxy
31110variable names are now mapped to lower case, for Windows.  The
31111spliturl() function no longer erroneously throws away all data past
31112the first newline.  The basejoin() function now intereprets "../"
31113correctly.  I *believe* that the problems with "exception raised in
31114__del__" under certain circumstances have been fixed (mostly by
31115changes elsewher in the interpreter).
31116
31117- In urlparse.py, there is a cache for results in urlparse.urlparse();
31118its size limit is set to 20.  Also, new URL schemes shttp, https, and
31119snews are "supported".
31120
31121- shelve.py: use cPickle and cStringIO when available.  Also added
31122a sync() method, which calls the database's sync() method if there is
31123one.
31124
31125- The mimetools.py module now uses the available Python modules for
31126decoding quoted-printable, uuencode and base64 formats, rather than
31127creating a subprocess.
31128
31129- The python debugger (pdb.py, and its base class bdb.py) now support
31130conditional breakpoints.  See the docs.
31131
31132- The modules base64.py, uu.py and quopri.py can now be used as simple
31133command line utilities.
31134
31135- Various small fixes to the nntplib.py module that I can't bother to
31136document in detail.
31137
31138- Sjoerd Mullender's mimify.py module now supports base64 encoding and
31139includes functions to handle the funny encoding you sometimes see in mail
31140headers.  It is now documented.
31141
31142- mailbox.py: Added BabylMailbox.  Improved the way the mailbox is
31143gotten from the environment.
31144
31145- Many more modules now correctly open files in binary mode when this
31146is necessary on non-Unix platforms.
31147
31148- The copying functions in the undocumented module shutil.py are
31149smarter.
31150
31151- The Writer classes in the formatter.py module now have a flush()
31152method.
31153
31154- The sgmllib.py module accepts hyphens and periods in the middle of
31155attribute names.  While this is against the SGML standard, there is
31156some HTML out there that uses this...
31157
31158- The interface for the Python bytecode disassembler module, dis.py,
31159has been enhanced quite a bit.  There's now one main function,
31160dis.dis(), which takes almost any kind of object (function, module,
31161class, instance, method, code object) and disassembles it; without
31162arguments it disassembles the last frame of the last traceback.  The
31163other functions have changed slightly, too.
31164
31165- The imghdr.py module recognizes new image types: BMP, PNG.
31166
31167- The string.py module has a new function replace(str, old, new,
31168[maxsplit]) which does substring replacements.  It is actually
31169implemented in C in the strop module.  The functions [r]find() an
31170[r]index() have an optional 4th argument indicating the end of the
31171substring to search, alsoo implemented by their strop counterparts.
31172(Remember, never import strop -- import string uses strop when
31173available with zero overhead.)
31174
31175- The string.join() function now accepts any sequence argument, not
31176just lists and tuples.
31177
31178- The string.maketrans() requires its first two arguments to be
31179present.  The old version didn't require them, but there's not much
31180point without them, and the documentation suggests that they are
31181required, so we fixed the code to match the documentation.
31182
31183- The regsub.py module has a function clear_cache(), which clears its
31184internal cache of compiled regular expressions.  Also, the cache now
31185takes the current syntax setting into account.  (However, this module
31186is now obsolete -- use the sub() or subn() functions or methods in the
31187re module.)
31188
31189- The undocumented module Complex.py has been removed, now that Python
31190has built-in complex numbers.  A similar module remains as
31191Demo/classes/Complex.py, as an example.
31192
31193
31194Changes to the build process
31195----------------------------
31196
31197- The way GNU readline is configured is totally different.  The
31198--with-readline configure option is gone.  It is now an extension
31199module, which may be loaded dynamically.  You must enable it (and
31200specify the correct libraries to link with) in the Modules/Setup file.
31201Importing the module installs some hooks which enable command line
31202editing.  When the interpreter shell is invoked interactively, it
31203attempts to import the readline module; when this fails, the default
31204input mechanism is used.  The hook variables are PyOS_InputHook and
31205PyOS_ReadlineFunctionPointer.  (Code contributed by Lee Busby, with
31206ideas from William Magro.)
31207
31208- New build procedure: a single library, libpython1.5.a, is now built,
31209which contains absolutely everything except for a one-line main()
31210program (which calls Py_Main(argc, argv) to start the interpreter
31211shell).  This makes life much simpler for applications that need to
31212embed Python.  The serial number of the build is now included in the
31213version string (sys.version).
31214
31215- As far as I can tell, neither gcc -Wall nor the Microsoft compiler
31216emits a single warning any more when compiling Python.
31217
31218- A number of new Makefile variables have been added for special
31219situations, e.g. LDLAST is appended to the link command.  These are
31220used by editing the Makefile or passing them on the make command
31221line.
31222
31223- A set of patches from Lee Busby has been integrated that make it
31224possible to catch floating point exceptions.  Use the configure option
31225--with-fpectl to enable the patches; the extension modules fpectl and
31226fpetest provide control to enable/disable and test the feature,
31227respectively.
31228
31229- The support for shared libraries under AIX is now simpler and more
31230robust.  Thanks to Vladimir Marangozov for revamping his own patches!
31231
31232- The Modules/makesetup script now reads a file Setup.local as well as
31233a file Setup.  Most changes to the Setup script can be done by editing
31234Setup.local instead, which makes it easier to carry a particular setup
31235over from one release to the next.
31236
31237- The Modules/makesetup script now copies any "include" lines it
31238encounters verbatim into the output Makefile.  It also recognizes .cxx
31239and .cpp as C++ source files.
31240
31241- The configure script is smarter about C compiler options; e.g. with
31242gcc it uses -O2 and -g when possible, and on some other platforms it
31243uses -Olimit 1500 to avoid a warning from the optimizer about the main
31244loop in ceval.c (which has more than 1000 basic blocks).
31245
31246- The configure script now detects whether malloc(0) returns a NULL
31247pointer or a valid block (of length zero).  This avoids the nonsense
31248of always adding one byte to all malloc() arguments on most platforms.
31249
31250- The configure script has a new option, --with-dec-threads, to enable
31251DEC threads on DEC Alpha platforms.  Also, --with-threads is now an
31252alias for --with-thread (this was the Most Common Typo in configure
31253arguments).
31254
31255- Many changes in Doc/Makefile; amongst others, latex2html is now used
31256to generate HTML from all latex documents.
31257
31258
31259Change to the Python/C API
31260--------------------------
31261
31262- Because some interfaces have changed, the PYTHON_API macro has been
31263bumped.  Most extensions built for the old API version will still run,
31264but I can't guarantee this.  Python prints a warning message on
31265version mismatches; it dumps core when the version mismatch causes a
31266serious problem :-)
31267
31268- I've completed the Grand Renaming, with the help of Roger Masse and
31269Barry Warsaw.  This makes reading or debugging the code much easier.
31270Many other unrelated code reorganizations have also been carried out.
31271The allobjects.h header file is gone; instead, you would have to
31272include Python.h followed by rename2.h.  But you're better off running
31273Tools/scripts/fixcid.py -s Misc/RENAME on your source, so you can omit
31274the rename2.h; it will disappear in the next release.
31275
31276- Various and sundry small bugs in the "abstract" interfaces have been
31277fixed.  Thanks to all the (involuntary) testers of the Python 1.4
31278version!  Some new functions have been added, e.g. PySequence_List(o),
31279equivalent to list(o) in Python.
31280
31281- New API functions PyLong_FromUnsignedLong() and
31282PyLong_AsUnsignedLong().
31283
31284- The API functions in the file cgensupport.c are no longer
31285supported.  This file has been moved to Modules and is only ever
31286compiled when the SGI specific 'gl' module is built.
31287
31288- PyObject_Compare() can now raise an exception.  Check with
31289PyErr_Occurred().  The comparison function in an object type may also
31290raise an exception.
31291
31292- The slice interface uses an upper bound of INT_MAX when no explicit
31293upper bound is given (e.x. for a[1:]).  It used to ask the object for
31294its length and do the calculations.
31295
31296- Support for multiple independent interpreters.  See Doc/api.tex,
31297functions Py_NewInterpreter() and Py_EndInterpreter().  Since the
31298documentation is incomplete, also see the new Demo/pysvr example
31299(which shows how to use these in a threaded application) and the
31300source code.
31301
31302- There is now a Py_Finalize() function which "de-initializes"
31303Python.  It is possible to completely restart the interpreter
31304repeatedly by calling Py_Finalize() followed by Py_Initialize().  A
31305change of functionality in Py_Initialize() means that it is now a
31306fatal error to call it while the interpreter is already initialized.
31307The old, half-hearted Py_Cleanup() routine is gone.  Use of Py_Exit()
31308is deprecated (it is nothing more than Py_Finalize() followed by
31309exit()).
31310
31311- There are no known memory leaks left.  While Py_Finalize() doesn't
31312free *all* allocated memory (some of it is hard to track down),
31313repeated calls to Py_Finalize() and Py_Initialize() do not create
31314unaccessible heap blocks.
31315
31316- There is now explicit per-thread state.  (Inspired by, but not the
31317same as, Greg Stein's free threading patches.)
31318
31319- There is now better support for threading C applications.  There are
31320now explicit APIs to manipulate the interpreter lock.  Read the source
31321or the Demo/pysvr example; the new functions are
31322PyEval_{Acquire,Release}{Lock,Thread}().
31323
31324- The test macro DEBUG has changed to Py_DEBUG, to avoid interference
31325with other libraries' DEBUG macros.  Likewise for any other test
31326macros that didn't yet start with Py_.
31327
31328- New wrappers around malloc() and friends: Py_Malloc() etc. call
31329malloc() and call PyErr_NoMemory() when it fails; PyMem_Malloc() call
31330just malloc().  Use of these wrappers could be essential if multiple
31331memory allocators exist (e.g. when using certain DLL setups under
31332Windows).  (Idea by Jim Fulton.)
31333
31334- New C API PyImport_Import() which uses whatever __import__() hook
31335that is installed for the current execution environment.  By Jim
31336Fulton.
31337
31338- It is now possible for an extension module's init function to fail
31339non-fatally, by calling one of the PyErr_* functions and returning.
31340
31341- The PyInt_AS_LONG() and PyFloat_AS_DOUBLE() macros now cast their
31342argument to the proper type, like the similar PyString macros already
31343did.  (Suggestion by Marc-Andre Lemburg.)  Similar for PyList_GET_SIZE
31344and PyList_GET_ITEM.
31345
31346- Some of the Py_Get* function, like Py_GetVersion() (but not yet
31347Py_GetPath()) are now declared as returning a const char *.  (More
31348should follow.)
31349
31350- Changed the run-time library to check for exceptions after object
31351comparisons.  PyObject_Compare() can now return an exception; use
31352PyErr_Occurred() to check (there is *no* special return value).
31353
31354- PyFile_WriteString() and Py_Flushline() now return error indicators
31355instead of clearing exceptions.  This fixes an obscure bug where using
31356these would clear a pending exception, discovered by Just van Rossum.
31357
31358- There's a new function, PyArg_ParseTupleAndKeywords(), which parses
31359an argument list including keyword arguments.  Contributed by Geoff
31360Philbrick.
31361
31362- PyArg_GetInt() is gone.
31363
31364- It's no longer necessary to include graminit.h when calling one of
31365the extended parser API functions.  The three public grammar start
31366symbols are now in Python.h as Py_single_input, Py_file_input, and
31367Py_eval_input.
31368
31369- The CObject interface has a new function,
31370PyCObject_Import(module, name).  It calls PyCObject_AsVoidPtr()
31371on the object referenced by "module.name".
31372
31373
31374Tkinter
31375-------
31376
31377- On popular demand, _tkinter once again installs a hook for readline
31378that processes certain Tk events while waiting for the user to type
31379(using PyOS_InputHook).
31380
31381- A patch by Craig McPheeters plugs the most obnoxious memory leaks,
31382caused by command definitions referencing widget objects beyond their
31383lifetime.
31384
31385- New standard dialog modules: tkColorChooser.py, tkCommonDialog.py,
31386tkMessageBox.py, tkFileDialog.py, tkSimpleDialog.py These interface
31387with the new Tk dialog scripts, and provide more "native platform"
31388style file selection dialog boxes on some platforms.  Contributed by
31389Fredrik Lundh.
31390
31391- Tkinter.py: when the first Tk object is destroyed, it sets the
31392hiddel global _default_root to None, so that when another Tk object is
31393created it becomes the new default root.  Other miscellaneous
31394changes and fixes.
31395
31396- The Image class now has a configure method.
31397
31398- Added a bunch of new winfo options to Tkinter.py; we should now be
31399up to date with Tk 4.2.  The new winfo options supported are:
31400mananger, pointerx, pointerxy, pointery, server, viewable, visualid,
31401visualsavailable.
31402
31403- The broken bind() method on Canvas objects defined in the Canvas.py
31404module has been fixed.  The CanvasItem and Group classes now also have
31405an unbind() method.
31406
31407- The problem with Tkinter.py falling back to trying to import
31408"tkinter" when "_tkinter" is not found has been fixed -- it no longer
31409tries "tkinter", ever.  This makes diagnosing the problem "_tkinter
31410not configured" much easier and will hopefully reduce the newsgroup
31411traffic on this topic.
31412
31413- The ScrolledText module once again supports the 'cnf' parameter, to
31414be compatible with the examples in Mark Lutz' book (I know, I know,
31415too late...)
31416
31417- The _tkinter.c extension module has been revamped.  It now support
31418Tk versions 4.1 through 8.0; support for 4.0 has been dropped.  It
31419works well under Windows and Mac (with the latest Tk ports to those
31420platforms).  It also supports threading -- it is safe for one
31421(Python-created) thread to be blocked in _tkinter.mainloop() while
31422other threads modify widgets.  To make the changes visible, those
31423threads must use update_idletasks()method.  (The patch for threading
31424in 1.5a3 was broken; in 1.5a4, it is back in a different version,
31425which requires access to the Tcl sources to get it to work -- hence it
31426is disabled by default.)
31427
31428- A bug in _tkinter.c has been fixed, where Split() with a string
31429containing an unmatched '"' could cause an exception or core dump.
31430
31431- Unfortunately, on Windows and Mac, Tk 8.0 no longer supports
31432CreateFileHandler, so _tkinter.createfilehandler is not available on
31433those platforms when using Tk 8.0 or later.  I will have to rethink
31434how to interface with Tcl's lower-level event mechanism, or with its
31435channels (which are like Python's file-like objects).  Jack Jansen has
31436provided a fix for the Mac, so createfilehandler *is* actually
31437supported there; maybe I can adapt his fix for Windows.
31438
31439
31440Tools and Demos
31441---------------
31442
31443- A new regression test suite is provided, which tests most of the
31444standard and built-in modules.  The regression test is run by invoking
31445the script Lib/test/regrtest.py.  Barry Warsaw wrote the test harnass;
31446he and Roger Masse contributed most of the new tests.
31447
31448- New tool: faqwiz -- the CGI script that is used to maintain the
31449Python FAQ (http://grail.cnri.reston.va.us/cgi-bin/faqw.py).  In
31450Tools/faqwiz.
31451
31452- New tool: webchecker -- a simple extensible web robot that, when
31453aimed at a web server, checks that server for dead links.  Available
31454are a command line utility as well as a Tkinter based GUI version.  In
31455Tools/webchecker.  A simplified version of this program is dissected
31456in my article in O'Reilly's WWW Journal, the issue on Scripting
31457Languages (Vol 2, No 2); Scripting the Web with Python (pp 97-120).
31458Includes a parser for robots.txt files by Skip Montanaro.
31459
31460- New small tools: cvsfiles.py (prints a list of all files under CVS
31461n a particular directory tree), treesync.py (a rather Guido-specific
31462script to synchronize two source trees, one on Windows NT, the other
31463one on Unix under CVS but accessible from the NT box), and logmerge.py
31464(sort a collection of RCS or CVS logs by date).  In Tools/scripts.
31465
31466- The freeze script now also works under Windows (NT).  Another
31467feature allows the -p option to be pointed at the Python source tree
31468instead of the installation prefix.  This was loosely based on part of
31469xfreeze by Sam Rushing and Bill Tutt.
31470
31471- New examples (Demo/extend) that show how to use the generic
31472extension makefile (Misc/Makefile.pre.in).
31473
31474- Tools/scripts/h2py.py now supports C++ comments.
31475
31476- Tools/scripts/pystone.py script is upgraded to version 1.1; there
31477was a bug in version 1.0 (distributed with Python 1.4) that leaked
31478memory.  Also, in 1.1, the LOOPS variable is incremented to 10000.
31479
31480- Demo/classes/Rat.py completely rewritten by Sjoerd Mullender.
31481
31482
31483Windows (NT and 95)
31484-------------------
31485
31486- New project files for Developer Studio (Visual C++) 5.0 for Windows
31487NT (the old VC++ 4.2 Makefile is also still supported, but will
31488eventually be withdrawn due to its bulkiness).
31489
31490- See the note on the new module search path in the "Miscellaneous" section
31491above.
31492
31493- Support for Win32s (the 32-bit Windows API under Windows 3.1) is
31494basically withdrawn.  If it still works for you, you're lucky.
31495
31496- There's a new extension module, msvcrt.c, which provides various
31497low-level operations defined in the Microsoft Visual C++ Runtime Library.
31498These include locking(), setmode(), get_osfhandle(), set_osfhandle(), and
31499console I/O functions like kbhit(), getch() and putch().
31500
31501- The -u option not only sets the standard I/O streams to unbuffered
31502status, but also sets them in binary mode.  (This can also be done
31503using msvcrt.setmode(), by the way.)
31504
31505- The, sys.prefix and sys.exec_prefix variables point to the directory
31506where Python is installed, or to the top of the source tree, if it was run
31507from there.
31508
31509- The various os.path modules (posixpath, ntpath, macpath) now support
31510passing more than two arguments to the join() function, so
31511os.path.join(a, b, c) is the same as os.path.join(a, os.path.join(b,
31512c)).
31513
31514- The ntpath module (normally used as os.path) supports ~ to $HOME
31515expansion in expanduser().
31516
31517- The freeze tool now works on Windows.
31518
31519- See also the Tkinter category for a sad note on
31520_tkinter.createfilehandler().
31521
31522- The truncate() method for file objects now works on Windows.
31523
31524- Py_Initialize() is no longer called when the DLL is loaded.  You
31525must call it yourself.
31526
31527- The time module's clock() function now has good precision through
31528the use of the Win32 API QueryPerformanceCounter().
31529
31530- Mark Hammond will release Python 1.5 versions of PythonWin and his
31531other Windows specific code: the win32api extensions, COM/ActiveX
31532support, and the MFC interface.
31533
31534
31535Mac
31536---
31537
31538- As always, the Macintosh port will be done by Jack Jansen.  He will
31539make a separate announcement for the Mac specific source code and the
31540binary distribution(s) when these are ready.
31541
31542
31543======================================================================
31544
31545
31546=====================================
31547==> Release 1.4 (October 25 1996) <==
31548=====================================
31549
31550(Starting in reverse chronological order:)
31551
31552- Changed disclaimer notice.
31553
31554- Added SHELL=/bin/sh to Misc/Makefile.pre.in -- some Make versions
31555default to the user's login shell.
31556
31557- In Lib/tkinter/Tkinter.py, removed bogus binding of <Delete> in Text
31558widget, and bogus bspace() function.
31559
31560- In Lib/cgi.py, bumped __version__ to 2.0 and restored a truncated
31561paragraph.
31562
31563- Fixed the NT Makefile (PC/vc40.mak) for VC 4.0 to set /MD for all
31564subprojects, and to remove the (broken) experimental NumPy
31565subprojects.
31566
31567- In Lib/py_compile.py, cast mtime to long() so it will work on Mac
31568(where os.stat() returns mtimes as floats.)
31569- Set self.rfile unbuffered (like self.wfile) in SocketServer.py, to
31570fix POST in CGIHTTPServer.py.
31571
31572- Version 2.83 of Misc/python-mode.el for Emacs is included.
31573
31574- In Modules/regexmodule.c, fixed symcomp() to correctly handle a new
31575group starting immediately after a group tag.
31576
31577- In Lib/SocketServer.py, changed the mode for rfile to unbuffered.
31578
31579- In Objects/stringobject.c, fixed the compare function to do the
31580first char comparison in unsigned mode, for consistency with the way
31581other characters are compared by memcmp().
31582
31583- In Lib/tkinter/Tkinter.py, fixed Scale.get() to support floats.
31584
31585- In Lib/urllib.py, fix another case where openedurl wasn't set.
31586
31587(XXX Sorry, the rest is in totally random order.  No time to fix it.)
31588
31589- SyntaxError exceptions detected during code generation
31590(e.g. assignment to an expression) now include a line number.
31591
31592- Don't leave trailing / or \ in script directory inserted in front of
31593sys.path.
31594
31595- Added a note to Tools/scripts/classfix.py abouts its historical
31596importance.
31597
31598- Added Misc/Makefile.pre.in, a universal Makefile for extensions
31599built outside the distribution.
31600
31601- Rewritten Misc/faq2html.py, by Ka-Ping Yee.
31602
31603- Install shared modules with mode 555 (needed for performance on some
31604platforms).
31605
31606- Some changes to standard library modules to avoid calling append()
31607with more than one argument -- while supported, this should be
31608outlawed, and I don't want to set a bad example.
31609
31610- bdb.py (and hence pdb.py) supports calling run() with a code object
31611instead of a code string.
31612
31613- Fixed an embarrassing bug cgi.py which prevented correct uploading
31614of binary files from Netscape (which doesn't distinguish between
31615binary and text files).  Also added dormant logging support, which
31616makes it easier to debug the cgi module itself.
31617
31618- Added default writer to constructor of NullFormatter class.
31619
31620- Use binary mode for socket.makefile() calls in ftplib.py.
31621
31622- The ihooks module no longer "installs" itself upon import -- this
31623was an experimental feature that helped ironing out some bugs but that
31624slowed down code that imported it without the need to install it
31625(e.g. the rexec module).  Also close the file in some cases and add
31626the __file__ attribute to loaded modules.
31627
31628- The test program for mailbox.py is now more useful.
31629
31630- Added getparamnames() to Message class in mimetools.py -- it returns
31631the names of parameters to the content-type header.
31632
31633- Fixed a typo in ni that broke the loop stripping "__." from names.
31634
31635- Fix sys.path[0] for scripts run via pdb.py's new main program.
31636
31637- profile.py can now also run a script, like pdb.
31638
31639- Fix a small bug in pyclbr -- don't add names starting with _ when
31640emulating from ... import *.
31641
31642- Fixed a series of embarrassing typos in rexec's handling of standard
31643I/O redirection.  Added some more "safe" built-in modules: cmath,
31644errno, operator.
31645
31646- Fixed embarrassing typo in shelve.py.
31647
31648- Added SliceType and EllipsisType to types.py.
31649
31650- In urllib.py, added handling for error 301 (same as 302); added
31651geturl() method to get the URL after redirection.
31652
31653- Fixed embarrassing typo in xdrlib.py.  Also fixed typo in Setup.in
31654for _xdrmodule.c and removed redundant #include from _xdrmodule.c.
31655
31656- Fixed bsddbmodule.c to add binary mode indicator on platforms that
31657have it.  This should make it working on Windows NT.
31658
31659- Changed last uses of #ifdef NT to #ifdef MS_WINDOWS or MS_WIN32,
31660whatever applies.  Also rationalized some other tests for various MS
31661platforms.
31662
31663- Added the sources for the NT installer script used for Python
316641.4beta3.  Not tested with this release, but better than nothing.
31665
31666- A compromise in pickle's defenses against Trojan horses: a
31667user-defined function is now okay where a class is expected.  A
31668built-in function is not okay, to prevent pickling something that
31669will execute os.system("rm -f *") when unpickling.
31670
31671- dis.py will print the name of local variables referenced by local
31672load/store/delete instructions.
31673
31674- Improved portability of SimpleHTTPServer module to non-Unix
31675platform.
31676
31677- The thread.h interface adds an extra argument to down_sema().  This
31678only affects other C code that uses thread.c; the Python thread module
31679doesn't use semaphores (which aren't provided on all platforms where
31680Python threads are supported).  Note: on NT, this change is not
31681implemented.
31682
31683- Fixed some typos in abstract.h; corrected signature of
31684PyNumber_Coerce, added PyMapping_DelItem.  Also fixed a bug in
31685abstract.c's PyObject_CallMethod().
31686
31687- apply(classname, (), {}) now works even if the class has no
31688__init__() method.
31689
31690- Implemented complex remainder and divmod() (these would dump core!).
31691Conversion of complex numbers to int, long int or float now raises an
31692exception, since there is no meaningful way to do it without losing
31693information.
31694
31695- Fixed bug in built-in complex() function which gave the wrong result
31696for two real arguments.
31697
31698- Change the hash algorithm for strings -- the multiplier is now
316991000003 instead of 3, which gives better spread for short strings.
31700
31701- New default path for Windows NT, the registry structure now supports
31702default paths for different install packages.  (Mark Hammond -- the
31703next PythonWin release will use this.)
31704
31705- Added more symbols to the python_nt.def file.
31706
31707- When using GNU readline, set rl_readline_name to "python".
31708
31709- The Ellipses built-in name has been renamed to Ellipsis -- this is
31710the correct singular form.  Thanks to Ka-Ping Yee, who saved us from
31711eternal embarrassment.
31712
31713- Bumped the PYTHON_API_VERSION to 1006, due to the Ellipses ->
31714Ellipsis name change.
31715
31716- Updated the library reference manual.  Added documentation of
31717restricted mode (rexec, Bastion) and the formatter module (for use
31718with the htmllib module).  Fixed the documentation of htmllib
31719(finally).
31720
31721- The reference manual is now maintained in FrameMaker.
31722
31723- Upgraded scripts Doc/partparse.py and Doc/texi2html.py.
31724
31725- Slight improvements to Doc/Makefile.
31726
31727- Added fcntl.lockf(). This should be used for Unix file locking
31728instead of the posixfile module; lockf() is more portable.
31729
31730- The getopt module now supports long option names, thanks to Lars
31731Wizenius.
31732
31733- Plenty of changes to Tkinter and Canvas, mostly due to Fred Drake
31734and Nils Fischbeck.
31735
31736- Use more bits of time.time() in whrandom's default seed().
31737
31738- Performance hack for regex module's regs attribute.
31739
31740- Don't close already closed socket in socket module.
31741
31742- Correctly handle separators containing embedded nulls in
31743strop.split, strop.find and strop.rfind.  Also added more detail to
31744error message for strop.atoi and friends.
31745
31746- Moved fallback definition for hypot() to Python/hypot.c.
31747
31748- Added fallback definition for strdup, in Python/strdup.c.
31749
31750- Fixed some bugs where a function would return 0 to indicate an error
31751where it should return -1.
31752
31753- Test for error returned by time.localtime(), and rationalized its MS
31754tests.
31755
31756- Added Modules/Setup.local file, which is processed after Setup.
31757
31758- Corrected bug in toplevel Makefile.in -- execution of regen script
31759would not use the right PATH and PYTHONPATH.
31760
31761- Various and sundry NeXT configuration changes (sigh).
31762
31763- Support systems where libreadline needs neither termcap nor curses.
31764
31765- Improved ld_so_aix script and python.exp file (for AIX).
31766
31767- More stringent test for working <stdarg.h> in configure script.
31768
31769- Removed Demo/www subdirectory -- it was totally out of date.
31770
31771- Improved demos and docs for Fred Drake's parser module; fixed one
31772typo in the module itself.
31773
31774
31775=========================================
31776==> Release 1.4beta3 (August 26 1996) <==
31777=========================================
31778
31779
31780(XXX This is less readable that it should.  I promise to restructure
31781it for the final 1.4 release.)
31782
31783
31784What's new in 1.4beta3 (since beta2)?
31785-------------------------------------
31786
31787- Name mangling to implement a simple form of class-private variables.
31788A name of the form "__spam" can't easily be used outside the class.
31789(This was added in 1.4beta3, but left out of the 1.4beta3 release
31790message.)
31791
31792- In urllib.urlopen(): HTTP URLs containing user:passwd@host are now
31793handled correctly when using a proxy server.
31794
31795- In ntpath.normpath(): don't truncate to 8+3 format.
31796
31797- In mimetools.choose_boundary(): don't die when getuid() or getpid()
31798aren't defined.
31799
31800- Module urllib: some optimizations to (un)quoting.
31801
31802- New module MimeWriter for writing MIME documents.
31803
31804- More changes to formatter module.
31805
31806- The freeze script works once again and is much more robust (using
31807sys.prefix etc.).  It also supports a -o option to specify an
31808output directory.
31809
31810- New module whichdb recognizes dbm, gdbm and bsddb/dbhash files.
31811
31812- The Doc/Makefile targets have been reorganized somewhat to remove the
31813insistence on always generating PostScript.
31814
31815- The texinfo to html filter (Doc/texi2html.py) has been improved somewhat.
31816
31817- "errors.h" has been renamed to "pyerrors.h" to resolve a long-standing
31818name conflict on the Mac.
31819
31820- Linking a module compiled with a different setting for Py_TRACE_REFS now
31821generates a linker error rather than a core dump.
31822
31823- The cgi module has a new convenience function print_exception(), which
31824formats a python exception using HTML.  It also fixes a bug in the
31825compatibility code and adds a dubious feature which makes it possible to
31826have two query strings, one in the URL and one in the POST data.
31827
31828- A subtle change in the unpickling of class instances makes it possible
31829to unpickle in restricted execution mode, where the __dict__ attribute is
31830not available (but setattr() is).
31831
31832- Documentation for os.path.splitext() (== posixpath.splitext()) has been
31833cleared up.  It splits at the *last* dot.
31834
31835- posixfile locking is now also correctly supported on AIX.
31836
31837- The tempfile module once again honors an initial setting of tmpdir.  It
31838now works on Windows, too.
31839
31840- The traceback module has some new functions to extract, format and print
31841the active stack.
31842
31843- Some translation functions in the urllib module have been made a little
31844less sluggish.
31845
31846- The addtag_* methods for Canvas widgets in Tkinter as well as in the
31847separate Canvas class have been fixed so they actually do something
31848meaningful.
31849
31850- A tiny _test() function has been added to Tkinter.py.
31851
31852- A generic Makefile for dynamically loaded modules is provided in the Misc
31853subdirectory (Misc/gMakefile).
31854
31855- A new version of python-mode.el for Emacs is provided.  See
31856http://www.python.org/ftp/emacs/pmdetails.html for details.  The
31857separate file pyimenu.el is no longer needed, imenu support is folded
31858into python-mode.el.
31859
31860- The configure script can finally correctly find the readline library in a
31861non-standard location.  The LDFLAGS variable is passed on the Makefiles
31862from the configure script.
31863
31864- Shared libraries are now installed as programs (i.e. with executable
31865permission).  This is required on HP-UX and won't hurt on other systems.
31866
31867- The objc.c module is no longer part of the distribution.  Objective-C
31868support may become available as contributed software on the ftp site.
31869
31870- The sybase module is no longer part of the distribution.  A much
31871improved sybase module is available as contributed software from the
31872ftp site.
31873
31874- _tkinter is now compatible with Tcl 7.5 / Tk 4.1 patch1 on Windows and
31875Mac (don't use unpatched Tcl/Tk!).  The default line in the Setup.in file
31876now links with Tcl 7.5 / Tk 4.1 rather than 7.4/4.0.
31877
31878- In Setup, you can now write "*shared*" instead of "*noconfig*", and you
31879can use *.so and *.sl as shared libraries.
31880
31881- Some more fidgeting for AIX shared libraries.
31882
31883- The mpz module is now compatible with GMP 2.x.  (Not tested by me.)
31884(Note -- a complete replacement by Niels Mo"ller, called gpmodule, is
31885available from the contrib directory on the ftp site.)
31886
31887- A warning is written to sys.stderr when a __del__ method raises an
31888exception (formerly, such exceptions were completely ignored).
31889
31890- The configure script now defines HAVE_OLD_CPP if the C preprocessor is
31891incapable of ANSI style token concatenation and stringification.
31892
31893- All source files (except a few platform specific modules) are once again
31894compatible with K&R C compilers as well as ANSI compilers.  In particular,
31895ANSI-isms have been removed or made conditional in complexobject.c,
31896getargs.c and operator.c.
31897
31898- The abstract object API has three new functions, PyObject_DelItem,
31899PySequence_DelItem, and PySequence_DelSlice.
31900
31901- The operator module has new functions delitem and delslice, and the
31902functions "or" and "and" are renamed to "or_" and "and_" (since "or" and
31903"and" are reserved words).  ("__or__" and "__and__" are unchanged.)
31904
31905- The environment module is no longer supported; putenv() is now a function
31906in posixmodule (also under NT).
31907
31908- Error in filter(<function>, "") has been fixed.
31909
31910- Unrecognized keyword arguments raise TypeError, not KeyError.
31911
31912- Better portability, fewer bugs and memory leaks, fewer compiler warnings,
31913some more documentation.
31914
31915- Bug in float power boundary case (0.0 to the negative integer power)
31916fixed.
31917
31918- The test of negative number to the float power has been moved from the
31919built-in pow() function to floatobject.c (so complex numbers can yield the
31920correct result).
31921
31922- The bug introduced in beta2 where shared libraries loaded (using
31923dlopen()) from the current directory would fail, has been fixed.
31924
31925- Modules imported as shared libraries now also have a __file__ attribute,
31926giving the filename from which they were loaded.  The only modules without
31927a __file__ attribute now are built-in modules.
31928
31929- On the Mac, dynamically loaded modules can end in either ".slb" or
31930".<platform>.slb" where <platform> is either "CFM68K" or "ppc".  The ".slb"
31931extension should only be used for "fat" binaries.
31932
31933- C API addition: marshal.c now supports
31934PyMarshal_WriteObjectToString(object).
31935
31936- C API addition: getargs.c now supports
31937PyArg_ParseTupleAndKeywords(args, kwdict, format, kwnames, ...)
31938to parse keyword arguments.
31939
31940- The PC versioning scheme (sys.winver) has changed once again.  the
31941version number is now "<digit>.<digit>.<digit>.<apiversion>", where the
31942first three <digit>s are the Python version (e.g. "1.4.0" for Python 1.4,
31943"1.4.1" for Python 1.4.1 -- the beta level is not included) and
31944<apiversion> is the four-digit PYTHON_API_VERSION (currently 1005).
31945
31946- h2py.py accepts whitespace before the # in CPP directives
31947
31948- On Solaris 2.5, it should now be possible to use either Posix threads or
31949Solaris threads (XXX: how do you select which is used???).  (Note: the
31950Python pthreads interface doesn't fully support semaphores yet -- anyone
31951care to fix this?)
31952
31953- Thread support should now work on AIX, using either DCE threads or
31954pthreads.
31955
31956- New file Demo/sockets/unicast.py
31957
31958- Working Mac port, with CFM68K support, with Tk 4.1 support (though not
31959both) (XXX)
31960
31961- New project setup for PC port, now compatible with PythonWin, with
31962_tkinter and NumPy support (XXX)
31963
31964- New module site.py (XXX)
31965
31966- New module xdrlib.py and optional support module _xdrmodule.c (XXX)
31967
31968- parser module adapted to new grammar, complete w/ Doc & Demo (XXX)
31969
31970- regen script fixed (XXX)
31971
31972- new machdep subdirectories Lib/{aix3,aix4,next3_3,freebsd2,linux2} (XXX)
31973
31974- testall now also tests math module (XXX)
31975
31976- string.atoi c.s. now raise an exception for an empty input string.
31977
31978- At last, it is no longer necessary to define HAVE_CONFIG_H in order to
31979have config.h included at various places.
31980
31981- Unrecognized keyword arguments now raise TypeError rather than KeyError.
31982
31983- The makesetup script recognizes files with extension .so or .sl as
31984(shared) libraries.
31985
31986- 'access' is no longer a reserved word, and all code related to its
31987implementation is gone (or at least #ifdef'ed out).  This should make
31988Python a little speedier too!
31989
31990- Performance enhancements suggested by Sjoerd Mullender.  This includes
31991the introduction of two new optional function pointers in type object,
31992getattro and setattro, which are like getattr and setattr but take a
31993string object instead of a C string pointer.
31994
31995- New operations in string module: lstrip(s) and rstrip(s) strip whitespace
31996only on the left or only on the right, A new optional third argument to
31997split() specifies the maximum number of separators honored (so
31998splitfields(s, sep, n) returns a list of at most n+1 elements).  (Since
319991.3, splitfields(s, None) is totally equivalent to split(s).)
32000string.capwords() has an optional second argument specifying the
32001separator (which is passed to split()).
32002
32003- regsub.split() has the same addition as string.split().  regsub.splitx(s,
32004sep, maxsep) implements the functionality that was regsub.split(s, 1) in
320051.4beta2 (return a list containing the delimiters as well as the words).
32006
32007- Final touch for AIX loading, rewritten Misc/AIX-NOTES.
32008
32009- In Modules/_tkinter.c, when using Tk 4.1 or higher, use className
32010argument to _tkinter.create() to set Tcl's argv0 variable, so X
32011resources use the right resource class again.
32012
32013- Add #undef fabs to Modules/mathmodule.c for macintosh.
32014
32015- Added some macro renames for AIX in Modules/operator.c.
32016
32017- Removed spurious 'E' from Doc/liberrno.tex.
32018
32019- Got rid of some cruft in Misc/ (dlMakefile, pyimenu.el); added new
32020Misc/gMakefile and new version of Misc/python-mode.el.
32021
32022- Fixed typo in Lib/ntpath.py (islink has "return false" which gives a
32023NameError).
32024
32025- Added missing "from types import *" to Lib/tkinter/Canvas.py.
32026
32027- Added hint about using default args for __init__ to pickle docs.
32028
32029- Corrected typo in Inclide/abstract.h: PySequence_Lenth ->
32030PySequence_Length.
32031
32032- Some improvements to Doc/texi2html.py.
32033
32034- In Python/import.c, Cast unsigned char * in struct _frozen to char *
32035in calls to rds_object().
32036
32037- In doc/ref4.tex, added note about scope of lambda bodies.
32038
32039What's new in 1.4beta2 (since beta1)?
32040-------------------------------------
32041
32042- Portability bug in the md5.h header solved.
32043
32044- The PC build procedure now really works, and sets sys.platform to a
32045meaningful value (a few things were botched in beta 1).  Lib/dos_8x3
32046is now a standard part of the distribution (alas).
32047
32048- More improvements to the installation procedure.  Typing "make install"
32049now inserts the version number in the pathnames of almost everything
32050installed, and creates the machine dependent modules (FCNTL.py etc.) if not
32051supplied by the distribution.  (XXX There's still a problem with the latter
32052because the "regen" script requires that Python is installed.  Some manual
32053intervention may still be required.) (This has been fixed in 1.4beta3.)
32054
32055- New modules: errno, operator (XXX).
32056
32057- Changes for use with Numerical Python: built-in function slice() and
32058Ellipses object, and corresponding syntax:
32059
32060	x[lo:hi:stride]		==	x[slice(lo, hi, stride)]
32061	x[a, ..., z]		==	x[(a, Ellipses, z)]
32062
32063- New documentation for errno and cgi modules.
32064
32065- The directory containing the script passed to the interpreter is
32066inserted in from of sys.path; "." is no longer a default path
32067component.
32068
32069- Optional third string argument to string.translate() specifies
32070characters to delete.  New function string.maketrans() creates a
32071translation table for translate() or for regex.compile().
32072
32073- Module posix (and hence module os under Unix) now supports putenv().
32074Moreover, module os is enhanced so that if putenv() is supported,
32075assignments to os.environ entries make the appropriate putenv() call.
32076(XXX the putenv() implementation can leak a small amount of memory per
32077call.)
32078
32079- pdb.py can now be invoked from the command line to debug a script:
32080python pdb.py <script> <arg> ...
32081
32082- Much improved parseaddr() in rfc822.
32083
32084- In cgi.py, you can now pass an alternative value for environ to
32085nearly all functions.
32086
32087- You can now assign to instance variables whose name begins and ends
32088with '__'.
32089
32090- New version of Fred Drake's parser module and associates (token,
32091symbol, AST).
32092
32093- New PYTHON_API_VERSION value and .pyc file magic number (again!).
32094
32095- The "complex" internal structure type is now called "Py_complex" to
32096avoid name conflicts.
32097
32098- Numerous small bugs fixed.
32099
32100- Slight pickle speedups.
32101
32102- Some slight speedups suggested by Sjoerd (more coming in 1.4 final).
32103
32104- NeXT portability mods by Bill Bumgarner integrated.
32105
32106- Modules regexmodule.c, bsddbmodule.c and xxmodule.c have been
32107converted to new naming style.
32108
32109
32110What's new in 1.4beta1 (since 1.3)?
32111-----------------------------------
32112
32113- Added sys.platform and sys.exec_platform for Bill Janssen.
32114
32115- Installation has been completely overhauled.  "make install" now installs
32116everything, not just the python binary.  Installation uses the install-sh
32117script (borrowed from X11) to install each file.
32118
32119- New functions in the posix module: mkfifo, plock, remove (== unlink),
32120and ftruncate.  More functions are also available under NT.
32121
32122- New function in the fcntl module: flock.
32123
32124- Shared library support for FreeBSD.
32125
32126- The --with-readline option can now be used without a DIRECTORY argument,
32127for systems where libreadline.* is in one of the standard places.  It is
32128also possible for it to be a shared library.
32129
32130- The extension tkinter has been renamed to _tkinter, to avoid confusion
32131with Tkinter.py oncase insensitive file systems.  It now supports Tk 4.1 as
32132well as 4.0.
32133
32134- Author's change of address from CWI in Amsterdam, The Netherlands, to
32135CNRI in Reston, VA, USA.
32136
32137- The math.hypot() function is now always available (if it isn't found in
32138the C math library, Python provides its own implementation).
32139
32140- The latex documentation is now compatible with latex2e, thanks to David
32141Ascher.
32142
32143- The expression x**y is now equivalent to pow(x, y).
32144
32145- The indexing expression x[a, b, c] is now equivalent to x[(a, b, c)].
32146
32147- Complex numbers are now supported.  Imaginary constants are written with
32148a 'j' or 'J' prefix, general complex numbers can be formed by adding a real
32149part to an imaginary part, like 3+4j.  Complex numbers are always stored in
32150floating point form, so this is equivalent to 3.0+4.0j.  It is also
32151possible to create complex numbers with the new built-in function
32152complex(re, [im]).  For the footprint-conscious, complex number support can
32153be disabled by defining the symbol WITHOUT_COMPLEX.
32154
32155- New built-in function list() is the long-awaited counterpart of tuple().
32156
32157- There's a new "cmath" module which provides the same functions as the
32158"math" library but with complex arguments and results.  (There are very
32159good reasons why math.sqrt(-1) still raises an exception -- you have to use
32160cmath.sqrt(-1) to get 1j for an answer.)
32161
32162- The Python.h header file (which is really the same as allobjects.h except
32163it disables support for old style names) now includes several more files,
32164so you have to have fewer #include statements in the average extension.
32165
32166- The NDEBUG symbol is no longer used.  Code that used to be dependent on
32167the presence of NDEBUG is now present on the absence of DEBUG.  TRACE_REFS
32168and REF_DEBUG have been renamed to Py_TRACE_REFS and Py_REF_DEBUG,
32169respectively.  At long last, the source actually compiles and links without
32170errors when this symbol is defined.
32171
32172- Several symbols that didn't follow the new naming scheme have been
32173renamed (usually by adding to rename2.h) to use a Py or _Py prefix.  There
32174are no external symbols left without a Py or _Py prefix, not even those
32175defined by sources that were incorporated from elsewhere (regexpr.c,
32176md5c.c).  (Macros are a different story...)
32177
32178- There are now typedefs for the structures defined in config.c and
32179frozen.c.
32180
32181- New PYTHON_API_VERSION value and .pyc file magic number.
32182
32183- New module Bastion.  (XXX)
32184
32185- Improved performance of StringIO module.
32186
32187- UserList module now supports + and * operators.
32188
32189- The binhex and binascii modules now actually work.
32190
32191- The cgi module has been almost totally rewritten and documented.
32192It now supports file upload and a new data type to handle forms more
32193flexibly.
32194
32195- The formatter module (for use with htmllib) has been overhauled (again).
32196
32197- The ftplib module now supports passive mode and has doc strings.
32198
32199- In (ideally) all places where binary files are read or written, the file
32200is now correctly opened in binary mode ('rb' or 'wb') so the code will work
32201on Mac or PC.
32202
32203- Dummy versions of os.path.expandvars() and expanduser() are now provided
32204on non-Unix platforms.
32205
32206- Module urllib now has two new functions url2pathname and pathname2url
32207which turn local filenames into "file:..." URLs using the same rules as
32208Netscape (why be different).  it also supports urlretrieve() with a
32209pathname parameter, and honors the proxy environment variables (http_proxy
32210etc.).  The URL parsing has been improved somewhat, too.
32211
32212- Micro improvements to urlparse.  Added urlparse.urldefrag() which
32213removes a trailing ``#fragment'' if any.
32214
32215- The mailbox module now supports MH style message delimiters as well.
32216
32217- The mhlib module contains some new functionality: setcontext() to set the
32218current folder and parsesequence() to parse a sequence as commonly passed
32219to MH commands (e.g. 1-10 or last:5).
32220
32221- New module mimify for conversion to and from MIME format of email
32222messages.
32223
32224- Module ni now automatically installs itself when first imported -- this
32225is against the normal rule that modules should define classes and functions
32226but not invoke them, but appears more useful in the case that two
32227different, independent modules want to use ni's features.
32228
32229- Some small performance enhancements in module pickle.
32230
32231- Small interface change to the profile.run*() family of functions -- more
32232sensible handling of return values.
32233
32234- The officially registered Mac creator for Python files is 'Pyth'.  This
32235replaces 'PYTH' which was used before but never registered.
32236
32237- Added regsub.capwords().  (XXX)
32238
32239- Added string.capwords(), string.capitalize() and string.translate().
32240(XXX)
32241
32242- Fixed an interface bug in the rexec module: it was impossible to pass a
32243hooks instance to the RExec class.  rexec now also supports the dynamic
32244loading of modules from shared libraries.  Some other interfaces have been
32245added too.
32246
32247- Module rfc822 now caches the headers in a dictionary for more efficient
32248lookup.
32249
32250- The sgmllib module now understands a limited number of SGML "shorthands"
32251like <A/.../ for <A>...</A>.  (It's not clear that this was a good idea...)
32252
32253- The tempfile module actually tries a number of different places to find a
32254usable temporary directory.  (This was prompted by certain Linux
32255installations that appear to be missing a /usr/tmp directory.) [A bug in
32256the implementation that would ignore a pre-existing tmpdir global has been
32257fixed in beta3.]
32258
32259- Much improved and enhanved FileDialog module for Tkinter.
32260
32261- Many small changes to Tkinter, to bring it more in line with Tk 4.0 (as
32262well as Tk 4.1).
32263
32264- New socket interfaces include ntohs(), ntohl(), htons(), htonl(), and
32265s.dup().  Sockets now work correctly on Windows.  On Windows, the built-in
32266extension is called _socket and a wrapper module win/socket.py provides
32267"makefile()" and "dup()" functionality.  On Windows, the select module
32268works only with socket objects.
32269
32270- Bugs in bsddb module fixed (e.g. missing default argument values).
32271
32272- The curses extension now includes <ncurses.h> when available.
32273
32274- The gdbm module now supports opening databases in "fast" mode by
32275specifying 'f' as the second character or the mode string.
32276
32277- new variables sys.prefix and sys.exec_prefix pass corresponding
32278configuration options / Makefile variables to the Python programmer.
32279
32280- The ``new'' module now supports creating new user-defined classes as well
32281as instances thereof.
32282
32283- The soundex module now sports get_soundex() to get the soundex value for an
32284arbitrary string (formerly it would only do soundex-based string
32285comparison) as well as doc strings.
32286
32287- New object type "cobject" to safely wrap void pointers for passing them
32288between various extension modules.
32289
32290- More efficient computation of float**smallint.
32291
32292- The mysterious bug whereby "x.x" (two occurrences of the same
32293one-character name) typed from the commandline would sometimes fail
32294mysteriously.
32295
32296- The initialization of the readline function can now be invoked by a C
32297extension through PyOS_ReadlineInit().
32298
32299- There's now an externally visible pointer PyImport_FrozenModules which
32300can be changed by an embedding application.
32301
32302- The argument parsing functions now support a new format character 'D' to
32303specify complex numbers.
32304
32305- Various memory leaks plugged and bugs fixed.
32306
32307- Improved support for posix threads (now that real implementations are
32308beginning to apepar).  Still no fully functioning semaphores.
32309
32310- Some various and sundry improvements and new entries in the Tools
32311directory.
32312
32313
32314=====================================
32315==> Release 1.3 (13 October 1995) <==
32316=====================================
32317
32318Major change
32319============
32320
32321Two words: Keyword Arguments.  See the first section of Chapter 12 of
32322the Tutorial.
32323
32324(The rest of this file is textually the same as the remaining sections
32325of that chapter.)
32326
32327
32328Changes to the WWW and Internet tools
32329=====================================
32330
32331The "htmllib" module has been rewritten in an incompatible fashion.
32332The new version is considerably more complete (HTML 2.0 except forms,
32333but including all ISO-8859-1 entity definitions), and easy to use.
32334Small changes to "sgmllib" have also been made, to better match the
32335tokenization of HTML as recognized by other web tools.
32336
32337A new module "formatter" has been added, for use with the new
32338"htmllib" module.
32339
32340The "urllib"and "httplib" modules have been changed somewhat to allow
32341overriding unknown URL types and to support authentication.  They now
32342use "mimetools.Message" instead of "rfc822.Message" to parse headers.
32343The "endrequest()" method has been removed from the HTTP class since
32344it breaks the interaction with some servers.
32345
32346The "rfc822.Message" class has been changed to allow a flag to be
32347passed in that says that the file is unseekable.
32348
32349The "ftplib" module has been fixed to be (hopefully) more robust on
32350Linux.
32351
32352Several new operations that are optionally supported by servers have
32353been added to "nntplib": "xover", "xgtitle", "xpath" and "date".
32354
32355Other Language Changes
32356======================
32357
32358The "raise" statement now takes an optional argument which specifies
32359the traceback to be used when printing the exception's stack trace.
32360This must be a traceback object, such as found in "sys.exc_traceback".
32361When omitted or given as "None", the old behavior (to generate a stack
32362trace entry for the current stack frame) is used.
32363
32364The tokenizer is now more tolerant of alien whitespace.  Control-L in
32365the leading whitespace of a line resets the column number to zero,
32366while Control-R just before the end of the line is ignored.
32367
32368Changes to Built-in Operations
32369==============================
32370
32371For file objects, "f.read(0)" and "f.readline(0)" now return an empty
32372string rather than reading an unlimited number of bytes.  For the
32373latter, omit the argument altogether or pass a negative value.
32374
32375A new system variable, "sys.platform", has been added.  It specifies
32376the current platform, e.g. "sunos5" or "linux1".
32377
32378The built-in functions "input()" and "raw_input()" now use the GNU
32379readline library when it has been configured (formerly, only
32380interactive input to the interpreter itself was read using GNU
32381readline).  The GNU readline library provides elaborate line editing
32382and history.  The Python debugger ("pdb") is the first beneficiary of
32383this change.
32384
32385Two new built-in functions, "globals()" and "locals()", provide access
32386to dictionaries containming current global and local variables,
32387respectively.  (These augment rather than replace "vars()", which
32388returns the current local variables when called without an argument,
32389and a module's global variables when called with an argument of type
32390module.)
32391
32392The built-in function "compile()" now takes a third possible value for
32393the kind of code to be compiled: specifying "'single'" generates code
32394for a single interactive statement, which prints the output of
32395expression statements that evaluate to something else than "None".
32396
32397Library Changes
32398===============
32399
32400There are new module "ni" and "ihooks" that support importing modules
32401with hierarchical names such as "A.B.C".  This is enabled by writing
32402"import ni; ni.ni()" at the very top of the main program.  These
32403modules are amply documented in the Python source.
32404
32405The module "rexec" has been rewritten (incompatibly) to define a class
32406and to use "ihooks".
32407
32408The "string.split()" and "string.splitfields()" functions are now the
32409same function (the presence or absence of the second argument
32410determines which operation is invoked); similar for "string.join()"
32411and "string.joinfields()".
32412
32413The "Tkinter" module and its helper "Dialog" have been revamped to use
32414keyword arguments.  Tk 4.0 is now the standard.  A new module
32415"FileDialog" has been added which implements standard file selection
32416dialogs.
32417
32418The optional built-in modules "dbm" and "gdbm" are more coordinated
32419--- their "open()" functions now take the same values for their "flag"
32420argument, and the "flag" and "mode" argument have default values (to
32421open the database for reading only, and to create the database with
32422mode "0666" minuse the umask, respectively).  The memory leaks have
32423finally been fixed.
32424
32425A new dbm-like module, "bsddb", has been added, which uses the BSD DB
32426package's hash method.
32427
32428A portable (though slow) dbm-clone, implemented in Python, has been
32429added for systems where none of the above is provided.  It is aptly
32430dubbed "dumbdbm".
32431
32432The module "anydbm" provides a unified interface to "bsddb", "gdbm",
32433"dbm", and "dumbdbm", choosing the first one available.
32434
32435A new extension module, "binascii", provides a variety of operations
32436for conversion of text-encoded binary data.
32437
32438There are three new or rewritten companion modules implemented in
32439Python that can encode and decode the most common such formats: "uu"
32440(uuencode), "base64" and "binhex".
32441
32442A module to handle the MIME encoding quoted-printable has also been
32443added: "quopri".
32444
32445The parser module (which provides an interface to the Python parser's
32446abstract syntax trees) has been rewritten (incompatibly) by Fred
32447Drake.  It now lets you change the parse tree and compile the result!
32448
32449The \code{syslog} module has been upgraded and documented.
32450
32451Other Changes
32452=============
32453
32454The dynamic module loader recognizes the fact that different filenames
32455point to the same shared library and loads the library only once, so
32456you can have a single shared library that defines multiple modules.
32457(SunOS / SVR4 style shared libraries only.)
32458
32459Jim Fulton's ``abstract object interface'' has been incorporated into
32460the run-time API.  For more detailes, read the files
32461"Include/abstract.h" and "Objects/abstract.c".
32462
32463The Macintosh version is much more robust now.
32464
32465Numerous things I have forgotten or that are so obscure no-one will
32466notice them anyway :-)
32467
32468
32469===================================
32470==> Release 1.2 (13 April 1995) <==
32471===================================
32472
32473- Changes to Misc/python-mode.el:
32474  - Wrapping and indentation within triple quote strings should work
32475    properly now.
32476  - `Standard' bug reporting mechanism (use C-c C-b)
32477  - py-mark-block was moved to C-c C-m
32478  - C-c C-v shows you the python-mode version
32479  - a basic python-font-lock-keywords has been added for Emacs 19
32480    font-lock colorizations.
32481  - proper interaction with pending-del and del-sel modes.
32482  - New py-electric-colon (:) command for improved outdenting.  Also
32483    py-indent-line (TAB) should handle outdented lines better.
32484  - New commands py-outdent-left (C-c C-l) and py-indent-right (C-c C-r)
32485
32486- The Library Reference has been restructured, and many new and
32487existing modules are now documented, in particular the debugger and
32488the profiler, as well as the persistency and the WWW/Internet support
32489modules.
32490
32491- All known bugs have been fixed.  For example the pow(2,2,3L) bug on
32492Linux has been fixed.  Also the re-entrancy problems with __del__ have
32493been fixed.
32494
32495- All known memory leaks have been fixed.
32496
32497- Phase 2 of the Great Renaming has been executed.  The header files
32498now use the new names (PyObject instead of object, etc.).  The linker
32499also sees the new names.  Most source files still use the old names,
32500by virtue of the rename2.h header file.  If you include Python.h, you
32501only see the new names.  Dynamically linked modules have to be
32502recompiled.  (Phase 3, fixing the rest of the sources, will be
32503executed gradually with the release later versions.)
32504
32505- The hooks for implementing "safe-python" (better called "restricted
32506execution") are in place.  Specifically, the import statement is
32507implemented by calling the built-in function __import__, and the
32508built-in names used in a particular scope are taken from the
32509dictionary __builtins__ in that scope's global dictionary.  See also
32510the new (unsupported, undocumented) module rexec.py.
32511
32512- The import statement now supports the syntax "import a.b.c" and
32513"from a.b.c import name".  No officially supported implementation
32514exists, but one can be prototyped by replacing the built-in __import__
32515function.  A proposal by Ken Manheimer is provided as newimp.py.
32516
32517- All machinery used by the import statement (or the built-in
32518__import__ function) is now exposed through the new built-in module
32519"imp" (see the library reference manual).  All dynamic loading
32520machinery is moved to the new file importdl.c.
32521
32522- Persistent storage is supported through the use of the modules
32523"pickle" and "shelve" (implemented in Python).  There's also a "copy"
32524module implementing deepcopy and normal (shallow) copy operations.
32525See the library reference manual.
32526
32527- Documentation strings for many object types are accessible through
32528the __doc__ attribute.  Modules, classes and functions support special
32529syntax to initialize the __doc__ attribute: if the first statement
32530consists of just a string literal, that string literal becomes the
32531value of the __doc__ attribute.  The default __doc__ attribute is
32532None.  Documentation strings are also supported for built-in
32533functions, types and modules; however this feature hasn't been widely
32534used yet.  See the 'new' module for an example.  (Basically, the type
32535object's tp_doc field contains the doc string for the type, and the
325364th member of the methodlist structure contains the doc string for the
32537method.)
32538
32539- The __coerce__ and __cmp__ methods for user-defined classes once
32540again work as expected.  As an example, there's a new standard class
32541Complex in the library.
32542
32543- The functions posix.popen() and posix.fdopen() now have an optional
32544third argument to specify the buffer size, and default their second
32545(mode) argument to 'r' -- in analogy to the built-in open() function.
32546The same applies to posixfile.open() and the socket method makefile().
32547
32548- The thread.exit_thread() function now raises SystemExit so that
32549'finally' clauses are honored and a memory leak is plugged.
32550
32551- Improved X11 and Motif support, by Sjoerd Mullender.  This extension
32552is being maintained and distributed separately.
32553
32554- Improved support for the Apple Macintosh, in part by Jack Jansen,
32555e.g. interfaces to (a few) resource mananger functions, get/set file
32556type and creator, gestalt, sound manager, speech manager, MacTCP, comm
32557toolbox, and the think C console library.  This is being maintained
32558and distributed separately.
32559
32560- Improved version for Windows NT, by Mark Hammond.  This is being
32561maintained and distributed separately.
32562
32563- Used autoconf 2.0 to generate the configure script.  Adapted
32564configure.in to use the new features in autoconf 2.0.
32565
32566- It now builds on the NeXT without intervention, even on the 3.3
32567Sparc pre-release.
32568
32569- Characters passed to isspace() and friends are masked to nonnegative
32570values.
32571
32572- Correctly compute pow(-3.0, 3).
32573
32574- Fix portability problems with getopt (configure now checks for a
32575non-GNU getopt).
32576
32577- Don't add frozenmain.o to libPython.a.
32578
32579- Exceptions can now be classes.  ALl built-in exceptions are still
32580string objects, but this will change in the future.
32581
32582- The socket module exports a long list of socket related symbols.
32583(More built-in modules will export their symbolic constants instead of
32584relying on a separately generated Python module.)
32585
32586- When a module object is deleted, it clears out its own dictionary.
32587This fixes a circularity in the references between functions and
32588their global dictionary.
32589
32590- Changed the error handling by [new]getargs() e.g. for "O&".
32591
32592- Dynamic loading of modules using shared libraries is supported for
32593several new platforms.
32594
32595- Support "O&", "[...]" and "{...}" in mkvalue().
32596
32597- Extension to findmethod(): findmethodinchain() (where a chain is a
32598linked list of methodlist arrays).  The calling interface for
32599findmethod() has changed: it now gets a pointer to the (static!)
32600methodlist structure rather than just to the function name -- this
32601saves copying flags etc. into the (short-lived) method object.
32602
32603- The callable() function is now public.
32604
32605- Object types can define a few new operations by setting function
32606pointers in the type object structure: tp_call defines how an object
32607is called, and tp_str defines how an object's str() is computed.
32608
32609
32610===================================
32611==> Release 1.1.1 (10 Nov 1994) <==
32612===================================
32613
32614This is a pure bugfix release again.  See the ChangeLog file for details.
32615
32616One exception: a few new features were added to tkinter.
32617
32618
32619=================================
32620==> Release 1.1 (11 Oct 1994) <==
32621=================================
32622
32623This release adds several new features, improved configuration and
32624portability, and fixes more bugs than I can list here (including some
32625memory leaks).
32626
32627The source compiles and runs out of the box on more platforms than
32628ever -- including Windows NT.  Makefiles or projects for a variety of
32629non-UNIX platforms are provided.
32630
32631APOLOGY: some new features are badly documented or not at all.  I had
32632the choice -- postpone the new release indefinitely, or release it
32633now, with working code but some undocumented areas.  The problem with
32634postponing the release is that people continue to suffer from existing
32635bugs, and send me patches based on the previous release -- which I
32636can't apply directly because my own source has changed.  Also, some
32637new modules (like signal) have been ready for release for quite some
32638time, and people are anxiously waiting for them.  In the case of
32639signal, the interface is simple enough to figure out without
32640documentation (if you're anxious enough :-).  In this case it was not
32641simple to release the module on its own, since it relies on many small
32642patches elsewhere in the source.
32643
32644For most new Python modules, the source code contains comments that
32645explain how to use them.  Documentation for the Tk interface, written
32646by Matt Conway, is available as tkinter-doc.tar.gz from the Python
32647home and mirror ftp sites (see Misc/FAQ for ftp addresses).  For the
32648new operator overloading facilities, have a look at Demo/classes:
32649Complex.py and Rat.py show how to implement a numeric type without and
32650with __coerce__ method.  Also have a look at the end of the Tutorial
32651document (Doc/tut.tex).  If you're still confused: use the newsgroup
32652or mailing list.
32653
32654
32655New language features:
32656
32657    - More flexible operator overloading for user-defined classes
32658    (INCOMPATIBLE WITH PREVIOUS VERSIONS!)  See end of tutorial.
32659
32660    - Classes can define methods named __getattr__, __setattr__ and
32661    __delattr__ to trap attribute accesses.  See end of tutorial.
32662
32663    - Classes can define method __call__ so instances can be called
32664    directly.  See end of tutorial.
32665
32666
32667New support facilities:
32668
32669    - The Makefiles (for the base interpreter as well as for extensions)
32670    now support creating dynamically loadable modules if the platform
32671    supports shared libraries.
32672
32673    - Passing the interpreter a .pyc file as script argument will execute
32674    the code in that file.  (On the Mac such files can be double-clicked!)
32675
32676    - New Freeze script, to create independently distributable "binaries"
32677    of Python programs -- look in Demo/freeze
32678
32679    - Improved h2py script (in Demo/scripts) follows #includes and
32680    supports macros with one argument
32681
32682    - New module compileall generates .pyc files for all modules in a
32683    directory (tree) without also executing them
32684
32685    - Threads should work on more platforms
32686
32687
32688New built-in modules:
32689
32690    - tkinter (support for Tcl's Tk widget set) is now part of the base
32691    distribution
32692
32693    - signal allows catching or ignoring UNIX signals (unfortunately still
32694    undocumented -- any taker?)
32695
32696    - termios provides portable access to POSIX tty settings
32697
32698    - curses provides an interface to the System V curses library
32699
32700    - syslog provides an interface to the (BSD?) syslog daemon
32701
32702    - 'new' provides interfaces to create new built-in object types
32703    (e.g. modules and functions)
32704
32705    - sybase provides an interface to SYBASE database
32706
32707
32708New/obsolete built-in methods:
32709
32710    - callable(x) tests whether x can be called
32711
32712    - sockets now have a setblocking() method
32713
32714    - sockets no longer have an allowbroadcast() method
32715
32716    - socket methods send() and sendto() return byte count
32717
32718
32719New standard library modules:
32720
32721    - types.py defines standard names for built-in types, e.g. StringType
32722
32723    - urlparse.py parses URLs according to the latest Internet draft
32724
32725    - uu.py does uuencode/uudecode (not the fastest in the world, but
32726    quicker than installing uuencode on a non-UNIX machine :-)
32727
32728    - New, faster and more powerful profile module.py
32729
32730    - mhlib.py provides interface to MH folders and messages
32731
32732
32733New facilities for extension writers (unfortunately still
32734undocumented):
32735
32736    - newgetargs() supports optional arguments and improved error messages
32737
32738    - O!, O& O? formats for getargs allow more versatile type checking of
32739    non-standard types
32740
32741    - can register pending asynchronous callback, to be called the next
32742    time the Python VM begins a new instruction (Py_AddPendingCall)
32743
32744    - can register cleanup routines to be called when Python exits
32745    (Py_AtExit)
32746
32747    - makesetup script understands C++ files in Setup file (use file.C
32748    or file.cc)
32749
32750    - Make variable OPT is passed on to sub-Makefiles
32751
32752    - An init<module>() routine may signal an error by not entering
32753    the module in the module table and raising an exception instead
32754
32755    - For long module names, instead of foobarbletchmodule.c you can
32756    use foobarbletch.c
32757
32758    - getintvalue() and getfloatvalue() try to convert any object
32759    instead of requiring an "intobject" or "floatobject"
32760
32761    - All the [new]getargs() formats that retrieve an integer value
32762    will now also work if a float is passed
32763
32764    - C function listtuple() converts list to tuple, fast
32765
32766    - You should now call sigcheck() instead of intrcheck();
32767    sigcheck() also sets an exception when it returns nonzero
32768
32769
32770====================================
32771==> Release 1.0.3 (14 July 1994) <==
32772====================================
32773
32774This release consists entirely of bug fixes to the C sources; see the
32775head of ../ChangeLog for a complete list.  Most important bugs fixed:
32776
32777- Sometimes the format operator (string%expr) would drop the last
32778character of the format string
32779
32780- Tokenizer looped when last line did not end in \n
32781
32782- Bug when triple-quoted string ended in quote plus newline
32783
32784- Typo in socketmodule (listen) (== instead of =)
32785
32786- typing vars() at the >>> prompt would cause recursive output
32787
32788
32789==================================
32790==> Release 1.0.2 (4 May 1994) <==
32791==================================
32792
32793Overview of the most visible changes.  Bug fixes are not listed.  See
32794also ChangeLog.
32795
32796Tokens
32797------
32798
32799* String literals follow Standard C rules: they may be continued on
32800the next line using a backslash; adjacent literals are concatenated
32801at compile time.
32802
32803* A new kind of string literals, surrounded by triple quotes (""" or
32804'''), can be continued on the next line without a backslash.
32805
32806Syntax
32807------
32808
32809* Function arguments may have a default value, e.g. def f(a, b=1);
32810defaults are evaluated at function definition time.  This also applies
32811to lambda.
32812
32813* The try-except statement has an optional else clause, which is
32814executed when no exception occurs in the try clause.
32815
32816Interpreter
32817-----------
32818
32819* The result of a statement-level expression is no longer printed,
32820except_ for expressions entered interactively.  Consequently, the -k
32821command line option is gone.
32822
32823* The result of the last printed interactive expression is assigned to
32824the variable '_'.
32825
32826* Access to implicit global variables has been speeded up by removing
32827an always-failing dictionary lookup in the dictionary of local
32828variables (mod suggested by Steve Makewski and Tim Peters).
32829
32830* There is a new command line option, -u, to force stdout and stderr
32831to be unbuffered.
32832
32833* Incorporated Steve Majewski's mods to import.c for dynamic loading
32834under AIX.
32835
32836* Fewer chances of dumping core when trying to reload or re-import
32837static built-in, dynamically loaded built-in, or frozen modules.
32838
32839* Loops over sequences now don't ask for the sequence's length when
32840they start, but try to access items 0, 1, 2, and so on until they hit
32841an IndexError.  This makes it possible to create classes that generate
32842infinite or indefinite sequences a la Steve Majewski.  This affects
32843for loops, the (not) in operator, and the built-in functions filter(),
32844map(), max(), min(), reduce().
32845
32846Changed Built-in operations
32847---------------------------
32848
32849* The '%' operator on strings (printf-style formatting) supports a new
32850feature (adapted from a patch by Donald Beaudry) to allow
32851'%(<key>)<format>' % {...} to take values from a dictionary by name
32852instead of from a tuple by position (see also the new function
32853vars()).
32854
32855* The '%s' formatting operator is changed to accept any type and
32856convert it to a string using str().
32857
32858* Dictionaries with more than 20,000 entries can now be created
32859(thanks to Steve Kirsch).
32860
32861New Built-in Functions
32862----------------------
32863
32864* vars() returns a dictionary containing the local variables; vars(m)
32865returns a dictionary containing the variables of module m.  Note:
32866dir(x) is now equivalent to vars(x).keys().
32867
32868Changed Built-in Functions
32869--------------------------
32870
32871* open() has an optional third argument to specify the buffer size: 0
32872for unbuffered, 1 for line buffered, >1 for explicit buffer size, <0
32873for default.
32874
32875* open()'s second argument is now optional; it defaults to "r".
32876
32877* apply() now checks that its second argument is indeed a tuple.
32878
32879New Built-in Modules
32880--------------------
32881
32882Changed Built-in Modules
32883------------------------
32884
32885The thread module no longer supports exit_prog().
32886
32887New Python Modules
32888------------------
32889
32890* Module addpack contains a standard interface to modify sys.path to
32891find optional packages (groups of related modules).
32892
32893* Module urllib contains a number of functions to access
32894World-Wide-Web files specified by their URL.
32895
32896* Module httplib implements the client side of the HTTP protocol used
32897by World-Wide-Web servers.
32898
32899* Module gopherlib implements the client side of the Gopher protocol.
32900
32901* Module mailbox (by Jack Jansen) contains a parser for UNIX and MMDF
32902style mailbox files.
32903
32904* Module random contains various random distributions, e.g. gauss().
32905
32906* Module lockfile locks and unlocks open files using fcntl (inspired
32907by a similar module by Andy Bensky).
32908
32909* Module ntpath (by Jaap Vermeulen) implements path operations for
32910Windows/NT.
32911
32912* Module test_thread (in Lib/test) contains a small test set for the
32913thread module.
32914
32915Changed Python Modules
32916----------------------
32917
32918* The string module's expandvars() function is now documented and is
32919implemented in Python (using regular expressions) instead of forking
32920off a shell process.
32921
32922* Module rfc822 now supports accessing the header fields using the
32923mapping/dictionary interface, e.g. h['subject'].
32924
32925* Module pdb now makes it possible to set a break on a function
32926(syntax: break <expression>, where <expression> yields a function
32927object).
32928
32929Changed Demos
32930-------------
32931
32932* The Demo/scripts/freeze.py script is working again (thanks to Jaap
32933Vermeulen).
32934
32935New Demos
32936---------
32937
32938* Demo/threads/Generator.py is a proposed interface for restartable
32939functions a la Tim Peters.
32940
32941* Demo/scripts/newslist.py, by Quentin Stafford-Fraser, generates a
32942directory full of HTML pages which between them contain links to all
32943the newsgroups available on your server.
32944
32945* Demo/dns contains a DNS (Domain Name Server) client.
32946
32947* Demo/lutz contains miscellaneous demos by Mark Lutz (e.g. psh.py, a
32948nice enhanced Python shell!!!).
32949
32950* Demo/turing contains a Turing machine by Amrit Prem.
32951
32952Documentation
32953-------------
32954
32955* Documented new language features mentioned above (but not all new
32956modules).
32957
32958* Added a chapter to the Tutorial describing recent additions to
32959Python.
32960
32961* Clarified some sentences in the reference manual,
32962e.g. break/continue, local/global scope, slice assignment.
32963
32964Source Structure
32965----------------
32966
32967* Moved Include/tokenizer.h to Parser/tokenizer.h.
32968
32969* Added Python/getopt.c for systems that don't have it.
32970
32971Emacs mode
32972----------
32973
32974* Indentation of continuated lines is done more intelligently;
32975consequently the variable py-continuation-offset is gone.
32976
32977
32978========================================
32979==> Release 1.0.1 (15 February 1994) <==
32980========================================
32981
32982* Many portability fixes should make it painless to build Python on
32983several new platforms, e.g. NeXT, SEQUENT, WATCOM, DOS, and Windows.
32984
32985* Fixed test for <stdarg.h> -- this broke on some platforms.
32986
32987* Fixed test for shared library dynalic loading -- this broke on SunOS
329884.x using the GNU loader.
32989
32990* Changed order and number of SVR4 networking libraries (it is now
32991-lsocket -linet -lnsl, if these libraries exist).
32992
32993* Installing the build intermediate stages with "make libainstall" now
32994also installs config.c.in, Setup and makesetup, which are used by the
32995new Extensions mechanism.
32996
32997* Improved README file contains more hints and new troubleshooting
32998section.
32999
33000* The built-in module strop now defines fast versions of three more
33001functions of the standard string module: atoi(), atol() and atof().
33002The strop versions of atoi() and atol() support an optional second
33003argument to specify the base (default 10).  NOTE: you don't have to
33004explicitly import strop to use the faster versions -- the string
33005module contains code to let versions from stop override the default
33006versions.
33007
33008* There is now a working Lib/dospath.py for those who use Python under
33009DOS (or Windows).  Thanks, Jaap!
33010
33011* There is now a working Modules/dosmodule.c for DOS (or Windows)
33012system calls.
33013
33014* Lib.os.py has been reorganized (making it ready for more operating
33015systems).
33016
33017* Lib/ospath.py is now obsolete (use os.path instead).
33018
33019* Many fixes to the tutorial to make it match Python 1.0.  Thanks,
33020Tim!
33021
33022* Fixed Doc/Makefile, Doc/README and various scripts there.
33023
33024* Added missing description of fdopen to Doc/libposix.tex.
33025
33026* Made cleanup() global, for the benefit of embedded applications.
33027
33028* Added parsing of addresses and dates to Lib/rfc822.py.
33029
33030* Small fixes to Lib/aifc.py, Lib/sunau.py, Lib/tzparse.py to make
33031them usable at all.
33032
33033* New module Lib/wave.py reads RIFF (*.wav) audio files.
33034
33035* Module Lib/filewin.py moved to Lib/stdwin/filewin.py where it
33036belongs.
33037
33038* New options and comments for Modules/makesetup (used by new
33039Extension mechanism).
33040
33041* Misc/HYPE contains text of announcement of 1.0.0 in comp.lang.misc
33042and elsewhere.
33043
33044* Fixed coredump in filter(None, 'abcdefg').
33045
33046
33047=======================================
33048==> Release 1.0.0 (26 January 1994) <==
33049=======================================
33050
33051As is traditional, so many things have changed that I can't pretend to
33052be complete in these release notes, but I'll try anyway :-)
33053
33054Note that the very last section is labeled "remaining bugs".
33055
33056
33057Source organization and build process
33058-------------------------------------
33059
33060* The sources have finally been split: instead of a single src
33061subdirectory there are now separate directories Include, Parser,
33062Grammar, Objects, Python and Modules.  Other directories also start
33063with a capital letter: Misc, Doc, Lib, Demo.
33064
33065* A few extensions (notably Amoeba and X support) have been moved to a
33066separate subtree Extensions, which is no longer in the core
33067distribution, but separately ftp'able as extensions.tar.Z.  (The
33068distribution contains a placeholder Ext-dummy with a description of
33069the Extensions subtree as well as the most recent versions of the
33070scripts used there.)
33071
33072* A few large specialized demos (SGI video and www) have been
33073moved to a separate subdirectory Demo2, which is no longer in the core
33074distribution, but separately ftp'able as demo2.tar.Z.
33075
33076* Parts of the standard library have been moved to subdirectories:
33077there are now standard subdirectories stdwin, test, sgi and sun4.
33078
33079* The configuration process has radically changed: I now use GNU
33080autoconf.  This makes it much easier to build on new Unix flavors, as
33081well as fully supporting VPATH (if your Make has it).  The scripts
33082Configure.py and Addmodule.sh are no longer needed.  Many source files
33083have been adapted in order to work with the symbols that the configure
33084script generated by autoconf defines (or not); the resulting source is
33085much more portable to different C compilers and operating systems,
33086even non Unix systems (a Mac port was done in an afternoon).  See the
33087toplevel README file for a description of the new build process.
33088
33089* GNU readline (a slightly newer version) is now a subdirectory of the
33090Python toplevel.  It is still not automatically configured (being
33091totally autoconf-unaware :-).  One problem has been solved: typing
33092Control-C to a readline prompt will now work.  The distribution no
33093longer contains a "super-level" directory (above the python toplevel
33094directory), and dl, dl-dld and GNU dld are no longer part of the
33095Python distribution (you can still ftp them from
33096ftp.cwi.nl:/pub/dynload).
33097
33098* The DOS functions have been taken out of posixmodule.c and moved
33099into a separate file dosmodule.c.
33100
33101* There's now a separate file version.c which contains nothing but
33102the version number.
33103
33104* The actual main program is now contained in config.c (unless NO_MAIN
33105is defined); pythonmain.c now contains a function realmain() which is
33106called from config.c's main().
33107
33108* All files needed to use the built-in module md5 are now contained in
33109the distribution.  The module has been cleaned up considerably.
33110
33111
33112Documentation
33113-------------
33114
33115* The library manual has been split into many more small latex files,
33116so it is easier to edit Doc/lib.tex file to create a custom library
33117manual, describing only those modules supported on your system.  (This
33118is not automated though.)
33119
33120* A fourth manual has been added, titled "Extending and Embedding the
33121Python Interpreter" (Doc/ext.tex), which collects information about
33122the interpreter which was previously spread over several files in the
33123misc subdirectory.
33124
33125* The entire documentation is now also available on-line for those who
33126have a WWW browser (e.g. NCSA Mosaic).  Point your browser to the URL
33127"http://www.cwi.nl/~guido/Python.html".
33128
33129
33130Syntax
33131------
33132
33133* Strings may now be enclosed in double quotes as well as in single
33134quotes.  There is no difference in interpretation.  The repr() of
33135string objects will use double quotes if the string contains a single
33136quote and no double quotes.  Thanks to Amrit Prem for these changes!
33137
33138* There is a new keyword 'exec'.  This replaces the exec() built-in
33139function.  If a function contains an exec statement, local variable
33140optimization is not performed for that particular function, thus
33141making assignment to local variables in exec statements less
33142confusing.  (As a consequence, os.exec and python.exec have been
33143renamed to execv.)
33144
33145* There is a new keyword 'lambda'.  An expression of the form
33146
33147	lambda <parameters> : <expression>
33148
33149yields an anonymous function.  This is really only syntactic sugar;
33150you can just as well define a local function using
33151
33152	def some_temporary_name(<parameters>): return <expression>
33153
33154Lambda expressions are particularly useful in combination with map(),
33155filter() and reduce(), described below.  Thanks to Amrit Prem for
33156submitting this code (as well as map(), filter(), reduce() and
33157xrange())!
33158
33159
33160Built-in functions
33161------------------
33162
33163* The built-in module containing the built-in functions is called
33164__builtin__ instead of builtin.
33165
33166* New built-in functions map(), filter() and reduce() perform standard
33167functional programming operations (though not lazily):
33168
33169- map(f, seq) returns a new sequence whose items are the items from
33170seq with f() applied to them.
33171
33172- filter(f, seq) returns a subsequence of seq consisting of those
33173items for which f() is true.
33174
33175- reduce(f, seq, initial) returns a value computed as follows:
33176	acc = initial
33177	for item in seq: acc = f(acc, item)
33178	return acc
33179
33180* New function xrange() creates a "range object".  Its arguments are
33181the same as those of range(), and when used in a for loop a range
33182objects also behaves identical.  The advantage of xrange() over
33183range() is that its representation (if the range contains many
33184elements) is much more compact than that of range().  The disadvantage
33185is that the result cannot be used to initialize a list object or for
33186the "Python idiom" [RED, GREEN, BLUE] = range(3).  On some modern
33187architectures, benchmarks have shown that "for i in range(...): ..."
33188actually executes *faster* than "for i in xrange(...): ...", but on
33189memory starved machines like PCs running DOS range(100000) may be just
33190too big to be represented at all...
33191
33192* Built-in function exec() has been replaced by the exec statement --
33193see above.
33194
33195
33196The interpreter
33197---------------
33198
33199* Syntax errors are now not printed to stderr by the parser, but
33200rather the offending line and other relevant information are packed up
33201in the SyntaxError exception argument.  When the main loop catches a
33202SyntaxError exception it will print the error in the same format as
33203previously, but at the proper position in the stack traceback.
33204
33205* You can now set a maximum to the number of traceback entries
33206printed by assigning to sys.tracebacklimit.  The default is 1000.
33207
33208* The version number in .pyc files has changed yet again.
33209
33210* It is now possible to have a .pyc file without a corresponding .py
33211file.  (Warning: this may break existing installations if you have an
33212old .pyc file lingering around somewhere on your module search path
33213without a corresponding .py file, when there is a .py file for a
33214module of the same name further down the path -- the new interpreter
33215will find the first .pyc file and complain about it, while the old
33216interpreter would ignore it and use the .py file further down.)
33217
33218* The list sys.builtin_module_names is now sorted and also contains
33219the names of a few hardwired built-in modules (sys, __main__ and
33220__builtin__).
33221
33222* A module can now find its own name by accessing the global variable
33223__name__.  Assigning to this variable essentially renames the module
33224(it should also be stored under a different key in sys.modules).
33225A neat hack follows from this: a module that wants to execute a main
33226program when called as a script no longer needs to compare
33227sys.argv[0]; it can simply do "if __name__ == '__main__': main()".
33228
33229* When an object is printed by the print statement, its implementation
33230of str() is used.  This means that classes can define __str__(self) to
33231direct how their instances are printed.  This is different from
33232__repr__(self), which should define an unambigous string
33233representation of the instance.  (If __str__() is not defined, it
33234defaults to __repr__().)
33235
33236* Functions and code objects can now be compared meaningfully.
33237
33238* On systems supporting SunOS or SVR4 style shared libraries, dynamic
33239loading of modules using shared libraries is automatically configured.
33240Thanks to Bill Jansen and Denis Severson for contributing this change!
33241
33242
33243Built-in objects
33244----------------
33245
33246* File objects have acquired a new method writelines() which is the
33247reverse of readlines().  (It does not actually write lines, just a
33248list of strings, but the symmetry makes the choice of name OK.)
33249
33250
33251Built-in modules
33252----------------
33253
33254* Socket objects no longer support the avail() method.  Use the select
33255module instead, or use this function to replace it:
33256
33257	def avail(f):
33258		import select
33259		return f in select.select([f], [], [], 0)[0]
33260
33261* Initialization of stdwin is done differently.  It actually modifies
33262sys.argv (taking out the options the X version of stdwin recognizes)
33263the first time it is imported.
33264
33265* A new built-in module parser provides a rudimentary interface to the
33266python parser.  Corresponding standard library modules token and symbol
33267defines the numeric values of tokens and non-terminal symbols.
33268
33269* The posix module has acquired new functions setuid(), setgid(),
33270execve(), and exec() has been renamed to execv().
33271
33272* The array module is extended with 8-byte object swaps, the 'i'
33273format character, and a reverse() method.  The read() and write()
33274methods are renamed to fromfile() and tofile().
33275
33276* The rotor module has freed of portability bugs.  This introduces a
33277backward compatibility problem: strings encoded with the old rotor
33278module can't be decoded by the new version.
33279
33280* For select.select(), a timeout (4th) argument of None means the same
33281as leaving the timeout argument out.
33282
33283* Module strop (and hence standard library module string) has acquired
33284a new function: rindex().  Thanks to Amrit Prem!
33285
33286* Module regex defines a new function symcomp() which uses an extended
33287regular expression syntax: parenthesized subexpressions may be labeled
33288using the form "\(<labelname>...\)", and the group() method can return
33289sub-expressions by name.  Thanks to Tracy Tims for these changes!
33290
33291* Multiple threads are now supported on Solaris 2.  Thanks to Sjoerd
33292Mullender!
33293
33294
33295Standard library modules
33296------------------------
33297
33298* The library is now split in several subdirectories: all stuff using
33299stdwin is in Lib/stdwin, all SGI specific (or SGI Indigo or GL) stuff
33300is in Lib/sgi, all Sun Sparc specific stuff is in Lib/sun4, and all
33301test modules are in Lib/test.  The default module search path will
33302include all relevant subdirectories by default.
33303
33304* Module os now knows about trying to import dos.  It defines
33305functions execl(), execle(), execlp() and execvp().
33306
33307* New module dospath (should be attacked by a DOS hacker though).
33308
33309* All modules defining classes now define __init__() constructors
33310instead of init() methods.  THIS IS AN INCOMPATIBLE CHANGE!
33311
33312* Some minor changes and bugfixes module ftplib (mostly Steve
33313Majewski's suggestions); the debug() method is renamed to
33314set_debuglevel().
33315
33316* Some new test modules (not run automatically by testall though):
33317test_audioop, test_md5, test_rgbimg, test_select.
33318
33319* Module string now defines rindex() and rfind() in analogy of index()
33320and find().  It also defines atof() and atol() (and corresponding
33321exceptions) in analogy to atoi().
33322
33323* Added help() functions to modules profile and pdb.
33324
33325* The wdb debugger (now in Lib/stdwin) now shows class or instance
33326variables on a double click.  Thanks to Sjoerd Mullender!
33327
33328* The (undocumented) module lambda has gone -- you couldn't import it
33329any more, and it was basically more a demo than a library module...
33330
33331
33332Multimedia extensions
33333---------------------
33334
33335* The optional built-in modules audioop and imageop are now standard
33336parts of the interpreter.  Thanks to Sjoerd Mullender and Jack Jansen
33337for contributing this code!
33338
33339* There's a new operation in audioop: minmax().
33340
33341* There's a new built-in module called rgbimg which supports portable
33342efficient reading of SGI RCG image files.  Thanks also to Paul
33343Haeberli for the original code!  (Who will contribute a GIF reader?)
33344
33345* The module aifc is gone -- you should now always use aifc, which has
33346received a facelift.
33347
33348* There's a new module sunau., for reading Sun (and NeXT) audio files.
33349
33350* There's a new module audiodev which provides a uniform interface to
33351(SGI Indigo and Sun Sparc) audio hardware.
33352
33353* There's a new module sndhdr which recognizes various sound files by
33354looking in their header and checking for various magic words.
33355
33356
33357Optimizations
33358-------------
33359
33360* Most optimizations below can be configured by compile-time flags.
33361Thanks to Sjoerd Mullender for submitting these optimizations!
33362
33363* Small integers (default -1..99) are shared -- i.e. if two different
33364functions compute the same value it is possible (but not
33365guaranteed!!!) that they return the same *object*.  Python programs
33366can detect this but should *never* rely on it.
33367
33368* Empty tuples (which all compare equal) are shared in the same
33369manner.
33370
33371* Tuples of size up to 20 (default) are put in separate free lists
33372when deallocated.
33373
33374* There is a compile-time option to cache a string's hash function,
33375but this appeared to have a negligeable effect, and as it costs 4
33376bytes per string it is disabled by default.
33377
33378
33379Embedding Python
33380----------------
33381
33382* The initialization interface has been simplified somewhat.  You now
33383only call "initall()" to initialize the interpreter.
33384
33385* The previously announced renaming of externally visible identifiers
33386has not been carried out.  It will happen in a later release.  Sorry.
33387
33388
33389Miscellaneous bugs that have been fixed
33390---------------------------------------
33391
33392* All known portability bugs.
33393
33394* Version 0.9.9 dumped core in <listobject>.sort() which has been
33395fixed.  Thanks to Jaap Vermeulen for fixing this and posting the fix
33396on the mailing list while I was away!
33397
33398* Core dump on a format string ending in '%', e.g. in the expression
33399'%' % None.
33400
33401* The array module yielded a bogus result for concatenation (a+b would
33402yield a+a).
33403
33404* Some serious memory leaks in strop.split() and strop.splitfields().
33405
33406* Several problems with the nis module.
33407
33408* Subtle problem when copying a class method from another class
33409through assignment (the method could not be called).
33410
33411
33412Remaining bugs
33413--------------
33414
33415* One problem with 64-bit machines remains -- since .pyc files are
33416portable and use only 4 bytes to represent an integer object, 64-bit
33417integer literals are silently truncated when written into a .pyc file.
33418Work-around: use eval('123456789101112').
33419
33420* The freeze script doesn't work any more.  A new and more portable
33421one can probably be cooked up using tricks from Extensions/mkext.py.
33422
33423* The dos support hasn't been tested yet.  (Really Soon Now we should
33424have a PC with a working C compiler!)
33425
33426
33427===================================
33428==> Release 0.9.9 (29 Jul 1993) <==
33429===================================
33430
33431I *believe* these are the main user-visible changes in this release,
33432but there may be others.  SGI users may scan the {src,lib}/ChangeLog
33433files for improvements of some SGI specific modules, e.g. aifc and
33434cl.  Developers of extension modules should also read src/ChangeLog.
33435
33436
33437Naming of C symbols used by the Python interpreter
33438--------------------------------------------------
33439
33440* This is the last release using the current naming conventions.  New
33441naming conventions are explained in the file misc/NAMING.
33442Summarizing, all externally visible symbols get (at least) a "Py"
33443prefix, and most functions are renamed to the standard form
33444PyModule_FunctionName.
33445
33446* Writers of extensions are urged to start using the new naming
33447conventions.  The next release will use the new naming conventions
33448throughout (it will also have a different source directory
33449structure).
33450
33451* As a result of the preliminary work for the great renaming, many
33452functions that were accidentally global have been made static.
33453
33454
33455BETA X11 support
33456----------------
33457
33458* There are now modules interfacing to the X11 Toolkit Intrinsics, the
33459Athena widgets, and the Motif 1.1 widget set.  These are not yet
33460documented except through the examples and README file in the demo/x11
33461directory.  It is expected that this interface will be replaced by a
33462more powerful and correct one in the future, which may or may not be
33463backward compatible.  In other words, this part of the code is at most
33464BETA level software!  (Note: the rest of Python is rock solid as ever!)
33465
33466* I understand that the above may be a bit of a disappointment,
33467however my current schedule does not allow me to change this situation
33468before putting the release out of the door.  By releasing it
33469undocumented and buggy, at least some of the (working!) demo programs,
33470like itr (my Internet Talk Radio browser) become available to a larger
33471audience.
33472
33473* There are also modules interfacing to SGI's "Glx" widget (a GL
33474window wrapped in a widget) and to NCSA's "HTML" widget (which can
33475format HyperText Markup Language, the document format used by the
33476World Wide Web).
33477
33478* I've experienced some problems when building the X11 support.  In
33479particular, the Xm and Xaw widget sets don't go together, and it
33480appears that using X11R5 is better than using X11R4.  Also the threads
33481module and its link time options may spoil things.  My own strategy is
33482to build two Python binaries: one for use with X11 and one without
33483it, which can contain a richer set of built-in modules.  Don't even
33484*think* of loading the X11 modules dynamically...
33485
33486
33487Environmental changes
33488---------------------
33489
33490* Compiled files (*.pyc files) created by this Python version are
33491incompatible with those created by the previous version.  Both
33492versions detect this and silently create a correct version, but it
33493means that it is not a good idea to use the same library directory for
33494an old and a new interpreter, since they will start to "fight" over
33495the *.pyc files...
33496
33497* When a stack trace is printed, the exception is printed last instead
33498of first.  This means that if the beginning of the stack trace
33499scrolled out of your window you can still see what exception caused
33500it.
33501
33502* Sometimes interrupting a Python operation does not work because it
33503hangs in a blocking system call.  You can now kill the interpreter by
33504interrupting it three times.  The second time you interrupt it, a
33505message will be printed telling you that the third interrupt will kill
33506the interpreter.  The "sys.exitfunc" feature still makes limited
33507clean-up possible in this case.
33508
33509
33510Changes to the command line interface
33511-------------------------------------
33512
33513* The python usage message is now much more informative.
33514
33515* New option -i enters interactive mode after executing a script --
33516useful for debugging.
33517
33518* New option -k raises an exception when an expression statement
33519yields a value other than None.
33520
33521* For each option there is now also a corresponding environment
33522variable.
33523
33524
33525Using Python as an embedded language
33526------------------------------------
33527
33528* The distribution now contains (some) documentation on the use of
33529Python as an "embedded language" in other applications, as well as a
33530simple example.  See the file misc/EMBEDDING and the directory embed/.
33531
33532
33533Speed improvements
33534------------------
33535
33536* Function local variables are now generally stored in an array and
33537accessed using an integer indexing operation, instead of through a
33538dictionary lookup.  (This compensates the somewhat slower dictionary
33539lookup caused by the generalization of the dictionary module.)
33540
33541
33542Changes to the syntax
33543---------------------
33544
33545* Continuation lines can now *sometimes* be written without a
33546backslash: if the continuation is contained within nesting (), [] or
33547{} brackets the \ may be omitted.  There's a much improved
33548python-mode.el in the misc directory which knows about this as well.
33549
33550* You can no longer use an empty set of parentheses to define a class
33551without base classes.  That is, you no longer write this:
33552
33553	class Foo(): # syntax error
33554		...
33555
33556You must write this instead:
33557
33558	class Foo:
33559		...
33560
33561This was already the preferred syntax in release 0.9.8 but many
33562people seemed not to have picked it up.  There's a Python script that
33563fixes old code: demo/scripts/classfix.py.
33564
33565* There's a new reserved word: "access".  The syntax and semantics are
33566still subject of research and debate (as well as undocumented), but
33567the parser knows about the keyword so you must not use it as a
33568variable, function, or attribute name.
33569
33570
33571Changes to the semantics of the language proper
33572-----------------------------------------------
33573
33574* The following compatibility hack is removed: if a function was
33575defined with two or more arguments, and called with a single argument
33576that was a tuple with just as many arguments, the items of this tuple
33577would be used as the arguments.  This is no longer supported.
33578
33579
33580Changes to the semantics of classes and instances
33581-------------------------------------------------
33582
33583* Class variables are now also accessible as instance variables for
33584reading (assignment creates an instance variable which overrides the
33585class variable of the same name though).
33586
33587* If a class attribute is a user-defined function, a new kind of
33588object is returned: an "unbound method".  This contains a pointer to
33589the class and can only be called with a first argument which is a
33590member of that class (or a derived class).
33591
33592* If a class defines a method __init__(self, arg1, ...) then this
33593method is called when a class instance is created by the classname()
33594construct.  Arguments passed to classname() are passed to the
33595__init__() method.  The __init__() methods of base classes are not
33596automatically called; the derived __init__() method must call these if
33597necessary (this was done so the derived __init__() method can choose
33598the call order and arguments for the base __init__() methods).
33599
33600* If a class defines a method __del__(self) then this method is called
33601when an instance of the class is about to be destroyed.  This makes it
33602possible to implement clean-up of external resources attached to the
33603instance.  As with __init__(), the __del__() methods of base classes
33604are not automatically called.  If __del__ manages to store a reference
33605to the object somewhere, its destruction is postponed; when the object
33606is again about to be destroyed its __del__() method will be called
33607again.
33608
33609* Classes may define a method __hash__(self) to allow their instances
33610to be used as dictionary keys.  This must return a 32-bit integer.
33611
33612
33613Minor improvements
33614------------------
33615
33616* Function and class objects now know their name (the name given in
33617the 'def' or 'class' statement that created them).
33618
33619* Class instances now know their class name.
33620
33621
33622Additions to built-in operations
33623--------------------------------
33624
33625* The % operator with a string left argument implements formatting
33626similar to sprintf() in C.  The right argument is either a single
33627value or a tuple of values.  All features of Standard C sprintf() are
33628supported except %p.
33629
33630* Dictionaries now support almost any key type, instead of just
33631strings.  (The key type must be an immutable type or must be a class
33632instance where the class defines a method __hash__(), in order to
33633avoid losing track of keys whose value may change.)
33634
33635* Built-in methods are now compared properly: when comparing x.meth1
33636and y.meth2, if x is equal to y and the methods are defined by the
33637same function, x.meth1 compares equal to y.meth2.
33638
33639
33640Additions to built-in functions
33641-------------------------------
33642
33643* str(x) returns a string version of its argument.  If the argument is
33644a string it is returned unchanged, otherwise it returns `x`.
33645
33646* repr(x) returns the same as `x`.  (Some users found it easier to
33647have this as a function.)
33648
33649* round(x) returns the floating point number x rounded to a whole
33650number, represented as a floating point number.  round(x, n) returns x
33651rounded to n digits.
33652
33653* hasattr(x, name) returns true when x has an attribute with the given
33654name.
33655
33656* hash(x) returns a hash code (32-bit integer) of an arbitrary
33657immutable object's value.
33658
33659* id(x) returns a unique identifier (32-bit integer) of an arbitrary
33660object.
33661
33662* compile() compiles a string to a Python code object.
33663
33664* exec() and eval() now support execution of code objects.
33665
33666
33667Changes to the documented part of the library (standard modules)
33668----------------------------------------------------------------
33669
33670* os.path.normpath() (a.k.a. posixpath.normpath()) has been fixed so
33671the border case '/foo/..' returns '/' instead of ''.
33672
33673* A new function string.find() is added with similar semantics to
33674string.index(); however when it does not find the given substring it
33675returns -1 instead of raising string.index_error.
33676
33677
33678Changes to built-in modules
33679---------------------------
33680
33681* New optional module 'array' implements operations on sequences of
33682integers or floating point numbers of a particular size.  This is
33683useful to manipulate large numerical arrays or to read and write
33684binary files consisting of numerical data.
33685
33686* Regular expression objects created by module regex now support a new
33687method named group(), which returns one or more \(...\) groups by number.
33688The number of groups is increased from 10 to 100.
33689
33690* Function compile() in module regex now supports an optional mapping
33691argument; a variable casefold is added to the module which can be used
33692as a standard uppercase to lowercase mapping.
33693
33694* Module time now supports many routines that are defined in the
33695Standard C time interface (<time.h>): gmtime(), localtime(),
33696asctime(), ctime(), mktime(), as well as these variables (taken from
33697System V): timezone, altzone, daylight and tzname.  (The corresponding
33698functions in the undocumented module calendar have been removed; the
33699undocumented and unfinished module tzparse is now obsolete and will
33700disappear in a future release.)
33701
33702* Module strop (the fast built-in version of standard module string)
33703now uses C's definition of whitespace instead of fixing it to space,
33704tab and newline; in practice this usually means that vertical tab,
33705form feed and return are now also considered whitespace.  It exports
33706the string of characters that are considered whitespace as well as the
33707characters that are considered lowercase or uppercase.
33708
33709* Module sys now defines the variable builtin_module_names, a list of
33710names of modules built into the current interpreter (including not
33711yet imported, but excluding two special modules that always have to be
33712defined -- sys and builtin).
33713
33714* Objects created by module sunaudiodev now also support flush() and
33715close() methods.
33716
33717* Socket objects created by module socket now support an optional
33718flags argument for their methods sendto() and recvfrom().
33719
33720* Module marshal now supports dumping to and loading from strings,
33721through the functions dumps() and loads().
33722
33723* Module stdwin now supports some new functionality.  You may have to
33724ftp the latest version: ftp.cwi.nl:/pub/stdwin/stdwinforviews.tar.Z.)
33725
33726
33727Bugs fixed
33728----------
33729
33730* Fixed comparison of negative long integers.
33731
33732* The tokenizer no longer botches input lines longer than BUFSIZ.
33733
33734* Fixed several severe memory leaks in module select.
33735
33736* Fixed memory leaks in modules socket and sv.
33737
33738* Fixed memory leak in divmod() for long integers.
33739
33740* Problems with definition of floatsleep() on Suns fixed.
33741
33742* Many portability bugs fixed (and undoubtedly new ones added :-).
33743
33744
33745Changes to the build procedure
33746------------------------------
33747
33748* The Makefile supports some new targets: "make default" and "make
33749all".  Both are by normally equivalent to "make python".
33750
33751* The Makefile no longer uses $> since it's not supported by all
33752versions of Make.
33753
33754* The header files now all contain #ifdef constructs designed to make
33755it safe to include the same header file twice, as well as support for
33756inclusion from C++ programs (automatic extern "C" { ... } added).
33757
33758
33759Freezing Python scripts
33760-----------------------
33761
33762* There is now some support for "freezing" a Python script as a
33763stand-alone executable binary file.  See the script
33764demo/scripts/freeze.py.  It will require some site-specific tailoring
33765of the script to get this working, but is quite worthwhile if you write
33766Python code for other who may not have built and installed Python.
33767
33768
33769MS-DOS
33770------
33771
33772* A new MS-DOS port has been done, using MSC 6.0 (I believe).  Thanks,
33773Marcel van der Peijl!  This requires fewer compatibility hacks in
33774posixmodule.c.  The executable is not yet available but will be soon
33775(check the mailing list).
33776
33777* The default PYTHONPATH has changed.
33778
33779
33780Changes for developers of extension modules
33781-------------------------------------------
33782
33783* Read src/ChangeLog for full details.
33784
33785
33786SGI specific changes
33787--------------------
33788
33789* Read src/ChangeLog for full details.
33790
33791
33792==================================
33793==> Release 0.9.8 (9 Jan 1993) <==
33794==================================
33795
33796I claim no completeness here, but I've tried my best to scan the log
33797files throughout my source tree for interesting bits of news.  A more
33798complete account of the changes is to be found in the various
33799ChangeLog files. See also "News for release 0.9.7beta" below if you're
33800still using release 0.9.6, and the file HISTORY if you have an even
33801older release.
33802
33803	--Guido
33804
33805
33806Changes to the language proper
33807------------------------------
33808
33809There's only one big change: the conformance checking for function
33810argument lists (of user-defined functions only) is stricter.  Earlier,
33811you could get away with the following:
33812
33813	(a) define a function of one argument and call it with any
33814	    number of arguments; if the actual argument count wasn't
33815	    one, the function would receive a tuple containing the
33816	    arguments (an empty tuple if there were none).
33817
33818	(b) define a function of two arguments, and call it with more
33819	    than two arguments; if there were more than two arguments,
33820	    the second argument would be passed as a tuple containing
33821	    the second and further actual arguments.
33822
33823(Note that an argument (formal or actual) that is a tuple is counted as
33824one; these rules don't apply inside such tuples, only at the top level
33825of the argument list.)
33826
33827Case (a) was needed to accommodate variable-length argument lists;
33828there is now an explicit "varargs" feature (precede the last argument
33829with a '*').  Case (b) was needed for compatibility with old class
33830definitions: up to release 0.9.4 a method with more than one argument
33831had to be declared as "def meth(self, (arg1, arg2, ...)): ...".
33832Version 0.9.6 provide better ways to handle both casees, bot provided
33833backward compatibility; version 0.9.8 retracts the compatibility hacks
33834since they also cause confusing behavior if a function is called with
33835the wrong number of arguments.
33836
33837There's a script that helps converting classes that still rely on (b),
33838provided their methods' first argument is called "self":
33839demo/scripts/methfix.py.
33840
33841If this change breaks lots of code you have developed locally, try
33842#defining COMPAT_HACKS in ceval.c.
33843
33844(There's a third compatibility hack, which is the reverse of (a): if a
33845function is defined with two or more arguments, and called with a
33846single argument that is a tuple with just as many arguments, the items
33847of this tuple will be used as the arguments.  Although this can (and
33848should!) be done using the built-in function apply() instead, it isn't
33849withdrawn yet.)
33850
33851
33852One minor change: comparing instance methods works like expected, so
33853that if x is an instance of a user-defined class and has a method m,
33854then (x.m==x.m) yields 1.
33855
33856
33857The following was already present in 0.9.7beta, but not explicitly
33858mentioned in the NEWS file: user-defined classes can now define types
33859that behave in almost allrespects like numbers.  See
33860demo/classes/Rat.py for a simple example.
33861
33862
33863Changes to the build process
33864----------------------------
33865
33866The Configure.py script and the Makefile has been made somewhat more
33867bullet-proof, after reports of (minor) trouble on certain platforms.
33868
33869There is now a script to patch Makefile and config.c to add a new
33870optional built-in module: Addmodule.sh.  Read the script before using!
33871
33872Using Addmodule.sh, all optional modules can now be configured at
33873compile time using Configure.py, so there are no modules left that
33874require dynamic loading.
33875
33876The Makefile has been fixed to make it easier to use with the VPATH
33877feature of some Make versions (e.g. SunOS).
33878
33879
33880Changes affecting portability
33881-----------------------------
33882
33883Several minor portability problems have been solved, e.g. "malloc.h"
33884has been renamed to "mymalloc.h", "strdup.c" is no longer used, and
33885the system now tolerates malloc(0) returning 0.
33886
33887For dynamic loading on the SGI, Jack Jansen's dl 1.6 is now
33888distributed with Python.  This solves several minor problems, in
33889particular scripts invoked using #! can now use dynamic loading.
33890
33891
33892Changes to the interpreter interface
33893------------------------------------
33894
33895On popular demand, there's finally a "profile" feature for interactive
33896use of the interpreter.  If the environment variable $PYTHONSTARTUP is
33897set to the name of an existing file, Python statements in this file
33898are executed when the interpreter is started in interactive mode.
33899
33900There is a new clean-up mechanism, complementing try...finally: if you
33901assign a function object to sys.exitfunc, it will be called when
33902Python exits or receives a SIGTERM or SIGHUP signal.
33903
33904The interpreter is now generally assumed to live in
33905/usr/local/bin/python (as opposed to /usr/local/python).  The script
33906demo/scripts/fixps.py will update old scripts in place (you can easily
33907modify it to do other similar changes).
33908
33909Most I/O that uses sys.stdin/stdout/stderr will now use any object
33910assigned to those names as long as the object supports readline() or
33911write() methods.
33912
33913The parser stack has been increased to 500 to accommodate more
33914complicated expressions (7 levels used to be the practical maximum,
33915it's now about 38).
33916
33917The limit on the size of the *run-time* stack has completely been
33918removed -- this means that tuple or list displays can contain any
33919number of elements (formerly more than 50 would crash the
33920interpreter).
33921
33922
33923Changes to existing built-in functions and methods
33924--------------------------------------------------
33925
33926The built-in functions int(), long(), float(), oct() and hex() now
33927also apply to class instalces that define corresponding methods
33928(__int__ etc.).
33929
33930
33931New built-in functions
33932----------------------
33933
33934The new functions str() and repr() convert any object to a string.
33935The function repr(x) is in all respects equivalent to `x` -- some
33936people prefer a function for this.  The function str(x) does the same
33937except if x is already a string -- then it returns x unchanged
33938(repr(x) adds quotes and escapes "funny" characters as octal escapes).
33939
33940The new function cmp(x, y) returns -1 if x<y, 0 if x==y, 1 if x>y.
33941
33942
33943Changes to general built-in modules
33944-----------------------------------
33945
33946The time module's functions are more general: time() returns a
33947floating point number and sleep() accepts one.  Their accuracies
33948depends on the precision of the system clock.  Millisleep is no longer
33949needed (although it still exists for now), but millitimer is still
33950needed since on some systems wall clock time is only available with
33951seconds precision, while a source of more precise time exists that
33952isn't synchronized with the wall clock.  (On UNIX systems that support
33953the BSD gettimeofday() function, time.time() is as time.millitimer().)
33954
33955The string representation of a file object now includes an address:
33956'<file 'filename', mode 'r' at #######>' where ###### is a hex number
33957(the object's address) to make it unique.
33958
33959New functions added to posix: nice(), setpgrp(), and if your system
33960supports them: setsid(), setpgid(), tcgetpgrp(), tcsetpgrp().
33961
33962Improvements to the socket module: socket objects have new methods
33963getpeername() and getsockname(), and the {get,set}sockopt methods can
33964now get/set any kind of option using strings built with the new struct
33965module.  And there's a new function fromfd() which creates a socket
33966object given a file descriptor (useful for servers started by inetd,
33967which have a socket connected to stdin and stdout).
33968
33969
33970Changes to SGI-specific built-in modules
33971----------------------------------------
33972
33973The FORMS library interface (fl) now requires FORMS 2.1a.  Some new
33974functions have been added and some bugs have been fixed.
33975
33976Additions to al (audio library interface): added getname(),
33977getdefault() and getminmax().
33978
33979The gl modules doesn't call "foreground()" when initialized (this
33980caused some problems) like it dit in 0.9.7beta (but not before).
33981There's a new gl function 'gversion() which returns a version string.
33982
33983The interface to sv (Indigo video interface) has totally changed.
33984(Sorry, still no documentation, but see the examples in
33985demo/sgi/{sv,video}.)
33986
33987
33988Changes to standard library modules
33989-----------------------------------
33990
33991Most functions in module string are now much faster: they're actually
33992implemented in C.  The module containing the C versions is called
33993"strop" but you should still import "string" since strop doesn't
33994provide all the interfaces defined in string (and strop may be renamed
33995to string when it is complete in a future release).
33996
33997string.index() now accepts an optional third argument giving an index
33998where to start searching in the first argument, so you can find second
33999and further occurrences (this is similar to the regular expression
34000functions in regex).
34001
34002The definition of what string.splitfields(anything, '') should return
34003is changed for the last time: it returns a singleton list containing
34004its whole first argument unchanged.  This is compatible with
34005regsub.split() which also ignores empty delimiter matches.
34006
34007posixpath, macpath: added dirname() and normpath() (and basename() to
34008macpath).
34009
34010The mainloop module (for use with stdwin) can now demultiplex input
34011from other sources, as long as they can be polled with select().
34012
34013
34014New built-in modules
34015--------------------
34016
34017Module struct defines functions to pack/unpack values to/from strings
34018representing binary values in native byte order.
34019
34020Module strop implements C versions of many functions from string (see
34021above).
34022
34023Optional module fcntl defines interfaces to fcntl() and ioctl() --
34024UNIX only.  (Not yet properly documented -- see however src/fcntl.doc.)
34025
34026Optional module mpz defines an interface to an altaernative long
34027integer implementation, the GNU MPZ library.
34028
34029Optional module md5 uses the GNU MPZ library to calculate MD5
34030signatures of strings.
34031
34032There are also optional new modules specific to SGI machines: imageop
34033defines some simple operations to images represented as strings; sv
34034interfaces to the Indigo video board; cl interfaces to the (yet
34035unreleased) compression library.
34036
34037
34038New standard library modules
34039----------------------------
34040
34041(Unfortunately the following modules are not all documented; read the
34042sources to find out more about them!)
34043
34044autotest: run testall without showing any output unless it differs
34045from the expected output
34046
34047bisect: use bisection to insert or find an item in a sorted list
34048
34049colorsys: defines conversions between various color systems (e.g. RGB
34050<-> YUV)
34051
34052nntplib: a client interface to NNTP servers
34053
34054pipes: utility to construct pipeline from templates, e.g. for
34055conversion from one file format to another using several utilities.
34056
34057regsub: contains three functions that are more or less compatible with
34058awk functions of the same name: sub() and gsub() do string
34059substitution, split() splits a string using a regular expression to
34060define how separators are define.
34061
34062test_types: test operations on the built-in types of Python
34063
34064toaiff: convert various audio file formats to AIFF format
34065
34066tzparse: parse the TZ environment parameter (this may be less general
34067than it could be, let me know if you fix it).
34068
34069(Note that the obsolete module "path" no longer exists.)
34070
34071
34072New SGI-specific library modules
34073--------------------------------
34074
34075CL: constants for use with the built-in compression library interface (cl)
34076
34077Queue: a multi-producer, multi-consumer queue class implemented for
34078use with the built-in thread module
34079
34080SOCKET: constants for use with built-in module socket, e.g. to set/get
34081socket options.  This is SGI-specific because the constants to be
34082passed are system-dependent.  You can generate a version for your own
34083system by running the script demo/scripts/h2py.py with
34084/usr/include/sys/socket.h as input.
34085
34086cddb: interface to the database used by the CD player
34087
34088torgb: convert various image file types to rgb format (requires pbmplus)
34089
34090
34091New demos
34092---------
34093
34094There's an experimental interface to define Sun RPC clients and
34095servers in demo/rpc.
34096
34097There's a collection of interfaces to WWW, WAIS and Gopher (both
34098Python classes and program providing a user interface) in demo/www.
34099This includes a program texi2html.py which converts texinfo files to
34100HTML files (the format used hy WWW).
34101
34102The ibrowse demo has moved from demo/stdwin/ibrowse to demo/ibrowse.
34103
34104For SGI systems, there's a whole collection of programs and classes
34105that make use of the Indigo video board in demo/sgi/{sv,video}.  This
34106represents a significant amount of work that we're giving away!
34107
34108There are demos "rsa" and "md5test" that exercise the mpz and md5
34109modules, respectively.  The rsa demo is a complete implementation of
34110the RSA public-key cryptosystem!
34111
34112A bunch of games and examples submitted by Stoffel Erasmus have been
34113included in demo/stoffel.
34114
34115There are miscellaneous new files in some existing demo
34116subdirectories: classes/bitvec.py, scripts/{fixps,methfix}.py,
34117sgi/al/cmpaf.py, sockets/{mcast,gopher}.py.
34118
34119There are also many minor changes to existing files, but I'm too lazy
34120to run a diff and note the differences -- you can do this yourself if
34121you save the old distribution's demos.  One highlight: the
34122stdwin/python.py demo is much improved!
34123
34124
34125Changes to the documentation
34126----------------------------
34127
34128The LaTeX source for the library uses different macros to enable it to
34129be converted to texinfo, and from there to INFO or HTML format so it
34130can be browsed as a hypertext.  The net result is that you can now
34131read the Python library documentation in Emacs info mode!
34132
34133
34134Changes to the source code that affect C extension writers
34135----------------------------------------------------------
34136
34137The function strdup() no longer exists (it was used only in one places
34138and is somewhat of a portability problem since some systems have the
34139same function in their C library.
34140
34141The functions NEW() and RENEW() allocate one spare byte to guard
34142against a NULL return from malloc(0) being taken for an error, but
34143this should not be relied upon.
34144
34145
34146=========================
34147==> Release 0.9.7beta <==
34148=========================
34149
34150
34151Changes to the language proper
34152------------------------------
34153
34154User-defined classes can now implement operations invoked through
34155special syntax, such as x[i] or `x` by defining methods named
34156__getitem__(self, i) or __repr__(self), etc.
34157
34158
34159Changes to the build process
34160----------------------------
34161
34162Instead of extensive manual editing of the Makefile to select
34163compile-time options, you can now run a Configure.py script.
34164The Makefile as distributed builds a minimal interpreter sufficient to
34165run Configure.py.  See also misc/BUILD
34166
34167The Makefile now includes more "utility" targets, e.g. install and
34168tags/TAGS
34169
34170Using the provided strtod.c and strtol.c are now separate options, as
34171on the Sun the provided strtod.c dumps core :-(
34172
34173The regex module is now an option chosen by the Makefile, since some
34174(old) C compilers choke on regexpr.c
34175
34176
34177Changes affecting portability
34178-----------------------------
34179
34180You need STDWIN version 0.9.7 (released 30 June 1992) for the stdwin
34181interface
34182
34183Dynamic loading is now supported for Sun (and other non-COFF systems)
34184through dld-3.2.3, as well as for SGI (a new version of Jack Jansen's
34185DL is out, 1.4)
34186
34187The system-dependent code for the use of the select() system call is
34188moved to one file: myselect.h
34189
34190Thanks to Jaap Vermeulen, the code should now port cleanly to the
34191SEQUENT
34192
34193
34194Changes to the interpreter interface
34195------------------------------------
34196
34197The interpretation of $PYTHONPATH in the environment is different: it
34198is inserted in front of the default path instead of overriding it
34199
34200
34201Changes to existing built-in functions and methods
34202--------------------------------------------------
34203
34204List objects now support an optional argument to their sort() method,
34205which is a comparison function similar to qsort(3) in C
34206
34207File objects now have a method fileno(), used by the new select module
34208(see below)
34209
34210
34211New built-in function
34212---------------------
34213
34214coerce(x, y): take two numbers and return a tuple containing them
34215both converted to a common type
34216
34217
34218Changes to built-in modules
34219---------------------------
34220
34221sys: fixed core dumps in settrace() and setprofile()
34222
34223socket: added socket methods setsockopt() and getsockopt(); and
34224fileno(), used by the new select module (see below)
34225
34226stdwin: added fileno() == connectionnumber(), in support of new module
34227select (see below)
34228
34229posix: added get{eg,eu,g,u}id(); waitpid() is now a separate function.
34230
34231gl: added qgetfd()
34232
34233fl: added several new functions, fixed several obscure bugs, adapted
34234to FORMS 2.1
34235
34236
34237Changes to standard modules
34238---------------------------
34239
34240posixpath: changed implementation of ismount()
34241
34242string: atoi() no longer mistakes leading zero for octal number
34243
34244...
34245
34246
34247New built-in modules
34248--------------------
34249
34250Modules marked "dynamic only" are not configured at compile time but
34251can be loaded dynamically.  You need to turn on the DL or DLD option in
34252the Makefile for support dynamic loading of modules (this requires
34253external code).
34254
34255select: interfaces to the BSD select() system call
34256
34257dbm: interfaces to the (new) dbm library (dynamic only)
34258
34259nis: interfaces to some NIS functions (aka yellow pages)
34260
34261thread: limited form of multiple threads (sgi only)
34262
34263audioop: operations useful for audio programs, e.g. u-LAW and ADPCM
34264coding (dynamic only)
34265
34266cd: interface to Indigo SCSI CDROM player audio library (sgi only)
34267
34268jpeg: read files in JPEG format (dynamic only, sgi only; needs
34269external code)
34270
34271imgfile: read SGI image files (dynamic only, sgi only)
34272
34273sunaudiodev: interface to sun's /dev/audio (dynamic only, sun only)
34274
34275sv: interface to Indigo video library (sgi only)
34276
34277pc: a minimal set of MS-DOS interfaces (MS-DOS only)
34278
34279rotor: encryption, by Lance Ellinghouse (dynamic only)
34280
34281
34282New standard modules
34283--------------------
34284
34285Not all these modules are documented.  Read the source:
34286lib/<modulename>.py.  Sometimes a file lib/<modulename>.doc contains
34287additional documentation.
34288
34289imghdr: recognizes image file headers
34290
34291sndhdr: recognizes sound file headers
34292
34293profile: print run-time statistics of Python code
34294
34295readcd, cdplayer: companion modules for built-in module cd (sgi only)
34296
34297emacs: interface to Emacs using py-connect.el (see below).
34298
34299SOCKET: symbolic constant definitions for socket options
34300
34301SUNAUDIODEV: symbolic constant definitions for sunaudiodef (sun only)
34302
34303SV: symbolic constant definitions for sv (sgi only)
34304
34305CD: symbolic constant definitions for cd (sgi only)
34306
34307
34308New demos
34309---------
34310
34311scripts/pp.py: execute Python as a filter with a Perl-like command
34312line interface
34313
34314classes/: examples using the new class features
34315
34316threads/: examples using the new thread module
34317
34318sgi/cd/: examples using the new cd module
34319
34320
34321Changes to the documentation
34322----------------------------
34323
34324The last-minute syntax changes of release 0.9.6 are now reflected
34325everywhere in the manuals
34326
34327The reference manual has a new section (3.2) on implementing new kinds
34328of numbers, sequences or mappings with user classes
34329
34330Classes are now treated extensively in the tutorial (chapter 9)
34331
34332Slightly restructured the system-dependent chapters of the library
34333manual
34334
34335The file misc/EXTENDING incorporates documentation for mkvalue() and
34336a new section on error handling
34337
34338The files misc/CLASSES and misc/ERRORS are no longer necessary
34339
34340The doc/Makefile now creates PostScript files automatically
34341
34342
34343Miscellaneous changes
34344---------------------
34345
34346Incorporated Tim Peters' changes to python-mode.el, it's now version
343471.06
34348
34349A python/Emacs bridge (provided by Terrence M. Brannon) lets a Python
34350program running in an Emacs buffer execute Emacs lisp code.  The
34351necessary Python code is in lib/emacs.py.  The Emacs code is
34352misc/py-connect.el (it needs some external Emacs lisp code)
34353
34354
34355Changes to the source code that affect C extension writers
34356----------------------------------------------------------
34357
34358New service function mkvalue() to construct a Python object from C
34359values according to a "format" string a la getargs()
34360
34361Most functions from pythonmain.c moved to new pythonrun.c which is
34362in libpython.a.  This should make embedded versions of Python easier
34363
34364ceval.h is split in eval.h (which needs compile.h and only declares
34365eval_code) and ceval.h (which doesn't need compile.hand declares the
34366rest)
34367
34368ceval.h defines macros BGN_SAVE / END_SAVE for use with threads (to
34369improve the parallellism of multi-threaded programs by letting other
34370Python code run when a blocking system call or something similar is
34371made)
34372
34373In structmember.[ch], new member types BYTE, CHAR and unsigned
34374variants have been added
34375
34376New file xxmodule.c is a template for new extension modules.
34377
34378
34379==================================
34380==> Release 0.9.6 (6 Apr 1992) <==
34381==================================
34382
34383Misc news in 0.9.6:
34384- Restructured the misc subdirectory
34385- Reference manual completed, library manual much extended (with indexes!)
34386- the GNU Readline library is now distributed standard with Python
34387- the script "../demo/scripts/classfix.py" fixes Python modules using old
34388  class syntax
34389- Emacs python-mode.el (was python.el) vastly improved (thanks, Tim!)
34390- Because of the GNU copyleft business I am not using the GNU regular
34391  expression implementation but a free re-implementation by Tatu Ylonen
34392  that recently appeared in comp.sources.misc (Bravo, Tatu!)
34393
34394New features in 0.9.6:
34395- stricter try stmt syntax: cannot mix except and finally clauses on 1 try
34396- New module 'os' supplants modules 'mac' and 'posix' for most cases;
34397  module 'path' is replaced by 'os.path'
34398- os.path.split() return value differs from that of old path.split()
34399- sys.exc_type, sys.exc_value, sys.exc_traceback are set to the exception
34400  currently being handled
34401- sys.last_type, sys.last_value, sys.last_traceback remember last unhandled
34402  exception
34403- New function string.expandtabs() expands tabs in a string
34404- Added times() interface to posix (user & sys time of process & children)
34405- Added uname() interface to posix (returns OS type, hostname, etc.)
34406- New built-in function execfile() is like exec() but from a file
34407- Functions exec() and eval() are less picky about whitespace/newlines
34408- New built-in functions getattr() and setattr() access arbitrary attributes
34409- More generic argument handling in built-in functions (see "./EXTENDING")
34410- Dynamic loading of modules written in C or C++ (see "./DYNLOAD")
34411- Division and modulo for long and plain integers with negative operands
34412  have changed; a/b is now floor(float(a)/float(b)) and a%b is defined
34413  as a-(a/b)*b.  So now the outcome of divmod(a,b) is the same as
34414  (a/b, a%b) for integers.  For floats, % is also changed, but of course
34415  / is unchanged, and divmod(x,y) does not yield (x/y, x%y)...
34416- A function with explicit variable-length argument list can be declared
34417  like this: def f(*args): ...; or even like this: def f(a, b, *rest): ...
34418- Code tracing and profiling features have been added, and two source
34419  code debuggers are provided in the library (pdb.py, tty-oriented,
34420  and wdb, window-oriented); you can now step through Python programs!
34421  See sys.settrace() and sys.setprofile(), and "../lib/pdb.doc"
34422- '==' is now the only equality operator; "../demo/scripts/eqfix.py" is
34423  a script that fixes old Python modules
34424- Plain integer right shift now uses sign extension
34425- Long integer shift/mask operations now simulate 2's complement
34426  to give more useful results for negative operands
34427- Changed/added range checks for long/plain integer shifts
34428- Options found after "-c command" are now passed to the command in sys.argv
34429  (note subtle incompatibility with "python -c command -- -options"!)
34430- Module stdwin is better protected against touching objects after they've
34431  been closed; menus can now also be closed explicitly
34432- Stdwin now uses its own exception (stdwin.error)
34433
34434New features in 0.9.5 (released as Macintosh application only, 2 Jan 1992):
34435- dictionary objects can now be compared properly; e.g., {}=={} is true
34436- new exception SystemExit causes termination if not caught;
34437  it is raised by sys.exit() so that 'finally' clauses can clean up,
34438  and it may even be caught.  It does work interactively!
34439- new module "regex" implements GNU Emacs style regular expressions;
34440  module "regexp" is rewritten in Python for backward compatibility
34441- formal parameter lists may contain trailing commas
34442
34443Bugs fixed in 0.9.6:
34444- assigning to or deleting a list item with a negative index dumped core
34445- divmod(-10L,5L) returned (-3L, 5L) instead of (-2L, 0L)
34446
34447Bugs fixed in 0.9.5:
34448- masking operations involving negative long integers gave wrong results
34449
34450
34451===================================
34452==> Release 0.9.4 (24 Dec 1991) <==
34453===================================
34454
34455- new function argument handling (see below)
34456- built-in apply(func, args) means func(args[0], args[1], ...)
34457- new, more refined exceptions
34458- new exception string values (NameError = 'NameError' etc.)
34459- better checking for math exceptions
34460- for sequences (string/tuple/list), x[-i] is now equivalent to x[len(x)-i]
34461- fixed list assignment bug: "a[1:1] = a" now works correctly
34462- new class syntax, without extraneous parentheses
34463- new 'global' statement to assign global variables from within a function
34464
34465
34466New class syntax
34467----------------
34468
34469You can now declare a base class as follows:
34470
34471	class B:			# Was: class B():
34472		def some_method(self): ...
34473		...
34474
34475and a derived class thusly:
34476
34477	class D(B):			# Was: class D() = B():
34478		def another_method(self, arg): ...
34479
34480Multiple inheritance looks like this:
34481
34482	class M(B, D):			# Was: class M() = B(), D():
34483		def this_or_that_method(self, arg): ...
34484
34485The old syntax is still accepted by Python 0.9.4, but will disappear
34486in Python 1.0 (to be posted to comp.sources).
34487
34488
34489New 'global' statement
34490----------------------
34491
34492Every now and then you have a global variable in a module that you
34493want to change from within a function in that module -- say, a count
34494of calls to a function, or an option flag, etc.  Until now this was
34495not directly possible.  While several kludges are known that
34496circumvent the problem, and often the need for a global variable can
34497be avoided by rewriting the module as a class, this does not always
34498lead to clearer code.
34499
34500The 'global' statement solves this dilemma.  Its occurrence in a
34501function body means that, for the duration of that function, the
34502names listed there refer to global variables.  For instance:
34503
34504	total = 0.0
34505	count = 0
34506
34507	def add_to_total(amount):
34508		global total, count
34509		total = total + amount
34510		count = count + 1
34511
34512'global' must be repeated in each function where it is needed.  The
34513names listed in a 'global' statement must not be used in the function
34514before the statement is reached.
34515
34516Remember that you don't need to use 'global' if you only want to *use*
34517a global variable in a function; nor do you need ot for assignments to
34518parts of global variables (e.g., list or dictionary items or
34519attributes of class instances).  This has not changed; in fact
34520assignment to part of a global variable was the standard workaround.
34521
34522
34523New exceptions
34524--------------
34525
34526Several new exceptions have been defined, to distinguish more clearly
34527between different types of errors.
34528
34529name			meaning					was
34530
34531AttributeError		reference to non-existing attribute	NameError
34532IOError			unexpected I/O error			RuntimeError
34533ImportError		import of non-existing module or name	NameError
34534IndexError		invalid string, tuple or list index	RuntimeError
34535KeyError		key not in dictionary			RuntimeError
34536OverflowError		numeric overflow			RuntimeError
34537SyntaxError		invalid syntax				RuntimeError
34538ValueError		invalid argument value			RuntimeError
34539ZeroDivisionError	division by zero			RuntimeError
34540
34541The string value of each exception is now its name -- this makes it
34542easier to experimentally find out which operations raise which
34543exceptions; e.g.:
34544
34545	>>> KeyboardInterrupt
34546	'KeyboardInterrupt'
34547	>>>
34548
34549
34550New argument passing semantics
34551------------------------------
34552
34553Off-line discussions with Steve Majewski and Daniel LaLiberte have
34554convinced me that Python's parameter mechanism could be changed in a
34555way that made both of them happy (I hope), kept me happy, fixed a
34556number of outstanding problems, and, given some backward compatibility
34557provisions, would only break a very small amount of existing code --
34558probably all mine anyway.  In fact I suspect that most Python users
34559will hardly notice the difference.  And yet it has cost me at least
34560one sleepless night to decide to make the change...
34561
34562Philosophically, the change is quite radical (to me, anyway): a
34563function is no longer called with either zero or one argument, which
34564is a tuple if there appear to be more arguments.  Every function now
34565has an argument list containing 0, 1 or more arguments.  This list is
34566always implemented as a tuple, and it is a (run-time) error if a
34567function is called with a different number of arguments than expected.
34568
34569What's the difference? you may ask.  The answer is, very little unless
34570you want to write variadic functions -- functions that may be called
34571with a variable number of arguments.  Formerly, you could write a
34572function that accepted one or more arguments with little trouble, but
34573writing a function that could be called with either 0 or 1 argument
34574(or more) was next to impossible.  This is now a piece of cake: you
34575can simply declare an argument that receives the entire argument
34576tuple, and check its length -- it will be of size 0 if there are no
34577arguments.
34578
34579Another anomaly of the old system was the way multi-argument methods
34580(in classes) had to be declared, e.g.:
34581
34582	class Point():
34583		def init(self, (x, y, color)): ...
34584		def setcolor(self, color): ...
34585		dev moveto(self, (x, y)): ...
34586		def draw(self): ...
34587
34588Using the new scheme there is no need to enclose the method arguments
34589in an extra set of parentheses, so the above class could become:
34590
34591	class Point:
34592		def init(self, x, y, color): ...
34593		def setcolor(self, color): ...
34594		dev moveto(self, x, y): ...
34595		def draw(self): ...
34596
34597That is, the equivalence rule between methods and functions has
34598changed so that now p.moveto(x,y) is equivalent to Point.moveto(p,x,y)
34599while formerly it was equivalent to Point.moveto(p,(x,y)).
34600
34601A special backward compatibility rule makes that the old version also
34602still works: whenever a function with exactly two arguments (at the top
34603level) is called with more than two arguments, the second and further
34604arguments are packed into a tuple and passed as the second argument.
34605This rule is invoked independently of whether the function is actually a
34606method, so there is a slight chance that some erroneous calls of
34607functions expecting two arguments with more than that number of
34608arguments go undetected at first -- when the function tries to use the
34609second argument it may find it is a tuple instead of what was expected.
34610Note that this rule will be removed from future versions of the
34611language; it is a backward compatibility provision *only*.
34612
34613Two other rules and a new built-in function handle conversion between
34614tuples and argument lists:
34615
34616Rule (a): when a function with more than one argument is called with a
34617single argument that is a tuple of the right size, the tuple's items
34618are used as arguments.
34619
34620Rule (b): when a function with exactly one argument receives no
34621arguments or more than one, that one argument will receive a tuple
34622containing the arguments (the tuple will be empty if there were no
34623arguments).
34624
34625
34626A new built-in function, apply(), was added to support functions that
34627need to call other functions with a constructed argument list.  The call
34628
34629	apply(function, tuple)
34630
34631is equivalent to
34632
34633	function(tuple[0], tuple[1], ..., tuple[len(tuple)-1])
34634
34635
34636While no new argument syntax was added in this phase, it would now be
34637quite sensible to add explicit syntax to Python for default argument
34638values (as in C++ or Modula-3), or a "rest" argument to receive the
34639remaining arguments of a variable-length argument list.
34640
34641
34642========================================================
34643==> Release 0.9.3 (never made available outside CWI) <==
34644========================================================
34645
34646- string sys.version shows current version (also printed on interactive entry)
34647- more detailed exceptions, e.g., IOError, ZeroDivisionError, etc.
34648- 'global' statement to declare module-global variables assigned in functions.
34649- new class declaration syntax: class C(Base1, Base2, ...): suite
34650  (the old syntax is still accepted -- be sure to convert your classes now!)
34651- C shifting and masking operators: << >> ~ & ^ | (for ints and longs).
34652- C comparison operators: == != (the old = and <> remain valid).
34653- floating point numbers may now start with a period (e.g., .14).
34654- definition of integer division tightened (always truncates towards zero).
34655- new builtins hex(x), oct(x) return hex/octal string from (long) integer.
34656- new list method l.count(x) returns the number of occurrences of x in l.
34657- new SGI module: al (Indigo and 4D/35 audio library).
34658- the FORMS interface (modules fl and FL) now uses FORMS 2.0
34659- module gl: added lrect{read,write}, rectzoom and pixmode;
34660  added (non-GL) functions (un)packrect.
34661- new socket method: s.allowbroadcast(flag).
34662- many objects support __dict__, __methods__ or __members__.
34663- dir() lists anything that has __dict__.
34664- class attributes are no longer read-only.
34665- classes support __bases__, instances support __class__ (and __dict__).
34666- divmod() now also works for floats.
34667- fixed obscure bug in eval('1            ').
34668
34669
34670===================================
34671==> Release 0.9.2 (Autumn 1991) <==
34672===================================
34673
34674Highlights
34675----------
34676
34677- tutorial now (almost) complete; library reference reorganized
34678- new syntax: continue statement; semicolons; dictionary constructors;
34679  restrictions on blank lines in source files removed
34680- dramatically improved module load time through precompiled modules
34681- arbitrary precision integers: compute 2 to the power 1000 and more...
34682- arithmetic operators now accept mixed type operands, e.g., 3.14/4
34683- more operations on list: remove, index, reverse; repetition
34684- improved/new file operations: readlines, seek, tell, flush, ...
34685- process management added to the posix module: fork/exec/wait/kill etc.
34686- BSD socket operations (with example servers and clients!)
34687- many new STDWIN features (color, fonts, polygons, ...)
34688- new SGI modules: font manager and FORMS library interface
34689
34690
34691Extended list of changes in 0.9.2
34692---------------------------------
34693
34694Here is a summary of the most important user-visible changes in 0.9.2,
34695in somewhat arbitrary order.  Changes in later versions are listed in
34696the "highlights" section above.
34697
34698
346991. Changes to the interpreter proper
34700
34701- Simple statements can now be separated by semicolons.
34702  If you write "if t: s1; s2", both s1 and s2 are executed
34703  conditionally.
34704- The 'continue' statement was added, with semantics as in C.
34705- Dictionary displays are now allowed on input: {key: value, ...}.
34706- Blank lines and lines bearing only a comment no longer need to
34707  be indented properly.  (A completely empty line still ends a multi-
34708  line statement interactively.)
34709- Mixed arithmetic is supported, 1 compares equal to 1.0, etc.
34710- Option "-c command" to execute statements from the command line
34711- Compiled versions of modules are cached in ".pyc" files, giving a
34712  dramatic improvement of start-up time
34713- Other, smaller speed improvements, e.g., extracting characters from
34714  strings, looking up single-character keys, and looking up global
34715  variables
34716- Interrupting a print operation raises KeyboardInterrupt instead of
34717  only cancelling the print operation
34718- Fixed various portability problems (it now passes gcc with only
34719  warnings -- more Standard C compatibility will be provided in later
34720  versions)
34721- Source is prepared for porting to MS-DOS
34722- Numeric constants are now checked for overflow (this requires
34723  standard-conforming strtol() and strtod() functions; a correct
34724  strtol() implementation is provided, but the strtod() provided
34725  relies on atof() for everything, including error checking
34726
34727
347282. Changes to the built-in types, functions and modules
34729
34730- New module socket: interface to BSD socket primitives
34731- New modules pwd and grp: access the UNIX password and group databases
34732- (SGI only:) New module "fm" interfaces to the SGI IRIX Font Manager
34733- (SGI only:) New module "fl" interfaces to Mark Overmars' FORMS library
34734- New numeric type: long integer, for unlimited precision
34735	- integer constants suffixed with 'L' or 'l' are long integers
34736	- new built-in function long(x) converts int or float to long
34737	- int() and float() now also convert from long integers
34738- New built-in function:
34739	- pow(x, y) returns x to the power y
34740- New operation and methods for lists:
34741	- l*n returns a new list consisting of n concatenated copies of l
34742	- l.remove(x) removes the first occurrence of the value x from l
34743	- l.index(x) returns the index of the first occurrence of x in l
34744	- l.reverse() reverses l in place
34745- New operation for tuples:
34746	- t*n returns a tuple consisting of n concatenated copies of t
34747- Improved file handling:
34748	- f.readline() no longer restricts the line length, is faster,
34749	  and isn't confused by null bytes; same for raw_input()
34750	- f.read() without arguments reads the entire (rest of the) file
34751	- mixing of print and sys.stdout.write() has different effect
34752- New methods for files:
34753	- f.readlines() returns a list containing the lines of the file,
34754	  as read with f.readline()
34755	- f.flush(), f.tell(), f.seek() call their stdio counterparts
34756	- f.isatty() tests for "tty-ness"
34757- New posix functions:
34758	- _exit(), exec(), fork(), getpid(), getppid(), kill(), wait()
34759	- popen() returns a file object connected to a pipe
34760	- utime() replaces utimes() (the latter is not a POSIX name)
34761- New stdwin features, including:
34762	- font handling
34763	- color drawing
34764	- scroll bars made optional
34765	- polygons
34766	- filled and xor shapes
34767	- text editing objects now have a 'settext' method
34768
34769
347703. Changes to the standard library
34771
34772- Name change: the functions path.cat and macpath.cat are now called
34773  path.join and macpath.join
34774- Added new modules: formatter, mutex, persist, sched, mainloop
34775- Added some modules and functionality to the "widget set" (which is
34776  still under development, so please bear with me):
34777	DirList, FormSplit, TextEdit, WindowSched
34778- Fixed module testall to work non-interactively
34779- Module string:
34780	- added functions join() and joinfields()
34781	- fixed center() to work correct and make it "transitive"
34782- Obsolete modules were removed: util, minmax
34783- Some modules were moved to the demo directory
34784
34785
347864. Changes to the demonstration programs
34787
34788- Added new useful scipts: byteyears, eptags, fact, from, lfact,
34789  objgraph, pdeps, pi, primes, ptags, which
34790- Added a bunch of socket demos
34791- Doubled the speed of ptags
34792- Added new stdwin demos: microedit, miniedit
34793- Added a windowing interface to the Python interpreter: python (most
34794  useful on the Mac)
34795- Added a browser for Emacs info files: demo/stdwin/ibrowse
34796  (yes, I plan to put all STDWIN and Python documentation in texinfo
34797  form in the future)
34798
34799
348005. Other changes to the distribution
34801
34802- An Emacs Lisp file "python.el" is provided to facilitate editing
34803  Python programs in GNU Emacs (slightly improved since posted to
34804  gnu.emacs.sources)
34805- Some info on writing an extension in C is provided
34806- Some info on building Python on non-UNIX platforms is provided
34807
34808
34809=====================================
34810==> Release 0.9.1 (February 1991) <==
34811=====================================
34812
34813- Micro changes only
34814- Added file "patchlevel.h"
34815
34816
34817=====================================
34818==> Release 0.9.0 (February 1991) <==
34819=====================================
34820
34821Original posting to alt.sources.
34822