blob: 6cadaecf87e39c096a086bd79fae005e05d6dd01 [file] [log] [blame]
Guido van Rossuma598c932000-09-04 16:26:03 +00001Python History
Guido van Rossuma7925f11994-01-26 10:20:16 +00002--------------
3
Guido van Rossum439d1fa1998-12-21 21:41:14 +00004This 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
10
Ned Deily5c4568a2016-12-22 18:38:47 -050011What's New in Python 3.4.0?
12===========================
13
14Release date: 2014-03-16
15
16Library
17-------
18
19- Issue #20939: Fix test_geturl failure in test_urllibnet due to
20 new redirect of http://www.python.org/ to https://www.python.org.
21
22Documentation
23-------------
24
25- Merge in all documentation changes since branching 3.4.0rc1.
26
27
28What's New in Python 3.4.0 release candidate 3?
29===============================================
30
31Release date: 2014-03-09
32
33Core and Builtins
34-----------------
35
36- Issue #20786: Fix signatures for dict.__delitem__ and
37 property.__delete__ builtins.
38
39Library
40-------
41
42- Issue #20839: Don't trigger a DeprecationWarning in the still supported
43 pkgutil.get_loader() API when __loader__ isn't set on a module (nor
44 when pkgutil.find_loader() is called directly).
45
46Build
47-----
48
49- Issue #14512: Launch pydoc -b instead of pydocgui.pyw on Windows.
50
51- Issue #20748: Uninstalling pip does not leave behind the pyc of
52 the uninstaller anymore.
53
54- Issue #20568: The Windows installer now installs the unversioned ``pip``
55 command in addition to the versioned ``pip3`` and ``pip3.4`` commands.
56
57- Issue #20757: The ensurepip helper for the Windows uninstaller now skips
58 uninstalling pip (rather than failing) if the user has updated pip to a
59 different version from the one bundled with ensurepip.
60
61- Issue #20465: Update OS X and Windows installer builds to use
62 SQLite 3.8.3.1.
63
64
65What's New in Python 3.4.0 release candidate 2?
66===============================================
67
68Release date: 2014-02-23
69
70Core and Builtins
71-----------------
72
73- Issue #20625: Parameter names in __annotations__ were not mangled properly.
74 Discovered by Jonas Wielicki, patch by Yury Selivanov.
75
76- Issue #20261: In pickle, lookup __getnewargs__ and __getnewargs_ex__ on the
77 type of the object.
78
79- Issue #20619: Give the AST nodes of keyword-only arguments a column and line
80 number.
81
82- Issue #20526: Revert changes of issue #19466 which introduces a regression:
83 don't clear anymore the state of Python threads early during the Python
84 shutdown.
85
86Library
87-------
88
89- Issue #20710: The pydoc summary line no longer displays the "self" parameter
90 for bound methods.
91
92- Issue #20566: Change asyncio.as_completed() to use a Queue, to
93 avoid O(N**2) behavior.
94
95- Issue #20704: Implement new debug API in asyncio. Add new methods
96 BaseEventLoop.set_debug() and BaseEventLoop.get_debug().
97 Add support for setting 'asyncio.tasks._DEBUG' variable with
98 'PYTHONASYNCIODEBUG' environment variable.
99
100- asyncio: Refactoring and fixes: BaseEventLoop.sock_connect() raises an
101 error if the address is not resolved; use __slots__ in Handle and
102 TimerHandle; as_completed() and wait() raise TypeError if the passed
103 list of Futures is a single Future; call_soon() and other 'call_*()'
104 functions raise TypeError if the passed callback is a coroutine
105 function; _ProactorBasePipeTransport uses _FlowControlMixin;
106 WriteTransport.set_write_buffer_size() calls _maybe_pause_protocol()
107 to consider pausing receiving if the watermark limits have changed;
108 fix _check_resolved_address() for IPv6 address; and other minor
109 improvements, along with multiple documentation updates.
110
111- Issue #20684: Fix inspect.getfullargspec() to not to follow __wrapped__
112 chains. Make its behaviour consistent with bound methods first argument.
113 Patch by Nick Coghlan and Yury Selivanov.
114
115- Issue #20681: Add new error handling API in asyncio. New APIs:
116 loop.set_exception_handler(), loop.default_exception_handler(), and
117 loop.call_exception_handler().
118
119- Issue #20673: Implement support for UNIX Domain Sockets in asyncio.
120 New APIs: loop.create_unix_connection(), loop.create_unix_server(),
121 streams.open_unix_connection(), and streams.start_unix_server().
122
123- Issue #20616: Add a format() method to tracemalloc.Traceback.
124
125- Issue #19744: the ensurepip installation step now just prints a warning to
126 stderr rather than failing outright if SSL/TLS is unavailable. This allows
127 local installation of POSIX builds without SSL/TLS support.
128
129- Issue #20594: Avoid name clash with the libc function posix_close.
130
131Build
132-----
133
134- Issue #20641: Run MSI custom actions (pip installation, pyc compilation)
135 with the NoImpersonate flag, to support elevated execution (UAC).
136
137- Issue #20221: Removed conflicting (or circular) hypot definition when
138 compiled with VS 2010 or above. Initial patch by Tabrez Mohammed.
139
140- Issue #20609: Restored the ability to build 64-bit Windows binaries on
141 32-bit Windows, which was broken by the change in issue #19788.
142
143
144What's New in Python 3.4.0 release candidate 1?
145===============================================
146
147Release date: 2014-02-10
148
149Core and Builtins
150-----------------
151
152- Issue #19255: The builtins module is restored to initial value before
153 cleaning other modules. The sys and builtins modules are cleaned last.
154
155- Issue #20588: Make Python-ast.c C89 compliant.
156
157- Issue #20437: Fixed 22 potential bugs when deleting object references.
158
159- Issue #20500: Displaying an exception at interpreter shutdown no longer
160 risks triggering an assertion failure in PyObject_Str.
161
162- Issue #20538: UTF-7 incremental decoder produced inconsistent string when
163 input was truncated in BASE64 section.
164
165- Issue #20404: io.TextIOWrapper (and hence the open() builtin) now uses the
166 internal codec marking system added for issue #19619 to throw LookupError
167 for known non-text encodings at stream construction time. The existing
168 output type checks remain in place to deal with unmarked third party
169 codecs.
170
171- Issue #17162: Add PyType_GetSlot.
172
173- Issue #20162: Fix an alignment issue in the siphash24() hash function which
174 caused a crash on PowerPC 64-bit (ppc64).
175
176Library
177-------
178
179- Issue #20530: The signatures for slot builtins have been updated
180 to reflect the fact that they only accept positional-only arguments.
181
182- Issue #20517: Functions in the os module that accept two filenames
183 now register both filenames in the exception on failure.
184
185- Issue #20563: The ipaddress module API is now considered stable.
186
187- Issue #14983: email.generator now always adds a line end after each MIME
188 boundary marker, instead of doing so only when there is an epilogue. This
189 fixes an RFC compliance bug and solves an issue with signed MIME parts.
190
191- Issue #20540: Fix a performance regression (vs. Python 3.2) when layering
192 a multiprocessing Connection over a TCP socket. For small payloads, Nagle's
193 algorithm would introduce idle delays before the entire transmission of a
194 message.
195
196- Issue #16983: the new email header parsing code will now decode encoded words
197 that are (incorrectly) surrounded by quotes, and register a defect.
198
199- Issue #19772: email.generator no longer mutates the message object when
200 doing a down-transform from 8bit to 7bit CTEs.
201
202- Issue #20536: the statistics module now correctly handle Decimal instances
203 with positive exponents
204
205- Issue #18805: the netmask/hostmask parsing in ipaddress now more reliably
206 filters out illegal values and correctly allows any valid prefix length.
207
208- Issue #20481: For at least Python 3.4, the statistics module will require
209 that all inputs for a single operation be of a single consistent type, or
210 else a mixed of ints and a single other consistent type. This avoids
211 some interoperability issues that arose with the previous approach of
212 coercing to a suitable common type.
213
214- Issue #20478: the statistics module now treats collections.Counter inputs
215 like any other iterable.
216
217- Issue #17369: get_filename was raising an exception if the filename
218 parameter's RFC2231 encoding was broken in certain ways. This was
219 a regression relative to python2.
220
221- Issue #20013: Some imap servers disconnect if the current mailbox is
222 deleted, and imaplib did not handle that case gracefully. Now it
223 handles the 'bye' correctly.
224
225- Issue #20531: Revert 3.4 version of fix for #19063, and apply the 3.3
226 version. That is, do *not* raise an error if unicode is passed to
227 email.message.Message.set_payload.
228
229- Issue #20476: If a non-compat32 policy is used with any of the email parsers,
230 EmailMessage is now used as the factory class. The factory class should
231 really come from the policy; that will get fixed in 3.5.
232
233- Issue #19920: TarFile.list() no longer fails when outputs a listing
234 containing non-encodable characters. Based on patch by Vajrasky Kok.
235
236- Issue #20515: Fix NULL pointer dereference introduced by issue #20368.
237
238- Issue #19186: Restore namespacing of expat symbols inside the pyexpat module.
239
240- Issue #20053: ensurepip (and hence venv) are no longer affected by the
241 settings in the default pip configuration file.
242
243- Issue #20426: When passing the re.DEBUG flag, re.compile() displays the
244 debug output every time it is called, regardless of the compilation cache.
245
246- Issue #20368: The null character now correctly passed from Tcl to Python.
247 Improved error handling in variables-related commands.
248
249- Issue #20435: Fix _pyio.StringIO.getvalue() to take into account newline
250 translation settings.
251
252- tracemalloc: Fix slicing traces and fix slicing a traceback.
253
254- Issue #20354: Fix an alignment issue in the tracemalloc module on 64-bit
255 platforms. Bug seen on 64-bit Linux when using "make profile-opt".
256
257- Issue #17159: inspect.signature now accepts duck types of functions,
258 which adds support for Cython functions. Initial patch by Stefan Behnel.
259
260- Issue #18801: Fix inspect.classify_class_attrs to correctly classify
261 object.__new__ and object.__init__.
262
263- Fixed cmath.isinf's name in its argument parsing code.
264
265- Issue #20311, #20452: poll and epoll now round the timeout away from zero,
266 instead of rounding towards zero, in select and selectors modules:
267 select.epoll.poll(), selectors.PollSelector.poll() and
268 selectors.EpollSelector.poll(). For example, a timeout of one microsecond
269 (1e-6) is now rounded to one millisecondi (1e-3), instead of being rounded to
270 zero. However, the granularity property and asyncio's resolution feature
271 were removed again.
272
273- asyncio: Some refactoring; various fixes; add write flow control to
274 unix pipes; Future.set_exception() instantiates the exception
275 argument if it is a class; improved proactor pipe transport; support
276 wait_for(f, None); don't log broken/disconnected pipes; use
277 ValueError instead of assert for forbidden subprocess_{shell,exec}
278 arguments; added a convenience API for subprocess management; added
279 StreamReader.at_eof(); properly handle duplicate coroutines/futures
280 in gather(), wait(), as_completed(); use a bytearray for buffering
281 in StreamReader; and more.
282
283- Issue #20288: fix handling of invalid numeric charrefs in HTMLParser.
284
285- Issue #20424: Python implementation of io.StringIO now supports lone surrogates.
286
287- Issue #20308: inspect.signature now works on classes without user-defined
288 __init__ or __new__ methods.
289
290- Issue #20372: inspect.getfile (and a bunch of other inspect functions that
291 use it) doesn't crash with unexpected AttributeError on classes defined in C
292 without __module__.
293
294- Issue #20356: inspect.signature formatting uses '/' to separate
295 positional-only parameters from others.
296
297- Issue #20223: inspect.signature now supports methods defined with
298 functools.partialmethods.
299
300- Issue #19456: ntpath.join() now joins relative paths correctly when a drive
301 is present.
302
303- Issue #19077: tempfile.TemporaryDirectory cleanup no longer fails when
304 called during shutdown. Emitting resource warning in __del__ no longer fails.
305 Original patch by Antoine Pitrou.
306
307- Issue #20394: Silence Coverity warning in audioop module.
308
309- Issue #20367: Fix behavior of concurrent.futures.as_completed() for
310 duplicate arguments. Patch by Glenn Langford.
311
312- Issue #8260: The read(), readline() and readlines() methods of
313 codecs.StreamReader returned incomplete data when were called after
314 readline() or read(size). Based on patch by Amaury Forgeot d'Arc.
315
316- Issue #20105: the codec exception chaining now correctly sets the
317 traceback of the original exception as its __traceback__ attribute.
318
319- Issue #17481: inspect.getfullargspec() now uses inspect.signature() API.
320
321- Issue #15304: concurrent.futures.wait() can block forever even if
322 Futures have completed. Patch by Glenn Langford.
323
324- Issue #14455: plistlib: fix serializing integers in the range
325 of an unsigned long long but outside of the range of signed long long for
326 binary plist files.
327
328IDLE
329----
330
331- Issue #20406: Use Python application icons for Idle window title bars.
332 Patch mostly by Serhiy Storchaka.
333
334- Update the python.gif icon for the Idle classbrowser and pathbowser
335 from the old green snake to the new blue and yellow snakes.
336
337- Issue #17721: Remove non-functional configuration dialog help button until we
338 make it actually gives some help when clicked. Patch by Guilherme Simões.
339
340Tests
341-----
342
343- Issue #20532: Tests which use _testcapi now are marked as CPython only.
344
345- Issue #19920: Added tests for TarFile.list(). Based on patch by Vajrasky Kok.
346
347- Issue #19990: Added tests for the imghdr module. Based on patch by
348 Claudiu Popa.
349
350- Issue #20474: Fix test_socket "unexpected success" failures on OS X 10.7+.
351
352Tools/Demos
353-----------
354
355- Issue #20530: Argument Clinic's signature format has been revised again.
356 The new syntax is highly human readable while still preventing false
357 positives. The syntax also extends Python syntax to denote "self" and
358 positional-only parameters, allowing inspect.Signature objects to be
359 totally accurate for all supported builtins in Python 3.4.
360
361- Issue #20456: Argument Clinic now observes the C preprocessor conditional
362 compilation statements of the C files it parses. When a Clinic block is
363 inside a conditional code, it adjusts its output to match, including
364 automatically generating an empty methoddef macro.
365
366- Issue #20456: Cloned functions in Argument Clinic now use the correct
367 name, not the name of the function they were cloned from, for text
368 strings inside generated code.
369
370- Issue #20456: Fixed Argument Clinic's test suite and "--converters" feature.
371
372- Issue #20456: Argument Clinic now allows specifying different names
373 for a parameter in Python and C, using "as" on the parameter line.
374
375- Issue #20326: Argument Clinic now uses a simple, unique signature to
376 annotate text signatures in docstrings, resulting in fewer false
377 positives. "self" parameters are also explicitly marked, allowing
378 inspect.Signature() to authoritatively detect (and skip) said parameters.
379
380- Issue #20326: Argument Clinic now generates separate checksums for the
381 input and output sections of the block, allowing external tools to verify
382 that the input has not changed (and thus the output is not out-of-date).
383
384Build
385-----
386
387- Issue #20465: Update SQLite shipped with OS X installer to 3.8.3.
388
389C-API
390-----
391
392- Issue #20517: Added new functions allowing OSError exceptions to reference
393 two filenames instead of one: PyErr_SetFromErrnoWithFilenameObjects() and
394 PyErr_SetExcFromWindowsErrWithFilenameObjects().
395
396Documentation
397-------------
398
399- Issue #20488: Change wording to say importlib is *the* implementation of
400 import instead of just *an* implementation.
401
402- Issue #6386: Clarify in the tutorial that specifying a symlink to execute
403 means the directory containing the executed script and not the symlink is
404 added to sys.path.
405
406
407What's New in Python 3.4.0 Beta 3?
408==================================
409
410Release date: 2014-01-26
411
412Core and Builtins
413-----------------
414
415- Issue #20189: Four additional builtin types (PyTypeObject,
416 PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
417 have been modified to provide introspection information for builtins.
418
419- Issue #17825: Cursor "^" is correctly positioned for SyntaxError and
420 IndentationError.
421
422- Issue #2382: SyntaxError cursor "^" is now written at correct position in most
423 cases when multibyte characters are in line (before "^"). This still not
424 works correctly with wide East Asian characters.
425
426- Issue #18960: The first line of Python script could be executed twice when
427 the source encoding was specified on the second line. Now the source encoding
428 declaration on the second line isn't effective if the first line contains
429 anything except a comment. 'python -x' works now again with files with the
430 source encoding declarations, and can be used to make Python batch files
431 on Windows.
432
433Library
434-------
435
436- asyncio: Various improvements and small changes not all covered by
437 issues listed below. E.g. wait_for() now cancels the inner task if
438 the timeout occcurs; tweaked the set of exported symbols; renamed
439 Empty/Full to QueueEmpty/QueueFull; "with (yield from lock)" now
440 uses a separate context manager; readexactly() raises if not enough
441 data was read; PTY support tweaks.
442
443- Issue #20311: asyncio: Add a granularity attribute to BaseEventLoop: maximum
444 between the resolution of the BaseEventLoop.time() method and the resolution
445 of the selector. The granuarility is used in the scheduler to round time and
446 deadline.
447
448- Issue #20311: selectors: Add a resolution attribute to BaseSelector.
449
450- Issue #20189: unittest.mock now no longer assumes that any object for
451 which it could get an inspect.Signature is a callable written in Python.
452 Fix courtesy of Michael Foord.
453
454- Issue #20317: ExitStack.__exit__ could create a self-referential loop if an
455 exception raised by a cleanup operation already had its context set
456 correctly (for example, by the @contextmanager decorator). The infinite
457 loop this caused is now avoided by checking if the expected context is
458 already set before trying to fix it.
459
460- Issue #20374: Fix build with GNU readline >= 6.3.
461
462- Issue #20262: Warnings are raised now when duplicate names are added in the
463 ZIP file or too long ZIP file comment is truncated.
464
465- Issue #20165: The unittest module no longer considers tests marked with
466 @expectedFailure successful if they pass.
467
468- Issue #18574: Added missing newline in 100-Continue reply from
469 http.server.BaseHTTPRequestHandler. Patch by Nikolaus Rath.
470
471- Issue #20270: urllib.urlparse now supports empty ports.
472
473- Issue #20243: TarFile no longer raise ReadError when opened in write mode.
474
475- Issue #20238: TarFile opened with external fileobj and "w:gz" mode didn't
476 write complete output on close.
477
478- Issue #20245: The open functions in the tarfile module now correctly handle
479 empty mode.
480
481- Issue #20242: Fixed basicConfig() format strings for the alternative
482 formatting styles. Thanks to kespindler for the bug report and patch.
483
484- Issue #20246: Fix buffer overflow in socket.recvfrom_into.
485
486- Issues #20206 and #5803: Fix edge case in email.quoprimime.encode where it
487 truncated lines ending in a character needing encoding but no newline by
488 using a more efficient algorithm that doesn't have the bug.
489
490- Issue #19082: Working xmlrpc.server and xmlrpc.client examples. Both in
491 modules and in documentation. Initial patch contributed by Vajrasky Kok.
492
493- Issue #20138: The wsgiref.application_uri() and wsgiref.request_uri()
494 functions now conform to PEP 3333 when handle non-ASCII URLs.
495
496- Issue #19097: Raise the correct Exception when cgi.FieldStorage is given an
497 invalid fileobj.
498
499- Issue #20152: Ported Python/import.c over to Argument Clinic.
500
501- Issue #13107: argparse and optparse no longer raises an exception when output
502 a help on environment with too small COLUMNS. Based on patch by
503 Elazar Gershuni.
504
505- Issue #20207: Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly
506 asked for.
507
508- Issue #18960: The tokenize module now ignore the source encoding declaration
509 on the second line if the first line contains anything except a comment.
510
511- Issue #20078: Reading malformed zipfiles no longer hangs with 100% CPU
512 consumption.
513
514- Issue #20113: os.readv() and os.writev() now raise an OSError exception on
515 error instead of returning -1.
516
517- Issue #19719: Make importlib.abc.MetaPathFinder.find_module(),
518 PathEntryFinder.find_loader(), and Loader.load_module() use PEP 451 APIs to
519 help with backwards-compatibility.
520
521- Issue #20144: inspect.Signature now supports parsing simple symbolic
522 constants as parameter default values in __text_signature__.
523
524- Issue #20072: Fixed multiple errors in tkinter with wantobjects is False.
525
526- Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver().
527
528- Issue #14455: Fix some problems with the new binary plist support in plistlib.
529
530IDLE
531----
532
533- Issue #17390: Add Python version to Idle editor window title bar.
534 Original patches by Edmond Burnett and Kent Johnson.
535
536- Issue #18960: IDLE now ignores the source encoding declaration on the second
537 line if the first line contains anything except a comment.
538
539Tests
540-----
541
542- Issue #20358: Tests for curses.window.overlay and curses.window.overwrite
543 no longer specify min{row,col} > max{row,col}.
544
545- Issue #19804: The test_find_mac test in test_uuid is now skipped if the
546 ifconfig executable is not available.
547
548- Issue #19886: Use better estimated memory requirements for bigmem tests.
549
550Tools/Demos
551-----------
552
553- Issue #20390: Argument Clinic's "file" output preset now defaults to
554 "{dirname}/clinic/{basename}.h".
555
556- Issue #20390: Argument Clinic's "class" directive syntax has been extended
557 with two new required arguments: "typedef" and "type_object".
558
559- Issue #20390: Argument Clinic: If __new__ or __init__ functions didn't use
560 kwargs (or args), the PyArg_NoKeywords (or PyArg_NoPositional) calls
561 generated are only run when the type object is an exact match.
562
563- Issue #20390: Argument Clinic now fails if you have required parameters after
564 optional parameters.
565
566- Issue #20390: Argument Clinic converters now have a new template they can
567 inject code into: "modifiers". Code put there is run in the parsing
568 function after argument parsing but before the call to the impl.
569
570- Issue #20376: Argument Clinic now escapes backslashes in docstrings.
571
572- Issue #20381: Argument Clinic now sanity checks the default argument when
573 c_default is also specified, providing a nice failure message for
574 disallowed values.
575
576- Issue #20189: Argument Clinic now ensures that parser functions for
577 __new__ are always of type newfunc, the type of the tp_new slot.
578 Similarly, parser functions for __init__ are now always of type initproc,
579 the type of tp_init.
580
581- Issue #20189: Argument Clinic now suppresses the docstring for __new__
582 and __init__ functions if no docstring is provided in the input.
583
584- Issue #20189: Argument Clinic now suppresses the "self" parameter in the
585 impl for @staticmethod functions.
586
587- Issue #20294: Argument Clinic now supports argument parsing for __new__ and
588 __init__ functions.
589
590- Issue #20299: Argument Clinic custom converters may now change the default
591 value of c_default and py_default with a class member.
592
593- Issue #20287: Argument Clinic's output is now configurable, allowing
594 delaying its output or even redirecting it to a separate file.
595
596- Issue #20226: Argument Clinic now permits simple expressions
597 (e.g. "sys.maxsize - 1") as default values for parameters.
598
599- Issue #19936: Added executable bits or shebang lines to Python scripts which
600 requires them. Disable executable bits and shebang lines in test and
601 benchmark files in order to prevent using a random system python, and in
602 source files of modules which don't provide command line interface. Fixed
603 shebang lines in the unittestgui and checkpip scripts.
604
605- Issue #20268: Argument Clinic now supports cloning the parameters and
606 return converter of existing functions.
607
608- Issue #20228: Argument Clinic now has special support for class special
609 methods.
610
611- Issue #20214: Fixed a number of small issues and documentation errors in
612 Argument Clinic (see issue for details).
613
614- Issue #20196: Fixed a bug where Argument Clinic did not generate correct
615 parsing code for functions with positional-only parameters where all arguments
616 are optional.
617
618- Issue #18960: 2to3 and the findnocoding.py script now ignore the source
619 encoding declaration on the second line if the first line contains anything
620 except a comment.
621
622- Issue #19723: The marker comments Argument Clinic uses have been changed
623 to improve readability.
624
625- Issue #20157: When Argument Clinic renames a parameter because its name
626 collides with a C keyword, it no longer exposes that rename to PyArg_Parse.
627
628- Issue #20141: Improved Argument Clinic's support for the PyArg_Parse "O!"
629 format unit.
630
631- Issue #20144: Argument Clinic now supports simple symbolic constants
632 as parameter default values.
633
634- Issue #20143: The line numbers reported in Argument Clinic errors are
635 now more accurate.
636
637- Issue #20142: Py_buffer variables generated by Argument Clinic are now
638 initialized with a default value.
639
640Build
641-----
642
643- Issue #12837: Silence a tautological comparison warning on OS X under Clang in
644 socketmodule.c.
645
646
647What's New in Python 3.4.0 Beta 2?
648==================================
649
650Release date: 2014-01-05
651
652Core and Builtins
653-----------------
654
655- Issue #17432: Drop UCS2 from names of Unicode functions in python3.def.
656
657- Issue #19526: Exclude all new API from the stable ABI. Exceptions can be
658 made if a need is demonstrated.
659
660- Issue #19969: PyBytes_FromFormatV() now raises an OverflowError if "%c"
661 argument is not in range [0; 255].
662
663- Issue #19995: %c, %o, %x, and %X now issue a DeprecationWarning on non-integer
664 input; reworded docs to clarify that an integer type should define both __int__
665 and __index__.
666
667- Issue #19787: PyThread_set_key_value() now always set the value. In Python
668 3.3, the function did nothing if the key already exists (if the current value
669 is a non-NULL pointer).
670
671- Issue #14432: Remove the thread state field from the frame structure. Fix a
672 crash when a generator is created in a C thread that is destroyed while the
673 generator is still used. The issue was that a generator contains a frame, and
674 the frame kept a reference to the Python state of the destroyed C thread. The
675 crash occurs when a trace function is setup.
676
677- Issue #19576: PyGILState_Ensure() now initializes threads. At startup, Python
678 has no concrete GIL. If PyGILState_Ensure() is called from a new thread for
679 the first time and PyEval_InitThreads() was not called yet, a GIL needs to be
680 created.
681
682- Issue #17576: Deprecation warning emitted now when __int__() or __index__()
683 return not int instance.
684
685- Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes.
686
687- Issue #19736: Add module-level statvfs constants defined for GNU/glibc
688 based systems.
689
690- Issue #20097: Fix bad use of "self" in importlib's WindowsRegistryFinder.
691
692- Issue #19729: In str.format(), fix recursive expansion in format spec.
693
694- Issue #19638: Fix possible crash / undefined behaviour from huge (more than 2
695 billion characters) input strings in _Py_dg_strtod.
696
697Library
698-------
699
700- Issue #20154: Deadlock in asyncio.StreamReader.readexactly().
701
702- Issue #16113: Remove sha3 module again.
703
704- Issue #20111: pathlib.Path.with_suffix() now sanity checks the given suffix.
705
706- Fix breakage in TestSuite.countTestCases() introduced by issue #11798.
707
708- Issue #20108: Avoid parameter name clash in inspect.getcallargs().
709
710- Issue #19918: Fix PurePath.relative_to() under Windows.
711
712- Issue #19422: Explicitly disallow non-SOCK_STREAM sockets in the ssl
713 module, rather than silently let them emit clear text data.
714
715- Issue #20046: Locale alias table no longer contains entities which can be
716 calculated. Generalized support of the euro modifier.
717
718- Issue #20027: Fixed locale aliases for devanagari locales.
719
720- Issue #20067: Tkinter variables now work when wantobjects is false.
721
722- Issue #19020: Tkinter now uses splitlist() instead of split() in configure
723 methods.
724
725- Issue #19744: ensurepip now provides a better error message when Python is
726 built without SSL/TLS support (pip currently requires that support to run,
727 even if only operating with local wheel files)
728
729- Issue #19734: ensurepip now ignores all pip environment variables to avoid
730 odd behaviour based on user configuration settings
731
732- Fix TypeError on "setup.py upload --show-response".
733
734- Issue #20045: Fix "setup.py register --list-classifiers".
735
736- Issue #18879: When a method is looked up on a temporary file, avoid closing
737 the file before the method is possibly called.
738
739- Issue #20037: Avoid crashes when opening a text file late at interpreter
740 shutdown.
741
742- Issue #19967: Thanks to the PEP 442, asyncio.Future now uses a
743 destructor to log uncaught exceptions, instead of the dedicated
744 _TracebackLogger class.
745
746- Added a Task.current_task() class method to asyncio.
747
748- Issue #19850: Set SA_RESTART in asyncio when registering a signal
749 handler to limit EINTR occurrences.
750
751- Implemented write flow control in asyncio for proactor event loop (Windows).
752
753- Change write buffer in asyncio use to avoid O(N**2) behavior. Make
754 write()/sendto() accept bytearray/memoryview.
755
756- Issue #20034: Updated alias mapping to most recent locale.alias file
757 from X.org distribution using makelocalealias.py.
758
759- Issue #5815: Fixed support for locales with modifiers. Fixed support for
760 locale encodings with hyphens.
761
762- Issue #20026: Fix the sqlite module to handle correctly invalid isolation
763 level (wrong type).
764
765- Issue #18829: csv.Dialect() now checks type for delimiter, escapechar and
766 quotechar fields. Original patch by Vajrasky Kok.
767
768- Issue #19855: uuid.getnode() on Unix now looks on the PATH for the
769 executables used to find the mac address, with /sbin and /usr/sbin as
770 fallbacks.
771
772- Issue #20007: HTTPResponse.read(0) no more prematurely closes connection.
773 Original patch by Simon Sapin.
774
775- Issue #19946: multiprocessing now uses runpy to initialize __main__ in
776 child processes when necessary, allowing it to correctly handle scripts
777 without suffixes and submodules that use explicit relative imports or
778 otherwise rely on parent modules being correctly imported prior to
779 execution.
780
781- Issue #19921: When Path.mkdir() is called with parents=True, any missing
782 parent is created with the default permissions, ignoring the mode argument
783 (mimicking the POSIX "mkdir -p" command).
784
785- Issue #19887: Improve the Path.resolve() algorithm to support certain
786 symlink chains.
787
788- Issue #19912: Fixed numerous bugs in ntpath.splitunc().
789
790- Issue #19911: ntpath.splitdrive() now correctly processes the 'İ' character
791 (U+0130, LATIN CAPITAL LETTER I WITH DOT ABOVE).
792
793- Issue #19532: python -m compileall with no filename/directory arguments now
794 respects the -f and -q flags instead of ignoring them.
795
796- Issue #19623: Fixed writing to unseekable files in the aifc module.
797
798- Issue #19946: multiprocessing.spawn now raises ImportError when the module to
799 be used as the main module cannot be imported.
800
801- Issue #17919: select.poll.register() again works with poll.POLLNVAL on AIX.
802 Fixed integer overflow in the eventmask parameter.
803
804- Issue #19063: if a Charset's body_encoding was set to None, the email
805 package would generate a message claiming the Content-Transfer-Encoding
806 was 7bit, and produce garbage output for the content. This now works.
807 A couple of other set_payload mishandlings of non-ASCII are also fixed.
808 In addition, calling set_payload with a string argument without
809 specifying a charset now raises an error (this is a new error in 3.4).
810
811- Issue #15475: Add __sizeof__ implementations for itertools objects.
812
813- Issue #19944: Fix importlib.find_spec() so it imports parents as needed
814 and move the function to importlib.util.
815
816- Issue #19880: Fix a reference leak in unittest.TestCase. Explicitly break
817 reference cycles between frames and the _Outcome instance.
818
819- Issue #17429: platform.linux_distribution() now decodes files from the UTF-8
820 encoding with the surrogateescape error handler, instead of decoding from the
821 locale encoding in strict mode. It fixes the function on Fedora 19 which is
822 probably the first major distribution release with a non-ASCII name. Patch
823 written by Toshio Kuratomi.
824
825- Issue #19343: Expose FreeBSD-specific APIs in resource module. Original
826 patch by Koobs.
827
828- Issue #19929: Call os.read with 32768 within subprocess.Popen.communicate
829 rather than 4096 for efficiency. A microbenchmark shows Linux and OS X
830 both using ~50% less cpu time this way.
831
832- Issue #19506: Use a memoryview to avoid a data copy when piping data
833 to stdin within subprocess.Popen.communicate. 5-10% less cpu usage.
834
835- Issue #19876: selectors unregister() no longer raises ValueError or OSError
836 if the FD is closed (as long as it was registered).
837
838- Issue #19908: pathlib now joins relative Windows paths correctly when a drive
839 is present. Original patch by Antoine Pitrou.
840
841- Issue #19296: Silence compiler warning in dbm_open
842
843- Issue #6784: Strings from Python 2 can now be unpickled as bytes
844 objects by setting the encoding argument of Unpickler to be 'bytes'.
845 Initial patch by Merlijn van Deen.
846
847- Issue #19839: Fix regression in bz2 module's handling of non-bzip2 data at
848 EOF, and analogous bug in lzma module.
849
850- Issue #19881: Fix pickling bug where cpickle would emit bad pickle data for
851 large bytes string (i.e., with size greater than 2**32-1).
852
853- Issue #19138: doctest's IGNORE_EXCEPTION_DETAIL now allows a match when
854 no exception detail exists (no colon following the exception's name, or
855 a colon does follow but no text follows the colon).
856
857- Issue #19927: Add __eq__ to path-based loaders in importlib.
858
859- Issue #19827: On UNIX, setblocking() and settimeout() methods of
860 socket.socket can now avoid a second syscall if the ioctl() function can be
861 used, or if the non-blocking flag of the socket is unchanged.
862
863- Issue #19785: smtplib now supports SSLContext.check_hostname and server name
864 indication for TLS/SSL connections.
865
866- Issue #19784: poplib now supports SSLContext.check_hostname and server name
867 indication for TLS/SSL connections.
868
869- Issue #19783: nntplib now supports SSLContext.check_hostname and server name
870 indication for TLS/SSL connections.
871
872- Issue #19782: imaplib now supports SSLContext.check_hostname and server name
873 indication for TLS/SSL connections.
874
875- Issue #20123: Fix pydoc.synopsis() for "binary" modules.
876
877- Issue #19834: Support unpickling of exceptions pickled by Python 2.
878
879- Issue #19781: ftplib now supports SSLContext.check_hostname and server name
880 indication for TLS/SSL connections.
881
882- Issue #19509: Add SSLContext.check_hostname to match the peer's certificate
883 with server_hostname on handshake.
884
885- Issue #15798: Fixed subprocess.Popen() to no longer fail if file
886 descriptor 0, 1 or 2 is closed.
887
888- Issue #17897: Optimized unpickle prefetching.
889
890- Issue #3693: Make the error message more helpful when the array.array()
891 constructor is given a str. Move the array module typecode documentation to
892 the docstring of the constructor.
893
894- Issue #19088: Fixed incorrect caching of the copyreg module in
895 object.__reduce__() and object.__reduce_ex__().
896
897- Issue #19698: Removed exec_module() methods from
898 importlib.machinery.BuiltinImporter and ExtensionFileLoader.
899
900- Issue #18864: Added a setter for ModuleSpec.has_location.
901
902- Fixed _pickle.Unpickler to not fail when loading empty strings as
903 persistent IDs.
904
905- Issue #11480: Fixed copy.copy to work with classes with custom metaclasses.
906 Patch by Daniel Urban.
907
908- Issue #6477: Added support for pickling the types of built-in singletons
909 (i.e., Ellipsis, NotImplemented, None).
910
911- Issue #19713: Add remaining PEP 451-related deprecations and move away
912 from using find_module/find_loaer/load_module.
913
914- Issue #19708: Update pkgutil to use the new importer APIs.
915
916- Issue #19703: Update pydoc to use the new importer APIs.
917
918- Issue #19851: Fixed a regression in reloading sub-modules.
919
920- ssl.create_default_context() sets OP_NO_COMPRESSION to prevent CRIME.
921
922- Issue #19802: Add socket.SO_PRIORITY.
923
924- Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with
925 virtual interface. Original patch by Kent Frazier.
926
927- Issue #11489: JSON decoder now accepts lone surrogates.
928
929- Issue #19545: Avoid chained exceptions while passing stray % to
930 time.strptime(). Initial patch by Claudiu Popa.
931
932IDLE
933----
934
935- Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
936
937- Issue #19481: print() of string subclass instance in IDLE no longer hangs.
938
939- Issue #18270: Prevent possible IDLE AttributeError on OS X when no initial
940 shell window is present.
941
942Tests
943-----
944
945- Issue #20055: Fix test_shutil under Windows with symlink privileges held.
946 Patch by Vajrasky Kok.
947
948- Issue #20070: Don't run test_urllib2net when network resources are not
949 enabled.
950
951- Issue #19938: Re-enabled test_bug_1333982 in test_dis, which had been
952 disabled since 3.0 due to the changes in listcomp handling.
953
954- Issue #19320: test_tcl no longer fails when wantobjects is false.
955
956- Issue #19919: Fix flaky SSL test. connect_ex() sometimes returns
957 EWOULDBLOCK on Windows or VMs hosted on Windows.
958
959- Issue #19912: Added tests for ntpath.splitunc().
960
961- Issue #19828: Fixed test_site when the whole suite is run with -S.
962
963- Issue #19928: Implemented a test for repr() of cell objects.
964
965- Issue #19535: Fixed test_docxmlrpc, test_functools, test_inspect, and
966 test_statistics when python is run with -OO.
967
968- Issue #19926: Removed unneeded test_main from test_abstract_numbers.
969 Patch by Vajrasky Kok.
970
971- Issue #19572: More skipped tests explicitly marked as skipped.
972
973- Issue #19595, #19987: Re-enabled a long-disabled test in test_winsound.
974
975- Issue #19588: Fixed tests in test_random that were silently skipped most
976 of the time. Patch by Julian Gindi.
977
978Build
979-----
980
981- Issue #19728: Enable pip installation by default on Windows.
982
983- Issue #16136: Remove VMS support
984
985- Issue #18215: Add script Tools/ssl/test_multiple_versions.py to compile and
986 run Python's unit tests with multiple versions of OpenSSL.
987
988- Issue #19922: define _INCLUDE__STDC_A1_SOURCE in HP-UX to include mbstate_t
989 for mbrtowc().
990
991- Issue #19788: kill_python(_d).exe is now run as a PreBuildEvent on the
992 pythoncore sub-project. This should prevent build errors due a previous
993 build's python(_d).exe still running.
994
995Documentation
996-------------
997
998- Issue #20265: Updated some parts of the Using Windows document.
999
1000- Issue #20266: Updated some parts of the Windows FAQ.
1001
1002- Issue #20255: Updated the about and bugs pages.
1003
1004- Issue #20253: Fixed a typo in the ipaddress docs that advertised an
1005 illegal attribute name. Found by INADA Naoki.
1006
1007- Issue #18840: Introduce the json module in the tutorial, and de-emphasize
1008 the pickle module.
1009
1010- Issue #19845: Updated the Compiling Python on Windows section.
1011
1012- Issue #19795: Improved markup of True/False constants.
1013
1014Tools/Demos
1015-----------
1016
1017- Issue #19659: Added documentation for Argument Clinic.
1018
1019- Issue #19976: Argument Clinic METH_NOARGS functions now always
1020 take two parameters.
1021
1022
1023What's New in Python 3.4.0 Beta 1?
1024==================================
1025
1026Release date: 2013-11-24
1027
1028Core and Builtins
1029-----------------
1030
1031- Use the repr of a module name in more places in import, especially
1032 exceptions.
1033
1034- Issue #19619: str.encode, bytes.decode and bytearray.decode now use an
1035 internal API to throw LookupError for known non-text encodings, rather
1036 than attempting the encoding or decoding operation and then throwing a
1037 TypeError for an unexpected output type. (The latter mechanism remains
1038 in place for third party non-text encodings)
1039
1040- Issue #19183: Implement PEP 456 'secure and interchangeable hash algorithm'.
1041 Python now uses SipHash24 on all major platforms.
1042
1043- Issue #12892: The utf-16* and utf-32* encoders no longer allow surrogate code
1044 points (U+D800-U+DFFF) to be encoded. The utf-32* decoders no longer decode
1045 byte sequences that correspond to surrogate code points. The surrogatepass
1046 error handler now works with the utf-16* and utf-32* codecs. Based on
1047 patches by Victor Stinner and Kang-Hao (Kenny) Lu.
1048
1049- Issue #17806: Added keyword-argument support for "tabsize" to
1050 str/bytes.expandtabs().
1051
1052- Issue #17828: Output type errors in str.encode(), bytes.decode() and
1053 bytearray.decode() now direct users to codecs.encode() or codecs.decode()
1054 as appropriate.
1055
1056- Issue #17828: The interpreter now attempts to chain errors that occur in
1057 codec processing with a replacement exception of the same type that
1058 includes the codec name in the error message. It ensures it only does this
1059 when the creation of the replacement exception won't lose any information.
1060
1061- Issue #19466: Clear the frames of daemon threads earlier during the
1062 Python shutdown to call object destructors. So "unclosed file" resource
1063 warnings are now correctly emitted for daemon threads.
1064
1065- Issue #19514: Deduplicate some _Py_IDENTIFIER declarations.
1066 Patch by Andrei Dorian Duma.
1067
1068- Issue #17936: Fix O(n**2) behaviour when adding or removing many subclasses
1069 of a given type.
1070
1071- Issue #19428: zipimport now handles errors when reading truncated or invalid
1072 ZIP archive.
1073
1074- Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handle
1075 exceptions when merging fast locals into f_locals of a frame.
1076 PyEval_GetLocals() now raises an exception and return NULL on failure.
1077
1078- Issue #19369: Optimized the usage of __length_hint__().
1079
1080- Issue #28026: Raise ImportError when exec_module() exists but
1081 create_module() is missing.
1082
1083- Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
1084 Python executable and not removed by the linker's optimizer.
1085
1086- Issue #19306: Add extra hints to the faulthandler module's stack
1087 dumps that these are "upside down".
1088
1089Library
1090-------
1091
1092- Issue #3158: doctest can now find doctests in functions and methods
1093 written in C.
1094
1095- Issue #13477: Added command line interface to the tarfile module.
1096 Original patch by Berker Peksag.
1097
1098- Issue #19674: inspect.signature() now produces a correct signature
1099 for some builtins.
1100
1101- Issue #19722: Added opcode.stack_effect(), which
1102 computes the stack effect of bytecode instructions.
1103
1104- Issue #19735: Implement private function ssl._create_stdlib_context() to
1105 create SSLContext objects in Python's stdlib module. It provides a single
1106 configuration point and makes use of SSLContext.load_default_certs().
1107
1108- Issue #16203: Add re.fullmatch() function and regex.fullmatch() method,
1109 which anchor the pattern at both ends of the string to match.
1110 Original patch by Matthew Barnett.
1111
1112- Issue #13592: Improved the repr for regular expression pattern objects.
1113 Based on patch by Hugo Lopes Tavares.
1114
1115- Issue #19641: Added the audioop.byteswap() function to convert big-endian
1116 samples to little-endian and vice versa.
1117
1118- Issue #15204: Deprecated the 'U' mode in file-like objects.
1119
1120- Issue #17810: Implement PEP 3154, pickle protocol 4.
1121
1122- Issue #19668: Added support for the cp1125 encoding.
1123
1124- Issue #19689: Add ssl.create_default_context() factory function. It creates
1125 a new SSLContext object with secure default settings.
1126
1127- Issue #19727: os.utime(..., None) is now potentially more precise
1128 under Windows.
1129
1130- Issue #17201: ZIP64 extensions now are enabled by default. Patch by
1131 William Mallard.
1132
1133- Issue #19292: Add SSLContext.load_default_certs() to load default root CA
1134 certificates from default stores or system stores. By default the method
1135 loads CA certs for authentication of server certs.
1136
1137- Issue #19673: Add pathlib to the stdlib as a provisional module (PEP 428).
1138
1139- Issue #16596: pdb in a generator now properly skips over yield and
1140 yield from rather than stepping out of the generator into its
1141 caller. (This is essential for stepping through asyncio coroutines.)
1142
1143- Issue #17916: Added dis.Bytecode.from_traceback() and
1144 dis.Bytecode.current_offset to easily display "current instruction"
1145 markers in the new disassembly API (Patch by Claudiu Popa).
1146
1147- Issue #19552: venv now supports bootstrapping pip into virtual environments
1148
1149- Issue #17134: Finalize interface to Windows' certificate store. Cert and
1150 CRL enumeration are now two functions. enum_certificates() also returns
1151 purpose flags as set of OIDs.
1152
1153- Issue #19555: Restore sysconfig.get_config_var('SO'), (and the distutils
1154 equivalent) with a DeprecationWarning pointing people at $EXT_SUFFIX.
1155
1156- Issue #8813: Add SSLContext.verify_flags to change the verification flags
1157 of the context in order to enable certification revocation list (CRL)
1158 checks or strict X509 rules.
1159
1160- Issue #18294: Fix the zlib module to make it 64-bit safe.
1161
1162- Issue #19682: Fix compatibility issue with old version of OpenSSL that
1163 was introduced by Issue #18379.
1164
1165- Issue #14455: plistlib now supports binary plists and has an updated API.
1166
1167- Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on
1168 big-endian platforms.
1169
1170- Issue #18379: SSLSocket.getpeercert() returns CA issuer AIA fields, OCSP
1171 and CRL distribution points.
1172
1173- Issue #18138: Implement cadata argument of SSLContext.load_verify_location()
1174 to load CA certificates and CRL from memory. It supports PEM and DER
1175 encoded strings.
1176
1177- Issue #18775: Add name and block_size attribute to HMAC object. They now
1178 provide the same API elements as non-keyed cryptographic hash functions.
1179
1180- Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC
1181 module supports digestmod names, e.g. hmac.HMAC('sha1').
1182
1183- Issue #19449: in csv's writerow, handle non-string keys when generating the
1184 error message that certain keys are not in the 'fieldnames' list.
1185
1186- Issue #13633: Added a new convert_charrefs keyword arg to HTMLParser that,
1187 when True, automatically converts all character references.
1188
1189- Issue #2927: Added the unescape() function to the html module.
1190
1191- Issue #8402: Added the escape() function to the glob module.
1192
1193- Issue #17618: Add Base85 and Ascii85 encoding/decoding to the base64 module.
1194
1195- Issue #19634: time.strftime("%y") now raises a ValueError on AIX when given a
1196 year before 1900.
1197
1198- Fix test.support.bind_port() to not cause an error when Python was compiled
1199 on a system with SO_REUSEPORT defined in the headers but run on a system
1200 with an OS kernel that does not support that reasonably new socket option.
1201
1202- Fix compilation error under gcc of the ctypes module bundled libffi for arm.
1203
1204- Issue #19448: Add private API to SSL module to lookup ASN.1 objects by OID,
1205 NID, short name and long name.
1206
1207- Issue #19282: dbm.open now supports the context management protocol.
1208 (Initial patch by Claudiu Popa)
1209
1210- Issue #8311: Added support for writing any bytes-like objects in the aifc,
1211 sunau, and wave modules.
1212
1213- Issue #5202: Added support for unseekable files in the wave module.
1214
1215- Issue #19544 and Issue #1180: Restore global option to ignore
1216 ~/.pydistutils.cfg in Distutils, accidentally removed in backout of
1217 distutils2 changes.
1218
1219- Issue #19523: Closed FileHandler leak which occurred when delay was set.
1220
1221- Issue #19544 and Issue #6516: Restore support for --user and --group
1222 parameters to sdist command accidentally rolled back as part of the
1223 distutils2 rollback.
1224
1225- Issue #13674: Prevented time.strftime from crashing on Windows when given
1226 a year before 1900 and a format of %y.
1227
1228- Issue #19406: implementation of the ensurepip module (part of PEP 453).
1229 Patch by Donald Stufft and Nick Coghlan.
1230
1231- Issue #19544 and Issue #6286: Restore use of urllib over http allowing use
1232 of http_proxy for Distutils upload command, a feature accidentally lost
1233 in the rollback of distutils2.
1234
1235- Issue #19544 and Issue #7457: Restore the read_pkg_file method to
1236 distutils.dist.DistributionMetadata accidentally removed in the undo of
1237 distutils2.
1238
1239- Issue #16685: Added support for any bytes-like objects in the audioop module.
1240 Removed support for strings.
1241
1242- Issue #7171: Add Windows implementation of ``inet_ntop`` and ``inet_pton``
1243 to socket module. Patch by Atsuo Ishimoto.
1244
1245- Issue #19261: Added support for writing 24-bit samples in the sunau module.
1246
1247- Issue #1097797: Added CP273 encoding, used on IBM mainframes in
1248 Germany and Austria. Mapping provided by Michael Bierenfeld.
1249
1250- Issue #1575020: Fixed support of 24-bit wave files on big-endian platforms.
1251
1252- Issue #19378: Fixed a number of cases in the dis module where the new
1253 "file" parameter was not being honoured correctly
1254
1255- Issue #19378: Removed the "dis.Bytecode.show_info" method
1256
1257- Issue #19378: Renamed the "dis.Bytecode.display_code" method to
1258 "dis.Bytecode.dis" and converted it to returning a string rather than
1259 printing output.
1260
1261- Issue #19378: the "line_offset" parameter in the new "dis.get_instructions"
1262 API has been renamed to "first_line" (and the default value and usage
1263 changed accordingly). This should reduce confusion with the more common use
1264 of "offset" in the dis docs to refer to bytecode offsets.
1265
1266- Issue #18678: Corrected spwd struct member names in spwd module:
1267 sp_nam->sp_namp, and sp_pwd->sp_pwdp. The old names are kept as extra
1268 structseq members, for backward compatibility.
1269
1270- Issue #6157: Fixed tkinter.Text.debug(). tkinter.Text.bbox() now raises
1271 TypeError instead of TclError on wrong number of arguments. Original patch
1272 by Guilherme Polo.
1273
1274- Issue #10197: Rework subprocess.get[status]output to use subprocess
1275 functionality and thus to work on Windows. Patch by Nick Coghlan
1276
1277- Issue #6160: The bbox() method of tkinter.Spinbox now returns a tuple of
1278 integers instead of a string. Based on patch by Guilherme Polo.
1279
1280- Issue #19403: contextlib.redirect_stdout is now reentrant
1281
1282- Issue #19286: Directories in ``package_data`` are no longer added to
1283 the filelist, preventing failure outlined in the ticket.
1284
1285- Issue #19480: HTMLParser now accepts all valid start-tag names as defined
1286 by the HTML5 standard.
1287
1288- Issue #15114: The html.parser module now raises a DeprecationWarning when the
1289 strict argument of HTMLParser or the HTMLParser.error method are used.
1290
1291- Issue #19410: Undo the special-casing removal of '' for
1292 importlib.machinery.FileFinder.
1293
1294- Issue #19424: Fix the warnings module to accept filename containing surrogate
1295 characters.
1296
1297- Issue #19435: Fix directory traversal attack on CGIHttpRequestHandler.
1298
1299- Issue #19227: Remove pthread_atfork() handler. The handler was added to
1300 solve #18747 but has caused issues.
1301
1302- Issue #19420: Fix reference leak in module initialization code of
1303 _hashopenssl.c
1304
1305- Issue #19329: Optimized compiling charsets in regular expressions.
1306
1307- Issue #19227: Try to fix deadlocks caused by re-seeding then OpenSSL
1308 pseudo-random number generator on fork().
1309
1310- Issue #16037: HTTPMessage.readheaders() raises an HTTPException when more than
1311 100 headers are read. Adapted from patch by Jyrki Pulliainen.
1312
1313- Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to
1314 prevent readline() calls from consuming too much memory. Patch by Jyrki
1315 Pulliainen.
1316
1317- Issue #16041: CVE-2013-1752: poplib: Limit maximum line lengths to 2048 to
1318 prevent readline() calls from consuming too much memory. Patch by Jyrki
1319 Pulliainen.
1320
1321- Issue #17997: Change behavior of ``ssl.match_hostname()`` to follow RFC 6125,
1322 for security reasons. It now doesn't match multiple wildcards nor wildcards
1323 inside IDN fragments.
1324
1325- Issue #16039: CVE-2013-1752: Change use of readline in imaplib module to limit
1326 line length. Patch by Emil Lind.
1327
1328- Issue #19330: the unnecessary wrapper functions have been removed from the
1329 implementations of the new contextlib.redirect_stdout and
1330 contextlib.suppress context managers, which also ensures they provide
1331 reasonable help() output on instances
1332
1333- Issue #19393: Fix symtable.symtable function to not be confused when there are
1334 functions or classes named "top".
1335
1336- Issue #18685: Restore re performance to pre-PEP 393 levels.
1337
1338- Issue #19339: telnetlib module is now using time.monotonic() when available
1339 to compute timeout.
1340
1341- Issue #19399: fix sporadic test_subprocess failure.
1342
1343- Issue #13234: Fix os.listdir to work with extended paths on Windows.
1344 Patch by Santoso Wijaya.
1345
1346- Issue #19375: The site module adding a "site-python" directory to sys.path,
1347 if it exists, is now deprecated.
1348
1349- Issue #19379: Lazily import linecache in the warnings module, to make
1350 startup with warnings faster until a warning gets printed.
1351
1352- Issue #19288: Fixed the "in" operator of dbm.gnu databases for string
1353 argument. Original patch by Arfrever Frehtes Taifersar Arahesis.
1354
1355- Issue #19287: Fixed the "in" operator of dbm.ndbm databases for string
1356 argument. Original patch by Arfrever Frehtes Taifersar Arahesis.
1357
1358- Issue #19327: Fixed the working of regular expressions with too big charset.
1359
1360- Issue #17400: New 'is_global' attribute for ipaddress to tell if an address
1361 is allocated by IANA for global or private networks.
1362
1363- Issue #19350: Increasing the test coverage of macurl2path. Patch by Colin
1364 Williams.
1365
1366- Issue #19365: Optimized the parsing of long replacement string in re.sub*()
1367 functions.
1368
1369- Issue #19352: Fix unittest discovery when a module can be reached
1370 through several paths (e.g. under Debian/Ubuntu with virtualenv).
1371
1372- Issue #15207: Fix mimetypes to read from correct part of Windows registry
1373 Original patch by Dave Chambers
1374
1375- Issue #16595: Add prlimit() to resource module.
1376
1377- Issue #19324: Expose Linux-specific constants in resource module.
1378
1379- Load SSL's error strings in hashlib.
1380
1381- Issue #18527: Upgrade internal copy of zlib to 1.2.8.
1382
1383- Issue #19274: Add a filterfunc parameter to PyZipFile.writepy.
1384
1385- Issue #8964: fix platform._sys_version to handle IronPython 2.6+.
1386 Patch by Martin Matusiak.
1387
1388- Issue #19413: Restore pre-3.3 reload() semantics of re-finding modules.
1389
1390- Issue #18958: Improve error message for json.load(s) while passing a string
1391 that starts with a UTF-8 BOM.
1392
1393- Issue #19307: Improve error message for json.load(s) while passing objects
1394 of the wrong type.
1395
1396- Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by
1397 limiting the call to readline(). Original patch by Michał
1398 Jastrzębski and Giampaolo Rodola.
1399
1400- Issue #17087: Improved the repr for regular expression match objects.
1401
1402Tests
1403-----
1404
1405- Issue #19664: test_userdict's repr test no longer depends on the order
1406 of dict elements.
1407
1408- Issue #19440: Clean up test_capi by removing an unnecessary __future__
1409 import, converting from test_main to unittest.main, and running the
1410 _testcapi module tests as subTests of a unittest TestCase method.
1411
1412- Issue #19378: the main dis module tests are now run with both stdout
1413 redirection *and* passing an explicit file parameter
1414
1415- Issue #19378: removed the not-actually-helpful assertInstructionMatches
1416 and assertBytecodeExactlyMatches helpers from bytecode_helper
1417
1418- Issue #18702: All skipped tests now reported as skipped.
1419
1420- Issue #19439: interpreter embedding tests are now executed on Windows
1421 (Patch by Zachary Ware)
1422
1423- Issue #19085: Added basic tests for all tkinter widget options.
1424
1425- Issue #19384: Fix test_py_compile for root user, patch by Claudiu Popa.
1426
1427Documentation
1428-------------
1429
1430- Issue #18326: Clarify that list.sort's arguments are keyword-only. Also,
1431 attempt to reduce confusion in the glossary by not saying there are
1432 different "types" of arguments and parameters.
1433
1434Build
1435-----
1436
1437- Issue #19358: "make clinic" now runs the Argument Clinic preprocessor
1438 over all CPython source files.
1439
1440- Update SQLite to 3.8.1, xz to 5.0.5, and Tcl/Tk to 8.6.1 on Windows.
1441
1442- Issue #16632: Enable DEP and ASLR on Windows.
1443
1444- Issue #17791: Drop PREFIX and EXEC_PREFIX definitions from PC/pyconfig.h
1445
1446- Add workaround for VS 2010 nmake clean issue. VS 2010 doesn't set up PATH
1447 for nmake.exe correctly.
1448
1449- Issue #19550: Implement Windows installer changes of PEP 453 (ensurepip).
1450
1451- Issue #19520: Fix compiler warning in the _sha3 module on 32bit Windows.
1452
1453- Issue #19356: Avoid using a C variabled named "_self", it's a reserved
1454 word in some C compilers.
1455
1456- Issue #15792: Correct build options on Win64. Patch by Jeremy Kloth.
1457
1458- Issue #19373: Apply upstream change to Tk 8.5.15 fixing OS X 10.9
1459 screen refresh problem for OS X installer build.
1460
1461- Issue #19649: On OS X, the same set of file names are now installed
1462 in bin directories for all configurations: non-framework vs framework,
1463 and single arch vs universal builds. pythonx.y-32 is now always
1464 installed for 64-bit/32-bit universal builds. The obsolete and
1465 undocumented pythonw* symlinks are no longer installed anywhere.
1466
1467- Issue #19553: PEP 453 - "make install" and "make altinstall" now install or
1468 upgrade pip by default, using the bundled pip provided by the new ensurepip
1469 module. A new configure option, --with-ensurepip[=upgrade|install|no], is
1470 available to override the default ensurepip "--upgrade" option. The option
1471 can also be set with "make [alt]install ENSUREPIP=[upgrade|install|no]".
1472
1473- Issue #19551: PEP 453 - the OS X installer now installs pip by default.
1474
1475- Update third-party libraries for OS X installers: xz 5.0.3 -> 5.0.5,
1476 SQLite 3.7.13 -> 3.8.1
1477
1478- Issue #15663: Revert OS X installer built-in Tcl/Tk support for 3.4.0b1.
1479 Some third-party projects, such as Matplotlib and PIL/Pillow,
1480 depended on being able to build with Tcl and Tk frameworks in
1481 /Library/Frameworks.
1482
1483Tools/Demos
1484-----------
1485
1486- Issue #19730: Argument Clinic now supports all the existing PyArg
1487 "format units" as legacy converters, as well as two new features:
1488 "self converters" and the "version" directive.
1489
1490- Issue #19552: pyvenv now bootstraps pip into virtual environments by
1491 default (pass --without-pip to request the old behaviour)
1492
1493- Issue #19390: Argument Clinic no longer accepts malformed Python
1494 and C ids.
1495
1496
1497What's New in Python 3.4.0 Alpha 4?
1498===================================
1499
1500Release date: 2013-10-20
1501
1502Core and Builtins
1503-----------------
1504
1505- Issue #19301: Give classes and functions that are explicitly marked global a
1506 global qualname.
1507
1508- Issue #19279: UTF-7 decoder no longer produces illegal strings.
1509
1510- Issue #16612: Add "Argument Clinic", a compile-time preprocessor for
1511 C files to generate argument parsing code. (See PEP 436.)
1512
1513- Issue #18810: Shift stat calls in importlib.machinery.FileFinder such that
1514 the code is optimistic that if something exists in a directory named exactly
1515 like the possible package being searched for that it's in actuality a
1516 directory.
1517
1518- Issue #18416: importlib.machinery.PathFinder now treats '' as the cwd and
1519 importlib.machinery.FileFinder no longer special-cases '' to '.'. This leads
1520 to modules imported from cwd to now possess an absolute file path for
1521 __file__ (this does not affect modules specified by path on the CLI but it
1522 does affect -m/runpy). It also allows FileFinder to be more consistent by not
1523 having an edge case.
1524
1525- Issue #4555: All exported C symbols are now prefixed with either
1526 "Py" or "_Py".
1527
1528- Issue #19219: Speed up marshal.loads(), and make pyc files slightly
1529 (5% to 10%) smaller.
1530
1531- Issue #19221: Upgrade Unicode database to version 6.3.0.
1532
1533- Issue #16742: The result of the C callback PyOS_ReadlineFunctionPointer must
1534 now be a string allocated by PyMem_RawMalloc() or PyMem_RawRealloc() (or NULL
1535 if an error occurred), instead of a string allocated by PyMem_Malloc() or
1536 PyMem_Realloc().
1537
1538- Issue #19199: Remove ``PyThreadState.tick_counter`` field
1539
1540- Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at
1541 least one place so as to avoid regressions.
1542
1543- Issue #19087: Improve bytearray allocation in order to allow cheap popping
1544 of data at the front (slice deletion).
1545
1546- Issue #19014: memoryview.cast() is now allowed on zero-length views.
1547
1548- Issue #18690: memoryview is now automatically registered with
1549 collections.abc.Sequence
1550
1551- Issue #19078: memoryview now correctly supports the reversed builtin
1552 (Patch by Claudiu Popa)
1553
1554Library
1555-------
1556
1557- Issue #17457: unittest test discovery now works with namespace packages.
1558 Patch by Claudiu Popa.
1559
1560- Issue #18235: Fix the sysconfig variables LDSHARED and BLDSHARED under AIX.
1561 Patch by David Edelsohn.
1562
1563- Issue #18606: Add the new "statistics" module (PEP 450). Contributed
1564 by Steven D'Aprano.
1565
1566- Issue #12866: The audioop module now supports 24-bit samples.
1567
1568- Issue #19254: Provide an optimized Python implementation of pbkdf2_hmac.
1569
1570- Issues #19201, Issue #19222, Issue #19223: Add "x" mode (exclusive creation)
1571 in opening file to bz2, gzip and lzma modules. Patches by Tim Heaney and
1572 Vajrasky Kok.
1573
1574- Fix a reference count leak in _sre.
1575
1576- Issue #19262: Initial check in of the 'asyncio' package (a.k.a. Tulip,
1577 a.k.a. PEP 3156). There are no docs yet, and the PEP is slightly
1578 out of date with the code. This module will have *provisional* status
1579 in Python 3.4.
1580
1581- Issue #19276: Fixed the wave module on 64-bit big-endian platforms.
1582
1583- Issue #19266: Rename the new-in-3.4 ``contextlib.ignore`` context manager
1584 to ``contextlib.suppress`` in order to be more consistent with existing
1585 descriptions of that operation elsewhere in the language and standard
1586 library documentation (Patch by Zero Piraeus).
1587
1588- Issue #18891: Completed the new email package (provisional) API additions
1589 by adding new classes EmailMessage, MIMEPart, and ContentManager.
1590
1591- Issue #18281: Unused stat constants removed from `tarfile`.
1592
1593- Issue #18999: Multiprocessing now supports 'contexts' with the same API
1594 as the module, but bound to specified start methods.
1595
1596- Issue #18468: The re.split, re.findall, and re.sub functions and the group()
1597 and groups() methods of match object now always return a string or a bytes
1598 object.
1599
1600- Issue #18725: The textwrap module now supports truncating multiline text.
1601
1602- Issue #18776: atexit callbacks now display their full traceback when they
1603 raise an exception.
1604
1605- Issue #17827: Add the missing documentation for ``codecs.encode`` and
1606 ``codecs.decode``.
1607
1608- Issue #19218: Rename collections.abc to _collections_abc in order to
1609 speed up interpreter start.
1610
1611- Issue #18582: Add 'pbkdf2_hmac' to the hashlib module. It implements PKCS#5
1612 password-based key derivation functions with HMAC as pseudorandom function.
1613
1614- Issue #19131: The aifc module now correctly reads and writes sampwidth of
1615 compressed streams.
1616
1617- Issue #19209: Remove import of copyreg from the os module to speed up
1618 interpreter startup. stat_result and statvfs_result are now hard-coded to
1619 reside in the os module.
1620
1621- Issue #19205: Don't import the 're' module in site and sysconfig module to
1622 speed up interpreter start.
1623
1624- Issue #9548: Add a minimal "_bootlocale" module that is imported by the
1625 _io module instead of the full locale module.
1626
1627- Issue #18764: Remove the 'print' alias for the PDB 'p' command so that it no
1628 longer shadows the print function.
1629
1630- Issue #19158: A rare race in BoundedSemaphore could allow .release() too
1631 often.
1632
1633- Issue #15805: Add contextlib.redirect_stdout().
1634
1635- Issue #18716: Deprecate the formatter module.
1636
1637- Issue #10712: 2to3 has a new "asserts" fixer that replaces deprecated names
1638 of unittest methods (e.g. failUnlessEqual -> assertEqual).
1639
1640- Issue #18037: 2to3 now escapes ``'\u'`` and ``'\U'`` in native strings.
1641
1642- Issue #17839: base64.decodebytes and base64.encodebytes now accept any
1643 object that exports a 1 dimensional array of bytes (this means the same
1644 is now also true for base64_codec)
1645
1646- Issue #19132: The pprint module now supports compact mode.
1647
1648- Issue #19137: The pprint module now correctly formats instances of set and
1649 frozenset subclasses.
1650
1651- Issue #10042: functools.total_ordering now correctly handles
1652 NotImplemented being returned by the underlying comparison function (Patch
1653 by Katie Miller)
1654
1655- Issue #19092: contextlib.ExitStack now correctly reraises exceptions
1656 from the __exit__ callbacks of inner context managers (Patch by Hrvoje
1657 Nikšić)
1658
1659- Issue #12641: Avoid passing "-mno-cygwin" to the mingw32 compiler, except
1660 when necessary. Patch by Oscar Benjamin.
1661
1662- Issue #5845: In site.py, only load readline history from ~/.python_history
1663 if no history has been read already. This avoids double writes to the
1664 history file at shutdown.
1665
1666- Properly initialize all fields of a SSL object after allocation.
1667
1668- Issue #19095: SSLSocket.getpeercert() now raises ValueError when the
1669 SSL handshake hasn't been done.
1670
1671- Issue #4366: Fix building extensions on all platforms when --enable-shared
1672 is used.
1673
1674- Issue #19030: Fixed `inspect.getmembers` and `inspect.classify_class_attrs`
1675 to attempt activating descriptors before falling back to a __dict__ search
1676 for faulty descriptors. `inspect.classify_class_attrs` no longer returns
1677 Attributes whose home class is None.
1678
1679C API
1680-----
1681
1682- Issue #1772673: The type of `char*` arguments now changed to `const char*`.
1683
1684- Issue #16129: Added a `Py_SetStandardStreamEncoding` pre-initialization API
1685 to allow embedding applications like Blender to force a particular
1686 encoding and error handler for the standard IO streams (initial patch by
1687 Bastien Montagne)
1688
1689Tests
1690-----
1691
1692- Issue #19275: Fix test_site on AMD64 Snow Leopard
1693
1694- Issue #14407: Fix unittest test discovery in test_concurrent_futures.
1695
1696- Issue #18919: Unified and extended tests for audio modules: aifc, sunau and
1697 wave.
1698
1699- Issue #18714: Added tests for ``pdb.find_function()``.
1700
1701Documentation
1702-------------
1703
1704- Issue #18758: Fixed and improved cross-references.
1705
1706- Issue #18972: Modernize email examples and use the argparse module in them.
1707
1708Build
1709-----
1710
1711- Issue #19130: Correct PCbuild/readme.txt, Python 3.3 and 3.4 require VS 2010.
1712
1713- Issue #15663: Update OS X 10.6+ installer to use Tcl/Tk 8.5.15.
1714
1715- Issue #14499: Fix several problems with OS X universal build support:
1716 1. ppc arch detection for extension module builds broke with Xcode 5
1717 2. ppc arch detection in configure did not work on OS X 10.4
1718 3. -sysroot and -arch flags were unnecessarily duplicated
1719 4. there was no obvious way to configure an intel-32 only build.
1720
1721- Issue #19019: Change the OS X installer build script to use CFLAGS instead
1722 of OPT for special build options. By setting OPT, some compiler-specific
1723 options like -fwrapv were overridden and thus not used, which could result
1724 in broken interpreters when building with clang.
1725
1726
1727What's New in Python 3.4.0 Alpha 3?
1728===================================
1729
1730Release date: 2013-09-29
1731
1732Core and Builtins
1733-----------------
1734
1735- Issue #18818: The "encodingname" part of PYTHONIOENCODING is now optional.
1736
1737- Issue #19098: Prevent overflow in the compiler when the recursion limit is set
1738 absurdly high.
1739
1740Library
1741-------
1742
1743- Issue #18929: `inspect.classify_class_attrs()` now correctly finds class
1744 attributes returned by `dir()` that are located in the metaclass.
1745
1746- Issue #18950: Fix miscellaneous bugs in the sunau module.
1747 Au_read.readframes() now updates current file position and reads correct
1748 number of frames from multichannel stream. Au_write.writeframesraw() now
1749 correctly updates current file position. Au_read.getnframes() now returns an
1750 integer (as in Python 2). Au_read and Au_write now correctly works with file
1751 object if start file position is not a zero.
1752
1753- Issue #18594: The fast path for collections.Counter() was never taken
1754 due to an over-restrictive type check.
1755
1756- Issue #19053: ZipExtFile.read1() with non-zero argument no more returns empty
1757 bytes until end of data.
1758
1759- logging: added support for Unix domain sockets to SocketHandler and
1760 DatagramHandler.
1761
1762- Issue #18996: TestCase.assertEqual() now more cleverly shorten differing
1763 strings in error report.
1764
1765- Issue #19034: repr() for tkinter.Tcl_Obj now exposes string reperesentation.
1766
1767- Issue #18978: ``urllib.request.Request`` now allows the method to be
1768 indicated on the class and no longer sets it to None in ``__init__``.
1769
1770- Issue #18626: the inspect module now offers a basic command line
1771 introspection interface (Initial patch by Claudiu Popa)
1772
1773- Issue #3015: Fixed tkinter with wantobject=False. Any Tcl command call
1774 returned empty string.
1775
1776- Issue #19037: The mailbox module now makes all changes to maildir files
1777 before moving them into place, to avoid race conditions with other programs
1778 that may be accessing the maildir directory.
1779
1780- Issue #14984: On POSIX systems, when netrc is called without a filename
1781 argument (and therefore is reading the user's $HOME/.netrc file), it now
1782 enforces the same security rules as typical ftp clients: the .netrc file must
1783 be owned by the user that owns the process and must not be readable by any
1784 other user.
1785
1786- Issue #18873: The tokenize module now detects Python source code encoding
1787 only in comment lines.
1788
1789- Issue #17764: Enable http.server to bind to a user specified network
1790 interface. Patch contributed by Malte Swart.
1791
1792- Issue #18937: Add an assertLogs() context manager to unittest.TestCase
1793 to ensure that a block of code emits a message using the logging module.
1794
1795- Issue #17324: Fix http.server's request handling case on trailing '/'. Patch
1796 contributed by Vajrasky Kok.
1797
1798- Issue #19018: The heapq.merge() function no longer suppresses IndexError
1799 in the underlying iterables.
1800
1801- Issue #18784: The uuid module no longer attempts to load libc via ctypes.CDLL
1802 if all the necessary functions have already been found in libuuid. Patch by
1803 Evgeny Sologubov.
1804
1805- The :envvar:`PYTHONFAULTHANDLER` environment variable now only enables the
1806 faulthandler module if the variable is non-empty. Same behaviour than other
1807 variables like :envvar:`PYTHONDONTWRITEBYTECODE`.
1808
1809- Issue #1565525: New function ``traceback.clear_frames`` will clear
1810 the local variables of all the stack frames referenced by a traceback
1811 object.
1812
1813Tests
1814-----
1815
1816- Issue #18952: Fix regression in support data downloads introduced when
1817 test.support was converted to a package. Regression noticed by Zachary
1818 Ware.
1819
1820IDLE
1821----
1822
1823- Issue #18873: IDLE now detects Python source code encoding only in comment
1824 lines.
1825
1826- Issue #18988: The "Tab" key now works when a word is already autocompleted.
1827
1828Documentation
1829-------------
1830
1831- Issue #17003: Unified the size argument names in the io module with common
1832 practice.
1833
1834Build
1835-----
1836
1837- Issue #18596: Support the use of address sanity checking in recent versions
1838 of clang and GCC by appropriately marking known false alarms in the small
1839 object allocator. Patch contributed by Dhiru Kholia.
1840
1841Tools/Demos
1842-----------
1843
1844- Issue #18873: 2to3 and the findnocoding.py script now detect Python source
1845 code encoding only in comment lines.
1846
1847
1848What's New in Python 3.4.0 Alpha 2?
1849===================================
1850
1851Release date: 2013-09-09
1852
1853Core and Builtins
1854-----------------
1855
1856- Issue #18942: sys._debugmallocstats() output was damaged on Windows.
1857
1858- Issue #18571: Implementation of the PEP 446: file descriptors and file
1859 handles are now created non-inheritable; add functions
1860 os.get/set_inheritable(), os.get/set_handle_inheritable() and
1861 socket.socket.get/set_inheritable().
1862
1863- Issue #11619: The parser and the import machinery do not encode Unicode
1864 filenames anymore on Windows.
1865
1866- Issue #18808: Non-daemon threads are now automatically joined when
1867 a sub-interpreter is shutdown (it would previously dump a fatal error).
1868
1869- Remove support for compiling on systems without getcwd().
1870
1871- Issue #18774: Remove last bits of GNU PTH thread code and thread_pth.h.
1872
1873- Issue #18771: Add optimization to set object lookups to reduce the cost
1874 of hash collisions. The core idea is to inspect a second key/hash pair
1875 for each cache line retrieved.
1876
1877- Issue #16105: When a signal handler fails to write to the file descriptor
1878 registered with ``signal.set_wakeup_fd()``, report an exception instead
1879 of ignoring the error.
1880
1881- Issue #18722: Remove uses of the "register" keyword in C code.
1882
1883- Issue #18667: Add missing "HAVE_FCHOWNAT" symbol to posix._have_functions.
1884
1885- Issue #16499: Add command line option for isolated mode.
1886
1887- Issue #15301: Parsing fd, uid, and gid parameters for builtins
1888 in Modules/posixmodule.c is now far more robust.
1889
1890- Issue #18368: PyOS_StdioReadline() no longer leaks memory when realloc()
1891 fail.
1892
1893- Issue #17934: Add a clear() method to frame objects, to help clean up
1894 expensive details (local variables) and break reference cycles.
1895
1896- Issue #18780: %-formatting codes %d, %i, and %u now treat int-subclasses
1897 as int (displays value of int-subclass instead of str(int-subclass) ).
1898
1899Library
1900-------
1901
1902- Issue #18808: Thread.join() now waits for the underlying thread state to
1903 be destroyed before returning. This prevents unpredictable aborts in
1904 Py_EndInterpreter() when some non-daemon threads are still running.
1905
1906- Issue #18458: Prevent crashes with newer versions of libedit. Its readline
1907 emulation has changed from 0-based indexing to 1-based like gnu readline.
1908
1909- Issue #18852: Handle case of ``readline.__doc__`` being ``None`` in the new
1910 readline activation code in ``site.py``.
1911
1912- Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in
1913 the _sre module.
1914
1915- Issue #18830: inspect.getclasstree() no longer produces duplicate entries even
1916 when input list contains duplicates.
1917
1918- Issue #18878: sunau.open now supports the context management protocol. Based on
1919 patches by Claudiu Popa and R. David Murray.
1920
1921- Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast
1922 64-bit pointer to long (32 bits).
1923
1924- Issue #18876: The FileIO.mode attribute now better reflects the actual mode
1925 under which the file was opened. Patch by Erik Bray.
1926
1927- Issue #16853: Add new selectors module.
1928
1929- Issue #18882: Add threading.main_thread() function.
1930
1931- Issue #18901: The sunau getparams method now returns a namedtuple rather than
1932 a plain tuple. Patch by Claudiu Popa.
1933
1934- Issue #17487: The result of the wave getparams method now is pickleable again.
1935 Patch by Claudiu Popa.
1936
1937- Issue #18756: os.urandom() now uses a lazily-opened persistent file
1938 descriptor, so as to avoid using many file descriptors when run in
1939 parallel from multiple threads.
1940
1941- Issue #18418: After fork(), reinit all threads states, not only active ones.
1942 Patch by A. Jesse Jiryu Davis.
1943
1944- Issue #17974: Switch unittest from using getopt to using argparse.
1945
1946- Issue #11798: TestSuite now drops references to own tests after execution.
1947
1948- Issue #16611: http.cookie now correctly parses the 'secure' and 'httponly'
1949 cookie flags.
1950
1951- Issue #11973: Fix a problem in kevent. The flags and fflags fields are now
1952 properly handled as unsigned.
1953
1954- Issue #18807: ``pyvenv`` now takes a --copies argument allowing copies
1955 instead of symlinks even where symlinks are available and the default.
1956
1957- Issue #18538: ``python -m dis`` now uses argparse for argument processing.
1958 Patch by Michele Orrù.
1959
1960- Issue #18394: Close cgi.FieldStorage's optional file.
1961
1962- Issue #17702: On error, os.environb now suppresses the exception context
1963 when raising a new KeyError with the original key.
1964
1965- Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6.
1966
1967- Issue #16809: Tkinter's splitlist() and split() methods now accept Tcl_Obj
1968 argument.
1969
1970- Issue #17211: Yield a namedtuple in pkgutil.
1971 Patch by Ramchandra Apte.
1972
1973- Issue #18324: set_payload now correctly handles binary input. This also
1974 supersedes the previous fixes for #14360, #1717, and #16564.
1975
1976- Issue #18794: Add a fileno() method and a closed attribute to select.devpoll
1977 objects.
1978
1979- Issue #17119: Fixed integer overflows when processing large strings and tuples
1980 in the tkinter module.
1981
1982- Issue #15352: Rebuild frozen modules when marshal.c is changed.
1983
1984- Issue #18747: Re-seed OpenSSL's pseudo-random number generator after fork.
1985 A pthread_atfork() parent handler is used to seed the PRNG with pid, time
1986 and some stack data.
1987
1988- Issue #8865: Concurrent invocation of select.poll.poll() now raises a
1989 RuntimeError exception. Patch by Christian Schubert.
1990
1991- Issue #18777: The ssl module now uses the new CRYPTO_THREADID API of
1992 OpenSSL 1.0.0+ instead of the deprecated CRYPTO id callback function.
1993
1994- Issue #18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok.
1995
1996- Issue #18178: Fix ctypes on BSD. dlmalloc.c was compiled twice which broke
1997 malloc weak symbols.
1998
1999- Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes
2000 inside subjectAltName correctly. Formerly the module has used OpenSSL's
2001 GENERAL_NAME_print() function to get the string representation of ASN.1
2002 strings for ``rfc822Name`` (email), ``dNSName`` (DNS) and
2003 ``uniformResourceIdentifier`` (URI).
2004
2005- Issue #18701: Remove support of old CPython versions (<3.0) from C code.
2006
2007- Issue #18756: Improve error reporting in os.urandom() when the failure
2008 is due to something else than /dev/urandom not existing (for example,
2009 exhausting the file descriptor limit).
2010
2011- Issue #18673: Add O_TMPFILE to os module. O_TMPFILE requires Linux kernel
2012 3.11 or newer. It's only defined on system with 3.11 uapi headers, too.
2013
2014- Issue #18532: Change the builtin hash algorithms' names to lower case names
2015 as promised by hashlib's documentation.
2016
2017- Issue #8713: add new spwan and forkserver start methods, and new functions
2018 get_all_start_methods, get_start_method, and set_start_method, to
2019 multiprocessing.
2020
2021- Issue #18405: Improve the entropy of crypt.mksalt().
2022
2023- Issue #12015: The tempfile module now uses a suffix of 8 random characters
2024 instead of 6, to reduce the risk of filename collision. The entropy was
2025 reduced when uppercase letters were removed from the charset used to generate
2026 random characters.
2027
2028- Issue #18585: Add :func:`textwrap.shorten` to collapse and truncate a
2029 piece of text to a given length.
2030
2031- Issue #18598: Tweak exception message for importlib.import_module() to
2032 include the module name when a key argument is missing.
2033
2034- Issue #19151: Fix docstring and use of _get_supported_file_loaders() to
2035 reflect 2-tuples.
2036
2037- Issue #19152: Add ExtensionFileLoader.get_filename().
2038
2039- Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get
2040 docstrings and ValueError messages. Patch by Zhongyue Luo
2041
2042- Fix refcounting issue with extension types in tkinter.
2043
2044- Issue #8112: xlmrpc.server's DocXMLRPCServer server no longer raises an error
2045 if methods have annotations; it now correctly displays the annotations.
2046
2047- Issue #18600: Added policy argument to email.message.Message.as_string,
2048 and as_bytes and __bytes__ methods to Message.
2049
2050- Issue #18671: Output more information when logging exceptions occur.
2051
2052- Issue #18621: Prevent the site module's patched builtins from keeping
2053 too many references alive for too long.
2054
2055- Issue #4885: Add weakref support to mmap objects. Patch by Valerie Lambert.
2056
2057- Issue #8860: Fixed rounding in timedelta constructor.
2058
2059- Issue #18849: Fixed a Windows-specific tempfile bug where collision with an
2060 existing directory caused mkstemp and related APIs to fail instead of
2061 retrying. Report and fix by Vlad Shcherbina.
2062
2063- Issue #18920: argparse's default destination for the version action (-v,
2064 --version) has also been changed to stdout, to match the Python executable.
2065
2066Tests
2067-----
2068
2069- Issue #18623: Factor out the _SuppressCoreFiles context manager into
2070 test.support. Patch by Valerie Lambert.
2071
2072- Issue #12037: Fix test_email for desktop Windows.
2073
2074- Issue #15507: test_subprocess's test_send_signal could fail if the test
2075 runner were run in an environment where the process inherited an ignore
2076 setting for SIGINT. Restore the SIGINT handler to the desired
2077 KeyboardInterrupt raising one during that test.
2078
2079- Issue #16799: Switched from getopt to argparse style in regrtest's argument
2080 parsing. Added more tests for regrtest's argument parsing.
2081
2082- Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as
2083 possible, since "localhost" goes through a DNS lookup under recent Windows
2084 versions.
2085
2086IDLE
2087----
2088
2089- Issue #18489: Add tests for SearchEngine. Original patch by Phil Webster.
2090
2091Documentation
2092-------------
2093
2094- Issue #18743: Fix references to non-existent "StringIO" module.
2095
2096- Issue #18783: Removed existing mentions of Python long type in docstrings,
2097 error messages and comments.
2098
2099Build
2100-----
2101
2102- Issue #1584: Provide configure options to override default search paths for
2103 Tcl and Tk when building _tkinter.
2104
2105- Issue #15663: Tcl/Tk 8.5.14 is now included with the OS X 10.6+ 64-/32-bit
2106 installer. It is no longer necessary to install a third-party version of
2107 Tcl/Tk 8.5 to work around the problems in the Apple-supplied Tcl/Tk 8.5
2108 shipped in OS X 10.6 and later releases.
2109
2110Tools/Demos
2111-----------
2112
2113- Issue #18922: Now The Lib/smtpd.py and Tools/i18n/msgfmt.py scripts write
2114 their version strings to stdout, and not to sderr.
2115
2116
2117What's New in Python 3.4.0 Alpha 1?
2118===================================
2119
2120Release date: 2013-08-03
2121
2122Core and Builtins
2123-----------------
2124
2125- Issue #16741: Fix an error reporting in int().
2126
2127- Issue #17899: Fix rare file descriptor leak in os.listdir().
2128
2129- Issue #10241: Clear extension module dict copies at interpreter shutdown.
2130 Patch by Neil Schemenauer, minimally modified.
2131
2132- Issue #9035: ismount now recognises volumes mounted below a drive root
2133 on Windows. Original patch by Atsuo Ishimoto.
2134
2135- Issue #18214: Improve finalization of Python modules to avoid setting
2136 their globals to None, in most cases.
2137
2138- Issue #18112: PEP 442 implementation (safe object finalization).
2139
2140- Issue #18552: Check return value of PyArena_AddPyObject() in
2141 obj2ast_object().
2142
2143- Issue #18560: Fix potential NULL pointer dereference in sum().
2144
2145- Issue #18520: Add a new PyStructSequence_InitType2() function, same than
2146 PyStructSequence_InitType() except that it has a return value (0 on success,
2147 -1 on error).
2148
2149- Issue #15905: Fix theoretical buffer overflow in handling of sys.argv[0],
2150 prefix and exec_prefix if the operation system does not obey MAXPATHLEN.
2151
2152- Issue #18408: Fix many various bugs in code handling errors, especially
2153 on memory allocation failure (MemoryError).
2154
2155- Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all().
2156
2157- Issue #18342: Use the repr of a module name when an import fails when using
2158 ``from ... import ...``.
2159
2160- Issue #17872: Fix a segfault in marshal.load() when input stream returns
2161 more bytes than requested.
2162
2163- Issue #18338: `python --version` now prints version string to stdout, and
2164 not to stderr. Patch by Berker Peksag and Michael Dickens.
2165
2166- Issue #18426: Fix NULL pointer dereference in C extension import when
2167 PyModule_GetDef() returns an error.
2168
2169- Issue #17206: On Windows, increase the stack size from 2 MB to 4.2 MB to fix
2170 a stack overflow in the marshal module (fix a crash in test_marshal).
2171 Patch written by Jeremy Kloth.
2172
2173- Issue #3329: Implement the PEP 445: Add new APIs to customize Python memory
2174 allocators.
2175
2176- Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the
2177 tstate is first removed from TLS and then deallocated.
2178
2179- Issue #13483: Use VirtualAlloc in obmalloc on Windows.
2180
2181- Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
2182 OverflowError when an argument of %c format is out of range.
2183
2184- Issue #18111: The min() and max() functions now support a default argument
2185 to be returned instead of raising a ValueError on an empty sequence.
2186 (Contributed by Julian Berman.)
2187
2188- Issue #18137: Detect integer overflow on precision in float.__format__()
2189 and complex.__format__().
2190
2191- Issue #15767: Introduce ModuleNotFoundError which is raised when a module
2192 could not be found.
2193
2194- Issue #18183: Fix various unicode operations on strings with large unicode
2195 codepoints.
2196
2197- Issue #18180: Fix ref leak in _PyImport_GetDynLoadWindows().
2198
2199- Issue #18038: SyntaxError raised during compilation sources with illegal
2200 encoding now always contains an encoding name.
2201
2202- Issue #17931: Resolve confusion on Windows between pids and process
2203 handles.
2204
2205- Tweak the exception message when the magic number or size value in a bytecode
2206 file is truncated.
2207
2208- Issue #17932: Fix an integer overflow issue on Windows 64-bit in iterators:
2209 change the C type of seqiterobject.it_index from long to Py_ssize_t.
2210
2211- Issue #18065: Don't set __path__ to the package name for frozen packages.
2212
2213- Issue #18088: When reloading a module, unconditionally reset all relevant
2214 attributes on the module (e.g. __name__, __loader__, __package__, __file__,
2215 __cached__).
2216
2217- Issue #17937: Try harder to collect cyclic garbage at shutdown.
2218
2219- Issue #12370: Prevent class bodies from interfering with the __class__
2220 closure.
2221
2222- Issue #17644: Fix a crash in str.format when curly braces are used in square
2223 brackets.
2224
2225- Issue #17237: Fix crash in the ASCII decoder on m68k.
2226
2227- Issue #17927: Frame objects kept arguments alive if they had been
2228 copied into a cell, even if the cell was cleared.
2229
2230- Issue #1545463: At shutdown, defer finalization of codec modules so
2231 that stderr remains usable.
2232
2233- Issue #7330: Implement width and precision (ex: "%5.3s") for the format
2234 string of PyUnicode_FromFormat() function, original patch written by Ysj Ray.
2235
2236- Issue #1545463: Global variables caught in reference cycles are now
2237 garbage-collected at shutdown.
2238
2239- Issue #17094: Clear stale thread states after fork(). Note that this
2240 is a potentially disruptive change since it may release some system
2241 resources which would otherwise remain perpetually alive (e.g. database
2242 connections kept in thread-local storage).
2243
2244- Issue #17408: Avoid using an obsolete instance of the copyreg module when
2245 the interpreter is shutdown and then started again.
2246
2247- Issue #5845: Enable tab-completion in the interactive interpreter by
2248 default, thanks to a new sys.__interactivehook__.
2249
2250- Issue #17115,17116: Module initialization now includes setting __package__ and
2251 __loader__ attributes to None.
2252
2253- Issue #17853: Ensure locals of a class that shadow free variables always win
2254 over the closures.
2255
2256- Issue #17863: In the interactive console, don't loop forever if the encoding
2257 can't be fetched from stdin.
2258
2259- Issue #17867: Raise an ImportError if __import__ is not found in __builtins__.
2260
2261- Issue #18698: Ensure importlib.reload() returns the module out of sys.modules.
2262
2263- Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
2264 such as was shipped with Centos 5 and Mac OS X 10.4.
2265
2266- Issue #17413: sys.settrace callbacks were being passed a string instead of an
2267 exception instance for the 'value' element of the arg tuple if the exception
2268 originated from C code; now an exception instance is always provided.
2269
2270- Issue #17782: Fix undefined behaviour on platforms where
2271 ``struct timespec``'s "tv_nsec" member is not a C long.
2272
2273- Issue #17722: When looking up __round__, resolve descriptors.
2274
2275- Issue #16061: Speed up str.replace() for replacing 1-character strings.
2276
2277- Issue #17715: Fix segmentation fault from raising an exception in a __trunc__
2278 method.
2279
2280- Issue #17643: Add __callback__ attribute to weakref.ref.
2281
2282- Issue #16447: Fixed potential segmentation fault when setting __name__ on a
2283 class.
2284
2285- Issue #17669: Fix crash involving finalization of generators using yield from.
2286
2287- Issue #14439: Python now prints the traceback on runpy failure at startup.
2288
2289- Issue #17469: Fix _Py_GetAllocatedBlocks() and sys.getallocatedblocks()
2290 when running on valgrind.
2291
2292- Issue #17619: Make input() check for Ctrl-C correctly on Windows.
2293
2294- Issue #17357: Add missing verbosity messages for -v/-vv that were lost during
2295 the importlib transition.
2296
2297- Issue #17610: Don't rely on non-standard behavior of the C qsort() function.
2298
2299- Issue #17323: The "[X refs, Y blocks]" printed by debug builds has been
2300 disabled by default. It can be re-enabled with the `-X showrefcount` option.
2301
2302- Issue #17328: Fix possible refleak in dict.setdefault.
2303
2304- Issue #17275: Corrected class name in init error messages of the C version of
2305 BufferedWriter and BufferedRandom.
2306
2307- Issue #7963: Fixed misleading error message that issued when object is
2308 called without arguments.
2309
2310- Issue #8745: Small speed up zipimport on Windows. Patch by Catalin Iacob.
2311
2312- Issue #5308: Raise ValueError when marshalling too large object (a sequence
2313 with size >= 2**31), instead of producing illegal marshal data.
2314
2315- Issue #12983: Bytes literals with invalid ``\x`` escape now raise a SyntaxError
2316 and a full traceback including line number.
2317
2318- Issue #16967: In function definition, evaluate positional defaults before
2319 keyword-only defaults.
2320
2321- Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.)
2322 in the interpreter.
2323
2324- Issue #17137: When a Unicode string is resized, the internal wide character
2325 string (wstr) format is now cleared.
2326
2327- Issue #17043: The unicode-internal decoder no longer read past the end of
2328 input buffer.
2329
2330- Issue #17098: All modules now have __loader__ set even if they pre-exist the
2331 bootstrapping of importlib.
2332
2333- Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.
2334
2335- Issue #16772: The base argument to the int constructor no longer accepts
2336 floats, or other non-integer objects with an __int__ method. Objects
2337 with an __index__ method are now accepted.
2338
2339- Issue #10156: In the interpreter's initialization phase, unicode globals
2340 are now initialized dynamically as needed.
2341
2342- Issue #16980: Fix processing of escaped non-ascii bytes in the
2343 unicode-escape-decode decoder.
2344
2345- Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
2346
2347- Issue #14850: Now a charmap decoder treats U+FFFE as "undefined mapping"
2348 in any mapping, not only in a string.
2349
2350- Issue #16613: Add *m* argument to ``collections.Chainmap.new_child`` to
2351 allow the new child map to be specified explicitly.
2352
2353- Issue #16730: importlib.machinery.FileFinder now no longers raises an
2354 exception when trying to populate its cache and it finds out the directory is
2355 unreadable or has turned into a file. Reported and diagnosed by
2356 David Pritchard.
2357
2358- Issue #16906: Fix a logic error that prevented most static strings from being
2359 cleared.
2360
2361- Issue #11461: Fix the incremental UTF-16 decoder. Original patch by
2362 Amaury Forgeot d'Arc.
2363
2364- Issue #16856: Fix a segmentation fault from calling repr() on a dict with
2365 a key whose repr raise an exception.
2366
2367- Issue #16367: Fix FileIO.readall() on Windows for files larger than 2 GB.
2368
2369- Issue #16761: Calling int() with base argument only now raises TypeError.
2370
2371- Issue #16759: Support the full DWORD (unsigned long) range in Reg2Py
2372 when retrieving a REG_DWORD value. This corrects functions like
2373 winreg.QueryValueEx that may have been returning truncated values.
2374
2375- Issue #14420: Support the full DWORD (unsigned long) range in Py2Reg
2376 when passed a REG_DWORD value. Fixes OverflowError in winreg.SetValueEx.
2377
2378- Issue #11939: Set the st_dev attribute of stat_result to allow Windows to
2379 take advantage of the os.path.samefile/sameopenfile/samestat implementations
2380 used by other platforms.
2381
2382- Issue #16772: The int() constructor's second argument (base) no longer
2383 accepts non integer values. Consistent with the behavior in Python 2.
2384
2385- Issue #14470: Remove w9xpopen support per PEP 11.
2386
2387- Issue #9856: Replace deprecation warning with raising TypeError
2388 in object.__format__. Patch by Florent Xicluna.
2389
2390- Issue #16597: In buffered and text IO, call close() on the underlying stream
2391 if invoking flush() fails.
2392
2393- Issue #16722: In the bytes() constructor, try to call __bytes__ on the
2394 argument before __index__.
2395
2396- Issue #16421: loading multiple modules from one shared object is now
2397 handled correctly (previously, the first module loaded from that file
2398 was silently returned). Patch by Václav Šmilauer.
2399
2400- Issue #16602: When a weakref's target was part of a long deallocation
2401 chain, the object could remain reachable through its weakref even though
2402 its refcount had dropped to zero.
2403
2404- Issue #16495: Remove extraneous NULL encoding check from bytes_decode().
2405
2406- Issue #16619: Create NameConstant AST class to represent None, True, and False
2407 literals. As a result, these constants are never loaded at runtime from
2408 builtins.
2409
2410- Issue #16455: On FreeBSD and Solaris, if the locale is C, the
2411 ASCII/surrogateescape codec is now used (instead of the locale encoding) to
2412 decode the command line arguments. This change fixes inconsistencies with
2413 os.fsencode() and os.fsdecode(), because these operating systems announce an
2414 ASCII locale encoding, but actually use the ISO-8859-1 encoding in practice.
2415
2416- Issue #16562: Optimize dict equality testing. Patch by Serhiy Storchaka.
2417
2418- Issue #16588: Silence unused-but-set warnings in Python/thread_pthread
2419
2420- Issue #16592: stringlib_bytes_join doesn't raise MemoryError on allocation
2421 failure.
2422
2423- Issue #16546: Fix: ast.YieldFrom argument is now mandatory.
2424
2425- Issue #16514: Fix regression causing a traceback when sys.path[0] is None
2426 (actually, any non-string or non-bytes type).
2427
2428- Issue #16306: Fix multiple error messages when unknown command line
2429 parameters where passed to the interpreter. Patch by Hieu Nguyen.
2430
2431- Issue #16215: Fix potential double memory free in str.replace(). Patch
2432 by Serhiy Storchaka.
2433
2434- Issue #16290: A float return value from the __complex__ special method is no
2435 longer accepted in the complex() constructor.
2436
2437- Issue #16416: On Mac OS X, operating system data are now always
2438 encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding
2439 (which may be ASCII if no locale environment variable is set), to avoid
2440 inconsistencies with os.fsencode() and os.fsdecode() functions which are
2441 already using UTF-8/surrogateescape.
2442
2443- Issue #16453: Fix equality testing of dead weakref objects.
2444
2445- Issue #9535: Fix pending signals that have been received but not yet
2446 handled by Python to not persist after os.fork() in the child process.
2447
2448- Issue #14794: Fix slice.indices to return correct results for huge values,
2449 rather than raising OverflowError.
2450
2451- Issue #15001: fix segfault on "del sys.modules['__main__']". Patch by Victor
2452 Stinner.
2453
2454- Issue #8271: the utf-8 decoder now outputs the correct number of U+FFFD
2455 characters when used with the 'replace' error handler on invalid utf-8
2456 sequences. Patch by Serhiy Storchaka, tests by Ezio Melotti.
2457
2458- Issue #5765: Apply a hard recursion limit in the compiler instead of
2459 blowing the stack and segfaulting. Initial patch by Andrea Griffini.
2460
2461- Issue #16402: When slicing a range, fix shadowing of exceptions from
2462 __index__.
2463
2464- Issue #16336: fix input checking in the surrogatepass error handler.
2465 Patch by Serhiy Storchaka.
2466
2467- Issue #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now
2468 raises an error.
2469
2470- Issue #7317: Display full tracebacks when an error occurs asynchronously.
2471 Patch by Alon Horev with update by Alexey Kachayev.
2472
2473- Issue #16309: Make PYTHONPATH="" behavior the same as if PYTHONPATH
2474 not set at all.
2475
2476- Issue #10189: Improve the error reporting of SyntaxErrors related to global
2477 and nonlocal statements.
2478
2479- Fix segfaults on setting __qualname__ on builtin types and attempting to
2480 delete it on any type.
2481
2482- Issue #14625: Rewrite the UTF-32 decoder. It is now 3x to 4x faster. Patch
2483 written by Serhiy Storchaka.
2484
2485- Issue #16345: Fix an infinite loop when ``fromkeys`` on a dict subclass
2486 received a nonempty dict from the constructor.
2487
2488- Issue #16271: Fix strange bugs that resulted from __qualname__ appearing in a
2489 class's __dict__ and on type.
2490
2491- Issue #12805: Make bytes.join and bytearray.join faster when the separator
2492 is empty. Patch by Serhiy Storchaka.
2493
2494- Issue #6074: Ensure cached bytecode files can always be updated by the
2495 user that created them, even when the source file is read-only.
2496
2497- Issue #15958: bytes.join and bytearray.join now accept arbitrary buffer
2498 objects.
2499
2500- Issue #14783: Improve int() docstring and switch docstrings for str(),
2501 range(), and slice() to use multi-line signatures.
2502
2503- Issue #16160: Subclass support now works for types.SimpleNamespace.
2504
2505- Issue #16148: Implement PEP 424, adding operator.length_hint and
2506 PyObject_LengthHint.
2507
2508- Upgrade Unicode data (UCD) to version 6.2.
2509
2510- Issue #15379: Fix passing of non-BMP characters as integers for the charmap
2511 decoder (already working as unicode strings). Patch by Serhiy Storchaka.
2512
2513- Issue #15144: Fix possible integer overflow when handling pointers as integer
2514 values, by using `Py_uintptr_t` instead of `size_t`. Patch by Serhiy
2515 Storchaka.
2516
2517- Issue #15965: Explicitly cast `AT_FDCWD` as (int). Required on Solaris 10
2518 (which defines `AT_FDCWD` as ``0xffd19553``), harmless on other platforms.
2519
2520- Issue #15839: Convert SystemErrors in `super()` to RuntimeErrors.
2521
2522- Issue #15448: Buffered IO now frees the buffer when closed, instead
2523 of when deallocating.
2524
2525- Issue #15846: Fix SystemError which happened when using `ast.parse()` in an
2526 exception handler on code with syntax errors.
2527
2528- Issue #15897: zipimport.c doesn't check return value of fseek().
2529 Patch by Felipe Cruz.
2530
2531- Issue #15801: Make sure mappings passed to '%' formatting are actually
2532 subscriptable.
2533
2534- Issue #15111: __import__ should propagate ImportError when raised as a
2535 side-effect of a module triggered from using fromlist.
2536
2537- Issue #15022: Add pickle and comparison support to types.SimpleNamespace.
2538
2539Library
2540-------
2541
2542- Issue #4331: Added functools.partialmethod (Initial patch by Alon Horev)
2543
2544- Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit
2545 platforms. Patch by Yogesh Chaudhari.
2546
2547- Issue #18681: Fix a NameError in importlib.reload() (noticed by Weizhao Li).
2548
2549- Issue #14323: Expanded the number of digits in the coefficients for the
2550 RGB -- YIQ conversions so that they match the FCC NTSC versions.
2551
2552- Issue #17998: Fix an internal error in regular expression engine.
2553
2554- Issue #17557: Fix os.getgroups() to work with the modified behavior of
2555 getgroups(2) on OS X 10.8. Original patch by Mateusz Lenik.
2556
2557- Issue #18608: Avoid keeping a strong reference to the locale module
2558 inside the _io module.
2559
2560- Issue #18619: Fix atexit leaking callbacks registered from sub-interpreters,
2561 and make it GC-aware.
2562
2563- Issue #15699: The readline module now uses PEP 3121-style module
2564 initialization, so as to reclaim allocated resources (Python callbacks)
2565 at shutdown. Original patch by Robin Schreiber.
2566
2567- Issue #17616: wave.open now supports the context management protocol.
2568
2569- Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns
2570 'SHA1' instead of 'SHA'.
2571
2572- Issue #13266: Added inspect.unwrap to easily unravel __wrapped__ chains
2573 (initial patch by Daniel Urban and Aaron Iles)
2574
2575- Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
2576
2577- Issue #18559: Fix NULL pointer dereference error in _pickle module
2578
2579- Issue #18556: Check the return type of PyUnicode_AsWideChar() in ctype's
2580 U_set().
2581
2582- Issue #17818: aifc.getparams now returns a namedtuple.
2583
2584- Issue #18549: Eliminate dead code in socket_ntohl()
2585
2586- Issue #18530: Remove additional stat call from posixpath.ismount.
2587 Patch by Alex Gaynor.
2588
2589- Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
2590
2591- Issue #9177: Calling read() or write() now raises ValueError, not
2592 AttributeError, on a closed SSL socket. Patch by Senko Rasic.
2593
2594- Issue #18513: Fix behaviour of cmath.rect w.r.t. signed zeros on OS X 10.8 +
2595 gcc.
2596
2597- Issue #18479: Changed venv Activate.ps1 to make deactivate a function, and
2598 removed Deactivate.ps1.
2599
2600- Issue #18480: Add missing call to PyType_Ready to the _elementtree extension.
2601
2602- Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
2603 Zachary Ware.)
2604
2605- Issue #18393: The private module _gestalt and private functions
2606 platform._mac_ver_gestalt, platform._mac_ver_lookup and
2607 platform._bcd2str have been removed. This does not affect the public
2608 interface of the platform module.
2609
2610- Issue #17482: functools.update_wrapper (and functools.wraps) now set the
2611 __wrapped__ attribute correctly even if the underlying function has a
2612 __wrapped__ attribute set.
2613
2614- Issue #18431: The new email header parser now decodes RFC2047 encoded words
2615 in structured headers.
2616
2617- Issue #18432: The sched module's queue method was incorrectly returning
2618 an iterator instead of a list.
2619
2620- Issue #18044: The new email header parser was mis-parsing encoded words where
2621 an encoded character immediately followed the '?' that follows the CTE
2622 character, resulting in a decoding failure. They are now decoded correctly.
2623
2624- Issue #18101: Tcl.split() now process strings nested in a tuple as it
2625 do with byte strings.
2626
2627- Issue #18116: getpass was always getting an error when testing /dev/tty,
2628 and thus was always falling back to stdin, and would then raise an exception
2629 if stdin could not be used (such as /dev/null). It also leaked an open file.
2630 All of these issues are now fixed.
2631
2632- Issue #17198: Fix a NameError in the dbm module. Patch by Valentina
2633 Mukhamedzhanova.
2634
2635- Issue #18013: Fix cgi.FieldStorage to parse the W3C sample form.
2636
2637- Issue #18020: improve html.escape speed by an order of magnitude.
2638 Patch by Matt Bryant.
2639
2640- Issue #18347: ElementTree's html serializer now preserves the case of
2641 closing tags.
2642
2643- Issue #17261: Ensure multiprocessing's proxies use proper address.
2644
2645- Issue #18343: faulthandler.register() now keeps the previous signal handler
2646 when the function is called twice, so faulthandler.unregister() restores
2647 correctly the original signal handler.
2648
2649- Issue #17097: Make multiprocessing ignore EINTR.
2650
2651- Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a
2652 segfault inside the _pickle C extension.
2653
2654- Issue #18240: The HMAC module is no longer restricted to bytes and accepts
2655 any bytes-like object, e.g. memoryview. Original patch by Jonas Borgström.
2656
2657- Issue #18224: Removed pydoc script from created venv, as it causes problems
2658 on Windows and adds no value over and above python -m pydoc ...
2659
2660- Issue #18155: The csv module now correctly handles csv files that use
2661 a delimiter character that has a special meaning in regexes, instead of
2662 throwing an exception.
2663
2664- Issue #14360: encode_quopri can now be successfully used as an encoder
2665 when constructing a MIMEApplication object.
2666
2667- Issue #11390: Add -o and -f command line options to the doctest CLI to
2668 specify doctest options (and convert it to using argparse).
2669
2670- Issue #18135: ssl.SSLSocket.write() now raises an OverflowError if the input
2671 string in longer than 2 gigabytes, and ssl.SSLContext.load_cert_chain()
2672 raises a ValueError if the password is longer than 2 gigabytes. The ssl
2673 module does not support partial write.
2674
2675- Issue #11016: Add C implementation of the stat module as _stat.
2676
2677- Issue #18248: Fix libffi build on AIX.
2678
2679- Issue #18259: Declare sethostname in socketmodule.c for AIX
2680
2681- Issue #18147: Add diagnostic functions to ssl.SSLContext(). get_ca_list()
2682 lists all loaded CA certificates and cert_store_stats() returns amount of
2683 loaded X.509 certs, X.509 CA certs and CRLs.
2684
2685- Issue #18167: cgi.FieldStorage no longer fails to handle multipart/form-data
2686 when ``\r\n`` appears at end of 65535 bytes without other newlines.
2687
2688- Issue #18076: Introduce importlib.util.decode_source().
2689
2690- Issue #18357: add tests for dictview set difference.
2691 Patch by Fraser Tweedale.
2692
2693- importlib.abc.SourceLoader.get_source() no longer changes SyntaxError or
2694 UnicodeDecodeError into ImportError.
2695
2696- Issue #18058, 18057: Make the namespace package loader meet the
2697 importlib.abc.InspectLoader ABC, allowing for namespace packages to work with
2698 runpy.
2699
2700- Issue #17177: The imp module is pending deprecation.
2701
2702- subprocess: Prevent a possible double close of parent pipe fds when the
2703 subprocess exec runs into an error. Prevent a regular multi-close of the
2704 /dev/null fd when any of stdin, stdout and stderr was set to DEVNULL.
2705
2706- Issue #18194: Introduce importlib.util.cache_from_source() and
2707 source_from_cache() while documenting the equivalent functions in imp as
2708 deprecated.
2709
2710- Issue #17907: Document imp.new_module() as deprecated in favour of
2711 types.ModuleType.
2712
2713- Issue #18192: Introduce importlib.util.MAGIC_NUMBER and document as deprecated
2714 imp.get_magic().
2715
2716- Issue #18149: Add filecmp.clear_cache() to manually clear the filecmp cache.
2717 Patch by Mark Levitt
2718
2719- Issue #18193: Add importlib.reload().
2720
2721- Issue #18157: Stop using imp.load_module() in pydoc.
2722
2723- Issue #16102: Make uuid._netbios_getnode() work again on Python 3.
2724
2725- Issue #17134: Add ssl.enum_cert_store() as interface to Windows' cert store.
2726
2727- Issue #18143: Implement ssl.get_default_verify_paths() in order to debug
2728 the default locations for cafile and capath.
2729
2730- Issue #17314: Move multiprocessing.forking over to importlib.
2731
2732- Issue #11959: SMTPServer and SMTPChannel now take an optional map, use of
2733 which avoids affecting global state.
2734
2735- Issue #18109: os.uname() now decodes fields from the locale encoding, and
2736 socket.gethostname() now decodes the hostname from the locale encoding,
2737 instead of using the UTF-8 encoding in strict mode.
2738
2739- Issue #18089: Implement importlib.abc.InspectLoader.load_module.
2740
2741- Issue #18088: Introduce importlib.abc.Loader.init_module_attrs for setting
2742 module attributes. Leads to the pending deprecation of
2743 importlib.util.module_for_loader.
2744
2745- Issue #17403: urllib.parse.robotparser normalizes the urls before adding to
2746 ruleline. This helps in handling certain types invalid urls in a conservative
2747 manner. Patch contributed by Mher Movsisyan.
2748
2749- Issue #18070: Have importlib.util.module_for_loader() set attributes
2750 unconditionally in order to properly support reloading.
2751
2752- Added importlib.util.module_to_load to return a context manager to provide the
2753 proper module object to load.
2754
2755- Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw
2756 stream's read() returns more bytes than requested.
2757
2758- Issue #18011: As was originally intended, base64.b32decode() now raises a
2759 binascii.Error if there are non-b32-alphabet characters present in the input
2760 string, instead of a TypeError.
2761
2762- Issue #18072: Implement importlib.abc.InspectLoader.get_code() and
2763 importlib.abc.ExecutionLoader.get_code().
2764
2765- Issue #8240: Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag on SSL
2766 sockets.
2767
2768- Issue #17269: Workaround for socket.getaddrinfo crash on MacOS X
2769 with port None or "0" and flags AI_NUMERICSERV.
2770
2771- Issue #16986: ElementTree now correctly works with string input when the
2772 internal XML encoding is not UTF-8 or US-ASCII.
2773
2774- Issue #17996: socket module now exposes AF_LINK constant on BSD and OSX.
2775
2776- Issue #17900: Allowed pickling of recursive OrderedDicts. Decreased pickled
2777 size and pickling time.
2778
2779- Issue #17914: Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an
2780 initial patch by Trent Nelson.
2781
2782- Issue #17812: Fixed quadratic complexity of base64.b32encode().
2783 Optimize base64.b32encode() and base64.b32decode() (speed up to 3x).
2784
2785- Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of
2786 service using certificates with many wildcards (CVE-2013-2099).
2787
2788- Issue #15758: Fix FileIO.readall() so it no longer has O(n**2) complexity.
2789
2790- Issue #14596: The struct.Struct() objects now use a more compact
2791 implementation.
2792
2793- Issue #17981: logging's SysLogHandler now closes the socket when it catches
2794 socket OSErrors.
2795
2796- Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function
2797 is long, not int.
2798
2799- Fix typos in the multiprocessing module.
2800
2801- Issue #17754: Make ctypes.util.find_library() independent of the locale.
2802
2803- Issue #17968: Fix memory leak in os.listxattr().
2804
2805- Issue #17606: Fixed support of encoded byte strings in the XMLGenerator
2806 characters() and ignorableWhitespace() methods. Original patch by Sebastian
2807 Ortiz Vasquez.
2808
2809- Issue #17732: Ignore distutils.cfg options pertaining to install paths if a
2810 virtual environment is active.
2811
2812- Issue #17915: Fix interoperability of xml.sax with file objects returned by
2813 codecs.open().
2814
2815- Issue #16601: Restarting iteration over tarfile really restarts rather
2816 than continuing from where it left off. Patch by Michael Birtwell.
2817
2818- Issue #17289: The readline module now plays nicer with external modules
2819 or applications changing the rl_completer_word_break_characters global
2820 variable. Initial patch by Bradley Froehle.
2821
2822- Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit
2823 platforms. Patch by Federico Schwindt.
2824
2825- Issue #11816: multiple improvements to the dis module: get_instructions
2826 generator, ability to redirect output to a file, Bytecode and Instruction
2827 abstractions. Patch by Nick Coghlan, Ryan Kelly and Thomas Kluyver.
2828
2829- Issue #13831: Embed stringification of remote traceback in local
2830 traceback raised when pool task raises an exception.
2831
2832- Issue #15528: Add weakref.finalize to support finalization using
2833 weakref callbacks.
2834
2835- Issue #14173: Avoid crashing when reading a signal handler during
2836 interpreter shutdown.
2837
2838- Issue #15902: Fix imp.load_module() accepting None as a file when loading an
2839 extension module.
2840
2841- Issue #13721: SSLSocket.getpeercert() and SSLSocket.do_handshake() now
2842 raise an OSError with ENOTCONN, instead of an AttributeError, when the
2843 SSLSocket is not connected.
2844
2845- Issue #14679: add an __all__ (that contains only HTMLParser) to html.parser.
2846
2847- Issue #17802: Fix an UnboundLocalError in html.parser. Initial tests by
2848 Thomas Barlow.
2849
2850- Issue #17358: Modules loaded by imp.load_source() and load_compiled() (and by
2851 extension load_module()) now have a better chance of working when reloaded.
2852
2853- Issue #17804: New function ``struct.iter_unpack`` allows for streaming
2854 struct unpacking.
2855
2856- Issue #17830: When keyword.py is used to update a keyword file, it now
2857 preserves the line endings of the original file.
2858
2859- Issue #17272: Making the urllib.request's Request.full_url a descriptor.
2860 Fixes bugs with assignment to full_url. Patch by Demian Brecht.
2861
2862- Issue #17353: Plistlib emitted empty data tags with deeply nested datastructures
2863
2864- Issue #11714: Use 'with' statements to assure a Semaphore releases a
2865 condition variable. Original patch by Thomas Rachel.
2866
2867- Issue #16624: `subprocess.check_output` now accepts an `input` argument,
2868 allowing the subprocess's stdin to be provided as a (byte) string.
2869 Patch by Zack Weinberg.
2870
2871- Issue #17795: Reverted backwards-incompatible change in SysLogHandler with
2872 Unix domain sockets.
2873
2874- Issue #16694: Add a pure Python implementation of the operator module.
2875 Patch by Zachary Ware.
2876
2877- Issue #11182: remove the unused and undocumented pydoc.Scanner class.
2878 Patch by Martin Morrison.
2879
2880- Issue #17741: Add ElementTree.XMLPullParser, an event-driven parser for
2881 non-blocking applications.
2882
2883- Issue #17555: Fix ForkAwareThreadLock so that size of after fork
2884 registry does not grow exponentially with generation of process.
2885
2886- Issue #17707: fix regression in multiprocessing.Queue's get() method where
2887 it did not block for short timeouts.
2888
2889- Issue #17720: Fix the Python implementation of pickle.Unpickler to correctly
2890 process the APPENDS opcode when it is used on non-list objects.
2891
2892- Issue #17012: shutil.which() no longer falls back to the PATH environment
2893 variable if an empty path argument is specified. Patch by Serhiy Storchaka.
2894
2895- Issue #17710: Fix pickle raising a SystemError on bogus input.
2896
2897- Issue #17341: Include the invalid name in the error messages from re about
2898 invalid group names.
2899
2900- Issue #17702: os.environ now raises KeyError with the original environment
2901 variable name (str on UNIX), instead of using the encoded name (bytes on
2902 UNIX).
2903
2904- Issue #16163: Make the importlib based version of pkgutil.iter_importers
2905 work for submodules. Initial patch by Berker Peksag.
2906
2907- Issue #16804: Fix a bug in the 'site' module that caused running
2908 'python -S -m site' to incorrectly throw an exception.
2909
2910- Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal.
2911 Initial patch by Daniel Riti.
2912
2913- Issue #2118: SMTPException is now a subclass of OSError.
2914
2915- Issue #17016: Get rid of possible pointer wraparounds and integer overflows
2916 in the re module. Patch by Nickolai Zeldovich.
2917
2918- Issue #16658: add missing return to HTTPConnection.send().
2919 Patch by Jeff Knupp.
2920
2921- Issue #9556: the logging package now allows specifying a time-of-day for a
2922 TimedRotatingFileHandler to rotate.
2923
2924- Issue #14971: unittest test discovery no longer gets confused when a function
2925 has a different __name__ than its name in the TestCase class dictionary.
2926
2927- Issue #17487: The wave getparams method now returns a namedtuple rather than
2928 a plain tuple.
2929
2930- Issue #17675: socket repr() provides local and remote addresses (if any).
2931 Patch by Giampaolo Rodola'
2932
2933- Issue #17093: Make the ABCs in importlib.abc provide default values or raise
2934 reasonable exceptions for their methods to make them more amenable to super()
2935 calls.
2936
2937- Issue #17566: Make importlib.abc.Loader.module_repr() optional instead of an
2938 abstractmethod; now it raises NotImplementedError so as to be ignored by default.
2939
2940- Issue #17678: Remove the use of deprecated method in http/cookiejar.py by
2941 changing the call to get_origin_req_host() to origin_req_host.
2942
2943- Issue #17666: Fix reading gzip files with an extra field.
2944
2945- Issue #16475: Support object instancing, recursion and interned strings
2946 in marshal
2947
2948- Issue #17502: Process DEFAULT values in mock side_effect that returns iterator.
2949
2950- Issue #16795: On the ast.arguments object, unify vararg with varargannotation
2951 and kwarg and kwargannotation. Change the column offset of ast.Attribute to be
2952 at the attribute name.
2953
2954- Issue #17434: Properly raise a SyntaxError when a string occurs between future
2955 imports.
2956
2957- Issue #17117: Import and @importlib.util.set_loader now set __loader__ when
2958 it has a value of None or the attribute doesn't exist.
2959
2960- Issue #17032: The "global" in the "NameError: global name 'x' is not defined"
2961 error message has been removed. Patch by Ram Rachum.
2962
2963- Issue #18080: When building a C extension module on OS X, if the compiler
2964 is overridden with the CC environment variable, use the new compiler as
2965 the default for linking if LDSHARED is not also overridden. This restores
2966 Distutils behavior introduced in 3.2.3 and inadvertently dropped in 3.3.0.
2967
2968- Issue #18113: Fixed a refcount leak in the curses.panel module's
2969 set_userptr() method. Reported by Atsuo Ishimoto.
2970
2971- Implement PEP 443 "Single-dispatch generic functions".
2972
2973- Implement PEP 435 "Adding an Enum type to the Python standard library".
2974
2975- Issue #15596: Faster pickling of unicode strings.
2976
2977- Issue #17572: Avoid chained exceptions when passing bad directives to
2978 time.strptime(). Initial patch by Claudiu Popa.
2979
2980- Issue #17435: threading.Timer's __init__ method no longer uses mutable
2981 default values for the args and kwargs parameters.
2982
2983- Issue #17526: fix an IndexError raised while passing code without filename to
2984 inspect.findsource(). Initial patch by Tyler Doyle.
2985
2986- Issue #17540: Added style parameter to logging formatter configuration by dict.
2987
2988- Issue #16692: The ssl module now supports TLS 1.1 and TLS 1.2. Initial
2989 patch by Michele Orrù.
2990
2991- Issue #17025: multiprocessing: Reduce Queue and SimpleQueue contention.
2992
2993- Issue #17536: Add to webbrowser's browser list: www-browser, x-www-browser,
2994 iceweasel, iceape.
2995
2996- Issue #17150: pprint now uses line continuations to wrap long string
2997 literals.
2998
2999- Issue #17488: Change the subprocess.Popen bufsize parameter default value
3000 from unbuffered (0) to buffering (-1) to match the behavior existing code
3001 expects and match the behavior of the subprocess module in Python 2 to avoid
3002 introducing hard to track down bugs.
3003
3004- Issue #17521: Corrected non-enabling of logger following two calls to
3005 fileConfig().
3006
3007- Issue #17508: Corrected logging MemoryHandler configuration in dictConfig()
3008 where the target handler wasn't configured first.
3009
3010- Issue #17209: curses.window.get_wch() now correctly handles KeyboardInterrupt
3011 (CTRL+c).
3012
3013- Issue #5713: smtplib now handles 421 (closing connection) error codes when
3014 sending mail by closing the socket and reporting the 421 error code via the
3015 exception appropriate to the command that received the error response.
3016
3017- Issue #16997: unittest.TestCase now provides a subTest() context manager
3018 to procedurally generate, in an easy way, small test instances.
3019
3020- Issue #17485: Also delete the Request Content-Length header if the data
3021 attribute is deleted. (Follow on to issue Issue #16464).
3022
3023- Issue #15927: CVS now correctly parses escaped newlines and carriage
3024 when parsing with quoting turned off.
3025
3026- Issue #17467: add readline and readlines support to mock_open in
3027 unittest.mock.
3028
3029- Issue #13248: removed deprecated and undocumented difflib.isbjunk,
3030 isbpopular.
3031
3032- Issue #17192: Update the ctypes module's libffi to v3.0.13. This
3033 specifically addresses a stack misalignment issue on x86 and issues on
3034 some more recent platforms.
3035
3036- Issue #8862: Fixed curses cleanup when getkey is interrupted by a signal.
3037
3038- Issue #17443: imaplib.IMAP4_stream was using the default unbuffered IO
3039 in subprocess, but the imap code assumes buffered IO. In Python2 this
3040 worked by accident. IMAP4_stream now explicitly uses buffered IO.
3041
3042- Issue #17476: Fixed regression relative to Python2 in undocumented pydoc
3043 'allmethods'; it was missing unbound methods on the class.
3044
3045- Issue #17474: Remove the deprecated methods of Request class.
3046
3047- Issue #16709: unittest discover order is no-longer filesystem specific. Patch
3048 by Jeff Ramnani.
3049
3050- Use the HTTPS PyPI url for upload, overriding any plain HTTP URL in pypirc.
3051
3052- Issue #5024: sndhdr.whichhdr now returns the frame count for WAV files
3053 rather than -1.
3054
3055- Issue #17460: Remove the strict argument of HTTPConnection and removing the
3056 DeprecationWarning being issued from 3.2 onwards.
3057
3058- Issue #16880: Do not assume _imp.load_dynamic() is defined in the imp module.
3059
3060- Issue #16389: Fixed a performance regression relative to Python 3.1 in the
3061 caching of compiled regular expressions.
3062
3063- Added missing FeedParser and BytesFeedParser to email.parser.__all__.
3064
3065- Issue #17431: Fix missing import of BytesFeedParser in email.parser.
3066
3067- Issue #12921: http.server's send_error takes an explain argument to send more
3068 information in response. Patch contributed by Karl.
3069
3070- Issue #17414: Add timeit, repeat, and default_timer to timeit.__all__.
3071
3072- Issue #1285086: Get rid of the refcounting hack and speed up
3073 urllib.parse.unquote() and urllib.parse.unquote_to_bytes().
3074
3075- Issue #17099: Have importlib.find_loader() raise ValueError when __loader__
3076 is not set, harmonizing with what happens when the attribute is set to None.
3077
3078- Expose the O_PATH constant in the os module if it is available.
3079
3080- Issue #17368: Fix an off-by-one error in the Python JSON decoder that caused
3081 a failure while decoding empty object literals when object_pairs_hook was
3082 specified.
3083
3084- Issue #17385: Fix quadratic behavior in threading.Condition. The FIFO
3085 queue now uses a deque instead of a list.
3086
3087- Issue #15806: Add contextlib.ignore(). This creates a context manager to
3088 ignore specified exceptions, replacing the "except SomeException: pass" idiom.
3089
3090- Issue #14645: The email generator classes now produce output using the
3091 specified linesep throughout. Previously if the prolog, epilog, or
3092 body were stored with a different linesep, that linesep was used. This
3093 fix corrects an RFC non-compliance issue with smtplib.send_message.
3094
3095- Issue #17278: Fix a crash in heapq.heappush() and heapq.heappop() when
3096 the list is being resized concurrently.
3097
3098- Issue #16962: Use getdents64 instead of the obsolete getdents syscall
3099 in the subprocess module on Linux.
3100
3101- Issue #16935: unittest now counts the module as skipped if it raises SkipTest,
3102 instead of counting it as an error. Patch by Zachary Ware.
3103
3104- Issue #17018: Make Process.join() retry if os.waitpid() fails with EINTR.
3105
3106- Issue #17223: array module: Fix a crasher when converting an array containing
3107 invalid characters (outside range [U+0000; U+10ffff]) to Unicode:
3108 repr(array), str(array) and array.tounicode(). Patch written by Manuel Jacob.
3109
3110- Issue #17197: profile/cProfile modules refactored so that code of run() and
3111 runctx() utility functions is not duplicated in both modules.
3112
3113- Issue #14720: sqlite3: Convert datetime microseconds correctly.
3114 Patch by Lowe Thiderman.
3115
3116- Issue #15132: Allow a list for the defaultTest argument of
3117 unittest.TestProgram. Patch by Jyrki Pulliainen.
3118
3119- Issue #17225: JSON decoder now counts columns in the first line starting
3120 with 1, as in other lines.
3121
3122- Issue #6623: Added explicit DeprecationWarning for ftplib.netrc, which has
3123 been deprecated and undocumented for a long time.
3124
3125- Issue #13700: Fix byte/string handling in imaplib authentication when an
3126 authobject is specified.
3127
3128- Issue #13153: Tkinter functions now raise TclError instead of ValueError when
3129 a string argument contains non-BMP character.
3130
3131- Issue #9669: Protect re against infinite loops on zero-width matching in
3132 non-greedy repeat. Patch by Matthew Barnett.
3133
3134- Issue #13169: The maximal repetition number in a regular expression has been
3135 increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on
3136 64-bit).
3137
3138- Issue #17143: Fix a missing import in the trace module. Initial patch by
3139 Berker Peksag.
3140
3141- Issue #15220: email.feedparser's line splitting algorithm is now simpler and
3142 faster.
3143
3144- Issue #16743: Fix mmap overflow check on 32 bit Windows.
3145
3146- Issue #16996: webbrowser module now uses shutil.which() to find a
3147 web-browser on the executable search path.
3148
3149- Issue #16800: tempfile.gettempdir() no longer left temporary files when
3150 the disk is full. Original patch by Amir Szekely.
3151
3152- Issue #17192: Import libffi-3.0.12.
3153
3154- Issue #16564: Fixed regression relative to Python2 in the operation of
3155 email.encoders.encode_7or8bit when used with binary data.
3156
3157- Issue #17052: unittest discovery should use self.testLoader.
3158
3159- Issue #4591: Uid and gid values larger than 2**31 are supported now.
3160
3161- Issue #17141: random.vonmisesvariate() no longer hangs for large kappas.
3162
3163- Issue #17149: Fix random.vonmisesvariate to always return results in
3164 [0, 2*math.pi].
3165
3166- Issue #1470548: XMLGenerator now works with binary output streams.
3167
3168- Issue #6975: os.path.realpath() now correctly resolves multiple nested
3169 symlinks on POSIX platforms.
3170
3171- Issue #13773: sqlite3.connect() gets a new `uri` parameter to pass the
3172 filename as a URI, allowing custom options to be passed.
3173
3174- Issue #16564: Fixed regression relative to Python2 in the operation of
3175 email.encoders.encode_noop when used with binary data.
3176
3177- Issue #10355: The mode, name, encoding and newlines properties now work on
3178 SpooledTemporaryFile objects even when they have not yet rolled over.
3179 Obsolete method xreadline (which has never worked in Python 3) has been
3180 removed.
3181
3182- Issue #16686: Fixed a lot of bugs in audioop module. Fixed crashes in
3183 avgpp(), maxpp() and ratecv(). Fixed an integer overflow in add(), bias(),
3184 and ratecv(). reverse(), lin2lin() and ratecv() no more lose precision for
3185 32-bit samples. max() and rms() no more returns a negative result and
3186 various other functions now work correctly with 32-bit sample -0x80000000.
3187
3188- Issue #17073: Fix some integer overflows in sqlite3 module.
3189
3190- Issue #16723: httplib.HTTPResponse no longer marked closed when the connection
3191 is automatically closed.
3192
3193- Issue #15359: Add CAN_BCM protocol support to the socket module. Patch by
3194 Brian Thorne.
3195
3196- Issue #16948: Fix quoted printable body encoding for non-latin1 character
3197 sets in the email package.
3198
3199- Issue #16811: Fix folding of headers with no value in the provisional email
3200 policies.
3201
3202- Issue #17132: Update symbol for "yield from" grammar changes.
3203
3204- Issue #17076: Make copying of xattrs more tolerant of missing FS support.
3205 Patch by Thomas Wouters.
3206
3207- Issue #17089: Expat parser now correctly works with string input when the
3208 internal XML encoding is not UTF-8 or US-ASCII. It also now accepts bytes
3209 and strings larger than 2 GiB.
3210
3211- Issue #6083: Fix multiple segmentation faults occurred when PyArg_ParseTuple
3212 parses nested mutating sequence.
3213
3214- Issue #5289: Fix ctypes.util.find_library on Solaris.
3215
3216- Issue #17106: Fix a segmentation fault in io.TextIOWrapper when an underlying
3217 stream or a decoder produces data of an unexpected type (i.e. when
3218 io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec).
3219
3220- Issue #17015: When it has a spec, a Mock object now inspects its signature
3221 when matching calls, so that arguments can be matched positionally or
3222 by name.
3223
3224- Issue #15633: httplib.HTTPResponse is now mark closed when the server
3225 sends less than the advertised Content-Length.
3226
3227- Issue #12268: The io module file object write methods no longer abort early
3228 when one of its write system calls is interrupted (EINTR).
3229
3230- Issue #6972: The zipfile module no longer overwrites files outside of
3231 its destination path when extracting malicious zip files.
3232
3233- Issue #4844: ZipFile now raises BadZipFile when opens a ZIP file with an
3234 incomplete "End of Central Directory" record. Original patch by Guilherme
3235 Polo and Alan McIntyre.
3236
3237- Issue #17071: Signature.bind() now works when one of the keyword arguments
3238 is named ``self``.
3239
3240- Issue #12004: Fix an internal error in PyZipFile when writing an invalid
3241 Python file. Patch by Ben Morgan.
3242
3243- Have py_compile use importlib as much as possible to avoid code duplication.
3244 Code now raises FileExistsError if the file path to be used for the
3245 byte-compiled file is a symlink or non-regular file as a warning that import
3246 will not keep the file path type if it writes to that path.
3247
3248- Issue #16972: Have site.addpackage() consider already known paths even when
3249 none are explicitly passed in. Bug report and fix by Kirill.
3250
3251- Issue #1602133: on Mac OS X a shared library build (``--enable-shared``)
3252 now fills the ``os.environ`` variable correctly.
3253
3254- Issue #15505: `unittest.installHandler` no longer assumes SIGINT handler is
3255 set to a callable object.
3256
3257- Issue #13454: Fix a crash when deleting an iterator created by itertools.tee()
3258 if all other iterators were very advanced before.
3259
3260- Issue #12411: Fix to cgi.parse_multipart to correctly use bytes boundaries
3261 and bytes data. Patch by Jonas Wagner.
3262
3263- Issue #16957: shutil.which() no longer searches a bare file name in the
3264 current directory on Unix and no longer searches a relative file path with
3265 a directory part in PATH directories. Patch by Thomas Kluyver.
3266
3267- Issue #1159051: GzipFile now raises EOFError when reading a corrupted file
3268 with truncated header or footer.
3269
3270- Issue #16993: shutil.which() now preserves the case of the path and extension
3271 on Windows.
3272
3273- Issue #16992: On Windows in signal.set_wakeup_fd, validate the file
3274 descriptor argument.
3275
3276- Issue #16422: For compatibility with the Python version, the C version of
3277 decimal now uses strings instead of integers for rounding mode constants.
3278
3279- Issue #15861: tkinter now correctly works with lists and tuples containing
3280 strings with whitespaces, backslashes or unbalanced braces.
3281
3282- Issue #9720: zipfile now writes correct local headers for files larger than
3283 4 GiB.
3284
3285- Issue #16955: Fix the poll() method for multiprocessing's socket
3286 connections on Windows.
3287
3288- SSLContext.load_dh_params() now properly closes the input file.
3289
3290- Issue #15031: Refactor some .pyc management code to cut down on code
3291 duplication. Thanks to Ronan Lamy for the report and taking an initial stab
3292 at the problem.
3293
3294- Issue #16398: Optimize deque.rotate() so that it only moves pointers
3295 and doesn't touch the underlying data with increfs and decrefs.
3296
3297- Issue #16900: Issue a ResourceWarning when an ssl socket is left unclosed.
3298
3299- Issue #13899: ``\A``, ``\Z``, and ``\B`` now correctly match the A, Z,
3300 and B literals when used inside character classes (e.g. ``'[\A]'``).
3301 Patch by Matthew Barnett.
3302
3303- Issue #15545: Fix regression in sqlite3's iterdump method where it was
3304 failing if the connection used a row factory (such as sqlite3.Row) that
3305 produced unsortable objects. (Regression was introduced by fix for 9750).
3306
3307- fcntl: add F_DUPFD_CLOEXEC constant, available on Linux 2.6.24+.
3308
3309- Issue #15972: Fix error messages when os functions expecting a file name or
3310 file descriptor receive the incorrect type.
3311
3312- Issue #8109: The ssl module now has support for server-side SNI, thanks
3313 to a :meth:`SSLContext.set_servername_callback` method. Patch by Daniel
3314 Black.
3315
3316- Issue #16860: In tempfile, use O_CLOEXEC when available to set the
3317 close-on-exec flag atomically.
3318
3319- Issue #16674: random.getrandbits() is now 20-40% faster for small integers.
3320
3321- Issue #16009: JSON error messages now provide more information.
3322
3323- Issue #16828: Fix error incorrectly raised by bz2.compress(b'') and
3324 bz2.BZ2Compressor.compress(b''). Initial patch by Martin Packman.
3325
3326- Issue #16833: In http.client.HTTPConnection, do not concatenate the request
3327 headers and body when the payload exceeds 16 KB, since it can consume more
3328 memory for no benefit. Patch by Benno Leslie.
3329
3330- Issue #16541: tk_setPalette() now works with keyword arguments.
3331
3332- Issue #16820: In configparser, `parser.popitem()` no longer raises ValueError.
3333 This makes `parser.clean()` work correctly.
3334
3335- Issue #16820: In configparser, ``parser['section'] = {}`` now preserves
3336 section order within the parser. This makes `parser.update()` preserve section
3337 order as well.
3338
3339- Issue #16820: In configparser, ``parser['DEFAULT'] = {}`` now correctly
3340 clears previous values stored in the default section. Same goes for
3341 ``parser.update({'DEFAULT': {}})``.
3342
3343- Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy.
3344
3345- Issue #16787: Increase asyncore and asynchat default output buffers size, to
3346 decrease CPU usage and increase throughput.
3347
3348- Issue #10527: make multiprocessing use poll() instead of select() if available.
3349
3350- Issue #16688: Now regexes contained backreferences correctly work with
3351 non-ASCII strings. Patch by Matthew Barnett.
3352
3353- Issue #16486: Make aifc files act as context managers.
3354
3355- Issue #16485: Now file descriptors are closed if file header patching failed
3356 on closing an aifc file.
3357
3358- Issue #16640: Run less code under a lock in sched module.
3359
3360- Issue #16165: sched.scheduler.run() no longer blocks a scheduler for other
3361 threads.
3362
3363- Issue #16641: Default values of sched.scheduler.enter() are no longer
3364 modifiable.
3365
3366- Issue #16618: Make glob.glob match consistently across strings and bytes
3367 regarding leading dots. Patch by Serhiy Storchaka.
3368
3369- Issue #16788: Add samestat to Lib/ntpath.py
3370
3371- Issue #16713: Parsing of 'tel' urls using urlparse separates params from
3372 path.
3373
3374- Issue #16443: Add docstrings to regular expression match objects.
3375 Patch by Anton Kasyanov.
3376
3377- Issue #15701: Fix HTTPError info method call to return the headers information.
3378
3379- Issue #16752: Add a missing import to modulefinder. Patch by Berker Peksag.
3380
3381- Issue #16646: ftplib.FTP.makeport() might lose socket error details.
3382 (patch by Serhiy Storchaka)
3383
3384- Issue #16626: Fix infinite recursion in glob.glob() on Windows when the
3385 pattern contains a wildcard in the drive or UNC path. Patch by Serhiy
3386 Storchaka.
3387
3388- Issue #15783: Except for the number methods, the C version of decimal now
3389 supports all None default values present in decimal.py. These values were
3390 largely undocumented.
3391
3392- Issue #11175: argparse.FileType now accepts encoding and errors
3393 arguments. Patch by Lucas Maystre.
3394
3395- Issue #16488: epoll() objects now support the `with` statement. Patch
3396 by Serhiy Storchaka.
3397
3398- Issue #16298: In HTTPResponse.read(), close the socket when there is no
3399 Content-Length and the incoming stream is finished. Patch by Eran
3400 Rundstein.
3401
3402- Issue #16049: Add abc.ABC class to enable the use of inheritance to create
3403 ABCs, rather than the more cumbersome metaclass=ABCMeta. Patch by Bruno
3404 Dupuis.
3405
3406- Expose the TCP_FASTOPEN and MSG_FASTOPEN flags in socket when they're
3407 available.
3408
3409- Issue #15701: Add a .headers attribute to urllib.error.HTTPError. Patch
3410 contributed by Berker Peksag.
3411
3412- Issue #15872: Fix 3.3 regression introduced by the new fd-based shutil.rmtree
3413 that caused it to not ignore certain errors when ignore_errors was set.
3414 Patch by Alessandro Moura and Serhiy Storchaka.
3415
3416- Issue #16248: Disable code execution from the user's home directory by
3417 tkinter when the -E flag is passed to Python. Patch by Zachary Ware.
3418
3419- Issue #13390: New function :func:`sys.getallocatedblocks()` returns the
3420 number of memory blocks currently allocated.
3421
3422- Issue #16628: Fix a memory leak in ctypes.resize().
3423
3424- Issue #13614: Fix setup.py register failure with invalid rst in description.
3425 Patch by Julien Courteau and Pierre Paul Lefebvre.
3426
3427- Issue #13512: Create ~/.pypirc securely (CVE-2011-4944). Initial patch by
3428 Philip Jenvey, tested by Mageia and Debian.
3429
3430- Issue #7719: Make distutils ignore ``.nfs*`` files instead of choking later
3431 on. Initial patch by SilentGhost and Jeff Ramnani.
3432
3433- Issue #13120: Allow calling pdb.set_trace() from thread.
3434 Patch by Ilya Sandler.
3435
3436- Issue #16585: Make CJK encoders support error handlers that return bytes per
3437 PEP 383.
3438
3439- Issue #10182: The re module doesn't truncate indices to 32 bits anymore.
3440 Patch by Serhiy Storchaka.
3441
3442- Issue #16333: use (",", ": ") as default separator in json when indent is
3443 specified, to avoid trailing whitespace. Patch by Serhiy Storchaka.
3444
3445- Issue #16573: In 2to3, treat enumerate() like a consuming call, so superfluous
3446 list() calls aren't added to filter(), map(), and zip() which are directly
3447 passed enumerate().
3448
3449- Issue #16464: Reset the Content-Length header when a urllib Request is reused
3450 with new data.
3451
3452- Issue #12848: The pure Python pickle implementation now treats object
3453 lengths as unsigned 32-bit integers, like the C implementation does.
3454 Patch by Serhiy Storchaka.
3455
3456- Issue #16423: urllib.request now has support for ``data:`` URLs. Patch by
3457 Mathias Panzenböck.
3458
3459- Issue #4473: Add a POP3.stls() to switch a clear-text POP3 session into
3460 an encrypted POP3 session, on supported servers. Patch by Lorenzo Catucci.
3461
3462- Issue #4473: Add a POP3.capa() method to query the capabilities advertised
3463 by the POP3 server. Patch by Lorenzo Catucci.
3464
3465- Issue #4473: Ensure the socket is shutdown cleanly in POP3.close().
3466 Patch by Lorenzo Catucci.
3467
3468- Issue #16522: added FAIL_FAST flag to doctest.
3469
3470- Issue #15627: Add the importlib.abc.InspectLoader.source_to_code() method.
3471
3472- Issue #16408: Fix file descriptors not being closed in error conditions
3473 in the zipfile module. Patch by Serhiy Storchaka.
3474
3475- Issue #14631: Add a new :class:`weakref.WeakMethod` to simulate weak
3476 references to bound methods.
3477
3478- Issue #16469: Fix exceptions from float -> Fraction and Decimal -> Fraction
3479 conversions for special values to be consistent with those for float -> int
3480 and Decimal -> int. Patch by Alexey Kachayev.
3481
3482- Issue #16481: multiprocessing no longer leaks process handles on Windows.
3483
3484- Issue #12428: Add a pure Python implementation of functools.partial().
3485 Patch by Brian Thorne.
3486
3487- Issue #16140: The subprocess module no longer double closes its child
3488 subprocess.PIPE parent file descriptors on child error prior to exec().
3489
3490- Remove a bare print to stdout from the subprocess module that could have
3491 happened if the child process wrote garbage to its pre-exec error pipe.
3492
3493- The subprocess module now raises its own SubprocessError instead of a
3494 RuntimeError in various error situations which should not normally happen.
3495
3496- Issue #16327: The subprocess module no longer leaks file descriptors
3497 used for stdin/stdout/stderr pipes to the child when fork() fails.
3498
3499- Issue #14396: Handle the odd rare case of waitpid returning 0 when not
3500 expected in subprocess.Popen.wait().
3501
3502- Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access
3503 previously-freed memory. Patch by Serhiy Storchaka.
3504
3505- Issue #16357: fix calling accept() on a SSLSocket created through
3506 SSLContext.wrap_socket(). Original patch by Jeff McNeil.
3507
3508- Issue #16409: The reporthook callback made by the legacy
3509 urllib.request.urlretrieve API now properly supplies a constant non-zero
3510 block_size as it did in Python 3.2 and 2.7. This matches the behavior of
3511 urllib.request.URLopener.retrieve.
3512
3513- Issue #16431: Use the type information when constructing a Decimal subtype
3514 from a Decimal argument.
3515
3516- Issue #15641: Clean up deprecated classes from importlib.
3517 Patch by Taras Lyapun.
3518
3519- Issue #16350: zlib.decompressobj().decompress() now accumulates data from
3520 successive calls after EOF in unused_data, instead of only saving the argument
3521 to the last call. decompressobj().flush() now correctly sets unused_data and
3522 unconsumed_tail. A bug in the handling of MemoryError when setting the
3523 unconsumed_tail attribute has also been fixed. Patch by Serhiy Storchaka.
3524
3525- Issue #12759: sre_parse now raises a proper error when the name of the group
3526 is missing. Initial patch by Serhiy Storchaka.
3527
3528- Issue #16152: fix tokenize to ignore whitespace at the end of the code when
3529 no newline is found. Patch by Ned Batchelder.
3530
3531- Issue #16284: Prevent keeping unnecessary references to worker functions
3532 in concurrent.futures ThreadPoolExecutor.
3533
3534- Issue #16230: Fix a crash in select.select() when one of the lists changes
3535 size while iterated on. Patch by Serhiy Storchaka.
3536
3537- Issue #16228: Fix a crash in the json module where a list changes size
3538 while it is being encoded. Patch by Serhiy Storchaka.
3539
3540- Issue #16351: New function gc.get_stats() returns per-generation collection
3541 statistics.
3542
3543- Issue #14897: Enhance error messages of struct.pack and
3544 struct.pack_into. Patch by Matti Mäki.
3545
3546- Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions.
3547 Patch by Serhiy Storchaka.
3548
3549- Issue #12890: cgitb no longer prints spurious <p> tags in text
3550 mode when the logdir option is specified.
3551
3552- Issue #16307: Fix multiprocessing.Pool.map_async not calling its callbacks.
3553 Patch by Janne Karila.
3554
3555- Issue #16305: Fix a segmentation fault occurring when interrupting
3556 math.factorial.
3557
3558- Issue #16116: Fix include and library paths to be correct when building C
3559 extensions in venvs.
3560
3561- Issue #16245: Fix the value of a few entities in html.entities.html5.
3562
3563- Issue #16301: Fix the localhost verification in urllib/request.py for ``file://``
3564 urls.
3565
3566- Issue #16250: Fix the invocations of URLError which had misplaced filename
3567 attribute for exception.
3568
3569- Issue #10836: Fix exception raised when file not found in urlretrieve
3570 Initial patch by Ezio Melotti.
3571
3572- Issue #14398: Fix size truncation and overflow bugs in the bz2 module.
3573
3574- Issue #12692: Fix resource leak in urllib.request when talking to an HTTP
3575 server that does not include a ``Connection: close`` header in its responses.
3576
3577- Issue #12034: Fix bogus caching of result in check_GetFinalPathNameByHandle.
3578 Patch by Atsuo Ishimoto.
3579
3580- Improve performance of `lzma.LZMAFile` (see also issue #16034).
3581
3582- Issue #16220: wsgiref now always calls close() on an iterable response.
3583 Patch by Brent Tubbs.
3584
3585- Issue #16270: urllib may hang when used for retrieving files via FTP by using
3586 a context manager. Patch by Giampaolo Rodola'.
3587
3588- Issue #16461: Wave library should be able to deal with 4GB wav files,
3589 and sample rate of 44100 Hz.
3590
3591- Issue #16176: Properly identify Windows 8 via platform.platform()
3592
3593- Issue #16088: BaseHTTPRequestHandler's send_error method includes a
3594 Content-Length header in its response now. Patch by Antoine Pitrou.
3595
3596- Issue #16114: The subprocess module no longer provides a misleading error
3597 message stating that args[0] did not exist when either the cwd or executable
3598 keyword arguments specified a path that did not exist.
3599
3600- Issue #16169: Fix ctypes.WinError()'s confusion between errno and winerror.
3601
3602- Issue #16110: logging.fileConfig now accepts a pre-initialised ConfigParser
3603 instance.
3604
3605- Issue #1492704: shutil.copyfile() raises a distinct SameFileError now if
3606 source and destination are the same file. Patch by Atsuo Ishimoto.
3607
3608- Issue #13896: Make shelf instances work with 'with' as context managers.
3609 Original patch by Filip Gruszczyński.
3610
3611- Issue #15417: Add support for csh and fish in venv activation scripts.
3612
3613- Issue #14377: ElementTree.write and some of the module-level functions have
3614 a new parameter - *short_empty_elements*. It controls how elements with no
3615 contents are emitted.
3616
3617- Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element
3618 element_factory (fixes a regression in SimpleTAL).
3619
3620- Issue #9650: List commonly used format codes in time.strftime and
3621 time.strptime docsttings. Original patch by Mike Hoy.
3622
3623- Issue #15452: logging configuration socket listener now has a verify option
3624 that allows an application to apply a verification function to the
3625 received configuration data before it is acted upon.
3626
3627- Issue #16034: Fix performance regressions in the new `bz2.BZ2File`
3628 implementation. Initial patch by Serhiy Storchaka.
3629
3630- `pty.spawn()` now returns the child process status returned by `os.waitpid()`.
3631
3632- Issue #15756: `subprocess.poll()` now properly handles `errno.ECHILD` to
3633 return a returncode of 0 when the child has already exited or cannot be waited
3634 on.
3635
3636- Issue #15323: Improve failure message of `Mock.assert_called_once_with()`.
3637
3638- Issue #16064: ``unittest -m`` claims executable is "python", not "python3".
3639
3640- Issue #12376: Pass on parameters in `TextTestResult.__init__()` super call.
3641
3642- Issue #15222: Insert blank line after each message in mbox mailboxes.
3643
3644- Issue #16013: Fix `csv.Reader` parsing issue with ending quote characters.
3645 Patch by Serhiy Storchaka.
3646
3647- Issue #15421: Fix an OverflowError in `Calendar.itermonthdates()` after
3648 `datetime.MAXYEAR`. Patch by Cédric Krier.
3649
3650- Issue #16112: platform.architecture does not correctly escape argument to
3651 /usr/bin/file. Patch by David Benjamin.
3652
3653- Issue #15970: `xml.etree.ElementTree` now serializes correctly the empty HTML
3654 elements 'meta' and 'param'.
3655
3656- Issue #15842: The `SocketIO.{readable,writable,seekable}` methods now raise
3657 ValueError when the file-like object is closed. Patch by Alessandro Moura.
3658
3659- Issue #15876: Fix a refleak in the `curses` module: window.encoding.
3660
3661- Issue #15881: Fix `atexit` hook in `multiprocessing`. Original patch by Chris
3662 McDonough.
3663
3664- Issue #15841: The readable(), writable() and seekable() methods of
3665 `io.BytesIO` and `io.StringIO` objects now raise ValueError when the object
3666 has been closed. Patch by Alessandro Moura.
3667
3668- Issue #15447: Use `subprocess.DEVNULL` in webbrowser, instead of opening
3669 `os.devnull` explicitly and leaving it open.
3670
3671- Issue #15509: `webbrowser.UnixBrowser` no longer passes empty arguments to
3672 Popen when ``%action`` substitutions produce empty strings.
3673
3674- Issue #12776, issue #11839: Call `argparse` type function (specified by
3675 add_argument) only once. Before, the type function was called twice in the
3676 case where the default was specified and the argument was given as well. This
3677 was especially problematic for the FileType type, as a default file would
3678 always be opened, even if a file argument was specified on the command line.
3679
3680- Issue #15906: Fix a regression in argparse caused by the preceding change,
3681 when ``action='append'``, ``type='str'`` and ``default=[]``.
3682
3683- Issue #16113: Added sha3 module based on the Keccak reference implementation
3684 3.2. The `hashlib` module has four additional hash algorithms: `sha3_224`,
3685 `sha3_256`, `sha3_384` and `sha3_512`. As part of the patch some common
3686 code was moved from _hashopenssl.c to hashlib.h.
3687
3688- ctypes.call_commethod was removed, since its only usage was in the defunct
3689 samples directory.
3690
3691- Issue #16692: Added TLSv1.1 and TLSv1.2 support for the ssl modules.
3692
3693- Issue #16832: add abc.get_cache_token() to expose cache validity checking
3694 support in ABCMeta.
3695
3696IDLE
3697----
3698
3699- Issue #18429: Format / Format Paragraph, now works when comment blocks
3700 are selected. As with text blocks, this works best when the selection
3701 only includes complete lines.
3702
3703- Issue #18226: Add docstrings and unittests for FormatParagraph.py.
3704 Original patches by Todd Rovito and Phil Webster.
3705
3706- Issue #18279: Format - Strip trailing whitespace no longer marks a file as
3707 changed when it has not been changed. This fix followed the addition of a
3708 test file originally written by Phil Webster (the issue's main goal).
3709
3710- Issue #7136: In the Idle File menu, "New Window" is renamed "New File".
3711 Patch by Tal Einat, Roget Serwy, and Todd Rovito.
3712
3713- Remove dead imports of imp.
3714
3715- Issue #18196: Avoid displaying spurious SystemExit tracebacks.
3716
3717- Issue #5492: Avoid traceback when exiting IDLE caused by a race condition.
3718
3719- Issue #17511: Keep IDLE find dialog open after clicking "Find Next".
3720 Original patch by Sarah K.
3721
3722- Issue #18055: Move IDLE off of imp and on to importlib.
3723
3724- Issue #15392: Create a unittest framework for IDLE.
3725 Initial patch by Rajagopalasarma Jayakrishnan.
3726 See Lib/idlelib/idle_test/README.txt for how to run Idle tests.
3727
3728- Issue #14146: Highlight source line while debugging on Windows.
3729
3730- Issue #17838: Allow sys.stdin to be reassigned.
3731
3732- Issue #13495: Avoid loading the color delegator twice in IDLE.
3733
3734- Issue #17798: Allow IDLE to edit new files when specified on command line.
3735
3736- Issue #14735: Update IDLE docs to omit "Control-z on Windows".
3737
3738- Issue #17532: Always include Options menu for IDLE on OS X.
3739 Patch by Guilherme Simões.
3740
3741- Issue #17585: Fixed IDLE regression. Now closes when using exit() or quit().
3742
3743- Issue #17657: Show full Tk version in IDLE's about dialog.
3744 Patch by Todd Rovito.
3745
3746- Issue #17613: Prevent traceback when removing syntax colorizer in IDLE.
3747
3748- Issue #1207589: Backwards-compatibility patch for right-click menu in IDLE.
3749
3750- Issue #16887: IDLE now accepts Cancel in tabify/untabify dialog box.
3751
3752- Issue #17625: In IDLE, close the replace dialog after it is used.
3753
3754- Issue #14254: IDLE now handles readline correctly across shell restarts.
3755
3756- Issue #17614: IDLE no longer raises exception when quickly closing a file.
3757
3758- Issue #6698: IDLE now opens just an editor window when configured to do so.
3759
3760- Issue #8900: Using keyboard shortcuts in IDLE to open a file no longer
3761 raises an exception.
3762
3763- Issue #6649: Fixed missing exit status in IDLE. Patch by Guilherme Polo.
3764
3765- Issue #17114: IDLE now uses non-strict config parser.
3766
3767- Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
3768 interface and support all mandatory methods and properties.
3769
3770- Issue #5066: Update IDLE docs. Patch by Todd Rovito.
3771
3772- Issue #16829: IDLE printing no longer fails if there are spaces or other
3773 special characters in the file path.
3774
3775- Issue #16491: IDLE now prints chained exception tracebacks.
3776
3777- Issue #16819: IDLE method completion now correctly works for bytes literals.
3778
3779- Issue #16504: IDLE now catches SyntaxErrors raised by tokenizer. Patch by
3780 Roger Serwy.
3781
3782- Issue #16511: Use default IDLE width and height if config param is not valid.
3783 Patch Serhiy Storchaka.
3784
3785- Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu.
3786 Patch by Todd Rovito.
3787
3788- Issue #16123: IDLE - deprecate running without a subprocess.
3789 Patch by Roger Serwy.
3790
3791Tests
3792-----
3793
3794- Issue #1666318: Add a test that shutil.copytree() retains directory
3795 permissions. Patch by Catherine Devlin.
3796
3797- Issue #18273: move the tests in Lib/test/json_tests to Lib/test/test_json
3798 and make them discoverable by unittest. Patch by Zachary Ware.
3799
3800- Fix a fcntl test case on KFreeBSD, Debian #708653 (Petr Salinger).
3801
3802- Issue #18396: Fix spurious test failure in test_signal on Windows when
3803 faulthandler is enabled (Patch by Jeremy Kloth)
3804
3805- Issue #17046: Fix broken test_executable_without_cwd in test_subprocess.
3806
3807- Issue #15415: Add new temp_dir() and change_cwd() context managers to
3808 test.support, and refactor temp_cwd() to use them. Patch by Chris Jerdonek.
3809
3810- Issue #15494: test.support is now a package rather than a module (Initial
3811 patch by Indra Talip)
3812
3813- Issue #17944: test_zipfile now discoverable and uses subclassing to
3814 generate tests for different compression types. Fixed a bug with skipping
3815 some tests due to use of exhausted iterators.
3816
3817- Issue #18266: test_largefile now works with unittest test discovery and
3818 supports running only selected tests. Patch by Zachary Ware.
3819
3820- Issue #17767: test_locale now works with unittest test discovery.
3821 Original patch by Zachary Ware.
3822
3823- Issue #18375: Assume --randomize when --randseed is used for running the
3824 testsuite.
3825
3826- Issue #11185: Fix test_wait4 under AIX. Patch by Sébastien Sablé.
3827
3828- Issue #18207: Fix test_ssl for some versions of OpenSSL that ignore seconds
3829 in ASN1_TIME fields.
3830
3831- Issue #18094: test_uuid no longer reports skipped tests as passed.
3832
3833- Issue #17992: Add timeouts to asyncore and asynchat tests so that they won't
3834 accidentally hang.
3835
3836- Issue #17833: Fix test_gdb failures seen on machines where debug symbols
3837 for glibc are available (seen on PPC64 Linux).
3838
3839- Issue #7855: Add tests for ctypes/winreg for issues found in IronPython.
3840 Initial patch by Dino Viehland.
3841
3842- Issue #11078: test___all__ now checks for duplicates in __all__.
3843 Initial patch by R. David Murray.
3844
3845- Issue #17712: Fix test_gdb failures on Ubuntu 13.04.
3846
3847- Issue #17835: Fix test_io when the default OS pipe buffer size is larger
3848 than one million bytes.
3849
3850- Issue #17065: Use process-unique key for winreg tests to avoid failures if
3851 test is run multiple times in parallel (eg: on a buildbot host).
3852
3853- Issue #12820: add tests for the xml.dom.minicompat module.
3854 Patch by John Chandler and Phil Connell.
3855
3856- Issue #17691: test_univnewlines now works with unittest test discovery.
3857 Patch by Zachary Ware.
3858
3859- Issue #17790: test_set now works with unittest test discovery.
3860 Patch by Zachary Ware.
3861
3862- Issue #17789: test_random now works with unittest test discovery.
3863 Patch by Zachary Ware.
3864
3865- Issue #17779: test_osx_env now works with unittest test discovery.
3866 Patch by Zachary Ware.
3867
3868- Issue #17766: test_iterlen now works with unittest test discovery.
3869 Patch by Zachary Ware.
3870
3871- Issue #17690: test_time now works with unittest test discovery.
3872 Patch by Zachary Ware.
3873
3874- Issue #17692: test_sqlite now works with unittest test discovery.
3875 Patch by Zachary Ware.
3876
3877- Issue #11995: test_pydoc doesn't import all sys.path modules anymore.
3878
3879- Issue #17448: test_sax now skips if there are no xml parsers available
3880 instead of raising an ImportError.
3881
3882- Issue #11420: make test suite pass with -B/DONTWRITEBYTECODE set.
3883 Initial patch by Thomas Wouters.
3884
3885- Issue #10652: make tcl/tk tests run after __all__ test, patch by
3886 Zachary Ware.
3887
3888- Issue #11963: remove human verification from test_parser and test_subprocess.
3889
3890- Issue #11732: add a new suppress_crash_popup() context manager to test.support
3891 that disables crash popups on Windows and use it in test_faulthandler and
3892 test_capi.
3893
3894- Issue #13898: test_ssl no longer prints a spurious stack trace on Ubuntu.
3895
3896- Issue #17283: Share code between `__main__.py` and `regrtest.py` in
3897 `Lib/test`.
3898
3899- Issue #17249: convert a test in test_capi to use unittest and reap threads.
3900
3901- Issue #17107: Test client-side SNI support in urllib.request thanks to
3902 the new server-side SNI support in the ssl module. Initial patch by
3903 Daniel Black.
3904
3905- Issue #17041: Fix testing when Python is configured with the
3906 --without-doc-strings.
3907
3908- Issue #16923: Fix ResourceWarnings in test_ssl.
3909
3910- Issue #15539: Added regression tests for Tools/scripts/pindent.py.
3911
3912- Issue #17479: test_io now works with unittest test discovery.
3913 Patch by Zachary Ware.
3914
3915- Issue #17066: test_robotparser now works with unittest test discovery.
3916 Patch by Zachary Ware.
3917
3918- Issue #17334: test_index now works with unittest test discovery.
3919 Patch by Zachary Ware.
3920
3921- Issue #17333: test_imaplib now works with unittest test discovery.
3922 Patch by Zachary Ware.
3923
3924- Issue #17082: test_dbm* now work with unittest test discovery.
3925 Patch by Zachary Ware.
3926
3927- Issue #17079: test_ctypes now works with unittest test discovery.
3928 Patch by Zachary Ware.
3929
3930- Issue #17304: test_hash now works with unittest test discovery.
3931 Patch by Zachary Ware.
3932
3933- Issue #17303: test_future* now work with unittest test discovery.
3934 Patch by Zachary Ware.
3935
3936- Issue #17163: test_file now works with unittest test discovery.
3937 Patch by Zachary Ware.
3938
3939- Issue #16925: test_configparser now works with unittest test discovery.
3940 Patch by Zachary Ware.
3941
3942- Issue #16918: test_codecs now works with unittest test discovery.
3943 Patch by Zachary Ware.
3944
3945- Issue #16919: test_crypt now works with unittest test discovery.
3946 Patch by Zachary Ware.
3947
3948- Issue #16910: test_bytes, test_unicode, and test_userstring now work with
3949 unittest test discovery. Patch by Zachary Ware.
3950
3951- Issue #16905: test_warnings now works with unittest test discovery.
3952 Initial patch by Berker Peksag.
3953
3954- Issue #16898: test_bufio now works with unittest test discovery.
3955 Patch by Zachary Ware.
3956
3957- Issue #16888: test_array now works with unittest test discovery.
3958 Patch by Zachary Ware.
3959
3960- Issue #16896: test_asyncore now works with unittest test discovery.
3961 Patch by Zachary Ware.
3962
3963- Issue #16897: test_bisect now works with unittest test discovery.
3964 Initial patch by Zachary Ware.
3965
3966- Issue #16852: test_genericpath, test_posixpath, test_ntpath, and test_macpath
3967 now work with unittest test discovery. Patch by Zachary Ware.
3968
3969- Issue #16748: test_heapq now works with unittest test discovery.
3970
3971- Issue #10646: Tests rearranged for os.samefile/samestat to check for not
3972 just symlinks but also hard links.
3973
3974- Issue #15302: Switch regrtest from using getopt to using argparse.
3975
3976- Issue #15324: Fix regrtest parsing of --fromfile, --match, and --randomize
3977 options.
3978
3979- Issue #16702: test_urllib2_localnet tests now correctly ignores proxies for
3980 localhost tests.
3981
3982- Issue #16664: Add regression tests for glob's behaviour concerning entries
3983 starting with a ".". Patch by Sebastian Kreft.
3984
3985- Issue #13390: The ``-R`` option to regrtest now also checks for memory
3986 allocation leaks, using :func:`sys.getallocatedblocks()`.
3987
3988- Issue #16559: Add more tests for the json module, including some from the
3989 official test suite at json.org. Patch by Serhiy Storchaka.
3990
3991- Issue #16661: Fix the `os.getgrouplist()` test by not assuming that it gives
3992 the same output as :command:`id -G`.
3993
3994- Issue #16115: Add some tests for the executable argument to
3995 subprocess.Popen(). Initial patch by Kushal Das.
3996
3997- Issue #16126: PyErr_Format format mismatch in _testcapimodule.c.
3998 Patch by Serhiy Storchaka.
3999
4000- Issue #15304: Fix warning message when `os.chdir()` fails inside
4001 `test.support.temp_cwd()`. Patch by Chris Jerdonek.
4002
4003- Issue #15802: Fix test logic in `TestMaildir.test_create_tmp()`. Patch by
4004 Serhiy Storchaka.
4005
4006- Issue #15557: Added a test suite for the webbrowser module, thanks to Anton
4007 Barkovsky.
4008
4009- Issue #16698: Skip posix test_getgroups when built with OS X
4010 deployment target prior to 10.6.
4011
4012Build
4013-----
4014
4015- Issue #16067: Add description into MSI file to replace installer's
4016 temporary name.
4017
4018- Issue #18257: Fix readlink usage in python-config. Install the python
4019 version again on Darwin.
4020
4021- Issue #18481: Add C coverage reporting with gcov and lcov. A new make target
4022 "coverage-report" creates an instrumented Python build, runs unit tests
4023 and creates a HTML. The report can be updated with "make coverage-lcov".
4024
4025- Issue #17845: Clarified the message printed when some module are not built.
4026
4027- Issue #18256: Compilation fix for recent AIX releases. Patch by
4028 David Edelsohn.
4029
4030- Issue #17547: In configure, explicitly pass -Wformat for the benefit for GCC
4031 4.8.
4032
4033- Issue #15172: Document NASM 2.10+ as requirement for building OpenSSL 1.0.1
4034 on Windows.
4035
4036- Issue #17591: Use lowercase filenames when including Windows header files.
4037 Patch by Roumen Petrov.
4038
4039- Issue #17550: Fix the --enable-profiling configure switch.
4040
4041- Issue #17425: Build with openssl 1.0.1d on Windows.
4042
4043- Issue #16754: Fix the incorrect shared library extension on linux. Introduce
4044 two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
4045 SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
4046
4047- Issue #5033: Fix building of the sqlite3 extension module when the
4048 SQLite library version has "beta" in it. Patch by Andreas Pelme.
4049
4050- Issue #17228: Fix building without pymalloc.
4051
4052- Issue #3718: Use AC_ARG_VAR to set MACHDEP in configure.ac.
4053
4054- Issue #16235: Implement python-config as a shell script.
4055
4056- Issue #16769: Remove outdated Visual Studio projects.
4057
4058- Issue #17031: Fix running regen in cross builds.
4059
4060- Issue #3754: fix typo in pthread AC_CACHE_VAL.
4061
4062- Issue #15484: Fix _PYTHON_PROJECT_BASE for srcdir != builddir builds;
4063 use _PYTHON_PROJECT_BASE in distutils/sysconfig.py.
4064
4065- Drop support for Windows 2000 (changeset e52df05b496a).
4066
4067- Issue #17029: Let h2py search the multiarch system include directory.
4068
4069- Issue #16953: Fix socket module compilation on platforms with
4070 HAVE_BROKEN_POLL. Patch by Jeffrey Armstrong.
4071
4072- Issue #16320: Remove redundant Makefile dependencies for strings and bytes.
4073
4074- Cross compiling needs host and build settings. configure no longer
4075 creates a broken PYTHON_FOR_BUILD variable when --build is missing.
4076
4077- Fix cross compiling issue in setup.py, ensure that lib_dirs and inc_dirs are
4078 defined in cross compiling mode, too.
4079
4080- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
4081
4082- Issue #16593: Have BSD 'make -s' do the right thing, thanks to Daniel Shahaf
4083
4084- Issue #16262: fix out-of-src-tree builds, if mercurial is not installed.
4085
4086- Issue #15298: ensure _sysconfigdata is generated in build directory, not
4087 source directory.
4088
4089- Issue #15833: Fix a regression in 3.3 that resulted in exceptions being
4090 raised if importlib failed to write byte-compiled files. This affected
4091 attempts to build Python out-of-tree from a read-only source directory.
4092
4093- Issue #15923: Fix a mistake in ``asdl_c.py`` that resulted in a TypeError
4094 after 2801bf875a24 (see #15801).
4095
4096- Issue #16135: Remove OS/2 support.
4097
4098- Issue #15819: Make sure we can build Python out-of-tree from a read-only
4099 source directory. (Somewhat related to issue #9860.)
4100
4101- Issue #15587: Enable Tk high-resolution text rendering on Macs with
4102 Retina displays. Applies to Tkinter apps, such as IDLE, on OS X
4103 framework builds linked with Cocoa Tk 8.5.
4104
4105- Issue #17161: make install now also installs a python3 man page.
4106
4107C-API
4108-----
4109
4110- Issue #18351: Fix various issues in a function in importlib provided to help
4111 PyImport_ExecCodeModuleWithPathnames() (and thus by extension
4112 PyImport_ExecCodeModule() and PyImport_ExecCodeModuleEx()).
4113
4114- Issue #15767: Added PyErr_SetImportErrorSubclass().
4115
4116- PyErr_SetImportError() now sets TypeError when its msg argument is set.
4117
4118- Issue #9369: The types of `char*` arguments of PyObject_CallFunction() and
4119 PyObject_CallMethod() now changed to `const char*`. Based on patches by
4120 Jörg Müller and Lars Buitinck.
4121
4122- Issue #17206: Py_CLEAR(), Py_DECREF(), Py_XINCREF() and Py_XDECREF() now
4123 expand their arguments once instead of multiple times. Patch written by Illia
4124 Polosukhin.
4125
4126- Issue #17522: Add the PyGILState_Check() API.
4127
4128- Issue #17327: Add PyDict_SetDefault.
4129
4130- Issue #16881: Fix Py_ARRAY_LENGTH macro for GCC < 3.1.
4131
4132- Issue #16505: Remove unused Py_TPFLAGS_INT_SUBCLASS.
4133
4134- Issue #16086: PyTypeObject.tp_flags and PyType_Spec.flags are now unsigned
4135 (unsigned long and unsigned int) to avoid an undefined behaviour with
4136 Py_TPFLAGS_TYPE_SUBCLASS ((1 << 31). PyType_GetFlags() result type is
4137 now unsigned too (unsigned long, instead of long).
4138
4139- Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified
4140 endianness detection and handling.
4141
4142Documentation
4143-------------
4144
4145- Issue #23006: Improve the documentation and indexing of dict.__missing__.
4146 Add an entry in the language datamodel special methods section.
4147 Revise and index its discussion in the stdtypes mapping/dict section.
4148
4149- Issue #17701: Improving strftime documentation.
4150
4151- Issue #18440: Clarify that `hash()` can truncate the value returned from an
4152 object's custom `__hash__()` method.
4153
4154- Issue #17844: Add links to encoders and decoders for bytes-to-bytes codecs.
4155
4156- Issue #14097: improve the "introduction" page of the tutorial.
4157
4158- Issue #17977: The documentation for the cadefault argument's default value
4159 in urllib.request.urlopen() is fixed to match the code.
4160
4161- Issue #6696: add documentation for the Profile objects, and improve
4162 profile/cProfile docs. Patch by Tom Pinckney.
4163
4164- Issue #15940: Specify effect of locale on time functions.
4165
4166- Issue #17538: Document XML vulnerabilties
4167
4168- Issue #16642: sched.scheduler timefunc initial default is time.monotonic.
4169 Patch by Ramchandra Apte
4170
4171- Issue #17047: remove doubled words in docs and docstrings
4172 reported by Serhiy Storchaka and Matthew Barnett.
4173
4174- Issue #15465: Document the versioning macros in the C API docs rather than
4175 the standard library docs. Patch by Kushal Das.
4176
4177- Issue #16406: Combine the pages for uploading and registering to PyPI.
4178
4179- Issue #16403: Document how distutils uses the maintainer field in
4180 PKG-INFO. Patch by Jyrki Pulliainen.
4181
4182- Issue #16695: Document how glob handles filenames starting with a
4183 dot. Initial patch by Jyrki Pulliainen.
4184
4185- Issue #8890: Stop advertising an insecure practice by replacing uses
4186 of the /tmp directory with better alternatives in the documentation.
4187 Patch by Geoff Wilson.
4188
4189- Issue #17203: add long option names to unittest discovery docs.
4190
4191- Issue #13094: add "Why do lambdas defined in a loop with different values
4192 all return the same result?" programming FAQ.
4193
4194- Issue #14901: Update portions of the Windows FAQ.
4195 Patch by Ashish Nitin Patil.
4196
4197- Issue #16267: Better document the 3.3+ approach to combining
4198 @abstractmethod with @staticmethod, @classmethod and @property
4199
4200- Issue #15209: Clarify exception chaining description in exceptions module
4201 documentation
4202
4203- Issue #15990: Improve argument/parameter documentation.
4204
4205- Issue #16209: Move the documentation for the str built-in function to a new
4206 str class entry in the "Text Sequence Type" section.
4207
4208- Issue #13538: Improve str() and object.__str__() documentation.
4209
4210- Issue #16489: Make it clearer that importlib.find_loader() needs parent
4211 packages to be explicitly imported.
4212
4213- Issue #16400: Update the description of which versions of a given package
4214 PyPI displays.
4215
4216- Issue #15677: Document that zlib and gzip accept a compression level of 0 to
4217 mean 'no compression'. Patch by Brian Brazil.
4218
4219- Issue #16197: Update winreg docstrings and documentation to match code.
4220 Patch by Zachary Ware.
4221
4222- Issue #8040: added a version switcher to the documentation. Patch by
4223 Yury Selivanov.
4224
4225- Issue #16241: Document -X faulthandler command line option.
4226 Patch by Marek Šuppa.
4227
4228- Additional comments and some style changes in the concurrent.futures URL
4229 retrieval example
4230
4231- Issue #16115: Improve subprocess.Popen() documentation around args, shell,
4232 and executable arguments.
4233
4234- Issue #13498: Clarify docs of os.makedirs()'s exist_ok argument. Done with
4235 great native-speaker help from R. David Murray.
4236
4237- Issue #15533: Clarify docs and add tests for `subprocess.Popen()`'s cwd
4238 argument.
4239
4240- Issue #15979: Improve timeit documentation.
4241
4242- Issue #16036: Improve documentation of built-in `int()`'s signature and
4243 arguments.
4244
4245- Issue #15935: Clarification of `argparse` docs, re: add_argument() type and
4246 default arguments. Patch contributed by Chris Jerdonek.
4247
4248- Issue #11964: Document a change in v3.2 to the behavior of the indent
4249 parameter of json encoding operations.
4250
4251- Issue #15116: Remove references to appscript as it is no longer being
4252 supported.
4253
4254Tools/Demos
4255-----------
4256
4257- Issue #18817: Fix a resource warning in Lib/aifc.py demo. Patch by
4258 Vajrasky Kok.
4259
4260- Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
4261
4262- Issue #18448: Fix a typo in Tools/demo/eiffel.py.
4263
4264- Issue #18457: Fixed saving of formulas and complex numbers in
4265 Tools/demo/ss1.py.
4266
4267- Issue #18449: Make Tools/demo/ss1.py work again on Python 3. Patch by
4268 Févry Thibault.
4269
4270- Issue #12990: The "Python Launcher" on OSX could not launch python scripts
4271 that have paths that include wide characters.
4272
4273- Issue #15239: Make mkstringprep.py work again on Python 3.
4274
4275- Issue #17028: Allowed Python arguments to be supplied to the Windows
4276 launcher.
4277
4278- Issue #17156: pygettext.py now detects the encoding of source files and
4279 correctly writes and escapes non-ascii characters.
4280
4281- Issue #15539: Fix a number of bugs in Tools/scripts/pindent.py. Now
4282 pindent.py works with a "with" statement. pindent.py no longer produces
4283 improper indentation. pindent.py now works with continued lines broken after
4284 "class" or "def" keywords and with continuations at the start of line.
4285
4286- Issue #11797: Add a 2to3 fixer that maps reload() to imp.reload().
4287
4288- Issue #10966: Remove the concept of unexpected skipped tests.
4289
4290- Issue #9893: Removed the Misc/Vim directory.
4291
4292- Removed the Misc/TextMate directory.
4293
4294- Issue #16245: Add the Tools/scripts/parse_html5_entities.py script to parse
4295 the list of HTML5 entities and update the html.entities.html5 dictionary.
4296
4297- Issue #15378: Fix Tools/unicode/comparecodecs.py. Patch by Serhiy Storchaka.
4298
4299- Issue #16549: Make json.tool work again on Python 3 and add tests.
4300 Initial patch by Berker Peksag and Serhiy Storchaka.
4301
4302- Issue #13301: use ast.literal_eval() instead of eval() in Tools/i18n/msgfmt.py.
4303 Patch by Serhiy Storchaka.
4304
4305Windows
4306-------
4307
4308- Issue #18569: The installer now adds .py to the PATHEXT variable when extensions
4309 are registered. Patch by Paul Moore.
4310
4311
Georg Brandl86dc7322012-10-01 18:58:45 +02004312What's New in Python 3.3.0?
4313===========================
4314
4315*Release date: 29-Sep-2012*
4316
4317Core and Builtins
4318-----------------
4319
4320- Issue #16046: Fix loading sourceless legacy .pyo files.
4321
Victor Stinner554fd082014-03-17 22:33:49 +01004322- Issue #16060: Fix refcounting bug when `__trunc__()` returns an object whose
4323 `__int__()` gives a non-integer. Patch by Serhiy Storchaka.
Georg Brandl86dc7322012-10-01 18:58:45 +02004324
4325Extension Modules
4326-----------------
4327
Victor Stinner554fd082014-03-17 22:33:49 +01004328- Issue #16012: Fix a regression in pyexpat. The parser's `UseForeignDTD()`
Georg Brandl86dc7322012-10-01 18:58:45 +02004329 method doesn't require an argument again.
4330
4331
4332What's New in Python 3.3.0 Release Candidate 3?
4333===============================================
4334
4335*Release date: 23-Sep-2012*
4336
4337Core and Builtins
4338-----------------
4339
Victor Stinner554fd082014-03-17 22:33:49 +01004340- Issue #15900: Fix reference leak in `PyUnicode_TranslateCharmap()`.
Georg Brandl86dc7322012-10-01 18:58:45 +02004341
4342- Issue #15926: Fix crash after multiple reinitializations of the interpreter.
4343
4344- Issue #15895: Fix FILE pointer leak in one error branch of
Victor Stinner554fd082014-03-17 22:33:49 +01004345 `PyRun_SimpleFileExFlags()` when filename points to a pyc/pyo file, closeit is
4346 false an and set_main_loader() fails.
Georg Brandl86dc7322012-10-01 18:58:45 +02004347
4348- Fixes for a few crash and memory leak regressions found by Coverity.
4349
4350Library
4351-------
4352
Victor Stinner554fd082014-03-17 22:33:49 +01004353- Issue #15882: Change `_decimal` to accept any coefficient tuple when
4354 constructing infinities. This is done for backwards compatibility with
4355 decimal.py: Infinity coefficients are undefined in _decimal (in accordance
4356 with the specification).
Georg Brandl86dc7322012-10-01 18:58:45 +02004357
Victor Stinner554fd082014-03-17 22:33:49 +01004358- Issue #15925: Fix a regression in `email.util` where the `parsedate()` and
4359 `parsedate_tz()` functions did not return None anymore when the argument could
Georg Brandl86dc7322012-10-01 18:58:45 +02004360 not be parsed.
4361
4362Extension Modules
4363-----------------
4364
4365- Issue #15973: Fix a segmentation fault when comparing datetime timezone
4366 objects.
4367
4368- Issue #15977: Fix memory leak in Modules/_ssl.c when the function
4369 _set_npn_protocols() is called multiple times, thanks to Daniel Sommermann.
4370
Victor Stinner554fd082014-03-17 22:33:49 +01004371- Issue #15969: `faulthandler` module: rename dump_tracebacks_later() to
Georg Brandl86dc7322012-10-01 18:58:45 +02004372 dump_traceback_later() and cancel_dump_tracebacks_later() to
4373 cancel_dump_traceback_later().
4374
4375- _decimal module: use only C 89 style comments.
4376
4377
4378What's New in Python 3.3.0 Release Candidate 2?
4379===============================================
4380
4381*Release date: 09-Sep-2012*
4382
4383Core and Builtins
4384-----------------
4385
4386- Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
Victor Stinner554fd082014-03-17 22:33:49 +01004387 sporadic crashes in multi-thread programs when several long deallocator chains
4388 ran concurrently and involved subclasses of built-in container types.
Georg Brandl86dc7322012-10-01 18:58:45 +02004389
Victor Stinner554fd082014-03-17 22:33:49 +01004390- Issue #15784: Modify `OSError`.__str__() to better distinguish between errno
4391 error numbers and Windows error numbers.
Georg Brandl86dc7322012-10-01 18:58:45 +02004392
4393- Issue #15781: Fix two small race conditions in import's module locking.
4394
4395Library
4396-------
4397
Victor Stinner554fd082014-03-17 22:33:49 +01004398- Issue #17158: Add 'symbols' to help() welcome message; clarify
4399 'modules spam' messages.
Georg Brandl86dc7322012-10-01 18:58:45 +02004400
Victor Stinner554fd082014-03-17 22:33:49 +01004401- Issue #15847: Fix a regression in argparse, which did not accept tuples as
4402 argument lists anymore.
Georg Brandl86dc7322012-10-01 18:58:45 +02004403
Victor Stinner554fd082014-03-17 22:33:49 +01004404- Issue #15828: Restore support for C extensions in `imp.load_module()`.
Georg Brandl86dc7322012-10-01 18:58:45 +02004405
Victor Stinner554fd082014-03-17 22:33:49 +01004406- Issue #15340: Fix importing the random module when ``/dev/urandom`` cannot be
4407 opened. This was a regression caused by the hash randomization patch.
4408
4409- Issue #10650: Deprecate the watchexp parameter of the `Decimal.quantize()`
Georg Brandl86dc7322012-10-01 18:58:45 +02004410 method.
4411
Victor Stinner554fd082014-03-17 22:33:49 +01004412- Issue #15785: Modify `window.get_wch()` API of the curses module: return a
4413 character for most keys, and an integer for special keys, instead of always
4414 returning an integer. So it is now possible to distinguish special keys like
4415 keypad keys.
Georg Brandl86dc7322012-10-01 18:58:45 +02004416
Victor Stinner554fd082014-03-17 22:33:49 +01004417- Issue #14223: Fix `window.addch()` of the curses module for special characters
Georg Brandl86dc7322012-10-01 18:58:45 +02004418 like curses.ACS_HLINE: the Python function addch(int) and addch(bytes) is now
4419 calling the C function waddch()/mvwaddch() (as it was done in Python 3.2),
4420 instead of wadd_wch()/mvwadd_wch(). The Python function addch(str) is still
4421 calling the C function wadd_wch()/mvwadd_wch() if the Python curses is linked
4422 to libncursesw.
4423
4424Build
4425-----
4426
4427- Issue #15822: Really ensure 2to3 grammar pickles are properly installed
4428 (replaces fixes for Issue #15645).
4429
4430Documentation
4431-------------
4432
Victor Stinner554fd082014-03-17 22:33:49 +01004433- Issue #15814: The memoryview enhancements in 3.3.0 accidentally permitted the
4434 hashing of multi-dimensional memorviews and memoryviews with multi-byte item
4435 formats. The intended restrictions have now been documented - they will be
4436 correctly enforced in 3.3.1.
Georg Brandl86dc7322012-10-01 18:58:45 +02004437
4438
4439What's New in Python 3.3.0 Release Candidate 1?
4440===============================================
4441
4442*Release date: 25-Aug-2012*
4443
4444Core and Builtins
4445-----------------
4446
4447- Issue #15573: memoryview comparisons are now performed by value with full
4448 support for any valid struct module format definition.
4449
Victor Stinner554fd082014-03-17 22:33:49 +01004450- Issue #15316: When an item in the fromlist for `__import__()` doesn't exist,
Georg Brandl86dc7322012-10-01 18:58:45 +02004451 don't raise an error, but if an exception is raised as part of an import do
4452 let that propagate.
4453
Victor Stinner554fd082014-03-17 22:33:49 +01004454- Issue #15778: Ensure that ``str(ImportError(msg))`` returns a str even when
4455 msg isn't a str.
Georg Brandl86dc7322012-10-01 18:58:45 +02004456
Victor Stinner554fd082014-03-17 22:33:49 +01004457- Issue #2051: Source file permission bits are once again correctly copied to
4458 the cached bytecode file. (The migration to importlib reintroduced this
4459 problem because these was no regression test. A test has been added as part of
4460 this patch)
Georg Brandl86dc7322012-10-01 18:58:45 +02004461
Victor Stinner554fd082014-03-17 22:33:49 +01004462- Issue #15761: Fix crash when ``PYTHONEXECUTABLE`` is set on Mac OS X.
Georg Brandl86dc7322012-10-01 18:58:45 +02004463
Victor Stinner554fd082014-03-17 22:33:49 +01004464- Issue #15726: Fix incorrect bounds checking in PyState_FindModule. Patch by
4465 Robin Schreiber.
Georg Brandl86dc7322012-10-01 18:58:45 +02004466
Victor Stinner554fd082014-03-17 22:33:49 +01004467- Issue #15604: Update uses of `PyObject_IsTrue()` to check for and handle
Georg Brandl86dc7322012-10-01 18:58:45 +02004468 errors correctly. Patch by Serhiy Storchaka.
4469
Victor Stinner554fd082014-03-17 22:33:49 +01004470- Issue #14846: `importlib.FileFinder` now handles the case where the directory
4471 being searched is removed after a previous import attempt.
Georg Brandl86dc7322012-10-01 18:58:45 +02004472
4473Library
4474-------
4475
Victor Stinner554fd082014-03-17 22:33:49 +01004476- Issue #13370: Ensure that ctypes works on Mac OS X when Python is compiled
4477 using the clang compiler.
Georg Brandl86dc7322012-10-01 18:58:45 +02004478
Victor Stinner554fd082014-03-17 22:33:49 +01004479- Issue #13072: The array module's 'u' format code is now deprecated and will be
4480 removed in Python 4.0.
Georg Brandl86dc7322012-10-01 18:58:45 +02004481
4482- Issue #15544: Fix Decimal.__float__ to work with payload-carrying NaNs.
4483
Victor Stinner554fd082014-03-17 22:33:49 +01004484- Issue #15776: Allow pyvenv to work in existing directory with --clean.
4485
4486- Issue #15249: email's BytesGenerator now correctly mangles From lines (when
Georg Brandl86dc7322012-10-01 18:58:45 +02004487 requested) even if the body contains undecodable bytes.
4488
4489- Issue #15777: Fix a refleak in _posixsubprocess.
4490
Martin Panter4e525582016-05-22 03:01:52 +00004491- Issue #665194: Update `email.utils.localtime` to use datetime.astimezone and
Georg Brandl86dc7322012-10-01 18:58:45 +02004492 correctly handle historic changes in UTC offsets.
4493
4494- Issue #15199: Fix JavaScript's default MIME type to application/javascript.
4495 Patch by Bohuslav Kabrda.
4496
Victor Stinner554fd082014-03-17 22:33:49 +01004497- Issue #12643: `code.InteractiveConsole` now respects `sys.excepthook` when
4498 displaying exceptions. Patch by Aaron Iles.
Georg Brandl86dc7322012-10-01 18:58:45 +02004499
Victor Stinner554fd082014-03-17 22:33:49 +01004500- Issue #13579: `string.Formatter` now understands the 'a' conversion specifier.
Georg Brandl86dc7322012-10-01 18:58:45 +02004501
Victor Stinner554fd082014-03-17 22:33:49 +01004502- Issue #15595: Fix ``subprocess.Popen(universal_newlines=True)`` for certain
4503 locales (utf-16 and utf-32 family). Patch by Chris Jerdonek.
Georg Brandl86dc7322012-10-01 18:58:45 +02004504
4505- Issue #15477: In cmath and math modules, add workaround for platforms whose
4506 system-supplied log1p function doesn't respect signs of zeros.
4507
Victor Stinner554fd082014-03-17 22:33:49 +01004508- Issue #15715: `importlib.__import__()` will silence an ImportError when the
4509 use of fromlist leads to a failed import.
Georg Brandl86dc7322012-10-01 18:58:45 +02004510
Victor Stinner554fd082014-03-17 22:33:49 +01004511- Issue #14669: Fix pickling of connections and sockets on Mac OS X by
4512 sending/receiving an acknowledgment after file descriptor transfer.
4513 TestPicklingConnection has been reenabled for Mac OS X.
Georg Brandl86dc7322012-10-01 18:58:45 +02004514
4515- Issue #11062: Fix adding a message from file to Babyl mailbox.
4516
Victor Stinner554fd082014-03-17 22:33:49 +01004517- Issue #15646: Prevent equivalent of a fork bomb when using `multiprocessing`
4518 on Windows without the ``if __name__ == '__main__'`` idiom.
Georg Brandl86dc7322012-10-01 18:58:45 +02004519
Victor Stinner554fd082014-03-17 22:33:49 +01004520IDLE
4521----
Georg Brandl86dc7322012-10-01 18:58:45 +02004522
Victor Stinner554fd082014-03-17 22:33:49 +01004523- Issue #15678: Fix IDLE menus when started from OS X command line (3.3.0b2
4524 regression).
Georg Brandl86dc7322012-10-01 18:58:45 +02004525
4526Documentation
4527-------------
4528
Victor Stinner554fd082014-03-17 22:33:49 +01004529- Touched up the Python 2 to 3 porting guide.
4530
4531- Issue #14674: Add a discussion of the `json` module's standard compliance.
Georg Brandl86dc7322012-10-01 18:58:45 +02004532 Patch by Chris Rebert.
4533
4534- Create a 'Concurrent Execution' section in the docs, and split up the
4535 'Optional Operating System Services' section to use a more user-centric
Victor Stinner554fd082014-03-17 22:33:49 +01004536 classification scheme (splitting them across the new CE section, IPC and text
4537 processing). Operating system limitations can be reflected with the Sphinx
4538 ``:platform:`` tag, it doesn't make sense as part of the Table of Contents.
Georg Brandl86dc7322012-10-01 18:58:45 +02004539
Victor Stinner554fd082014-03-17 22:33:49 +01004540- Issue #4966: Bring the sequence docs up to date for the Py3k transition and
4541 the many language enhancements since they were original written.
Georg Brandl86dc7322012-10-01 18:58:45 +02004542
4543- The "path importer" misnomer has been replaced with Eric Snow's
Victor Stinner554fd082014-03-17 22:33:49 +01004544 more-awkward-but-at-least-not-wrong suggestion of "path based finder" in the
4545 import system reference docs.
Georg Brandl86dc7322012-10-01 18:58:45 +02004546
Victor Stinner554fd082014-03-17 22:33:49 +01004547- Issue #15640: Document `importlib.abc.Finder` as deprecated.
Georg Brandl86dc7322012-10-01 18:58:45 +02004548
Victor Stinner554fd082014-03-17 22:33:49 +01004549- Issue #15630: Add an example for "continue" stmt in the tutorial. Patch by
Georg Brandl86dc7322012-10-01 18:58:45 +02004550 Daniel Ellis.
4551
4552Tests
4553-----
4554
4555- Issue #15747: ZFS always returns EOPNOTSUPP when attempting to set the
Victor Stinner554fd082014-03-17 22:33:49 +01004556 UF_IMMUTABLE flag (via either chflags or lchflags); refactor affected tests in
4557 test_posix.py to account for this.
Georg Brandl86dc7322012-10-01 18:58:45 +02004558
Victor Stinner554fd082014-03-17 22:33:49 +01004559- Issue #15285: Refactor the approach for testing connect timeouts using two
4560 external hosts that have been configured specifically for this type of test.
Georg Brandl86dc7322012-10-01 18:58:45 +02004561
Victor Stinner554fd082014-03-17 22:33:49 +01004562- Issue #15743: Remove the deprecated method usage in `urllib` tests. Patch by
Georg Brandl86dc7322012-10-01 18:58:45 +02004563 Jeff Knupp.
4564
Victor Stinner554fd082014-03-17 22:33:49 +01004565- Issue #15615: Add some tests for the `json` module's handling of invalid input
4566 data. Patch by Kushal Das.
Georg Brandl86dc7322012-10-01 18:58:45 +02004567
4568Build
4569-----
4570
4571- Output lib files for PGO build into PGO directory.
4572
4573- Pick up 32-bit launcher from PGO directory on 64-bit PGO build.
4574
Victor Stinner554fd082014-03-17 22:33:49 +01004575- Drop ``PC\python_nt.h`` as it's not used. Add input dependency on custom
Georg Brandl86dc7322012-10-01 18:58:45 +02004576 build step.
4577
Victor Stinner554fd082014-03-17 22:33:49 +01004578- Issue #15511: Drop explicit dependency on pythonxy.lib from _decimal amd64
4579 configuration.
Georg Brandl86dc7322012-10-01 18:58:45 +02004580
4581- Add missing PGI/PGO configurations for pywlauncher.
4582
4583- Issue #15645: Ensure 2to3 grammar pickles are properly installed.
4584
4585
4586What's New in Python 3.3.0 Beta 2?
4587==================================
4588
4589*Release date: 12-Aug-2012*
4590
4591Core and Builtins
4592-----------------
4593
Victor Stinner554fd082014-03-17 22:33:49 +01004594- Issue #15568: Fix the return value of ``yield from`` when StopIteration is
Georg Brandl86dc7322012-10-01 18:58:45 +02004595 raised by a custom iterator.
4596
Victor Stinner554fd082014-03-17 22:33:49 +01004597- Issue #13119: `sys.stdout` and `sys.stderr` are now using "\r\n" newline on
Georg Brandl86dc7322012-10-01 18:58:45 +02004598 Windows, as Python 2.
4599
4600- Issue #15534: Fix the fast-search function for non-ASCII Unicode strings.
4601
Victor Stinner554fd082014-03-17 22:33:49 +01004602- Issue #15508: Fix the docstring for `__import__()` to have the proper default
Georg Brandl86dc7322012-10-01 18:58:45 +02004603 value of 0 for 'level' and to not mention negative levels since they are not
4604 supported.
4605
4606- Issue #15425: Eliminated traceback noise from more situations involving
4607 importlib.
4608
4609- Issue #14578: Support modules registered in the Windows registry again.
4610
4611- Issue #15466: Stop using TYPE_INT64 in marshal, to make importlib.h (and other
4612 byte code files) equal between 32-bit and 64-bit systems.
4613
4614- Issue #1692335: Move initial exception args assignment to
Victor Stinner554fd082014-03-17 22:33:49 +01004615 `BaseException.__new__()` to help pickling of naive subclasses.
Georg Brandl86dc7322012-10-01 18:58:45 +02004616
Victor Stinner554fd082014-03-17 22:33:49 +01004617- Issue #12834: Fix `PyBuffer_ToContiguous()` for non-contiguous arrays.
Georg Brandl86dc7322012-10-01 18:58:45 +02004618
Victor Stinner554fd082014-03-17 22:33:49 +01004619- Issue #15456: Fix code `__sizeof__()` after #12399 change. Patch by Serhiy
Georg Brandl86dc7322012-10-01 18:58:45 +02004620 Storchaka.
4621
4622- Issue #15404: Refleak in PyMethodObject repr.
4623
Victor Stinner554fd082014-03-17 22:33:49 +01004624- Issue #15394: An issue in `PyModule_Create()` that caused references to be
4625 leaked on some error paths has been fixed. Patch by Julia Lawall.
Georg Brandl86dc7322012-10-01 18:58:45 +02004626
4627- Issue #15368: An issue that caused bytecode generation to be non-deterministic
4628 has been fixed.
4629
4630- Issue #15202: Consistently use the name "follow_symlinks" for new parameters
4631 in os and shutil functions.
4632
Victor Stinner554fd082014-03-17 22:33:49 +01004633- Issue #15314: ``__main__.__loader__`` is now set correctly during interpreter
Georg Brandl86dc7322012-10-01 18:58:45 +02004634 startup.
4635
4636- Issue #15111: When a module imported using 'from import' has an ImportError
4637 inside itself, don't mask that fact behind a generic ImportError for the
4638 module itself.
4639
4640- Issue #15293: Add GC support to the AST base node type.
4641
4642- Issue #15291: Fix a memory leak where AST nodes where not properly
4643 deallocated.
4644
4645- Issue #15110: Fix the tracebacks generated by "import xxx" to not show the
4646 importlib stack frames.
4647
Victor Stinner554fd082014-03-17 22:33:49 +01004648- Issue #16369: Global PyTypeObjects not initialized with PyType_Ready(...).
4649
Georg Brandl86dc7322012-10-01 18:58:45 +02004650- Issue #15020: The program name used to search for Python's path is now
4651 "python3" under Unix, not "python".
4652
Victor Stinner554fd082014-03-17 22:33:49 +01004653- Issue #15897: zipimport.c doesn't check return value of fseek().
4654 Patch by Felipe Cruz.
4655
4656- Issue #15033: Fix the exit status bug when modules invoked using -m switch,
Georg Brandl86dc7322012-10-01 18:58:45 +02004657 return the proper failure return value (1). Patch contributed by Jeff Knupp.
4658
Victor Stinner554fd082014-03-17 22:33:49 +01004659- Issue #15229: An `OSError` subclass whose __init__ doesn't call back
Georg Brandl86dc7322012-10-01 18:58:45 +02004660 OSError.__init__ could produce incomplete instances, leading to crashes when
4661 calling str() on them.
4662
Victor Stinner554fd082014-03-17 22:33:49 +01004663- Issue #15307: Virtual environments now use symlinks with framework builds on
Georg Brandl86dc7322012-10-01 18:58:45 +02004664 Mac OS X, like other POSIX builds.
4665
4666Library
4667-------
4668
Victor Stinner554fd082014-03-17 22:33:49 +01004669- Issue #14590: configparser now correctly strips inline comments when delimiter
4670 occurs earlier without preceding space.
4671
4672- Issue #15424: Add a `__sizeof__()` implementation for array objects. Patch by
Georg Brandl86dc7322012-10-01 18:58:45 +02004673 Ludwig Hähne.
4674
4675- Issue #15576: Allow extension modules to act as a package's __init__ module.
4676
Victor Stinner554fd082014-03-17 22:33:49 +01004677- Issue #15502: Have `importlib.invalidate_caches()` work on `sys.meta_path`
4678 instead of `sys.path_importer_cache`.
Georg Brandl86dc7322012-10-01 18:58:45 +02004679
4680- Issue #15163: Pydoc shouldn't list __loader__ as module data.
4681
4682- Issue #15471: Do not use mutable objects as defaults for
Victor Stinner554fd082014-03-17 22:33:49 +01004683 `importlib.__import__()`.
Georg Brandl86dc7322012-10-01 18:58:45 +02004684
4685- Issue #15559: To avoid a problematic failure mode when passed to the bytes
Victor Stinner554fd082014-03-17 22:33:49 +01004686 constructor, objects in the ipaddress module no longer implement `__index__()`
4687 (they still implement `__int__()` as appropriate).
Georg Brandl86dc7322012-10-01 18:58:45 +02004688
4689- Issue #15546: Fix handling of pathological input data in the peek() and
4690 read1() methods of the BZ2File, GzipFile and LZMAFile classes.
4691
Victor Stinner554fd082014-03-17 22:33:49 +01004692- Issue #12655: Instead of requiring a custom type, `os.sched_getaffinity()` and
4693 `os.sched_setaffinity()` now use regular sets of integers to represent the
4694 CPUs a process is restricted to.
Georg Brandl86dc7322012-10-01 18:58:45 +02004695
Victor Stinner554fd082014-03-17 22:33:49 +01004696- Issue #15538: Fix compilation of the `socket.getnameinfo()` /
4697 `socket.getaddrinfo()` emulation code. Patch by Philipp Hagemeister.
Georg Brandl86dc7322012-10-01 18:58:45 +02004698
4699- Issue #15519: Properly expose WindowsRegistryFinder in importlib (and use the
Victor Stinner554fd082014-03-17 22:33:49 +01004700 correct term for it). Original patch by Eric Snow.
Georg Brandl86dc7322012-10-01 18:58:45 +02004701
4702- Issue #15502: Bring the importlib ABCs into line with the current state of the
Victor Stinner554fd082014-03-17 22:33:49 +01004703 import protocols given PEP 420. Original patch by Eric Snow.
Georg Brandl86dc7322012-10-01 18:58:45 +02004704
4705- Issue #15499: Launching a webbrowser in Unix used to sleep for a few seconds.
4706 Original patch by Anton Barkovsky.
4707
4708- Issue #15463: The faulthandler module truncates strings to 500 characters,
4709 instead of 100, to be able to display long file paths.
4710
Victor Stinner554fd082014-03-17 22:33:49 +01004711- Issue #6056: Make `multiprocessing` use setblocking(True) on the sockets it
Georg Brandl86dc7322012-10-01 18:58:45 +02004712 uses. Original patch by J Derek Wilson.
4713
4714- Issue #15364: Fix sysconfig.get_config_var('srcdir') to be an absolute path.
4715
Victor Stinner554fd082014-03-17 22:33:49 +01004716- Issue #15413: `os.times()` had disappeared under Windows.
Georg Brandl86dc7322012-10-01 18:58:45 +02004717
Victor Stinner554fd082014-03-17 22:33:49 +01004718- Issue #15402: An issue in the struct module that caused `sys.getsizeof()` to
Georg Brandl86dc7322012-10-01 18:58:45 +02004719 return incorrect results for struct.Struct instances has been fixed. Initial
4720 patch by Serhiy Storchaka.
4721
Victor Stinner554fd082014-03-17 22:33:49 +01004722- Issue #15232: When mangle_from is True, `email.Generator` now correctly
4723 mangles lines that start with 'From ' that occur in a MIME preamble or
4724 epilogue.
Georg Brandl86dc7322012-10-01 18:58:45 +02004725
4726- Issue #15094: Incorrectly placed #endif in _tkinter.c. Patch by Serhiy
4727 Storchaka.
4728
Victor Stinner554fd082014-03-17 22:33:49 +01004729- Issue #13922: `argparse` no longer incorrectly strips '--'s that appear after
Georg Brandl86dc7322012-10-01 18:58:45 +02004730 the first one.
4731
Victor Stinner554fd082014-03-17 22:33:49 +01004732- Issue #12353: `argparse` now correctly handles null argument values.
Georg Brandl86dc7322012-10-01 18:58:45 +02004733
4734- Issue #10017, issue #14998: Fix TypeError using pprint on dictionaries with
4735 user-defined types as keys or other unorderable keys.
4736
Victor Stinner554fd082014-03-17 22:33:49 +01004737- Issue #15397: `inspect.getmodulename()` is now based directly on importlib via
4738 a new `importlib.machinery.all_suffixes()` API.
Georg Brandl86dc7322012-10-01 18:58:45 +02004739
Victor Stinner554fd082014-03-17 22:33:49 +01004740- Issue #14635: `telnetlib` will use poll() rather than select() when possible to
Georg Brandl86dc7322012-10-01 18:58:45 +02004741 avoid failing due to the select() file descriptor limit.
4742
4743- Issue #15180: Clarify posixpath.join() error message when mixing str & bytes.
4744
4745- Issue #15343: pkgutil now includes an iter_importer_modules implementation for
4746 importlib.machinery.FileFinder (similar to the way it already handled
4747 zipimport.zipimporter).
4748
4749- Issue #15314: runpy now sets __main__.__loader__ correctly.
4750
4751- Issue #15357: The import emulation in pkgutil is now deprecated. pkgutil uses
4752 importlib internally rather than the emulation.
4753
4754- Issue #15233: Python now guarantees that callables registered with the atexit
4755 module will be called in a deterministic order.
4756
Victor Stinner554fd082014-03-17 22:33:49 +01004757- Issue #15238: `shutil.copystat()` now copies Linux "extended attributes".
Georg Brandl86dc7322012-10-01 18:58:45 +02004758
4759- Issue #15230: runpy.run_path now correctly sets __package__ as described in
4760 the documentation.
4761
4762- Issue #15315: Support VS 2010 in distutils cygwincompiler.
4763
4764- Issue #15294: Fix a regression in pkgutil.extend_path()'s handling of nested
4765 namespace packages.
4766
Victor Stinner554fd082014-03-17 22:33:49 +01004767- Issue #15056: `imp.cache_from_source()` and `imp.source_from_cache()` raise
4768 NotImplementedError when `sys.implementation.cache_tag` is set to None.
Georg Brandl86dc7322012-10-01 18:58:45 +02004769
Victor Stinner554fd082014-03-17 22:33:49 +01004770- Issue #15256: Grammatical mistake in exception raised by `imp.find_module()`.
Georg Brandl86dc7322012-10-01 18:58:45 +02004771
Victor Stinner554fd082014-03-17 22:33:49 +01004772- Issue #5931: `wsgiref` environ variable SERVER_SOFTWARE will specify an
Georg Brandl86dc7322012-10-01 18:58:45 +02004773 implementation specific term like CPython, Jython instead of generic "Python".
4774
4775- Issue #13248: Remove obsolete argument "max_buffer_size" of BufferedWriter and
4776 BufferedRWPair, from the io module.
4777
Victor Stinner554fd082014-03-17 22:33:49 +01004778- Issue #13248: Remove obsolete argument "version" of `argparse.ArgumentParser`.
Georg Brandl86dc7322012-10-01 18:58:45 +02004779
4780- Issue #14814: Implement more consistent ordering and sorting behaviour for
4781 ipaddress objects.
4782
Victor Stinner554fd082014-03-17 22:33:49 +01004783- Issue #14814: `ipaddress` network objects correctly return NotImplemented when
Georg Brandl86dc7322012-10-01 18:58:45 +02004784 compared to arbitrary objects instead of raising TypeError.
4785
4786- Issue #14990: Correctly fail with SyntaxError on invalid encoding declaration.
4787
Victor Stinner554fd082014-03-17 22:33:49 +01004788- Issue #14814: `ipaddress` now provides more informative error messages when
Georg Brandl86dc7322012-10-01 18:58:45 +02004789 constructing instances directly (changes permitted during beta due to
4790 provisional API status).
4791
Victor Stinner554fd082014-03-17 22:33:49 +01004792- Issue #15247: `io.FileIO` now raises an error when given a file descriptor
4793 pointing to a directory.
Georg Brandl86dc7322012-10-01 18:58:45 +02004794
4795- Issue #15261: Stop os.stat(fd) crashing on Windows when fd not open.
4796
Victor Stinner554fd082014-03-17 22:33:49 +01004797- Issue #15166: Implement `imp.get_tag()` using `sys.implementation.cache_tag`.
Georg Brandl86dc7322012-10-01 18:58:45 +02004798
Victor Stinner554fd082014-03-17 22:33:49 +01004799- Issue #15210: Catch KeyError when `importlib.__init__()` can't find
Georg Brandl86dc7322012-10-01 18:58:45 +02004800 _frozen_importlib in sys.modules, not ImportError.
4801
Victor Stinner554fd082014-03-17 22:33:49 +01004802- Issue #15030: `importlib.abc.PyPycLoader` now supports the new source size
Georg Brandl86dc7322012-10-01 18:58:45 +02004803 header field in .pyc files.
4804
4805- Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on
4806 flush().
4807
4808- Issue #10571: Fix the "--sign" option of distutils' upload command. Patch by
4809 Jakub Wilk.
4810
4811- Issue #9559: If messages were only added, a new file is no longer created and
4812 renamed over the old file when flush() is called on an mbox, MMDF or Babyl
4813 mailbox.
4814
Victor Stinner554fd082014-03-17 22:33:49 +01004815- Issue #10924: Fixed `crypt.mksalt()` to use a RNG that is suitable for
Georg Brandl86dc7322012-10-01 18:58:45 +02004816 cryptographic purpose.
4817
4818- Issue #15184: Ensure consistent results of OS X configuration tailoring for
4819 universal builds by factoring out common OS X-specific customizations from
4820 sysconfig, distutils.sysconfig, distutils.util, and distutils.unixccompiler
4821 into a new module _osx_support.
4822
4823C API
4824-----
4825
Victor Stinner554fd082014-03-17 22:33:49 +01004826- Issue #15610: `PyImport_ImportModuleEx()` now uses a 'level' of 0 instead of -1.
Georg Brandl86dc7322012-10-01 18:58:45 +02004827
Victor Stinner554fd082014-03-17 22:33:49 +01004828- Issue #15169, issue #14599: Strip out the C implementation of
4829 `imp.source_from_cache()` used by PyImport_ExecCodeModuleWithPathnames() and
Georg Brandl86dc7322012-10-01 18:58:45 +02004830 used the Python code instead. Leads to PyImport_ExecCodeModuleObject() to not
4831 try to infer the source path from the bytecode path as
4832 PyImport_ExecCodeModuleWithPathnames() does.
4833
4834Extension Modules
4835-----------------
4836
Victor Stinner554fd082014-03-17 22:33:49 +01004837- Issue #6493: An issue in ctypes on Windows that caused structure bitfields of
4838 type `ctypes.c_uint32` and width 32 to incorrectly be set has been fixed.
Georg Brandl86dc7322012-10-01 18:58:45 +02004839
4840- Issue #15194: Update libffi to the 3.0.11 release.
4841
Victor Stinner554fd082014-03-17 22:33:49 +01004842IDLE
4843----
4844
4845- Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog
4846 ended with ``\``. Patch by Roger Serwy.
4847
Georg Brandl86dc7322012-10-01 18:58:45 +02004848Tools/Demos
4849-----------
4850
4851- Issue #15458: python-config gets a new option --configdir to print the $LIBPL
4852 value.
4853
4854- Move importlib.test.benchmark to Tools/importbench.
4855
4856- Issue #12605: The gdb hooks for debugging CPython (within Tools/gdb) have been
4857 enhanced to show information on more C frames relevant to CPython within the
4858 "py-bt" and "py-bt-full" commands:
4859
4860 * C frames that are waiting on the GIL
4861 * C frames that are garbage-collecting
4862 * C frames that are due to the invocation of a PyCFunction
4863
4864Documentation
4865-------------
4866
Victor Stinner554fd082014-03-17 22:33:49 +01004867- Issue #15041: Update "see also" list in tkinter documentation.
4868
4869- Issue #15444: Use proper spelling for non-ASCII contributor names. Patch by
4870 Serhiy Storchaka.
Georg Brandl86dc7322012-10-01 18:58:45 +02004871
4872- Issue #15295: Reorganize and rewrite the documentation on the import system.
4873
4874- Issue #15230: Clearly document some of the limitations of the runpy module and
4875 nudge readers towards importlib when appropriate.
4876
4877- Issue #15053: Copy Python 3.3 import lock change notice to all relevant
4878 functions in imp instead of just at the top of the relevant section.
4879
4880- Issue #15288: Link to the term "loader" in notes in pkgutil about how things
4881 won't work as expected in Python 3.3 and mark the requisite functions as
4882 "changed" since they will no longer work with modules directly imported by
4883 import itself.
4884
Victor Stinner554fd082014-03-17 22:33:49 +01004885- Issue #13557: Clarify effect of giving two different namespaces to `exec()` or
4886 `execfile()`.
Georg Brandl86dc7322012-10-01 18:58:45 +02004887
Victor Stinner554fd082014-03-17 22:33:49 +01004888- Issue #15250: Document that `filecmp.dircmp()` compares files shallowly. Patch
Georg Brandl86dc7322012-10-01 18:58:45 +02004889 contributed by Chris Jerdonek.
4890
Victor Stinner554fd082014-03-17 22:33:49 +01004891- Issue #15442: Expose the default list of directories ignored by
4892 `filecmp.dircmp()` as a module attribute, and expand the list to more modern
4893 values.
4894
Georg Brandl86dc7322012-10-01 18:58:45 +02004895Tests
4896-----
4897
Victor Stinner554fd082014-03-17 22:33:49 +01004898- Issue #15467: Move helpers for `__sizeof__()` tests into test_support. Patch
4899 by Serhiy Storchaka.
Georg Brandl86dc7322012-10-01 18:58:45 +02004900
4901- Issue #15320: Make iterating the list of tests thread-safe when running tests
4902 in multiprocess mode. Patch by Chris Jerdonek.
4903
Victor Stinner554fd082014-03-17 22:33:49 +01004904- Issue #15168: Move `importlib.test` to `test.test_importlib`.
Georg Brandl86dc7322012-10-01 18:58:45 +02004905
4906- Issue #15091: Reactivate a test on UNIX which was failing thanks to a
Victor Stinner554fd082014-03-17 22:33:49 +01004907 forgotten `importlib.invalidate_caches()` call.
Georg Brandl86dc7322012-10-01 18:58:45 +02004908
4909- Issue #15230: Adopted a more systematic approach in the runpy tests.
4910
4911- Issue #15300: Ensure the temporary test working directories are in the same
4912 parent folder when running tests in multiprocess mode from a Python build.
4913 Patch by Chris Jerdonek.
4914
4915- Issue #15284: Skip {send,recv}msg tests in test_socket when IPv6 is not
4916 enabled. Patch by Brian Brazil.
4917
4918- Issue #15277: Fix a resource leak in support.py when IPv6 is disabled. Patch
4919 by Brian Brazil.
4920
4921Build
4922-----
4923
4924- Issue #11715: Fix multiarch detection without having Debian development tools
4925 (dpkg-dev) installed.
4926
4927- Issue #15037: Build OS X installers with local copy of ncurses 5.9 libraries
4928 to avoid curses.unget_wch bug present in older versions of ncurses such as
4929 those shipped with OS X.
4930
4931- Issue #15560: Fix building _sqlite3 extension on OS X with an SDK. Also, for
4932 OS X installers, ensure consistent sqlite3 behavior and feature availability
4933 by building a local copy of libsqlite3 rather than depending on the wide range
4934 of versions supplied with various OS X releases.
4935
4936- Issue #8847: Disable COMDAT folding in Windows PGO builds.
4937
4938- Issue #14018: Fix OS X Tcl/Tk framework checking when using OS X SDKs.
4939
Victor Stinner554fd082014-03-17 22:33:49 +01004940- Issue #16256: OS X installer now sets correct permissions for doc directory.
4941
Georg Brandl86dc7322012-10-01 18:58:45 +02004942- Issue #15431: Add _freeze_importlib project to regenerate importlib.h on
4943 Windows. Patch by Kristján Valur Jónsson.
4944
4945- Issue #14197: For OS X framework builds, ensure links to the shared library
4946 are created with the proper ABI suffix.
4947
4948- Issue #14330: For cross builds, don't use host python, use host search paths
4949 for host compiler.
4950
4951- Issue #15235: Allow Berkley DB versions up to 5.3 to build the dbm module.
4952
4953- Issue #15268: Search curses.h in /usr/include/ncursesw.
4954
4955
4956What's New in Python 3.3.0 Beta 1?
4957==================================
4958
4959*Release date: 27-Jun-2012*
4960
4961Core and Builtins
4962-----------------
4963
4964- Fix a (most likely) very rare memory leak when calling main() and not being
4965 able to decode a command-line argument.
4966
4967- Issue #14815: Use Py_ssize_t instead of long for the object hash, to
4968 preserve all 64 bits of hash on Win64.
4969
4970- Issue #12268: File readline, readlines and read() or readall() methods
4971 no longer lose data when an underlying read system call is interrupted.
4972 IOError is no longer raised due to a read system call returning EINTR
4973 from within these methods.
4974
4975- Issue #11626: Add _SizeT functions to stable ABI.
4976
Georg Brandl86dc7322012-10-01 18:58:45 +02004977- Issue #15142: Fix reference leak when deallocating instances of types
4978 created using PyType_FromSpec().
4979
Georg Brandl86dc7322012-10-01 18:58:45 +02004980- Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on
4981 the work by Hirokazu Yamamoto.
4982
4983- Issue #15096: Removed support for ur'' as the raw notation isn't
4984 compatible with Python 2.x's raw unicode strings.
4985
4986- Issue #13783: Generator objects now use the identifier APIs internally
4987
4988- Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels.
4989 Patch by Serhiy Storchaka.
4990
4991- Issue #15026: utf-16 encoding is now significantly faster (up to 10x).
4992 Patch by Serhiy Storchaka.
4993
4994- Issue #11022: open() and io.TextIOWrapper are now calling
4995 locale.getpreferredencoding(False) instead of locale.getpreferredencoding()
4996 in text mode if the encoding is not specified. Don't change temporary the
4997 locale encoding using locale.setlocale(), use the current locale encoding
4998 instead of the user preferred encoding.
4999
5000- Issue #14673: Add Eric Snow's sys.implementation implementation.
5001
5002- Issue #15038: Optimize python Locks on Windows.
5003
5004Library
5005-------
5006
Georg Brandl86dc7322012-10-01 18:58:45 +02005007- Issue #12288: Consider '0' and '0.0' as valid initialvalue
5008 for tkinter SimpleDialog.
5009
5010- Issue #15512: Add a __sizeof__ implementation for parser.
5011 Patch by Serhiy Storchaka.
5012
5013- Issue #15469: Add a __sizeof__ implementation for deque objects.
5014 Patch by Serhiy Storchaka.
5015
5016- Issue #15489: Add a __sizeof__ implementation for BytesIO objects.
5017 Patch by Serhiy Storchaka.
5018
5019- Issue #15487: Add a __sizeof__ implementation for buffered I/O objects.
5020 Patch by Serhiy Storchaka.
5021
5022- Issue #15514: Correct __sizeof__ support for cpu_set.
5023 Patch by Serhiy Storchaka.
5024
Georg Brandl86dc7322012-10-01 18:58:45 +02005025- Issue #15177: Added dir_fd parameter to os.fwalk().
5026
Georg Brandl86dc7322012-10-01 18:58:45 +02005027- Issue #15061: Re-implemented hmac.compare_digest() in C to prevent further
5028 timing analysis and to support all buffer protocol aware objects as well as
5029 ASCII only str instances safely.
5030
5031- Issue #15164: Change return value of platform.uname() from a
5032 plain tuple to a collections.namedtuple.
5033
5034- Support Mageia Linux in the platform module.
5035
5036- Issue #11678: Support Arch linux in the platform module.
5037
5038- Issue #15118: Change return value of os.uname() and os.times() from
5039 plain tuples to immutable iterable objects with named attributes
5040 (structseq objects).
5041
5042- Speed up _decimal by another 10-15% by caching the thread local context
5043 that was last accessed. In the pi benchmark (64-bit platform, prec=9),
5044 _decimal is now only 1.5x slower than float.
5045
5046- Remove the packaging module, which is not ready for prime time.
5047
5048- Issue #15154: Add "dir_fd" parameter to os.rmdir, remove "rmdir"
5049 parameter from os.remove / os.unlink.
5050
5051- Issue #4489: Add a shutil.rmtree that isn't susceptible to symlink attacks.
5052 It is used automatically on platforms supporting the necessary os.openat()
5053 and os.unlinkat() functions. Main code by Martin von Löwis.
5054
5055- Issue #15156: HTMLParser now uses the new "html.entities.html5" dictionary.
5056
5057- Issue #11113: add a new "html5" dictionary containing the named character
5058 references defined by the HTML5 standard and the equivalent Unicode
5059 character(s) to the html.entities module.
5060
5061- Issue #15114: the strict mode of HTMLParser and the HTMLParseError exception
5062 are deprecated now that the parser is able to parse invalid markup.
5063
5064- Issue #3665: \u and \U escapes are now supported in unicode regular
5065 expressions. Patch by Serhiy Storchaka.
5066
5067- Issue #15153: Added inspect.getgeneratorlocals to simplify white box
5068 testing of generator state updates
5069
5070- Issue #13062: Added inspect.getclosurevars to simplify testing stateful
5071 closures
5072
5073- Issue #11024: Fixes and additional tests for Time2Internaldate.
5074
5075- Issue #14626: Large refactoring of functions / parameters in the os module.
5076 Many functions now support "dir_fd" and "follow_symlinks" parameters;
Terry Jan Reedy8e7586b2013-03-11 18:38:13 -04005077 some also support accepting an open file descriptor in place of a path
Georg Brandl86dc7322012-10-01 18:58:45 +02005078 string. Added os.support_* collections as LBYL helpers. Removed many
5079 functions only previously seen in 3.3 alpha releases (often starting with
5080 "f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka;
5081 implemented by Larry Hastings.
5082
5083- Issue #15008: Implement PEP 362 "Signature Objects".
5084 Patch by Yury Selivanov.
5085
Martin Panter4e525582016-05-22 03:01:52 +00005086- Issue #15138: base64.urlsafe_{en,de}code() are now 3-4x faster.
Georg Brandl86dc7322012-10-01 18:58:45 +02005087
5088- Issue #444582: Add shutil.which, for finding programs on the system path.
5089 Original patch by Erik Demaine, with later iterations by Jan Killian
5090 and Brian Curtin.
5091
5092- Issue #14837: SSL errors now have ``library`` and ``reason`` attributes
5093 describing precisely what happened and in which OpenSSL submodule. The
5094 str() of a SSLError is also enhanced accordingly.
5095
5096- Issue #9527: datetime.astimezone() method will now supply a class
5097 timezone instance corresponding to the system local timezone when
5098 called with no arguments.
5099
5100- Issue #14653: email.utils.mktime_tz() no longer relies on system
5101 mktime() when timezone offest is supplied.
5102
5103- Issue #14684: zlib.compressobj() and zlib.decompressobj() now support the use
5104 of predefined compression dictionaries. Original patch by Sam Rushing.
5105
5106- Fix GzipFile's handling of filenames given as bytes objects.
5107
5108- Issue #14772: Return destination values from some shutil functions.
5109
Serhiy Storchaka14867992014-09-10 23:43:41 +03005110- Issue #15064: Implement context management protocol for multiprocessing types
Georg Brandl86dc7322012-10-01 18:58:45 +02005111
5112- Issue #15101: Make pool finalizer avoid joining current thread.
5113
5114- Issue #14657: The frozen instance of importlib used for bootstrap is now
5115 also the module imported as importlib._bootstrap.
5116
5117- Issue #14055: Add __sizeof__ support to _elementtree.
5118
5119- Issue #15054: A bug in tokenize.tokenize that caused string literals
5120 with 'b' prefixes to be incorrectly tokenized has been fixed.
5121 Patch by Serhiy Storchaka.
5122
5123- Issue #15006: Allow equality comparison between naive and aware
5124 time or datetime objects.
5125
Georg Brandl86dc7322012-10-01 18:58:45 +02005126- Issue #15036: Mailbox no longer throws an error if a flush is done
5127 between operations when removing or changing multiple items in mbox,
5128 MMDF, or Babyl mailboxes.
5129
5130- Issue #14059: Implement multiprocessing.Barrier.
5131
5132- Issue #15061: The inappropriately named hmac.secure_compare has been
5133 renamed to hmac.compare_digest, restricted to operating on bytes inputs
5134 only and had its documentation updated to more accurately reflect both its
5135 intent and its limitations
5136
5137- Issue #13841: Make child processes exit using sys.exit() on Windows.
5138
5139- Issue #14936: curses_panel was converted to PEP 3121 and PEP 384 API.
5140 Patch by Robin Schreiber.
5141
5142- Issue #1667546: On platforms supporting tm_zone and tm_gmtoff fields
5143 in struct tm, time.struct_time objects returned by time.gmtime(),
5144 time.localtime() and time.strptime() functions now have tm_zone and
5145 tm_gmtoff attributes. Original patch by Paul Boddie.
5146
5147- Rename adjusted attribute to adjustable in time.get_clock_info() result.
5148
5149- Issue #3518: Remove references to non-existent BaseManager.from_address()
5150 method.
5151
5152- Issue #13857: Added textwrap.indent() function (initial patch by Ezra
5153 Berch)
5154
5155- Issue #2736: Added datetime.timestamp() method.
5156
5157- Issue #13854: Make multiprocessing properly handle non-integer
5158 non-string argument to SystemExit.
5159
5160- Issue #12157: Make pool.map() empty iterables correctly. Initial
5161 patch by mouad.
5162
5163- Issue #11823: disassembly now shows argument counts on calls with keyword args.
5164
5165- Issue #14711: os.stat_float_times() has been deprecated.
5166
5167- LZMAFile now accepts the modes "rb"/"wb"/"ab" as synonyms of "r"/"w"/"a".
5168
5169- The bz2 and lzma modules now each contain an open() function, allowing
5170 compressed files to readily be opened in text mode as well as binary mode.
5171
5172- BZ2File.__init__() and LZMAFile.__init__() now accept a file object as their
5173 first argument, rather than requiring a separate "fileobj" argument.
5174
5175- gzip.open() now accepts file objects as well as filenames.
5176
5177- Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError
5178 when the path existed and had the S_ISGID mode bit set when it was
5179 not explicitly asked for. This is no longer an exception as mkdir
5180 cannot control if the OS sets that bit for it or not.
5181
5182- Issue #14989: Make the CGI enable option to http.server available via command
5183 line.
5184
5185- Issue #14987: Add a missing import statement to inspect.
5186
5187- Issue #1079: email.header.decode_header now correctly parses all the examples
5188 in RFC2047. There is a necessary visible behavior change: the leading and/or
5189 trailing whitespace on ASCII parts is now preserved.
5190
5191- Issue #14969: Better handling of exception chaining in contextlib.ExitStack
5192
Georg Brandl86dc7322012-10-01 18:58:45 +02005193- Issue #14963: Convert contextlib.ExitStack.__exit__ to use an iterative
5194 algorithm (Patch by Alon Horev)
5195
5196- Issue #14785: Add sys._debugmallocstats() to help debug low-level memory
5197 allocation issues
5198
5199- Issue #14443: Ensure that .py files are byte-compiled with the correct Python
5200 executable within bdist_rpm even on older versions of RPM
5201
5202C-API
5203-----
5204
Victor Stinner554fd082014-03-17 22:33:49 +01005205- Issue #15146: Add PyType_FromSpecWithBases. Patch by Robin Schreiber.
5206
5207- Issue #15042: Add PyState_AddModule and PyState_RemoveModule. Add version
5208 guard for Py_LIMITED_API additions. Patch by Robin Schreiber.
5209
Georg Brandl86dc7322012-10-01 18:58:45 +02005210- Issue #13783: Inadvertent additions to the public C API in the PEP 380
5211 implementation have either been removed or marked as private interfaces.
5212
5213Extension Modules
5214-----------------
5215
5216- Issue #15000: Support the "unique" x32 architecture in _posixsubprocess.c.
5217
Victor Stinner554fd082014-03-17 22:33:49 +01005218IDLE
5219----
5220
5221- Issue #9803: Don't close IDLE on saving if breakpoint is open.
5222 Patch by Roger Serwy.
5223
5224- Issue #14962: Update text coloring in IDLE shell window after changing
5225 options. Patch by Roger Serwy.
5226
Georg Brandl86dc7322012-10-01 18:58:45 +02005227Documentation
5228-------------
5229
Victor Stinner554fd082014-03-17 22:33:49 +01005230- Issue #15176: Clarified behavior, documentation, and implementation
5231 of os.listdir().
5232
5233- Issue #14982: Document that pkgutil's iteration functions require the
5234 non-standard iter_modules() method to be defined by an importer (something
5235 the importlib importers do not define).
5236
Georg Brandl86dc7322012-10-01 18:58:45 +02005237- Issue #15081: Document PyState_FindModule.
5238 Patch by Robin Schreiber.
5239
5240- Issue #14814: Added first draft of ipaddress module API reference
5241
5242Tests
5243-----
5244
Victor Stinner554fd082014-03-17 22:33:49 +01005245- Issue #15187: Bugfix: remove temporary directories test_shutil was leaving
5246 behind.
5247
Georg Brandl86dc7322012-10-01 18:58:45 +02005248- Issue #14769: test_capi now has SkipitemTest, which cleverly checks
5249 for "parity" between PyArg_ParseTuple() and the Python/getargs.c static
5250 function skipitem() for all possible "format units".
5251
5252- test_nntplib now tolerates being run from behind NNTP gateways that add
5253 "X-Antivirus" headers to articles
5254
5255- Issue #15043: test_gdb is now skipped entirely if gdb security settings
5256 block loading of the gdb hooks
5257
5258- Issue #14963: Add test cases for exception handling behaviour
5259 in contextlib.ExitStack (Initial patch by Alon Horev)
5260
5261Build
5262-----
5263
5264- Issue #13590: Improve support for OS X Xcode 4:
5265 * Try to avoid building Python or extension modules with problematic
5266 llvm-gcc compiler.
5267 * Since Xcode 4 removes ppc support, extension module builds now
5268 check for ppc compiler support and automatically remove ppc and
5269 ppc64 archs when not available.
5270 * Since Xcode 4 no longer install SDKs in default locations,
5271 extension module builds now revert to using installed headers
5272 and libs if the SDK used to build the interpreter is not
5273 available.
5274 * Update ./configure to use better defaults for universal builds;
5275 in particular, --enable-universalsdk=yes uses the Xcode default
5276 SDK and --with-universal-archs now defaults to "intel" if ppc
5277 not available.
5278
5279- Issue #14225: Fix Unicode support for curses (#12567) on OS X
5280
5281- Issue #14928: Fix importlib bootstrap issues by using a custom executable
5282 (Modules/_freeze_importlib) to build Python/importlib.h.
5283
5284
5285What's New in Python 3.3.0 Alpha 4?
5286===================================
5287
5288*Release date: 31-May-2012*
5289
5290Core and Builtins
5291-----------------
5292
5293- Issue #14835: Make plistlib output empty arrays & dicts like OS X.
5294 Patch by Sidney San Martín.
5295
5296- Issue #14744: Use the new _PyUnicodeWriter internal API to speed up
5297 str%args and str.format(args).
5298
5299- Issue #14930: Make memoryview objects weakrefable.
5300
5301- Issue #14775: Fix a potential quadratic dict build-up due to the garbage
5302 collector repeatedly trying to untrack dicts.
5303
5304- Issue #14857: fix regression in references to PEP 3135 implicit __class__
5305 closure variable (Reopens issue #12370)
5306
5307- Issue #14712 (PEP 405): Virtual environments. Implemented by Vinay Sajip.
5308
5309- Issue #14660 (PEP 420): Namespace packages. Implemented by Eric Smith.
5310
5311- Issue #14494: Fix __future__.py and its documentation to note that
5312 absolute imports are the default behavior in 3.0 instead of 2.7.
5313 Patch by Sven Marnach.
5314
5315- Issue #9260: A finer-grained import lock. Most of the import sequence
5316 now uses per-module locks rather than the global import lock, eliminating
5317 well-known issues with threads and imports.
5318
5319- Issue #14624: UTF-16 decoding is now 3x to 4x faster on various inputs.
5320 Patch by Serhiy Storchaka.
5321
5322- asdl_seq and asdl_int_seq are now Py_ssize_t sized.
5323
5324- Issue #14133 (PEP 415): Implement suppression of __context__ display with an
5325 attribute on BaseException. This replaces the original mechanism of PEP 409.
5326
5327- Issue #14417: Mutating a dict during lookup now restarts the lookup instead
5328 of raising a RuntimeError (undoes issue #14205).
5329
5330- Issue #14738: Speed-up UTF-8 decoding on non-ASCII data. Patch by Serhiy
5331 Storchaka.
5332
5333- Issue #14700: Fix two broken and undefined-behaviour-inducing overflow checks
5334 in old-style string formatting.
5335
Georg Brandl86dc7322012-10-01 18:58:45 +02005336Library
5337-------
5338
5339- Issue #14690: Use monotonic clock instead of system clock in the sched,
5340 subprocess and trace modules.
5341
Georg Brandl86dc7322012-10-01 18:58:45 +02005342- Issue #14443: Tell rpmbuild to use the correct version of Python in
5343 bdist_rpm. Initial patch by Ross Lagerwall.
5344
Georg Brandl86dc7322012-10-01 18:58:45 +02005345- Issue #12515: email now registers a defect if it gets to EOF while parsing
5346 a MIME part without seeing the closing MIME boundary.
5347
Georg Brandl86dc7322012-10-01 18:58:45 +02005348- Issue #1672568: email now always decodes base64 payloads, adding padding and
5349 ignoring non-base64-alphabet characters if needed, and registering defects
5350 for any such problems.
5351
5352- Issue #14925: email now registers a defect when the parser decides that there
5353 is a missing header/body separator line. MalformedHeaderDefect, which the
5354 existing code would never actually generate, is deprecated.
5355
5356- Issue #10365: File open dialog now works instead of crashing even when
5357 the parent window is closed before the dialog. Patch by Roger Serwy.
5358
5359- Issue #8739: Updated smtpd to support RFC 5321, and added support for the
5360 RFC 1870 SIZE extension.
5361
5362- Issue #665194: Added a localtime function to email.utils to provide an
5363 aware local datetime for use in setting Date headers.
5364
5365- Issue #12586: Added new provisional policies that implement convenient
5366 unicode support for email headers. See What's New for details.
5367
5368- Issue #14731: Refactored email Policy framework to support full backward
5369 compatibility with Python 3.2 by default yet allow for the introduction of
5370 new features through new policies. Note that Policy.must_be_7bit is renamed
5371 to cte_type.
5372
5373- Issue #14876: Use user-selected font for highlight configuration.
5374
5375- Issue #14920: Fix the help(urllib.parse) failure on locale C on terminals.
5376 Have ascii characters in help.
5377
5378- Issue #14548: Make multiprocessing finalizers check pid before
5379 running to cope with possibility of gc running just after fork.
5380
Georg Brandl86dc7322012-10-01 18:58:45 +02005381- Issue #14036: Add an additional check to validate that port in urlparse does
5382 not go in illegal range and returns None.
5383
5384- Issue #14862: Add missing names to os.__all__
5385
5386- Issue #14875: Use float('inf') instead of float('1e66666') in the json module.
5387
5388- Issue #13585: Added contextlib.ExitStack
5389
5390- PEP 3144, Issue #14814: Added the ipaddress module
5391
5392- Issue #14426: Correct the Date format in Expires attribute of Set-Cookie
5393 Header in Cookie.py.
5394
5395- Issue #14588: The types module now provide new_class() and prepare_class()
5396 functions to support PEP 3115 compliant dynamic class creation. Patch by
5397 Daniel Urban and Nick Coghlan.
5398
Martin Panterc04fb562016-02-10 05:44:01 +00005399- Issue #13152: Allow specifying a custom tabsize for expanding tabs in
Georg Brandl86dc7322012-10-01 18:58:45 +02005400 textwrap. Patch by John Feuerstein.
5401
5402- Issue #14721: Send the correct 'Content-length: 0' header when the body is an
5403 empty string ''. Initial Patch contributed by Arve Knudsen.
5404
5405- Issue #14072: Fix parsing of 'tel' URIs in urlparse by making the check for
5406 ports stricter.
5407
5408- Issue #9374: Generic parsing of query and fragment portions of url for any
5409 scheme. Supported both by RFC3986 and RFC2396.
5410
5411- Issue #14798: Fix the functions in pyclbr to raise an ImportError
5412 when the first part of a dotted name is not a package. Patch by
5413 Xavier de Gaye.
5414
5415- Issue #12098: multiprocessing on Windows now starts child processes
5416 using the same sys.flags as the current process. Initial patch by
5417 Sergey Mezentsev.
5418
5419- Issue #13031: Small speed-up for tarfile when unzipping tarfiles.
5420 Patch by Justin Peel.
5421
5422- Issue #14780: urllib.request.urlopen() now has a ``cadefault`` argument
5423 to use the default certificate store. Initial patch by James Oakley.
5424
5425- Issue #14829: Fix bisect and range() indexing with large indices
5426 (>= 2 ** 32) under 64-bit Windows.
5427
5428- Issue #14732: The _csv module now uses PEP 3121 module initialization.
5429 Patch by Robin Schreiber.
5430
5431- Issue #14809: Add HTTP status codes introduced by RFC 6585 to http.server
5432 and http.client. Patch by EungJun Yi.
5433
5434- Issue #14777: tkinter may return undecoded UTF-8 bytes as a string when
Martin Panter0be894b2016-09-07 12:03:06 +00005435 accessing the Tk clipboard. Modify clipboard_get() to first request type
Georg Brandl86dc7322012-10-01 18:58:45 +02005436 UTF8_STRING when no specific type is requested in an X11 windowing
5437 environment, falling back to the current default type STRING if that fails.
5438 Original patch by Thomas Kluyver.
5439
5440- Issue #14773: Fix os.fwalk() failing on dangling symlinks.
5441
5442- Issue #12541: Be lenient with quotes around Realm field of HTTP Basic
5443 Authentation in urllib2.
5444
5445- Issue #14807: move undocumented tarfile.filemode() to stat.filemode() and add
5446 doc entry. Add tarfile.filemode alias with deprecation warning.
5447
5448- Issue #13815: TarFile.extractfile() now returns io.BufferedReader objects.
5449
5450- Issue #14532: Add a secure_compare() helper to the hmac module, to mitigate
5451 timing attacks. Patch by Jon Oberheide.
5452
5453- Add importlib.util.resolve_name().
5454
5455- Issue #14366: Support lzma compression in zip files.
5456 Patch by Serhiy Storchaka.
5457
5458- Issue #13959: Introduce importlib.find_loader() and document
5459 imp.find_module/load_module as deprecated.
5460
5461- Issue #14082: shutil.copy2() now copies extended attributes, if possible.
5462 Patch by Hynek Schlawack.
5463
5464- Issue #13959: Make importlib.abc.FileLoader.load_module()/get_filename() and
5465 importlib.machinery.ExtensionFileLoader.load_module() have their single
5466 argument be optional. Allows for the replacement (and thus deprecation) of
5467 imp.load_source()/load_package()/load_compiled().
5468
5469- Issue #13959: imp.get_suffixes() has been deprecated in favour of the new
5470 attributes on importlib.machinery: SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES,
5471 OPTIMIZED_BYTECODE_SUFFIXES, BYTECODE_SUFFIXES, and EXTENSION_SUFFIXES. This
5472 led to an indirect deprecation of inspect.getmoduleinfo().
5473
5474- Issue #14662: Prevent shutil failures on OS X when destination does not
5475 support chflag operations. Patch by Hynek Schlawack.
5476
5477- Issue #14157: Fix time.strptime failing without a year on February 29th.
5478 Patch by Hynek Schlawack.
5479
5480- Issue #14753: Make multiprocessing's handling of negative timeouts
5481 the same as it was in Python 3.2.
5482
5483- Issue #14583: Fix importlib bug when a package's __init__.py would first
5484 import one of its modules then raise an error.
5485
5486- Issue #14741: Fix missing support for Ellipsis ('...') in parser module.
5487
5488- Issue #14697: Fix missing support for set displays and set comprehensions in
5489 parser module.
5490
5491- Issue #14701: Fix missing support for 'raise ... from' in parser module.
5492
5493- Add support for timeouts to the acquire() methods of
5494 multiprocessing's lock/semaphore/condition proxies.
5495
5496- Issue #13989: Add support for text mode to gzip.open().
5497
5498- Issue #14127: The os.stat() result object now provides three additional
5499 fields: st_ctime_ns, st_mtime_ns, and st_atime_ns, providing those times as an
5500 integer with nanosecond resolution. The functions os.utime(), os.lutimes(),
5501 and os.futimes() now accept a new parameter, ns, which accepts mtime and atime
5502 as integers with nanosecond resolution.
5503
5504- Issue #14127 and #10148: shutil.copystat now preserves exact mtime and atime
5505 on filesystems providing nanosecond resolution.
5506
Victor Stinner554fd082014-03-17 22:33:49 +01005507IDLE
5508----
5509
5510- Issue #14958: Change IDLE systax highlighting to recognize all string and
5511 byte literals supported in Python 3.3.
5512
5513- Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu.
5514
5515- Issue #14929: Stop IDLE 3.x from closing on Unicode decode errors when
5516 grepping. Patch by Roger Serwy.
5517
5518- Issue #12510: Attempting to get invalid tooltip no longer closes IDLE.
5519 Other tooltipss have been corrected or improved and the number of tests
5520 has been tripled. Original patch by Roger Serwy.
5521
Georg Brandl86dc7322012-10-01 18:58:45 +02005522Tools/Demos
5523-----------
5524
5525- Issue #14695: Bring Tools/parser/unparse.py support up to date with
5526 the Python 3.3 Grammar.
5527
5528Build
5529-----
5530
5531- Issue #14472: Update .gitignore. Patch by Matej Cepl.
5532
5533- Upgrade Windows library versions: bzip 1.0.6, OpenSSL 1.0.1c.
5534
5535- Issue #14693: Under non-Windows platforms, hashlib's fallback modules are
5536 always compiled, even if OpenSSL is present at build time.
5537
5538- Issue #13210: Windows build now uses VS2010, ported from VS2008.
5539
Victor Stinner554fd082014-03-17 22:33:49 +01005540C-API
5541-----
5542
5543- Issue #14705: The PyArg_Parse() family of functions now support the 'p' format
5544 unit, which accepts a "boolean predicate" argument. It converts any Python
5545 value into an integer--0 if it is "false", and 1 otherwise.
5546
Georg Brandl86dc7322012-10-01 18:58:45 +02005547Documentation
5548-------------
5549
Victor Stinner554fd082014-03-17 22:33:49 +01005550- Issue #14863: Update the documentation of os.fdopen() to reflect the
5551 fact that it's only a thin wrapper around open() anymore.
5552
Georg Brandl86dc7322012-10-01 18:58:45 +02005553- Issue #14588: The language reference now accurately documents the Python 3
5554 class definition process. Patch by Nick Coghlan.
5555
5556- Issue #14943: Correct a default argument value for winreg.OpenKey
5557 and correctly list the argument names in the function's explanation.
5558
5559
5560What's New in Python 3.3.0 Alpha 3?
5561===================================
5562
5563*Release date: 01-May-2012*
5564
5565Core and Builtins
5566-----------------
5567
5568- Issue #14699: Fix calling the classmethod descriptor directly.
5569
5570- Issue #14433: Prevent msvcrt crash in interactive prompt when stdin is closed.
5571
5572- Issue #14521: Make result of float('nan') and float('-nan') more consistent
5573 across platforms.
5574
5575- Issue #14646: __import__() sets __loader__ if the loader did not.
5576
5577- Issue #14605: No longer have implicit entries in sys.meta_path. If
5578 sys.meta_path is found to be empty, raise ImportWarning.
5579
5580- Issue #14605: No longer have implicit entries in sys.path_hooks. If
5581 sys.path_hooks is found to be empty, a warning will be raised. None is now
5582 inserted into sys.path_importer_cache if no finder was discovered. This also
5583 means imp.NullImporter is no longer implicitly used.
5584
5585- Issue #13903: Implement PEP 412. Individual dictionary instances can now share
5586 their keys with other dictionaries. Classes take advantage of this to share
5587 their instance dictionary keys for improved memory and performance.
5588
5589- Issue #11603 (again): Setting __repr__ to __str__ now raises a RuntimeError
5590 when repr() or str() is called on such an object.
5591
5592- Issue #14658: Fix binding a special method to a builtin implementation of a
5593 special method with a different name.
5594
5595- Issue #14630: Fix a memory access bug for instances of a subclass of int
5596 with value 0.
5597
5598- Issue #14339: Speed improvements to bin, oct and hex functions. Patch by
5599 Serhiy Storchaka.
5600
Georg Brandl86dc7322012-10-01 18:58:45 +02005601- Issue #14385: It is now possible to use a custom type for the __builtins__
5602 namespace, instead of a dict. It can be used for sandboxing for example.
5603 Raise also a NameError instead of ImportError if __build_class__ name if not
5604 found in __builtins__.
5605
5606- Issue #12599: Be more strict in accepting None compared to a false-like
5607 object for importlib.util.module_for_loader and
5608 importlib.machinery.PathFinder.
5609
5610- Issue #14612: Fix jumping around with blocks by setting f_lineno.
5611
5612- Issue #14592: Attempting a relative import w/o __package__ or __name__ set in
5613 globals raises a KeyError.
5614
5615- Issue #14607: Fix keyword-only arguments which started with ``__``.
5616
5617- Issue #10854: The ImportError raised when an extension module on Windows
5618 fails to import now uses the new path and name attributes from
5619 Issue #1559549.
5620
5621- Issue #13889: Check and (if necessary) set FPU control word before calling
5622 any of the dtoa.c string <-> float conversion functions, on MSVC builds of
5623 Python. This fixes issues when embedding Python in a Delphi app.
5624
5625- __import__() now matches PEP 328 and documentation by defaulting 'index' to 0
5626 instead of -1 and removing support for negative values.
5627
5628- Issue #2377: Make importlib the implementation of __import__().
5629
5630- Issue #1559549: ImportError now has 'name' and 'path' attributes that are set
5631 using keyword arguments to its constructor. They are currently not set by
5632 import as they are meant for use by importlib.
5633
5634- Issue #14474: Save and restore exception state in thread.start_new_thread()
Martin Panter7462b6492015-11-02 03:37:02 +00005635 while writing error message if the thread leaves an unhandled exception.
Georg Brandl86dc7322012-10-01 18:58:45 +02005636
5637- Issue #13019: Fix potential reference leaks in bytearray.extend(). Patch
5638 by Suman Saha.
5639
5640Library
5641-------
5642
Martin Panter69332c12016-08-04 13:07:31 +00005643- Issue #14768: os.path.expanduser('~/a') doesn't work correctly when HOME is '/'.
Georg Brandl86dc7322012-10-01 18:58:45 +02005644
5645- Issue #14371: Support bzip2 in zipfile module. Patch by Serhiy Storchaka.
5646
5647- Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running
5648 step. Patch by Xavier de Gaye.
5649
5650- Issue #14696: Fix parser module to understand 'nonlocal' declarations.
5651
5652- Issue #10941: Fix imaplib.Internaldate2tuple to produce correct result near
5653 the DST transition. Patch by Joe Peterson.
5654
5655- Issue #9154: Fix parser module to understand function annotations.
5656
5657- Issue #6085: In http.server.py SimpleHTTPServer.address_string returns the
5658 client ip address instead client hostname. Patch by Charles-François Natali.
5659
5660- Issue #14309: Deprecate time.clock(), use time.perf_counter() or
5661 time.process_time() instead.
5662
5663- Issue #14428: Implement the PEP 418. Add time.get_clock_info(),
5664 time.perf_counter() and time.process_time() functions, and rename
5665 time.steady() to time.monotonic().
5666
5667- Issue #14646: importlib.util.module_for_loader() now sets __loader__ and
5668 __package__ (when possible).
5669
5670- Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a
5671 test class that doesn't inherit from TestCase (i.e. a mixin).
5672
5673- Issue #4892: multiprocessing Connections can now be transferred over
5674 multiprocessing Connections. Patch by Richard Oudkerk (sbt).
5675
5676- Issue #14160: TarFile.extractfile() failed to resolve symbolic links when
5677 the links were not located in an archive subdirectory.
5678
5679- Issue #14638: pydoc now treats non-string __name__ values as if they
5680 were missing, instead of raising an error.
5681
5682- Issue #13684: Fix httplib tunnel issue of infinite loops for certain sites
5683 which send EOF without trailing \r\n.
5684
5685- Issue #14605: Add importlib.abc.FileLoader, importlib.machinery.(FileFinder,
5686 SourceFileLoader, SourcelessFileLoader, ExtensionFileLoader).
5687
5688- Issue #13959: imp.cache_from_source()/source_from_cache() now follow
5689 os.path.join()/split() semantics for path manipulation instead of its prior,
5690 custom semantics of caring the right-most path separator forward in path
5691 joining.
5692
5693- Issue #2193: Allow ":" character in Cookie NAME values.
5694
5695- Issue #14629: tokenizer.detect_encoding will specify the filename in the
5696 SyntaxError exception if found at readline.__self__.name.
5697
5698- Issue #14629: Raise SyntaxError in tokenizer.detect_encoding if the
5699 first two lines have non-UTF-8 characters without an encoding declaration.
5700
5701- Issue #14308: Fix an exception when a "dummy" thread is in the threading
5702 module's active list after a fork().
5703
5704- Issue #11750: The Windows API functions scattered in the _subprocess and
5705 _multiprocessing.win32 modules now live in a single module "_winapi".
5706 Patch by sbt.
5707
5708- Issue #14087: multiprocessing: add Condition.wait_for(). Patch by sbt.
5709
5710- Issue #14538: HTMLParser can now parse correctly start tags that contain
5711 a bare '/'.
5712
5713- Issue #14452: SysLogHandler no longer inserts a UTF-8 BOM into the message.
5714
5715- Issue #14386: Expose the dict_proxy internal type as types.MappingProxyType.
5716
5717- Issue #13959: Make imp.reload() always use a module's __loader__ to perform
5718 the reload.
5719
5720- Issue #13959: Add imp.py and rename the built-in module to _imp, allowing for
5721 re-implementing parts of the module in pure Python.
5722
5723- Issue #13496: Fix potential overflow in bisect.bisect algorithm when applied
5724 to a collection of size > sys.maxsize / 2.
5725
5726- Have importlib take advantage of ImportError's new 'name' and 'path'
5727 attributes.
5728
5729- Issue #14399: zipfile now recognizes that the archive has been modified even
5730 if only the comment is changed. In addition, the TypeError that results from
Terry Jan Reedy8e7586b2013-03-11 18:38:13 -04005731 trying to set a non-binary value as a comment is now raised at the time
Georg Brandl86dc7322012-10-01 18:58:45 +02005732 the comment is set rather than at the time the zipfile is written.
5733
5734- trace.CoverageResults.is_ignored_filename() now ignores any name that starts
5735 with "<" and ends with ">" instead of special-casing "<string>" and
5736 "<doctest ".
5737
5738- Issue #12537: The mailbox module no longer depends on knowledge of internal
5739 implementation details of the email package Message object.
5740
5741- Issue #7978: socketserver now restarts the select() call when EINTR is
5742 returned. This avoids crashing the server loop when a signal is received.
5743 Patch by Jerzy Kozera.
5744
5745- Issue #14522: Avoid duplicating socket handles in multiprocessing.connection.
5746 Patch by sbt.
5747
5748- Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.
5749
Georg Brandl86dc7322012-10-01 18:58:45 +02005750- Issue #3033: Add displayof parameter to tkinter font. Patch by Guilherme Polo.
5751
5752- Issue #14482: Raise a ValueError, not a NameError, when trying to create
5753 a multiprocessing Client or Listener with an AF_UNIX type address under
5754 Windows. Patch by Popa Claudiu.
5755
5756- Issue #802310: Generate always unique tkinter font names if not directly passed.
5757
5758- Issue #14151: Raise a ValueError, not a NameError, when trying to create
5759 a multiprocessing Client or Listener with an AF_PIPE type address under
5760 non-Windows platforms. Patch by Popa Claudiu.
5761
5762- Issue #14493: Use gvfs-open or xdg-open in webbrowser.
5763
5764Build
5765-----
5766
5767- "make touch" will now touch generated files that are checked into Mercurial,
5768 after a "hg update" which failed to bring the timestamps into the right order.
5769
5770Tests
5771-----
5772
5773- Issue #14026: In test_cmd_line_script, check that sys.argv is populated
5774 correctly for the various invocation approaches (Patch by Jason Yeo)
5775
5776- Issue #14032: Fix incorrect variable name in test_cmd_line_script debugging
5777 message (Patch by Jason Yeo)
5778
5779- Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing
5780 a test failure in test_ssl.
5781
5782- Issue #14355: Regrtest now supports the standard unittest test loading, and
5783 will use it if a test file contains no `test_main` method.
5784
Victor Stinner554fd082014-03-17 22:33:49 +01005785IDLE
5786----
5787
5788- Issue #8515: Set __file__ when run file in IDLE.
5789 Initial patch by Bruce Frederiksen.
5790
5791- Issue #14496: Fix wrong name in idlelib/tabbedpages.py.
5792 Patch by Popa Claudiu.
5793
Georg Brandl86dc7322012-10-01 18:58:45 +02005794Tools / Demos
5795-------------
5796
5797- Issue #3561: The Windows installer now has an option, off by default, for
5798 placing the Python installation into the system "Path" environment variable.
5799
5800- Issue #13165: stringbench is now available in the Tools/stringbench folder.
5801 It used to live in its own SVN project.
5802
Victor Stinner554fd082014-03-17 22:33:49 +01005803C-API
5804-----
5805
5806- Issue #14098: New functions PyErr_GetExcInfo and PyErr_SetExcInfo.
5807 Patch by Stefan Behnel.
5808
Georg Brandl86dc7322012-10-01 18:58:45 +02005809
5810What's New in Python 3.3.0 Alpha 2?
5811===================================
5812
5813*Release date: 01-Apr-2012*
5814
5815Core and Builtins
5816-----------------
5817
5818- Issue #1683368: object.__new__ and object.__init__ raise a TypeError if they
5819 are passed arguments and their complementary method is not overridden.
5820
5821- Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as
5822 the module name that was not interned.
5823
5824- Issue #14331: Use significantly less stack space when importing modules by
5825 allocating path buffers on the heap instead of the stack.
5826
5827- Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not
5828 passed strings.
5829
5830- Issue #1469629: Allow cycles through an object's __dict__ slot to be
5831 collected. (For example if ``x.__dict__ is x``).
5832
5833- Issue #14205: dict lookup raises a RuntimeError if the dict is modified
5834 during a lookup.
5835
5836- Issue #14220: When a generator is delegating to another iterator with the
5837 yield from syntax, it needs to have its ``gi_running`` flag set to True.
5838
5839- Issue #14435: Remove dedicated block allocator from floatobject.c and rely
5840 on the PyObject_Malloc() api like all other objects.
5841
5842- Issue #14471: Fix a possible buffer overrun in the winreg module.
5843
5844- Issue #14288: Allow the serialization of builtin iterators
5845
5846Library
5847-------
5848
5849- Issue #14300: Under Windows, sockets created using socket.dup() now allow
5850 overlapped I/O. Patch by sbt.
5851
5852- Issue #13872: socket.detach() now marks the socket closed (as mirrored
5853 in the socket repr()). Patch by Matt Joiner.
5854
5855- Issue #14406: Fix a race condition when using ``concurrent.futures.wait(
5856 return_when=ALL_COMPLETED)``. Patch by Matt Joiner.
5857
5858- Issue #5136: deprecate old, unused functions from tkinter.
5859
Georg Brandl86dc7322012-10-01 18:58:45 +02005860- Issue #14416: syslog now defines the LOG_ODELAY and LOG_AUTHPRIV constants
5861 if they are defined in <syslog.h>.
5862
Georg Brandl86dc7322012-10-01 18:58:45 +02005863- Issue #14295: Add unittest.mock
5864
5865- Issue #7652: Add --with-system-libmpdec option to configure for linking
5866 the _decimal module against an installed libmpdec.
5867
5868- Issue #14380: MIMEText now defaults to utf-8 when passed non-ASCII unicode
5869 with no charset specified.
5870
5871- Issue #10340: asyncore - properly handle EINVAL in dispatcher constructor on
5872 OSX; avoid to call handle_connect in case of a disconnected socket which
5873 was not meant to connect.
5874
5875- Issue #14204: The ssl module now has support for the Next Protocol
5876 Negotiation extension, if available in the underlying OpenSSL library.
5877 Patch by Colin Marc.
5878
5879- Issue #3035: Unused functions from tkinter are marked as pending deprecated.
5880
5881- Issue #12757: Fix the skipping of doctests when python is run with -OO so
5882 that it works in unittest's verbose mode as well as non-verbose mode.
5883
5884- Issue #7652: Integrate the decimal floating point libmpdec library to speed
5885 up the decimal module. Performance gains of the new C implementation are
5886 between 10x and 100x, depending on the application.
5887
Georg Brandl86dc7322012-10-01 18:58:45 +02005888- Issue #14269: SMTPD now conforms to the RFC and requires a HELO command
5889 before MAIL, RCPT, or DATA.
5890
5891- Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr
5892 attribute.
5893
5894- Issue #14344: fixed the repr of email.policy objects.
5895
5896- Issue #11686: Added missing entries to email package __all__ lists
5897 (mostly the new Bytes classes).
5898
5899- Issue #14335: multiprocessing's custom Pickler subclass now inherits from
5900 the C-accelerated implementation. Patch by sbt.
5901
5902- Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem.
5903
5904- Issue #11199: Fix the with urllib which hangs on particular ftp urls.
5905
5906- Improve the memory utilization and speed of functools.lru_cache.
5907
5908- Issue #14222: Use the new time.steady() function instead of time.time() for
5909 timeout in queue and threading modules to not be affected of system time
5910 update.
5911
5912- Issue #13248: Remove lib2to3.pytree.Base.get_prefix/set_prefix.
5913
5914- Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes in the hash
5915 table internal to the pyexpat module's copy of the expat library to avoid a
5916 denial of service due to hash collisions. Patch by David Malcolm with some
5917 modifications by the expat project.
5918
Georg Brandl86dc7322012-10-01 18:58:45 +02005919- Issue #12818: format address no longer needlessly \ escapes ()s in names when
5920 the name ends up being quoted.
5921
5922- Issue #14062: BytesGenerator now correctly folds Header objects,
5923 including using linesep when folding.
5924
5925- Issue #13839: When invoked on the command-line, the pstats module now
5926 accepts several filenames of profile stat files and merges them all.
5927 Patch by Matt Joiner.
5928
5929- Issue #14291: Email now defaults to utf-8 for non-ASCII unicode headers
5930 instead of raising an error. This fixes a regression relative to 2.7.
5931
5932- Issue #989712: Support using Tk without a mainloop.
5933
Georg Brandl86dc7322012-10-01 18:58:45 +02005934- Issue #3835: Refuse to use unthreaded Tcl in threaded Python.
5935
5936- Issue #2843: Add new Tk API to Tkinter.
5937
5938- Issue #14184: Increase the default stack size for secondary threads on
5939 Mac OS X to avoid interpreter crashes when using threads on 10.7.
5940
5941- Issue #14180: datetime.date.fromtimestamp(),
5942 datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp()
5943 now raise an OSError instead of ValueError if localtime() or gmtime() failed.
5944
5945- Issue #14180: time.ctime(), gmtime(), time.localtime(),
5946 datetime.date.fromtimestamp(), datetime.datetime.fromtimestamp() and
5947 datetime.datetime.utcfromtimestamp() now raises an OverflowError, instead of
5948 a ValueError, if the timestamp does not fit in time_t.
5949
5950- Issue #14180: datetime.datetime.fromtimestamp() and
5951 datetime.datetime.utcfromtimestamp() now round microseconds towards zero
5952 instead of rounding to nearest with ties going away from zero.
5953
5954- Issue #10543: Fix unittest test discovery with Jython bytecode files.
5955
5956- Issue #1178863: Separate initialisation from setting when initializing
5957 Tkinter.Variables; harmonize exceptions to ValueError; only delete variables
5958 that have not been deleted; assert that variable names are strings.
5959
5960- Issue #14104: Implement time.monotonic() on Mac OS X, patch written by
5961 Nicholas Riley.
5962
5963- Issue #13394: the aifc module now uses warnings.warn() to signal warnings.
5964
5965- Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under
5966 Windows when the child process has already exited.
5967
5968- Issue #14223: curses.addch() is no more limited to the range 0-255 when the
5969 Python curses is not linked to libncursesw. It was a regression introduced
5970 in Python 3.3a1.
5971
5972- Issue #14168: Check for presence of Element._attrs in minidom before
5973 accessing it.
5974
5975- Issue #12328: Fix multiprocessing's use of overlapped I/O on Windows.
5976 Also, add a multiprocessing.connection.wait(rlist, timeout=None) function
5977 for polling multiple objects at once. Patch by sbt.
5978
5979- Issue #14007: Accept incomplete TreeBuilder objects (missing start, end,
5980 data or close method) for the Python implementation as well.
5981 Drop the no-op TreeBuilder().xml() method from the C implementation.
5982
5983- Issue #14210: pdb now has tab-completion not only for command names, but
5984 also for their arguments, wherever possible.
5985
5986- Issue #14310: Sockets can now be with other processes on Windows using
5987 the api socket.socket.share() and socket.fromshare().
5988
5989- Issue #10576: The gc module now has a 'callbacks' member that will get
5990 called when garbage collection takes place.
5991
5992Build
5993-----
5994
5995- Issue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban.
5996
5997- Issue #14387: Do not include accu.h from Python.h.
5998
5999- Issue #14359: Only use O_CLOEXEC in _posixmodule.c if it is defined.
6000 Based on patch from Hervé Coatanhay.
6001
6002- Issue #14321: Do not run pgen during the build if files are up to date.
6003
6004Documentation
6005-------------
6006
6007- Issue #14034: added the argparse tutorial.
6008
6009- Issue #14324: Fix configure tests for cross builds.
6010
6011- Issue #14327: Call AC_CANONICAL_HOST in configure.ac and check in
6012 config.{guess,sub}. Don't use uname calls for cross builds.
6013
6014Extension Modules
6015-----------------
6016
6017- Issue #9041: An issue in ctypes.c_longdouble, ctypes.c_double, and
6018 ctypes.c_float that caused an incorrect exception to be returned in the
6019 case of overflow has been fixed.
6020
6021- Issue #14212: The re module didn't retain a reference to buffers it was
6022 scanning, resulting in segfaults.
6023
6024- Issue #14259: The finditer() method of re objects did not take any
6025 keyword arguments, contrary to the documentation.
6026
6027- Issue #10142: Support for SEEK_HOLE/SEEK_DATA (for example, under ZFS).
6028
6029Tests
6030-----
6031
6032- Issue #14442: Add missing errno import in test_smtplib.
6033
6034- Issue #8315: (partial fix) python -m unittest test.test_email now works.
6035
6036
6037What's New in Python 3.3.0 Alpha 1?
6038===================================
6039
6040*Release date: 05-Mar-2012*
6041
6042Core and Builtins
6043-----------------
6044
6045- Issue #14172: Fix reference leak when marshalling a buffer-like object
6046 (other than a bytes object).
6047
6048- Issue #13521: dict.setdefault() now does only one lookup for the given key,
6049 making it "atomic" for many purposes. Patch by Filip Gruszczyński.
6050
6051- PEP 409, Issue #6210: "raise X from None" is now supported as a means of
6052 suppressing the display of the chained exception context. The chained
6053 context still remains available as the __context__ attribute.
6054
6055- Issue #10181: New memoryview implementation fixes multiple ownership
6056 and lifetime issues of dynamically allocated Py_buffer members (#9990)
6057 as well as crashes (#8305, #7433). Many new features have been added
6058 (See whatsnew/3.3), and the documentation has been updated extensively.
6059 The ndarray test object from _testbuffer.c implements all aspects of
6060 PEP-3118, so further development towards the complete implementation
6061 of the PEP can proceed in a test-driven manner.
6062
6063 Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review
6064 and many ideas.
6065
6066- Issue #12834: Fix incorrect results of memoryview.tobytes() for
6067 non-contiguous arrays.
6068
6069- Issue #5231: Introduce memoryview.cast() method that allows changing
6070 format and shape without making a copy of the underlying memory.
6071
6072- Issue #14084: Fix a file descriptor leak when importing a module with a
6073 bad encoding.
6074
6075- Upgrade Unicode data to Unicode 6.1.
6076
6077- Issue #14040: Remove rarely used file name suffixes for C extensions
6078 (under POSIX mainly).
6079
6080- Issue #14051: Allow arbitrary attributes to be set of classmethod and
6081 staticmethod.
6082
6083- Issue #13703: oCERT-2011-003: Randomize hashes of str and bytes to protect
6084 against denial of service attacks due to hash collisions within the dict and
6085 set types. Patch by David Malcolm, based on work by Victor Stinner.
6086
6087- Issue #13020: Fix a reference leak when allocating a structsequence object
6088 fails. Patch by Suman Saha.
6089
6090- Issue #13908: Ready types returned from PyType_FromSpec.
6091
6092- Issue #11235: Fix OverflowError when trying to import a source file whose
6093 modification time doesn't fit in a 32-bit timestamp.
6094
6095- Issue #12705: A SyntaxError exception is now raised when attempting to
6096 compile multiple statements as a single interactive statement.
6097
6098- Fix the builtin module initialization code to store the init function for
6099 future reinitialization.
6100
6101- Issue #8052: The posix subprocess module would take a long time closing
6102 all possible file descriptors in the child process rather than just open
6103 file descriptors. It now closes only the open fds if possible for the
6104 default close_fds=True behavior.
6105
6106- Issue #13629: Renumber the tokens in token.h so that they match the indexes
6107 into _PyParser_TokenNames.
6108
6109- Issue #13752: Add a casefold() method to str.
6110
6111- Issue #13761: Add a "flush" keyword argument to the print() function,
6112 used to ensure flushing the output stream.
6113
6114- Issue #13645: pyc files now contain the size of the corresponding source
6115 code, to avoid timestamp collisions (especially on filesystems with a low
6116 timestamp resolution) when checking for freshness of the bytecode.
6117
6118- PEP 380, Issue #11682: Add "yield from <x>" to support easy delegation to
6119 subgenerators (initial patch by Greg Ewing, integration into 3.3 by
6120 Renaud Blanch, Ryan Kelly, Zbigniew Jędrzejewski-Szmek and Nick Coghlan)
6121
6122- Issue #13748: Raw bytes literals can now be written with the ``rb`` prefix
6123 as well as ``br``.
6124
6125- Issue #12736: Use full unicode case mappings for upper, lower, and title case.
6126
6127- Issue #12760: Add a create mode to open(). Patch by David Townshend.
6128
6129- Issue #13738: Simplify implementation of bytes.lower() and bytes.upper().
6130
6131- Issue #13577: Built-in methods and functions now have a __qualname__.
6132 Patch by sbt.
6133
6134- Issue #6695: Full garbage collection runs now clear the freelist of set
6135 objects. Initial patch by Matthias Troffaes.
6136
6137- Fix OSError.__init__ and OSError.__new__ so that each of them can be
Martin Pantere26da7c2016-06-02 10:07:09 +00006138 overridden and take additional arguments (followup to issue #12555).
Georg Brandl86dc7322012-10-01 18:58:45 +02006139
6140- Fix the fix for issue #12149: it was incorrect, although it had the side
6141 effect of appearing to resolve the issue. Thanks to Mark Shannon for
6142 noticing.
6143
6144- Issue #13505: Pickle bytes objects in a way that is compatible with
6145 Python 2 when using protocols <= 2.
6146
6147- Issue #11147: Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER. (Fix
6148 given by Campbell Barton).
6149
6150- Issue #13503: Use a more efficient reduction format for bytearrays with
6151 pickle protocol >= 3. The old reduction format is kept with older protocols
6152 in order to allow unpickling under Python 2. Patch by Irmen de Jong.
6153
6154- Issue #7111: Python can now be run without a stdin, stdout or stderr
6155 stream. It was already the case with Python 2. However, the corresponding
6156 sys module entries are now set to None (instead of an unusable file object).
6157
6158- Issue #11849: Ensure that free()d memory arenas are really released
6159 on POSIX systems supporting anonymous memory mappings. Patch by
6160 Charles-François Natali.
6161
Georg Brandl86dc7322012-10-01 18:58:45 +02006162- PEP 3155 / issue #13448: Qualified name for classes and functions.
6163
6164- Issue #13436: Fix a bogus error message when an AST object was passed
6165 an invalid integer value.
6166
6167- Issue #13411: memoryview objects are now hashable when the underlying
6168 object is hashable.
6169
6170- Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER
6171 to allow compiling extension modules with -Wswitch-enum on gcc.
6172 Initial patch by Floris Bruynooghe.
6173
6174- Issue #10227: Add an allocation cache for a single slice object. Patch by
6175 Stefan Behnel.
6176
6177- Issue #13393: BufferedReader.read1() now asks the full requested size to
6178 the raw stream instead of limiting itself to the buffer size.
6179
6180- Issue #13392: Writing a pyc file should now be atomic under Windows as well.
6181
6182- Issue #13333: The UTF-7 decoder now accepts lone surrogates (the encoder
6183 already accepts them).
6184
6185- Issue #13389: Full garbage collection passes now clear the freelists for
6186 list and dict objects. They already cleared other freelists in the
6187 interpreter.
6188
6189- Issue #13327: Remove the need for an explicit None as the second argument
6190 to os.utime, os.lutimes, os.futimes, os.futimens, os.futimesat, in
6191 order to update to the current time. Also added keyword argument
6192 handling to os.utimensat in order to remove the need for explicit None.
6193
6194- Issue #13350: Simplify some C code by replacing most usages of
6195 PyUnicode_Format by PyUnicode_FromFormat.
6196
6197- Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode
6198 error handler in interactive mode (when calling into PyOS_Readline()).
6199
6200- Issue #9896: Add start, stop, and step attributes to range objects.
6201
6202- Issue #13343: Fix a SystemError when a lambda expression uses a global
6203 variable in the default value of a keyword-only argument: ``lambda *,
6204 arg=GLOBAL_NAME: None``
6205
6206- Issue #12797: Added custom opener parameter to builtin open() and
6207 FileIO.open().
6208
6209- Issue #10519: Avoid unnecessary recursive function calls in
6210 setobject.c.
6211
6212- Issue #10363: Deallocate global locks in Py_Finalize().
6213
6214- Issue #13018: Fix reference leaks in error paths in dictobject.c.
6215 Patch by Suman Saha.
6216
6217- Issue #13201: Define '==' and '!=' to compare range objects based on
6218 the sequence of values they define (instead of comparing based on
6219 object identity).
6220
6221- Issue #1294232: In a few cases involving metaclass inheritance, the
6222 interpreter would sometimes invoke the wrong metaclass when building a new
6223 class object. These cases now behave correctly. Patch by Daniel Urban.
6224
6225- Issue #12753: Add support for Unicode name aliases and named sequences.
6226 Both ``unicodedata.lookup()`` and '\N{...}' now resolve aliases,
6227 and ``unicodedata.lookup()`` resolves named sequences too.
6228
6229- Issue #12170: The count(), find(), rfind(), index() and rindex() methods
6230 of bytes and bytearray objects now accept an integer between 0 and 255
6231 as their first argument. Patch by Petri Lehtinen.
6232
6233- Issue #12604: VTRACE macro expanded to no-op in _sre.c to avoid compiler
6234 warnings. Patch by Josh Triplett and Petri Lehtinen.
6235
6236- Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignore
6237 error handlers on all Windows versions. The MBCS codec is now supporting all
6238 error handlers, instead of only replace to encode and ignore to decode.
6239
6240- Issue #13188: When called without an explicit traceback argument,
6241 generator.throw() now gets the traceback from the passed exception's
6242 ``__traceback__`` attribute. Patch by Petri Lehtinen.
6243
6244- Issue #13146: Writing a pyc file is now atomic under POSIX.
6245
6246- Issue #7833: Extension modules built using distutils on Windows will no
6247 longer include a "manifest" to prevent them failing at import time in some
6248 embedded situations.
6249
6250- PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.
6251
6252- Add internal API for static strings (_Py_identifier et al.).
6253
6254- Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
6255 as "The pipe is being closed") is now mapped to POSIX errno EPIPE
6256 (previously EINVAL).
6257
6258- Issue #12911: Fix memory consumption when calculating the repr() of huge
6259 tuples or lists.
6260
6261- PEP 393: flexible string representation. Thanks to Torsten Becker for the
6262 initial implementation, and Victor Stinner for various bug fixes.
6263
6264- Issue #14081: The 'sep' and 'maxsplit' parameter to str.split, bytes.split,
6265 and bytearray.split may now be passed as keyword arguments.
6266
6267- Issue #13012: The 'keepends' parameter to str.splitlines may now be passed
6268 as a keyword argument: "my_string.splitlines(keepends=True)". The same
6269 change also applies to bytes.splitlines and bytearray.splitlines.
6270
6271- Issue #7732: Don't open a directory as a file anymore while importing a
Martin Panter1f1177d2015-10-31 11:48:53 +00006272 module. Ignore the directory if its name matches the module name (e.g.
Martin Panter7462b6492015-11-02 03:37:02 +00006273 "__init__.py") and raise an ImportError instead.
Georg Brandl86dc7322012-10-01 18:58:45 +02006274
6275- Issue #13021: Missing decref on an error path. Thanks to Suman Saha for
6276 finding the bug and providing a patch.
6277
6278- Issue #12973: Fix overflow checks that relied on undefined behaviour in
6279 list_repeat (listobject.c) and islice_next (itertoolsmodule.c). These bugs
6280 caused test failures with recent versions of Clang.
6281
6282- Issue #12904: os.utime, os.futimes, os.lutimes, and os.futimesat now write
6283 atime and mtime with nanosecond precision on modern POSIX platforms.
6284
6285- Issue #12802: the Windows error ERROR_DIRECTORY (numbered 267) is now
6286 mapped to POSIX errno ENOTDIR (previously EINVAL).
6287
6288- Issue #9200: The str.is* methods now work with strings that contain non-BMP
6289 characters even in narrow Unicode builds.
6290
6291- Issue #12791: Break reference cycles early when a generator exits with
6292 an exception.
6293
6294- Issue #12773: Make __doc__ mutable on user-defined classes.
6295
6296- Issue #12766: Raise a ValueError when creating a class with a class variable
6297 that conflicts with a name in __slots__.
6298
6299- Issue #12266: Fix str.capitalize() to correctly uppercase/lowercase
6300 titlecased and cased non-letter characters.
6301
6302- Issue #12732: In narrow unicode builds, allow Unicode identifiers which fall
6303 outside the BMP.
6304
6305- Issue #12575: Validate user-generated AST before it is compiled.
6306
6307- Make type(None), type(Ellipsis), and type(NotImplemented) callable. They
6308 return the respective singleton instances.
6309
6310- Forbid summing bytes with sum().
6311
6312- Verify the types of AST strings and identifiers provided by the user before
6313 compiling them.
6314
6315- Issue #12647: The None object now has a __bool__() method that returns False.
6316 Formerly, bool(None) returned False only because of special case logic
6317 in PyObject_IsTrue().
6318
6319- Issue #12579: str.format_map() now raises a ValueError if used on a
6320 format string that contains positional fields. Initial patch by
6321 Julian Berman.
6322
6323- Issue #10271: Allow warnings.showwarning() be any callable.
6324
Martin Panter7462b6492015-11-02 03:37:02 +00006325- Issue #11627: Fix segfault when __new__ on an exception returns a
Georg Brandl86dc7322012-10-01 18:58:45 +02006326 non-exception class.
6327
6328- Issue #12149: Update the method cache after a type's dictionary gets
6329 cleared by the garbage collector. This fixes a segfault when an instance
6330 and its type get caught in a reference cycle, and the instance's
6331 deallocator calls one of the methods on the type (e.g. when subclassing
6332 IOBase). Diagnosis and patch by Davide Rizzo.
6333
Victor Stinner554fd082014-03-17 22:33:49 +01006334- Issue #9611, Issue #9015: FileIO.read() clamps the length to INT_MAX on Windows.
Georg Brandl86dc7322012-10-01 18:58:45 +02006335
6336- Issue #9642: Uniformize the tests on the availability of the mbcs codec, add
6337 a new HAVE_MBCS define.
6338
6339- Issue #9642: Fix filesystem encoding initialization: use the ANSI code page
6340 on Windows if the mbcs codec is not available, and fail with a fatal error if
6341 we cannot get the locale encoding (if nl_langinfo(CODESET) is not available)
6342 instead of using UTF-8.
6343
6344- When a generator yields, do not retain the caller's exception state on the
6345 generator.
6346
6347- Issue #12475: Prevent generators from leaking their exception state into the
6348 caller's frame as they return for the last time.
6349
6350- Issue #12291: You can now load multiple marshalled objects from a stream,
6351 with other data interleaved between marshalled objects.
6352
6353- Issue #12356: When required positional or keyword-only arguments are not
Martin Panter7462b6492015-11-02 03:37:02 +00006354 given, produce an informative error message which includes the name(s) of the
Georg Brandl86dc7322012-10-01 18:58:45 +02006355 missing arguments.
6356
Martin Pantere26da7c2016-06-02 10:07:09 +00006357- Issue #12370: Fix super with no arguments when __class__ is overridden in the
Georg Brandl86dc7322012-10-01 18:58:45 +02006358 class body.
6359
6360- Issue #12084: os.stat on Windows now works properly with relative symbolic
6361 links when called from any directory.
6362
6363- Loosen type restrictions on the __dir__ method. __dir__ can now return any
6364 sequence, which will be converted to a list and sorted by dir().
6365
6366- Issue #12265: Make error messages produced by passing an invalid set of
6367 arguments to a function more informative.
6368
6369- Issue #12225: Still allow Python to build if Python is not in its hg repo or
6370 mercurial is not installed.
6371
6372- Issue #1195: my_fgets() now always clears errors before calling fgets(). Fix
6373 the following case: sys.stdin.read() stopped with CTRL+d (end of file),
6374 raw_input() interrupted by CTRL+c.
6375
6376- Issue #12216: Allow unexpected EOF errors to happen on any line of the file.
6377
6378- Issue #12199: The TryExcept and TryFinally and AST nodes have been unified
6379 into a Try node.
6380
6381- Issue #9670: Increase the default stack size for secondary threads on
6382 Mac OS X and FreeBSD to reduce the chances of a crash instead of a
6383 "maximum recursion depth" RuntimeError exception.
6384 (patch by Ronald Oussoren)
6385
6386- Issue #12106: The use of the multiple-with shorthand syntax is now reflected
6387 in the AST.
6388
6389- Issue #12190: Try to use the same filename object when compiling unmarshalling
6390 a code objects in the same file.
6391
6392- Issue #12166: Move implementations of dir() specialized for various types into
6393 the __dir__() methods of those types.
6394
6395- Issue #5715: In socketserver, close the server socket in the child process.
6396
6397- Correct lookup of __dir__ on objects. Among other things, this causes errors
6398 besides AttributeError found on lookup to be propagated.
6399
6400- Issue #12060: Use sig_atomic_t type and volatile keyword in the signal
6401 module. Patch written by Charles-François Natali.
6402
6403- Issue #1746656: Added the if_nameindex, if_indextoname, if_nametoindex
6404 methods to the socket module.
6405
6406- Issue #12044: Fixed subprocess.Popen when used as a context manager to
6407 wait for the process to end when exiting the context to avoid unintentionally
6408 leaving zombie processes around.
6409
6410- Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c,
6411 clear the end-of-file indicator after CTRL+d.
6412
6413- Issue #1856: Avoid crashes and lockups when daemon threads run while the
6414 interpreter is shutting down; instead, these threads are now killed when
6415 they try to take the GIL.
6416
6417- Issue #9756: When calling a method descriptor or a slot wrapper descriptor,
6418 the check of the object type doesn't read the __class__ attribute anymore.
6419 Fix a crash if a class override its __class__ attribute (e.g. a proxy of the
6420 str type). Patch written by Andreas Stührk.
6421
6422- Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_*
6423 APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch
6424 by Charles-François Natali.
6425
6426- Issue #10914: Initialize correctly the filesystem codec when creating a new
6427 subinterpreter to fix a bootstrap issue with codecs implemented in Python, as
6428 the ISO-8859-15 codec.
6429
6430- Issue #11918: OS/2 and VMS are no more supported because of the lack of
6431 maintainer.
6432
6433- Issue #6780: fix starts/endswith error message to mention that tuples are
6434 accepted too.
6435
6436- Issue #5057: fix a bug in the peepholer that led to non-portable pyc files
6437 between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP
6438 chars (e.g. "\U00012345"[0]).
6439
6440- Issue #11845: Fix typo in rangeobject.c that caused a crash in
6441 compute_slice_indices. Patch by Daniel Urban.
6442
6443- Issue #5673: Added a `timeout` keyword argument to subprocess.Popen.wait,
6444 subprocess.Popen.communicated, subprocess.call, subprocess.check_call, and
6445 subprocess.check_output. If the blocking operation takes more than `timeout`
6446 seconds, the `subprocess.TimeoutExpired` exception is raised.
6447
6448- Issue #11650: PyOS_StdioReadline() retries fgets() if it was interrupted
6449 (EINTR), for example if the program is stopped with CTRL+z on Mac OS X. Patch
6450 written by Charles-Francois Natali.
6451
6452- Issue #9319: Include the filename in "Non-UTF8 code ..." syntax error.
6453
6454- Issue #10785: Store the filename as Unicode in the Python parser.
6455
6456- Issue #11619: _PyImport_LoadDynamicModule() doesn't encode the path to bytes
6457 on Windows.
6458
6459- Issue #10998: Remove mentions of -Q, sys.flags.division_warning and
6460 Py_DivisionWarningFlag left over from Python 2.
6461
6462- Issue #11244: Remove an unnecessary peepholer check that was preventing
6463 negative zeros from being constant-folded properly.
6464
6465- Issue #11395: io.FileIO().write() clamps the data length to 32,767 bytes on
6466 Windows if the file is a TTY to workaround a Windows bug. The Windows console
6467 returns an error (12: not enough space error) on writing into stdout if
6468 stdout mode is binary and the length is greater than 66,000 bytes (or less,
6469 depending on heap usage).
6470
6471- Issue #11320: fix bogus memory management in Modules/getpath.c, leading to
6472 a possible crash when calling Py_SetPath().
6473
6474- Issue #11432: A bug was introduced in subprocess.Popen on posix systems with
6475 3.2.0 where the stdout or stderr file descriptor being the same as the stdin
6476 file descriptor would raise an exception. webbrowser.open would fail. fixed.
6477
6478- Issue #9856: Change object.__format__ with a non-empty format string
6479 to be a DeprecationWarning. In 3.2 it was a PendingDeprecationWarning.
6480 In 3.4 it will be a TypeError.
6481
6482- Issue #11244: The peephole optimizer is now able to constant-fold
6483 arbitrarily complex expressions. This also fixes a 3.2 regression where
6484 operations involving negative numbers were not constant-folded.
6485
6486- Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when
6487 there are many tags (e.g. when using mq). Patch by Nadeem Vawda.
6488
6489- Issue #11335: Fixed a memory leak in list.sort when the key function
6490 throws an exception.
6491
6492- Issue #8923: When a string is encoded to UTF-8 in strict mode, the result is
6493 cached into the object. Examples: str.encode(), str.encode('utf-8'),
6494 PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString(unicode, "utf-8",
6495 NULL).
6496
Georg Brandl86dc7322012-10-01 18:58:45 +02006497- Issue #10829: Refactor PyUnicode_FromFormat(), use the same function to parse
6498 the format string in the 3 steps, fix crashs on invalid format strings.
6499
6500- Issue #13007: whichdb should recognize gdbm 1.9 magic numbers.
6501
Georg Brandl86dc7322012-10-01 18:58:45 +02006502- Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with
6503 a buffer struct having a NULL data pointer.
6504
6505- Issue #11272: On Windows, input() strips '\r' (and not only '\n'), and
6506 sys.stdin uses universal newline (replace '\r\n' by '\n').
6507
R David Murray4d289a22012-10-16 21:54:12 -04006508- Issue #11828: startswith and endswith now accept None as slice index.
Georg Brandl86dc7322012-10-01 18:58:45 +02006509 Patch by Torsten Becker.
6510
Georg Brandl86dc7322012-10-01 18:58:45 +02006511- Issue #11168: Remove filename debug variable from PyEval_EvalFrameEx().
6512 It encoded the Unicode filename to UTF-8, but the encoding fails on
6513 undecodable filename (on surrogate characters) which raises an unexpected
6514 UnicodeEncodeError on recursion limit.
6515
6516- Issue #11187: Remove bootstrap code (use ASCII) of
6517 PyUnicode_AsEncodedString(), it was replaced by a better fallback (use the
6518 locale encoding) in PyUnicode_EncodeFSDefault().
6519
6520- Check for NULL result in PyType_FromSpec.
6521
6522- Issue #10516: New copy() and clear() methods for lists and bytearrays.
6523
6524- Issue #11386: bytearray.pop() now throws IndexError when the bytearray is
6525 empty, instead of OverflowError.
6526
6527- Issue #12380: The rjust, ljust and center methods of bytes and bytearray
6528 now accept a bytearray argument.
6529
6530Library
6531-------
6532
6533- Issue #14195: An issue that caused weakref.WeakSet instances to incorrectly
6534 return True for a WeakSet instance 'a' in both 'a < a' and 'a > a' has been
6535 fixed.
6536
6537- Issue #14166: Pickler objects now have an optional ``dispatch_table``
Martin Panterc04fb562016-02-10 05:44:01 +00006538 attribute which allows setting custom per-pickler reduction functions.
Georg Brandl86dc7322012-10-01 18:58:45 +02006539 Patch by sbt.
6540
Martin Panter6245cb32016-04-15 02:14:19 +00006541- Issue #14177: marshal.loads() now raises TypeError when given a unicode
Georg Brandl86dc7322012-10-01 18:58:45 +02006542 string. Patch by Guilherme Gonçalves.
6543
6544- Issue #13550: Remove the debug machinery from the threading module: remove
6545 verbose arguments from all threading classes and functions.
6546
6547- Issue #14159: Fix the len() of weak containers (WeakSet, WeakKeyDictionary,
6548 WeakValueDictionary) to return a better approximation when some objects
6549 are dead or dying. Moreover, the implementation is now O(1) rather than
6550 O(n).
6551
Georg Brandl86dc7322012-10-01 18:58:45 +02006552- Issue #11841: Fix comparison bug with 'rc' versions in packaging.version.
6553 Patch by Filip Gruszczyński.
6554
Georg Brandl86dc7322012-10-01 18:58:45 +02006555- Issue #6884: Fix long-standing bugs with MANIFEST.in parsing in distutils
6556 on Windows. Also fixed in packaging.
6557
6558- Issue #8033: sqlite3: Fix 64-bit integer handling in user functions
6559 on 32-bit architectures. Initial patch by Philippe Devalkeneer.
6560
6561- HTMLParser is now able to handle slashes in the start tag.
6562
6563- Issue #13641: Decoding functions in the base64 module now accept ASCII-only
6564 unicode strings. Patch by Catalin Iacob.
6565
6566- Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a
6567 new importlib.invalidate_caches() function.
6568
6569- Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in
6570 SimpleXMLRPCServer upon malformed POST request.
6571
6572- Issue #13961: Move importlib over to using os.replace() for atomic renaming.
6573
6574- Do away with ambiguous level values (as suggested by PEP 328) in
6575 importlib.__import__() by raising ValueError when level < 0.
6576
6577- Issue #2489: pty.spawn could consume 100% cpu when it encountered an EOF.
6578
6579- Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert().
6580
6581- Issue #13777: Add PF_SYSTEM sockets on OS X.
6582 Patch by Michael Goderbauer.
6583
6584- Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
6585 Patch by Suman Saha.
6586
6587- Issue #1326113: distutils' and packaging's build_ext commands option now
6588 correctly parses multiple values (separated by whitespace or commas) given
6589 to their --libraries option.
6590
6591- Issue #10287: nntplib now queries the server's CAPABILITIES first before
6592 sending MODE READER, and only sends it if not already in READER mode.
6593 Patch by Hynek Schlawack.
6594
6595- Issue #13993: HTMLParser is now able to handle broken end tags when
6596 strict=False.
6597
6598- Issue #13930: lib2to3 now supports writing converted output files to another
6599 directory tree as well as copying unchanged files and altering the file
6600 suffix.
6601
6602- Issue #9750: Fix sqlite3.Connection.iterdump on tables and fields
6603 with a name that is a keyword or contains quotes. Patch by Marko
6604 Kohtala.
6605
6606- Issue #10287: nntplib now queries the server's CAPABILITIES again after
6607 authenticating (since the result may change, according to RFC 4643).
6608 Patch by Hynek Schlawack.
6609
Georg Brandl86dc7322012-10-01 18:58:45 +02006610- Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building
6611 Distutils-based packages with C extension modules may fail because
6612 Apple has removed gcc-4.2, the version used to build python.org
6613 64-bit/32-bit Pythons. If the user does not explicitly override
6614 the default C compiler by setting the CC environment variable,
6615 Distutils will now attempt to compile extension modules with clang
6616 if gcc-4.2 is required but not found. Also as a convenience, if
6617 the user does explicitly set CC, substitute its value as the default
6618 compiler in the Distutils LDSHARED configuration variable for OS X.
6619 (Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u
6620 SDK, neither of which are available in Xcode 4. This change does not
6621 attempt to override settings to support their use with Xcode 4.)
6622
6623- Issue #13960: HTMLParser is now able to handle broken comments when
6624 strict=False.
6625
Georg Brandl86dc7322012-10-01 18:58:45 +02006626- When '' is a path (e.g. in sys.path), make sure __file__ uses the current
6627 working directory instead of '' in importlib.
6628
6629- Issue #13609: Add two functions to query the terminal size:
6630 os.get_terminal_size (low level) and shutil.get_terminal_size (high level).
6631 Patch by Zbigniew Jędrzejewski-Szmek.
6632
6633- Issue #13845: On Windows, time.time() now uses GetSystemTimeAsFileTime()
6634 instead of ftime() to have a resolution of 100 ns instead of 1 ms (the clock
6635 accuracy is between 0.5 ms and 15 ms).
6636
6637- Issue #13846: Add time.monotonic(), monotonic clock.
6638
6639- Issue #8184: multiprocessing: On Windows, don't set SO_REUSEADDR on
6640 Connection sockets, and set FILE_FLAG_FIRST_PIPE_INSTANCE on named pipes, to
6641 make sure two listeners can't bind to the same socket/pipe (or any existing
6642 socket/pipe).
6643
Georg Brandl86dc7322012-10-01 18:58:45 +02006644- Issue #10811: Fix recursive usage of cursors. Instead of crashing,
6645 raise a ProgrammingError now.
6646
Georg Brandl86dc7322012-10-01 18:58:45 +02006647- Issue #13734: Add os.fwalk(), a directory walking function yielding file
6648 descriptors.
6649
6650- Issue #2945: Make the distutils upload command aware of bdist_rpm products.
6651
6652- Issue #13712: pysetup create should not convert package_data to extra_files.
6653
6654- Issue #11805: package_data in setup.cfg should allow more than one value.
6655
Georg Brandl86dc7322012-10-01 18:58:45 +02006656- Issue #13676: Handle strings with embedded zeros correctly in sqlite3.
6657
Georg Brandl86dc7322012-10-01 18:58:45 +02006658- Issue #8828: Add new function os.replace(), for cross-platform renaming
6659 with overwriting.
6660
6661- Issue #13848: open() and the FileIO constructor now check for NUL
6662 characters in the file name. Patch by Hynek Schlawack.
6663
6664- Issue #13806: The size check in audioop decompression functions was too
6665 strict and could reject valid compressed data. Patch by Oleg Plakhotnyuk.
6666
6667- Issue #13812: When a multiprocessing Process child raises an exception,
6668 flush stderr after printing the exception traceback.
6669
6670- Issue #13885: CVE-2011-3389: the _ssl module would always disable the CBC
6671 IV attack countermeasure.
6672
6673- Issue #13847: time.localtime() and time.gmtime() now raise an OSError instead
6674 of ValueError on failure. time.ctime() and time.asctime() now raises an
6675 OSError if localtime() failed. time.clock() now raises a RuntimeError if the
6676 processor time used is not available or its value cannot be represented
6677
Georg Brandl86dc7322012-10-01 18:58:45 +02006678- Issue #13772: In os.symlink() under Windows, do not try to guess the link
6679 target's type (file or directory). The detection was buggy and made the
6680 call non-atomic (therefore prone to race conditions).
6681
6682- Issue #6631: Disallow relative file paths in urllib urlopen methods.
6683
6684- Issue #13722: Avoid silencing ImportErrors when initializing the codecs
6685 registry.
6686
6687- Issue #13781: Fix GzipFile bug that caused an exception to be raised when
6688 opening for writing using a fileobj returned by os.fdopen().
6689
6690- Issue #13803: Under Solaris, distutils doesn't include bitness
6691 in the directory name.
6692
6693- Issue #10278: Add time.wallclock() function, monotonic clock.
6694
6695- Issue #13809: Fix regression where bz2 module wouldn't work when threads are
6696 disabled. Original patch by Amaury Forgeot d'Arc.
6697
6698- Issue #13589: Fix some serialization primitives in the aifc module.
6699 Patch by Oleg Plakhotnyuk.
6700
6701- Issue #13642: Unquote before b64encoding user:password during Basic
6702 Authentication. Patch contributed by Joonas Kuorilehto.
6703
Georg Brandl86dc7322012-10-01 18:58:45 +02006704- Issue #12364: Fix a hang in concurrent.futures.ProcessPoolExecutor.
6705 The hang would occur when retrieving the result of a scheduled future after
6706 the executor had been shut down.
6707
6708- Issue #13502: threading: Fix a race condition in Event.wait() that made it
6709 return False when the event was set and cleared right after.
6710
6711- Issue #9993: When the source and destination are on different filesystems,
6712 and the source is a symlink, shutil.move() now recreates a symlink on the
6713 destination instead of copying the file contents. Patch by Jonathan Niehof
6714 and Hynek Schlawack.
6715
6716- Issue #12926: Fix a bug in tarfile's link extraction.
6717
6718- Issue #13696: Fix the 302 Relative URL Redirection problem.
6719
6720- Issue #13636: Weak ciphers are now disabled by default in the ssl module
6721 (except when SSLv2 is explicitly asked for).
6722
6723- Issue #12715: Add an optional symlinks argument to shutil functions
6724 (copyfile, copymode, copystat, copy, copy2). When that parameter is
6725 true, symlinks aren't dereferenced and the operation instead acts on the
6726 symlink itself (or creates one, if relevant). Patch by Hynek Schlawack.
6727
6728- Add a flags parameter to select.epoll.
6729
Georg Brandl86dc7322012-10-01 18:58:45 +02006730- Issue #13626: Add support for SSL Diffie-Hellman key exchange, through the
6731 SSLContext.load_dh_params() method and the ssl.OP_SINGLE_DH_USE option.
6732
6733- Issue #11006: Don't issue low level warning in subprocess when pipe2() fails.
6734
6735- Issue #13620: Support for Chrome browser in webbrowser. Patch contributed
6736 by Arnaud Calmettes.
6737
6738- Issue #11829: Fix code execution holes in inspect.getattr_static for
6739 metaclasses with metaclasses. Patch by Andreas Stührk.
6740
6741- Issue #12708: Add starmap() and starmap_async() methods (similar to
6742 itertools.starmap()) to multiprocessing.Pool. Patch by Hynek Schlawack.
6743
6744- Issue #1785: Fix inspect and pydoc with misbehaving descriptors.
6745
6746- Issue #13637: "a2b" functions in the binascii module now accept ASCII-only
6747 unicode strings.
6748
6749- Issue #13634: Add support for querying and disabling SSL compression.
6750
6751- Issue #13627: Add support for SSL Elliptic Curve-based Diffie-Hellman
6752 key exchange, through the SSLContext.set_ecdh_curve() method and the
6753 ssl.OP_SINGLE_ECDH_USE option.
6754
6755- Issue #13635: Add ssl.OP_CIPHER_SERVER_PREFERENCE, so that SSL servers
6756 choose the cipher based on their own preferences, rather than on the
6757 client's.
6758
6759- Issue #11813: Fix inspect.getattr_static for modules. Patch by Andreas
6760 Stührk.
6761
6762- Issue #7502: Fix equality comparison for DocTestCase instances. Patch by
6763 Cédric Krier.
6764
6765- Issue #11870: threading: Properly reinitialize threads internal locks and
6766 condition variables to avoid deadlocks in child processes.
6767
6768- Issue #8035: urllib: Fix a bug where the client could remain stuck after a
6769 redirection or an error.
6770
6771- Issue #13560: os.strerror() now uses the current locale encoding instead of
6772 UTF-8.
6773
Georg Brandl86dc7322012-10-01 18:58:45 +02006774- Issue #8373: The filesystem path of AF_UNIX sockets now uses the filesystem
6775 encoding and the surrogateescape error handler, rather than UTF-8. Patch
6776 by David Watson.
6777
6778- Issue #10350: Read and save errno before calling a function which might
6779 overwrite it. Original patch by Hallvard B Furuseth.
6780
6781- Issue #11610: Introduce a more general way to declare abstract properties.
6782
6783- Issue #13591: A bug in importlib has been fixed that caused import_module
6784 to load a module twice.
6785
Martin Panter4e525582016-05-22 03:01:52 +00006786- Issue #13449: sched.scheduler.run() method has a new "blocking" parameter which
Georg Brandl86dc7322012-10-01 18:58:45 +02006787 when set to False makes run() execute the scheduled events due to expire
6788 soonest (if any) and then return. Patch by Giampaolo Rodolà.
6789
Martin Panter4e525582016-05-22 03:01:52 +00006790- Issue #8684: sched.scheduler class can be safely used in multi-threaded
Georg Brandl86dc7322012-10-01 18:58:45 +02006791 environments. Patch by Josiah Carlson and Giampaolo Rodolà.
6792
6793- Alias resource.error to OSError ala PEP 3151.
6794
6795- Issue #5689: Add support for lzma compression to the tarfile module.
6796
6797- Issue #13248: Turn 3.2's PendingDeprecationWarning into 3.3's
6798 DeprecationWarning. It covers 'cgi.escape', 'importlib.abc.PyLoader',
6799 'importlib.abc.PyPycLoader', 'nntplib.NNTP.xgtitle', 'nntplib.NNTP.xpath',
6800 and private attributes of 'smtpd.SMTPChannel'.
6801
Victor Stinner554fd082014-03-17 22:33:49 +01006802- Issue #5905, Issue #13560: time.strftime() is now using the current locale
Georg Brandl86dc7322012-10-01 18:58:45 +02006803 encoding, instead of UTF-8, if the wcsftime() function is not available.
6804
Georg Brandl86dc7322012-10-01 18:58:45 +02006805- Issue #13464: Add a readinto() method to http.client.HTTPResponse. Patch
6806 by Jon Kuhn.
6807
6808- tarfile.py: Correctly detect bzip2 compressed streams with blocksizes
6809 other than 900k.
6810
6811- Issue #13439: Fix many errors in turtle docstrings.
6812
6813- Issue #6715: Add a module 'lzma' for compression using the LZMA algorithm.
6814 Thanks to Per Øyvind Karlsen for the initial implementation.
6815
6816- Issue #13487: Make inspect.getmodule robust against changes done to
6817 sys.modules while it is iterating over it.
6818
6819- Issue #12618: Fix a bug that prevented py_compile from creating byte
6820 compiled files in the current directory. Initial patch by Sjoerd de Vries.
6821
6822- Issue #13444: When stdout has been closed explicitly, we should not attempt
6823 to flush it at shutdown and print an error.
6824
6825- Issue #12567: The curses module uses Unicode functions for Unicode arguments
6826 when it is linked to the ncurses library. It encodes also Unicode strings to
6827 the locale encoding instead of UTF-8.
6828
6829- Issue #12856: Ensure child processes do not inherit the parent's random
6830 seed for filename generation in the tempfile module. Patch by Brian
6831 Harring.
6832
6833- Issue #9957: SpooledTemporaryFile.truncate() now accepts an optional size
6834 parameter, as other file-like objects. Patch by Ryan Kelly.
6835
6836- Issue #13458: Fix a memory leak in the ssl module when decoding a
6837 certificate with a subjectAltName. Patch by Robert Xiao.
6838
6839- Issue #13415: os.unsetenv() doesn't ignore errors anymore.
6840
6841- Issue #13245: sched.scheduler class constructor's timefunc and
6842 delayfunct parameters are now optional.
6843 scheduler.enter and scheduler.enterabs methods gained a new kwargs parameter.
6844 Patch contributed by Chris Clark.
6845
6846- Issue #12328: Under Windows, refactor handling of Ctrl-C events and
6847 make _multiprocessing.win32.WaitForMultipleObjects interruptible when
6848 the wait_flag parameter is false. Patch by sbt.
6849
6850- Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is
6851 raised when the wrapped raw file is non-blocking and the write would block.
6852 Previous code assumed that the raw write() would raise BlockingIOError, but
6853 RawIOBase.write() is defined to returned None when the call would block.
6854 Patch by sbt.
6855
6856- Issue #13358: HTMLParser now calls handle_data only once for each CDATA.
6857
6858- Issue #4147: minidom's toprettyxml no longer adds whitespace around a text
6859 node when it is the only child of an element. Initial patch by Dan
6860 Kenigsberg.
6861
6862- Issue #13374: The Windows bytes API has been deprecated in the os module. Use
6863 Unicode filenames instead of bytes filenames to not depend on the ANSI code
6864 page anymore and to support any filename.
6865
6866- Issue #13297: Use bytes type to send and receive binary data through XMLRPC.
6867
6868- Issue #6397: Support "/dev/poll" polling objects in select module,
6869 under Solaris & derivatives.
6870
6871- Issues #1745761, #755670, #13357, #12629, #1200313: HTMLParser now correctly
6872 handles non-valid attributes, including adjacent and unquoted attributes.
6873
6874- Issue #13193: Fix distutils.filelist.FileList and packaging.manifest.Manifest
6875 under Windows.
6876
6877- Issue #13384: Remove unnecessary __future__ import in Lib/random.py
6878
6879- Issue #13149: Speed up append-only StringIO objects.
6880
6881- Issue #13373: multiprocessing.Queue.get() could sometimes block indefinitely
6882 when called with a timeout. Patch by Arnaud Ysmal.
6883
6884- Issue #13254: Fix Maildir initialization so that maildir contents
6885 are read correctly.
6886
6887- Issue #3067: locale.setlocale() now raises TypeError if the second
6888 argument is an invalid iterable. Its documentation and docstring
6889 were also updated. Initial patch by Jyrki Pulliainen.
6890
6891- Issue #13140: Fix the daemon_threads attribute of ThreadingMixIn.
6892
6893- Issue #13339: Fix compile error in posixmodule.c due to missing semicolon.
6894 Thanks to Robert Xiao.
6895
6896- Byte compilation in packaging is now isolated from the calling Python -B or
6897 -O options, instead of being disallowed under -B or buggy under -O.
6898
6899- Issue #10570: curses.putp() and curses.tparm() are now expecting a byte
6900 string, instead of a Unicode string.
6901
6902- Issue #13295: http.server now produces valid HTML 4.01 strict.
6903
6904- Issue #2892: preserve iterparse events in case of SyntaxError.
6905
6906- Issue #13287: urllib.request and urllib.error now contains an __all__
6907 attribute to expose only relevant classes and functions. Patch by Florent
6908 Xicluna.
6909
6910- Issue #670664: Fix HTMLParser to correctly handle the content of
6911 ``<script>...</script>`` and ``<style>...</style>``.
6912
6913- Issue #10817: Fix urlretrieve function to raise ContentTooShortError even
6914 when reporthook is None. Patch by Jyrki Pulliainen.
6915
Georg Brandl86dc7322012-10-01 18:58:45 +02006916- Fix the xmlrpc.client user agent to return something similar to
6917 urllib.request user agent: "Python-xmlrpc/3.3".
6918
6919- Issue #13293: Better error message when trying to marshal bytes using
6920 xmlrpc.client.
6921
6922- Issue #13291: NameError in xmlrpc package.
6923
6924- Issue #13258: Use callable() built-in in the standard library.
6925
6926- Issue #13273: fix a bug that prevented HTMLParser to properly detect some
6927 tags when strict=False.
6928
6929- Issue #11183: Add finer-grained exceptions to the ssl module, so that
6930 you don't have to inspect the exception's attributes in the common case.
6931
6932- Issue #13216: Add cp65001 codec, the Windows UTF-8 (CP_UTF8).
6933
6934- Issue #13226: Add RTLD_xxx constants to the os module. These constants can be
6935 used with sys.setdlopenflags().
6936
6937- Issue #10278: Add clock_getres(), clock_gettime() and CLOCK_xxx constants to
6938 the time module. time.clock_gettime(time.CLOCK_MONOTONIC) provides a
6939 monotonic clock
6940
6941- Issue #10332: multiprocessing: fix a race condition when a Pool is closed
6942 before all tasks have completed.
6943
6944- Issue #13255: wrong docstrings in array module.
6945
6946- Issue #8540: Remove deprecated Context._clamp attribute in Decimal module.
6947
R David Murray435ee1f2012-10-06 18:20:08 -04006948- Issue #13235: Added DeprecationWarning to logging.warn() method and function.
Georg Brandl86dc7322012-10-01 18:58:45 +02006949
6950- Issue #9168: now smtpd is able to bind privileged port.
6951
6952- Issue #12529: fix cgi.parse_header issue on strings with double-quotes and
6953 semicolons together. Patch by Ben Darnell and Petri Lehtinen.
6954
Martin Panter7462b6492015-11-02 03:37:02 +00006955- Issue #13227: functools.lru_cache() now has an option to distinguish
Georg Brandl86dc7322012-10-01 18:58:45 +02006956 calls with different argument types.
6957
6958- Issue #6090: zipfile raises a ValueError when a document with a timestamp
6959 earlier than 1980 is provided. Patch contributed by Petri Lehtinen.
6960
6961- Issue #13150: sysconfig no longer parses the Makefile and config.h files
6962 when imported, instead doing it at build time. This makes importing
6963 sysconfig faster and reduces Python startup time by 20%.
6964
6965- Issue #12448: smtplib now flushes stdout while running ``python -m smtplib``
6966 in order to display the prompt correctly.
6967
6968- Issue #12454: The mailbox module is now using ASCII, instead of the locale
R David Murray435ee1f2012-10-06 18:20:08 -04006969 encoding, to read and write .mh_sequences files.
Georg Brandl86dc7322012-10-01 18:58:45 +02006970
6971- Issue #13194: zlib.compressobj().copy() and zlib.decompressobj().copy() are
6972 now available on Windows.
6973
R David Murray435ee1f2012-10-06 18:20:08 -04006974- Issue #1673007: urllib.request now supports HEAD request via new method argument.
Georg Brandl86dc7322012-10-01 18:58:45 +02006975 Patch contributions by David Stanek, Patrick Westerhoff and Ezio Melotti.
6976
6977- Issue #12386: packaging does not fail anymore when writing the RESOURCES
6978 file.
6979
6980- Issue #13158: Fix decoding and encoding of GNU tar specific base-256 number
6981 fields in tarfile.
6982
6983- Issue #13025: mimetypes is now reading MIME types using the UTF-8 encoding,
6984 instead of the locale encoding.
6985
6986- Issue #10653: On Windows, use strftime() instead of wcsftime() because
6987 wcsftime() doesn't format time zone correctly.
6988
6989- Issue #13150: The tokenize module doesn't compile large regular expressions
6990 at startup anymore.
6991
6992- Issue #11171: Fix distutils.sysconfig.get_makefile_filename when Python was
6993 configured with different prefix and exec-prefix.
6994
6995- Issue #11254: Teach distutils and packaging to compile .pyc and .pyo files in
6996 PEP 3147-compliant __pycache__ directories.
6997
6998- Issue #7367: Fix pkgutil.walk_paths to skip directories whose
6999 contents cannot be read.
7000
7001- Issue #3163: The struct module gets new format characters 'n' and 'N'
7002 supporting C integer types ``ssize_t`` and ``size_t``, respectively.
7003
7004- Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale.
7005 Reported and diagnosed by Thomas Kluyver.
7006
7007- Issue #13087: BufferedReader.seek() now always raises UnsupportedOperation
7008 if the underlying raw stream is unseekable, even if the seek could be
7009 satisfied using the internal buffer. Patch by John O'Connor.
7010
7011- Issue #7689: Allow pickling of dynamically created classes when their
7012 metaclass is registered with copyreg. Patch by Nicolas M. Thiéry and Craig
7013 Citro.
7014
Georg Brandl86dc7322012-10-01 18:58:45 +02007015- Issue #13034: When decoding some SSL certificates, the subjectAltName
7016 extension could be unreported.
7017
Georg Brandl86dc7322012-10-01 18:58:45 +02007018- Issue #12306: Expose the runtime version of the zlib C library as a constant,
7019 ZLIB_RUNTIME_VERSION, in the zlib module. Patch by Torsten Landschoff.
7020
7021- Issue #12959: Add collections.ChainMap to collections.__all__.
7022
7023- Issue #8933: distutils' PKG-INFO files and packaging's METADATA files will
7024 now correctly report Metadata-Version: 1.1 instead of 1.0 if a Classifier or
7025 Download-URL field is present.
7026
7027- Issue #12567: Add curses.unget_wch() function. Push a character so the next
7028 get_wch() will return it.
7029
7030- Issue #9561: distutils and packaging now writes egg-info files using UTF-8,
7031 instead of the locale encoding.
7032
7033- Issue #8286: The distutils command sdist will print a warning message instead
7034 of crashing when an invalid path is given in the manifest template.
7035
7036- Issue #12841: tarfile unnecessarily checked the existence of numerical user
7037 and group ids on extraction. If one of them did not exist the respective id
7038 of the current user (i.e. root) was used for the file and ownership
7039 information was lost.
7040
7041- Issue #12888: Fix a bug in HTMLParser.unescape that prevented it to escape
7042 more than 128 entities. Patch by Peter Otten.
7043
7044- Issue #12878: Expose a __dict__ attribute on io.IOBase and its subclasses.
7045
Georg Brandl86dc7322012-10-01 18:58:45 +02007046- Issue #12494: On error, call(), check_call(), check_output() and
7047 getstatusoutput() functions of the subprocess module now kill the process,
7048 read its status (to avoid zombis) and close pipes.
7049
7050- Issue #12720: Expose low-level Linux extended file attribute functions in os.
7051
7052- Issue #10946: The distutils commands bdist_dumb, bdist_wininst and bdist_msi
7053 now respect a --skip-build option given to bdist. The packaging commands
7054 were fixed too.
7055
7056- Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments in
7057 the C pickle implementation.
7058
7059- Issue #11564: Avoid crashes when trying to pickle huge objects or containers
7060 (more than 2**31 items). Instead, in most cases, an OverflowError is raised.
7061
7062- Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
7063 greater than FD_SETSIZE.
7064
7065- Issue #12839: Fix crash in zlib module due to version mismatch.
7066 Fix by Richard M. Tew.
7067
7068- Issue #9923: The mailcap module now correctly uses the platform path
7069 separator for the MAILCAP environment variable on non-POSIX platforms.
7070
7071- Issue #12835: Follow up to #6560 that unconditionally prevents use of the
7072 unencrypted sendmsg/recvmsg APIs on SSL wrapped sockets. Patch by David
7073 Watson.
7074
7075- Issue #12803: SSLContext.load_cert_chain() now accepts a password argument
7076 to be used if the private key is encrypted. Patch by Adam Simpkins.
7077
7078- Issue #11657: Fix sending file descriptors over 255 over a multiprocessing
7079 Pipe.
7080
7081- Issue #12811: tabnanny.check() now promptly closes checked files. Patch by
7082 Anthony Briggs.
7083
7084- Issue #6560: The sendmsg/recvmsg API is now exposed by the socket module
7085 when provided by the underlying platform, supporting processing of
7086 ancillary data in pure Python code. Patch by David Watson and Heiko Wundram.
7087
7088- Issue #12326: On Linux, sys.platform doesn't contain the major version
7089 anymore. It is now always 'linux', instead of 'linux2' or 'linux3' depending
7090 on the Linux version used to build Python.
7091
7092- Issue #12213: Fix a buffering bug with interleaved reads and writes that
7093 could appear on BufferedRandom streams.
7094
7095- Issue #12778: Reduce memory consumption when JSON-encoding a large
7096 container of many small objects.
7097
7098- Issue #12650: Fix a race condition where a subprocess.Popen could leak
7099 resources (FD/zombie) when killed at the wrong time.
7100
7101- Issue #12744: Fix inefficient representation of integers between 2**31 and
7102 2**63 on systems with a 64-bit C "long".
7103
7104- Issue #12646: Add an 'eof' attribute to zlib.Decompress, to make it easier to
7105 detect truncated input streams.
7106
7107- Issue #11513: Fix exception handling ``tarfile.TarFile.gzopen()`` when
7108 the file cannot be opened.
7109
7110- Issue #12687: Fix a possible buffering bug when unpickling text mode
7111 (protocol 0, mostly) pickles.
7112
7113- Issue #10087: Fix the html output format of the calendar module.
7114
R David Murray3dc23d42012-10-06 16:30:46 -04007115- Issue #13121: add support for inplace math operators to collections.Counter.
7116
7117- Add support for unary plus and unary minus to collections.Counter.
Georg Brandl86dc7322012-10-01 18:58:45 +02007118
7119- Issue #12683: urlparse updated to include svn as schemes that uses relative
7120 paths. (svn from 1.5 onwards support relative path).
7121
7122- Issue #12655: Expose functions from sched.h in the os module: sched_yield(),
7123 sched_setscheduler(), sched_getscheduler(), sched_setparam(),
7124 sched_get_min_priority(), sched_get_max_priority(), sched_rr_get_interval(),
7125 sched_getaffinity(), sched_setaffinity().
7126
7127- Add ThreadError to threading.__all__.
7128
7129- Issues #11104, #8688: Fix the behavior of distutils' sdist command with
7130 manually-maintained MANIFEST files.
7131
7132- Issue #11281: smtplib.STMP gets source_address parameter, which adds the
7133 ability to bind to specific source address on a machine with multiple
7134 interfaces. Patch by Paulo Scardine.
7135
7136- Issue #12464: tempfile.TemporaryDirectory.cleanup() should not follow
7137 symlinks: fix it. Patch by Petri Lehtinen.
7138
7139- Issue #8887: "pydoc somebuiltin.somemethod" (or help('somebuiltin.somemethod')
7140 in Python code) now finds the doc of the method.
7141
R David Murrayd9c6ab42012-10-06 14:38:17 -04007142- Issue #10968: Remove indirection in threading. The public names (Event,
Georg Brandl86dc7322012-10-01 18:58:45 +02007143 Condition, etc.) used to be factory functions returning instances of hidden
R David Murrayd9c6ab42012-10-06 14:38:17 -04007144 classes (_Event, _Condition, etc.), because (if Guido recalls correctly) this
7145 code pre-dates the ability to subclass extension types. It is now possible
Victor Stinner554fd082014-03-17 22:33:49 +01007146 to inherit from these classes, without having to import the private
Georg Brandl86dc7322012-10-01 18:58:45 +02007147 underscored names like multiprocessing did.
7148
7149- Issue #9723: Add shlex.quote functions, to escape filenames and command
7150 lines.
7151
7152- Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime.
7153
7154- Issue #12514: Use try/finally to assure the timeit module restores garbage
7155 collections when it is done.
7156
7157- Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is
7158 given as a low fd, it gets overwritten.
7159
Georg Brandl86dc7322012-10-01 18:58:45 +02007160- Issue #12576: Fix urlopen behavior on sites which do not send (or obfuscates)
Victor Stinner554fd082014-03-17 22:33:49 +01007161 ``Connection: close`` header.
Georg Brandl86dc7322012-10-01 18:58:45 +02007162
7163- Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling.
7164
7165- Issue #1813: Fix codec lookup under Turkish locales.
7166
7167- Issue #12591: Improve support of "universal newlines" in the subprocess
7168 module: the piped streams can now be properly read from or written to.
7169
7170- Issue #12591: Allow io.TextIOWrapper to work with raw IO objects (without
7171 a read1() method), and add a *write_through* parameter to mandate
7172 unbuffered writes.
7173
7174- Issue #10883: Fix socket leaks in urllib.request when using FTP.
7175
7176- Issue #12592: Make Python build on OpenBSD 5 (and future major releases).
7177
7178- Issue #12372: POSIX semaphores are broken on AIX: don't use them.
7179
7180- Issue #12551: Provide a get_channel_binding() method on SSL sockets so as
7181 to get channel binding data for the current SSL session (only the
7182 "tls-unique" channel binding is implemented). This allows the implementation
7183 of certain authentication mechanisms such as SCRAM-SHA-1-PLUS. Patch by
7184 Jacek Konieczny.
7185
7186- Issue #665194: email.utils now has format_datetime and parsedate_to_datetime
7187 functions, allowing for round tripping of RFC2822 format dates.
7188
7189- Issue #12571: Add a plat-linux3 directory mirroring the plat-linux2
7190 directory, so that "import DLFCN" and other similar imports work on
7191 Linux 3.0.
7192
7193- Issue #7484: smtplib no longer puts <> around addresses in VRFY and EXPN
7194 commands; they aren't required and in fact postfix doesn't support that form.
7195
7196- Issue #12273: Remove ast.__version__. AST changes can be accounted for by
7197 checking sys.version_info or sys._mercurial.
7198
7199- Silence spurious "broken pipe" tracebacks when shutting down a
7200 ProcessPoolExecutor.
7201
7202- Fix potential resource leaks in concurrent.futures.ProcessPoolExecutor
7203 by joining all queues and processes when shutdown() is called.
7204
7205- Issue #11603: Fix a crash when __str__ is rebound as __repr__. Patch by
7206 Andreas Stührk.
7207
7208- Issue #11321: Fix a crash with multiple imports of the _pickle module when
7209 embedding Python. Patch by Andreas Stührk.
7210
7211- Issue #6755: Add get_wch() method to curses.window class. Patch by Iñigo
7212 Serna.
7213
7214- Add cgi.closelog() function to close the log file.
7215
7216- Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.
7217
Martin Panter7462b6492015-11-02 03:37:02 +00007218- Issue #4376: ctypes now supports nested structures in an endian different than
Georg Brandl86dc7322012-10-01 18:58:45 +02007219 the parent structure. Patch by Vlad Riscutia.
7220
7221- Raise ValueError when attempting to set the _CHUNK_SIZE attribute of a
7222 TextIOWrapper to a huge value, not TypeError.
7223
7224- Issue #12504: Close file handles in a timely manner in packaging.database.
7225 This fixes a bug with the remove (uninstall) feature on Windows.
7226
7227- Issues #12169 and #10510: Factor out code used by various packaging commands
7228 to make HTTP POST requests, and make sure it uses CRLF.
7229
7230- Issue #12016: Multibyte CJK decoders now resynchronize faster. They only
7231 ignore the first byte of an invalid byte sequence. For example,
7232 b'\xff\n'.decode('gb2312', 'replace') gives '\ufffd\n' instead of '\ufffd'.
7233
7234- Issue #12459: time.sleep() now raises a ValueError if the sleep length is
7235 negative, instead of an infinite sleep on Windows or raising an IOError on
7236 Linux for example, to have the same behaviour on all platforms.
7237
7238- Issue #12451: pydoc: html_getfile() now uses tokenize.open() to support
Martin Panter7462b6492015-11-02 03:37:02 +00007239 Python scripts using an encoding different than UTF-8 (read the coding cookie
Georg Brandl86dc7322012-10-01 18:58:45 +02007240 of the script).
7241
7242- Issue #12493: subprocess: Popen.communicate() now also handles EINTR errors
7243 if the process has only one pipe.
7244
7245- Issue #12467: warnings: fix a race condition if a warning is emitted at
7246 shutdown, if globals()['__file__'] is None.
7247
7248- Issue #12451: pydoc: importfile() now opens the Python script in binary mode,
7249 instead of text mode using the locale encoding, to avoid encoding issues.
7250
7251- Issue #12451: runpy: run_path() now opens the Python script in binary mode,
7252 instead of text mode using the locale encoding, to support other encodings
7253 than UTF-8 (scripts using the coding cookie).
7254
7255- Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
7256 of the text mode (using the locale encoding) to avoid encoding issues.
7257
7258- Issue #12147: Adjust the new-in-3.2 smtplib.send_message method for better
7259 conformance to the RFCs: correctly handle Sender and Resent- headers.
7260
7261- Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
7262 the garbage collector while the Heap lock is held.
7263
R David Murray8155ff42012-10-02 18:26:31 -04007264- Issue #12462: time.sleep() now immediately calls the (Python) signal handler
Georg Brandl86dc7322012-10-01 18:58:45 +02007265 if it is interrupted by a signal, instead of having to wait until the next
7266 instruction.
7267
7268- Issue #12442: new shutil.disk_usage function, providing total, used and free
7269 disk space statistics.
7270
7271- Issue #12451: The XInclude default loader of xml.etree now decodes files from
7272 UTF-8 instead of the locale encoding if the encoding is not specified. It now
7273 also opens XML files for the parser in binary mode instead of the text mode
7274 to avoid encoding issues.
7275
7276- Issue #12451: doctest.debug_script() doesn't create a temporary file
7277 anymore to avoid encoding issues.
7278
7279- Issue #12451: pydoc.synopsis() now reads the encoding cookie if available,
7280 to read the Python script from the right encoding.
7281
7282- Issue #12451: distutils now opens the setup script in binary mode to read the
7283 encoding cookie, instead of opening it in UTF-8.
7284
7285- Issue #9516: On Mac OS X, change Distutils to no longer globally attempt to
7286 check or set the MACOSX_DEPLOYMENT_TARGET environment variable for the
7287 interpreter process. This could cause failures in non-Distutils subprocesses
7288 and was unreliable since tests or user programs could modify the interpreter
Terry Jan Reedy8e7586b2013-03-11 18:38:13 -04007289 environment after Distutils set it. Instead, have Distutils set the
Georg Brandl86dc7322012-10-01 18:58:45 +02007290 deployment target only in the environment of each build subprocess. It is
7291 still possible to globally override the default by setting
7292 MACOSX_DEPLOYMENT_TARGET before launching the interpreter; its value must be
7293 greater or equal to the default value, the value with which the interpreter
7294 was built. Also, implement the same handling in packaging.
7295
7296- Issue #12422: In the copy module, don't store objects that are their own copy
7297 in the memo dict.
7298
7299- Issue #12303: Add sigwaitinfo() and sigtimedwait() to the signal module.
7300
7301- Issue #12404: Remove C89 incompatible code from mmap module. Patch by Akira
7302 Kitada.
7303
7304- Issue #1874: email now detects and reports as a defect the presence of
7305 any CTE other than 7bit, 8bit, or binary on a multipart.
7306
7307- Issue #12383: Fix subprocess module with env={}: don't copy the environment
7308 variables, start with an empty environment.
7309
7310- Issue #11637: Fix support for importing packaging setup hooks from the
7311 project directory.
7312
7313- Issue #6771: Moved the curses.wrapper function from the single-function
7314 wrapper module into __init__, eliminating the module. Since __init__ was
7315 already importing the function to curses.wrapper, there is no API change.
7316
7317- Issue #11584: email.header.decode_header no longer fails if the header
7318 passed to it is a Header object, and Header/make_header no longer fail
7319 if given binary unknown-8bit input.
7320
7321- Issue #11700: mailbox proxy object close methods can now be called multiple
7322 times without error.
7323
7324- Issue #11767: Correct file descriptor leak in mailbox's __getitem__ method.
7325
7326- Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP
7327 connection if its getresponse() method fails with a socket error. Patch
7328 written by Ezio Melotti.
7329
7330- Issue #12240: Allow multiple setup hooks in packaging's setup.cfg files.
7331 Original patch by Erik Bray.
7332
7333- Issue #9284: Allow inspect.findsource() to find the source of doctest
7334 functions.
7335
7336- Issue #11595: Fix assorted bugs in packaging.util.cfg_to_args, a
7337 compatibility helper for the distutils-packaging transition. Original patch
7338 by Erik Bray.
7339
7340- Issue #12287: In ossaudiodev, check that the device isn't closed in several
7341 methods.
7342
7343- Issue #12009: Fixed regression in netrc file comment handling.
7344
7345- Issue #12246: Warn and fail when trying to install a third-party project from
7346 an uninstalled Python (built in a source checkout). Original patch by
7347 Tshepang Lekhonkhobe.
7348
7349- Issue #10694: zipfile now ignores garbage at the end of a zipfile.
7350
7351- Issue #12283: Fixed regression in smtplib quoting of leading dots in DATA.
7352
7353- Issue #10424: Argparse now includes the names of the missing required
7354 arguments in the missing arguments error message.
7355
7356- Issue #12168: SysLogHandler now allows NUL termination to be controlled using
7357 a new 'append_nul' attribute on the handler.
7358
7359- Issue #11583: Speed up os.path.isdir on Windows by using GetFileAttributes
7360 instead of os.stat.
7361
7362- Issue #12021: Make mmap's read() method argument optional. Patch by Petri
7363 Lehtinen.
7364
7365- Issue #9205: concurrent.futures.ProcessPoolExecutor now detects killed
7366 children and raises BrokenProcessPool in such a situation. Previously it
7367 would reliably freeze/deadlock.
7368
7369- Issue #12040: Expose a new attribute ``sentinel`` on instances of
7370 ``multiprocessing.Process``. Also, fix Process.join() to not use polling
7371 anymore, when given a timeout.
7372
7373- Issue #11893: Remove obsolete internal wrapper class ``SSLFakeFile`` in the
7374 smtplib module. Patch by Catalin Iacob.
7375
7376- Issue #12080: Fix a Decimal.power() case that took an unreasonably long time
7377 to compute.
7378
7379- Issue #12221: Remove __version__ attributes from pyexpat, pickle, tarfile,
7380 pydoc, tkinter, and xml.parsers.expat. This were useless version constants
7381 left over from the Mercurial transition
7382
7383- Named tuples now work correctly with vars().
7384
7385- Issue #12085: Fix an attribute error in subprocess.Popen destructor if the
7386 constructor has failed, e.g. because of an undeclared keyword argument. Patch
7387 written by Oleg Oshmyan.
7388
7389- Issue #12028: Make threading._get_ident() public, rename it to
7390 threading.get_ident() and document it. This function was already used using
7391 _thread.get_ident().
7392
7393- Issue #12171: IncrementalEncoder.reset() of CJK codecs (multibytecodec) calls
7394 encreset() instead of decreset().
7395
7396- Issue #12218: Removed wsgiref.egg-info.
7397
7398- Issue #12196: Add pipe2() to the os module.
7399
7400- Issue #985064: Make plistlib more resilient to faulty input plists.
7401 Patch by Mher Movsisyan.
7402
7403- Issue #1625: BZ2File and bz2.decompress() now support multi-stream files.
7404 Initial patch by Nir Aides.
7405
7406- Issue #12175: BufferedReader.read(-1) now calls raw.readall() if available.
7407
7408- Issue #12175: FileIO.readall() now only reads the file position and size
7409 once.
7410
7411- Issue #12175: RawIOBase.readall() now returns None if read() returns None.
7412
7413- Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError
7414 if the file is closed.
7415
Victor Stinner554fd082014-03-17 22:33:49 +01007416- Issue #11109: New service_action method for BaseServer, used by ForkingMixin
R David Murray6e7bd652012-10-01 21:47:57 -04007417 class for cleanup. Initial Patch by Justin Warkentin.
Georg Brandl86dc7322012-10-01 18:58:45 +02007418
7419- Issue #12045: Avoid duplicate execution of command in
7420 ctypes.util._get_soname(). Patch by Sijin Joseph.
7421
7422- Issue #10818: Remove the Tk GUI and the serve() function of the pydoc module,
7423 pydoc -g has been deprecated in Python 3.2 and it has a new enhanced web
7424 server.
7425
7426- Issue #1441530: In imaplib, read the data in one chunk to speed up large
7427 reads and simplify code.
7428
7429- Issue #12070: Fix the Makefile parser of the sysconfig module to handle
7430 correctly references to "bogus variable" (e.g. "prefix=$/opt/python").
7431
7432- Issue #12100: Don't reset incremental encoders of CJK codecs at each call to
7433 their encode() method anymore, but continue to call the reset() method if the
7434 final argument is True.
7435
7436- Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl
7437 module.
7438
7439- Issue #6501: os.device_encoding() returns None on Windows if the application
7440 has no console.
7441
7442- Issue #12105: Add O_CLOEXEC to the os module.
7443
7444- Issue #12079: Decimal('Infinity').fma(Decimal('0'), (3.91224318126786e+19+0j))
7445 now raises TypeError (reflecting the invalid type of the 3rd argument) rather
7446 than Decimal.InvalidOperation.
7447
7448- Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore
7449 to be able to unload the module.
7450
7451- Add the packaging module, an improved fork of distutils (also known as
7452 distutils2).
7453
7454- Issue #12065: connect_ex() on an SSL socket now returns the original errno
7455 when the socket's timeout expires (it used to return None).
7456
7457- Issue #8809: The SMTP_SSL constructor and SMTP.starttls() now support
7458 passing a ``context`` argument pointing to an ssl.SSLContext instance.
7459 Patch by Kasun Herath.
7460
Georg Brandl86dc7322012-10-01 18:58:45 +02007461- Issue #9516: Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET
7462 is set in shell.
7463
7464- Issue #8650: Make zlib module 64-bit clean. compress(), decompress() and
7465 their incremental counterparts now raise OverflowError if given an input
7466 larger than 4GB, instead of silently truncating the input and returning
7467 an incorrect result.
7468
7469- Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail
7470 attribute when called without a max_length argument.
7471
7472- Issue #12062: Fix a flushing bug when doing a certain type of I/O sequence
7473 on a file opened in read+write mode (namely: reading, seeking a bit forward,
7474 writing, then seeking before the previous write but still within buffered
7475 data, and writing again).
7476
7477- Issue #9971: Write an optimized implementation of BufferedReader.readinto().
7478 Patch by John O'Connor.
7479
Georg Brandl86dc7322012-10-01 18:58:45 +02007480- Issue #11799: urllib.request Authentication Handlers will raise a ValueError
7481 when presented with an unsupported Authentication Scheme. Patch contributed
7482 by Yuval Greenfield.
7483
7484- Issue #10419, #6011: build_scripts command of distutils handles correctly
7485 non-ASCII path (path to the Python executable). Open and write the script in
7486 binary mode, but ensure that the shebang is decodable from UTF-8 and from the
7487 encoding of the script.
7488
Martin Panterc04fb562016-02-10 05:44:01 +00007489- Issue #8498: In socket.accept(), allow specifying 0 as a backlog value in
Georg Brandl86dc7322012-10-01 18:58:45 +02007490 order to accept exactly one connection. Patch by Daniel Evers.
7491
7492- Issue #12011: signal.signal() and signal.siginterrupt() raise an OSError,
7493 instead of a RuntimeError: OSError has an errno attribute.
7494
7495- Issue #3709: add a flush_headers method to BaseHTTPRequestHandler, which
7496 manages the sending of headers to output stream and flushing the internal
7497 headers buffer. Patch contribution by Andrew Schaaf
7498
7499- Issue #11743: Rewrite multiprocessing connection classes in pure Python.
7500
7501- Issue #11164: Stop trying to use _xmlplus in the xml module.
7502
7503- Issue #11888: Add log2 function to math module. Patch written by Mark
7504 Dickinson.
7505
7506- Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional.
7507
7508- Issue #8407: The signal handler writes the signal number as a single byte
7509 instead of a nul byte into the wakeup file descriptor. So it is possible to
7510 wait more than one signal and know which signals were raised.
7511
7512- Issue #8407: Add pthread_kill(), sigpending() and sigwait() functions to the
7513 signal module.
7514
7515- Issue #11927: SMTP_SSL now uses port 465 by default as documented. Patch
7516 by Kasun Herath.
7517
7518- Issue #12002: ftplib's abort() method raises TypeError.
7519
7520- Issue #11916: Add a number of MacOSX specific definitions to the errno module.
7521 Patch by Pierre Carrier.
7522
7523- Issue #11999: fixed sporadic sync failure mailbox.Maildir due to its trying to
7524 detect mtime changes by comparing to the system clock instead of to the
7525 previous value of the mtime.
7526
7527- Issue #11072: added MLSD command (RFC-3659) support to ftplib.
7528
7529- Issue #8808: The IMAP4_SSL constructor now allows passing an SSLContext
7530 parameter to control parameters of the secure channel. Patch by Sijin
7531 Joseph.
7532
7533- ntpath.samefile failed to notice that "a.txt" and "A.TXT" refer to the same
7534 file on Windows XP. As noticed in issue #10684.
7535
7536- Issue #12000: When a SSL certificate has a subjectAltName without any
7537 dNSName entry, ssl.match_hostname() should use the subject's commonName.
7538 Patch by Nicolas Bareil.
7539
7540- Issue #10775: assertRaises, assertRaisesRegex, assertWarns, and
7541 assertWarnsRegex now accept a keyword argument 'msg' when used as context
7542 managers. Initial patch by Winston Ewert.
7543
7544- Issue #10684: shutil.move used to delete a folder on case insensitive
7545 filesystems when the source and destination name where the same except
7546 for the case.
7547
7548- Issue #11647: objects created using contextlib.contextmanager now support
7549 more than one call to the function when used as a decorator. Initial patch
7550 by Ysj Ray.
7551
7552- Issue #11930: Removed deprecated time.accept2dyear variable.
7553 Removed year >= 1000 restriction from datetime.strftime.
7554
7555- logging: don't define QueueListener if Python has no thread support.
7556
7557- functools.cmp_to_key() now works with collections.Hashable().
7558
7559- Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get
7560 around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso.
7561
7562- Issue #8407: Add signal.pthread_sigmask() function to fetch and/or change the
7563 signal mask of the calling thread.
7564
7565- Issue #11858: configparser.ExtendedInterpolation expected lower-case section
7566 names.
7567
7568- Issue #11324: ConfigParser(interpolation=None) now works correctly.
7569
7570- Issue #11811: ssl.get_server_certificate() is now IPv6-compatible. Patch
7571 by Charles-François Natali.
7572
7573- Issue #11763: don't use difflib in TestCase.assertMultiLineEqual if the
7574 strings are too long.
7575
7576- Issue #11236: getpass.getpass responds to ctrl-c or ctrl-z on terminal.
7577
7578- Issue #11856: Speed up parsing of JSON numbers.
7579
7580- Issue #11005: threading.RLock()._release_save() raises a RuntimeError if the
7581 lock was not acquired.
7582
7583- Issue #11258: Speed up ctypes.util.find_library() under Linux by a factor
7584 of 5 to 10. Initial patch by Jonas H.
7585
7586- Issue #11382: Trivial system calls, such as dup() or pipe(), needn't
7587 release the GIL. Patch by Charles-François Natali.
7588
7589- Issue #11223: Add threading._info() function providing informations about
7590 the thread implementation.
7591
7592- Issue #11731: simplify/enhance email parser/generator API by introducing
7593 policy objects.
7594
7595- Issue #11768: The signal handler of the signal module only calls
7596 Py_AddPendingCall() for the first signal to fix a deadlock on reentrant or
7597 parallel calls. PyErr_SetInterrupt() writes also into the wake up file.
7598
7599- Issue #11492: fix several issues with header folding in the email package.
7600
7601- Issue #11852: Add missing imports and update tests.
7602
7603- Issue #11875: collections.OrderedDict's __reduce__ was temporarily
7604 mutating the object instead of just working on a copy.
7605
7606- Issue #11467: Fix urlparse behavior when handling urls which contains scheme
7607 specific part only digits. Patch by Santoso Wijaya.
7608
7609- collections.Counter().copy() now works correctly for subclasses.
7610
7611- Issue #11474: Fix the bug with url2pathname() handling of '/C|/' on Windows.
7612 Patch by Santoso Wijaya.
7613
7614- Issue #11684: complete email.parser bytes API by adding BytesHeaderParser.
7615
7616- The bz2 module now handles 4GiB+ input buffers correctly.
7617
7618- Issue #9233: Fix json.loads('{}') to return a dict (instead of a list), when
7619 _json is not available.
7620
7621- Issue #11830: Remove unnecessary introspection code in the decimal module.
7622
7623- Issue #11703: urllib2.geturl() does not return correct url when the original
7624 url contains #fragment.
7625
7626- Issue #10019: Fixed regression in json module where an indent of 0 stopped
7627 adding newlines and acted instead like 'None'.
7628
7629- Issue #11186: pydoc ignores a module if its name contains a surrogate
7630 character in the index of modules.
7631
7632- Issue #11815: Use a light-weight SimpleQueue for the result queue in
7633 concurrent.futures.ProcessPoolExecutor.
7634
7635- Issue #5162: Treat services like frozen executables to allow child spawning
7636 from multiprocessing.forking on Windows.
7637
7638- logging.basicConfig now supports an optional 'handlers' argument taking an
7639 iterable of handlers to be added to the root logger. Additional parameter
7640 checks were also added to basicConfig.
7641
7642- Issue #11814: Fix likely typo in multiprocessing.Pool._terminate().
7643
7644- Issue #11747: Fix range formatting in difflib.context_diff() and
7645 difflib.unified_diff().
7646
7647- Issue #8428: Fix a race condition in multiprocessing.Pool when terminating
7648 worker processes: new processes would be spawned while the pool is being
7649 shut down. Patch by Charles-François Natali.
7650
7651- Issue #2650: re.escape() no longer escapes the '_'.
7652
7653- Issue #11757: select.select() now raises ValueError when a negative timeout
7654 is passed (previously, a select.error with EINVAL would be raised). Patch
7655 by Charles-François Natali.
7656
7657- Issue #7311: fix html.parser to accept non-ASCII attribute values.
7658
7659- Issue #11605: email.parser.BytesFeedParser was incorrectly converting
7660 multipart subparts with an 8-bit CTE into unicode instead of preserving the
7661 bytes.
7662
7663- Issue #1690608: email.util.formataddr is now RFC 2047 aware: it now has a
7664 charset parameter that defaults to utf-8 and is used as the charset for RFC
7665 2047 encoding when the realname contains non-ASCII characters.
7666
7667- Issue #10963: Ensure that subprocess.communicate() never raises EPIPE.
7668
7669- Issue #10791: Implement missing method GzipFile.read1(), allowing GzipFile
7670 to be wrapped in a TextIOWrapper. Patch by Nadeem Vawda.
7671
7672- Issue #11707: Added a fast C version of functools.cmp_to_key().
7673 Patch by Filip Gruszczyński.
7674
7675- Issue #11688: Add sqlite3.Connection.set_trace_callback(). Patch by
7676 Torsten Landschoff.
7677
7678- Issue #11746: Fix SSLContext.load_cert_chain() to accept elliptic curve
7679 private keys.
7680
7681- Issue #5863: Rewrite BZ2File in pure Python, and allow it to accept
7682 file-like objects using a new ``fileobj`` constructor argument. Patch by
7683 Nadeem Vawda.
7684
7685- unittest.TestCase.assertSameElements has been removed.
7686
7687- sys.getfilesystemencoding() raises a RuntimeError if initfsencoding() was not
7688 called yet: detect bootstrap (startup) issues earlier.
7689
7690- Issue #11393: Add the new faulthandler module.
7691
7692- Issue #11618: Fix the timeout logic in threading.Lock.acquire() under Windows.
7693
7694- Removed the 'strict' argument to email.parser.Parser, which has been
7695 deprecated since Python 2.4.
7696
7697- Issue #11256: Fix inspect.getcallargs on functions that take only keyword
7698 arguments.
7699
7700- Issue #11696: Fix ID generation in msilib.
7701
7702- itertools.accumulate now supports an optional *func* argument for
7703 a user-supplied binary function.
7704
7705- Issue #11692: Remove unnecessary demo functions in subprocess module.
7706
7707- Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when
7708 trying to pack a negative (in-range) integer.
7709
7710- Issue #11675: multiprocessing.[Raw]Array objects created from an integer size
7711 are now zeroed on creation. This matches the behaviour specified by the
7712 documentation.
7713
7714- Issue #7639: Fix short file name generation in bdist_msi
7715
Georg Brandl86dc7322012-10-01 18:58:45 +02007716- Issue #11635: Don't use polling in worker threads and processes launched by
7717 concurrent.futures.
7718
Victor Stinner554fd082014-03-17 22:33:49 +01007719- Issue #5845: Automatically read readline configuration to enable completion
7720 in interactive mode.
7721
Georg Brandl86dc7322012-10-01 18:58:45 +02007722- Issue #6811: Allow importlib to change a code object's co_filename attribute
7723 to match the path to where the source code currently is, not where the code
7724 object originally came from.
7725
7726- Issue #8754: Have importlib use the repr of a module name in error messages.
7727
7728- Issue #11591: Prevent "import site" from modifying sys.path when python
7729 was started with -S.
7730
7731- collections.namedtuple() now adds a _source attribute to the generated
7732 class. This make the source more accessible than the outdated
7733 "verbose" option which prints to stdout but doesn't make the source
7734 string available.
7735
7736- Issue #11371: Mark getopt error messages as localizable. Patch by Filip
7737 Gruszczyński.
7738
7739- Issue #11333: Add __slots__ to collections ABCs.
7740
7741- Issue #11628: cmp_to_key generated class should use __slots__.
7742
7743- Issue #11666: let help() display named tuple attributes and methods
7744 that start with a leading underscore.
7745
7746- Issue #11662: Make urllib and urllib2 ignore redirections if the
7747 scheme is not HTTP, HTTPS or FTP (CVE-2011-1521).
7748
7749- Issue #5537: Fix time2isoz() and time2netscape() functions of
7750 httplib.cookiejar for expiration year greater than 2038 on 32-bit systems.
7751
7752- Issue #4391: Use proper gettext plural forms in optparse.
7753
7754- Issue #11127: Raise a TypeError when trying to pickle a socket object.
7755
Victor Stinner554fd082014-03-17 22:33:49 +01007756- Issue #11563: ``Connection: close`` header is sent by requests using URLOpener
Georg Brandl86dc7322012-10-01 18:58:45 +02007757 class which helps in closing of sockets after connection is over. Patch
7758 contributions by Jeff McNeil and Nadeem Vawda.
7759
7760- Issue #11459: A ``bufsize`` value of 0 in subprocess.Popen() really creates
7761 unbuffered pipes, such that select() works properly on them.
7762
7763- Issue #5421: Fix misleading error message when one of socket.sendto()'s
7764 arguments has the wrong type. Patch by Nikita Vetoshkin.
7765
7766- Issue #10812: Add some extra posix functions to the os module.
7767
7768- Issue #10979: unittest stdout buffering now works with class and module
7769 setup and teardown.
7770
Georg Brandl86dc7322012-10-01 18:58:45 +02007771- Issue #11243: fix the parameter querying methods of Message to work if
7772 the headers contain un-encoded non-ASCII data.
7773
7774- Issue #11401: fix handling of headers with no value; this fixes a regression
7775 relative to Python2 and the result is now the same as it was in Python2.
7776
7777- Issue #9298: base64 bodies weren't being folded to line lengths less than 78,
7778 which was a regression relative to Python2. Unlike Python2, the last line
7779 of the folded body now ends with a carriage return.
7780
7781- Issue #11560: shutil.unpack_archive now correctly handles the format
7782 parameter. Patch by Evan Dandrea.
7783
7784- Issue #5870: Add `subprocess.DEVNULL` constant.
7785
7786- Issue #11133: fix two cases where inspect.getattr_static can trigger code
7787 execution. Patch by Andreas Stührk.
7788
7789- Issue #11569: use absolute path to the sysctl command in multiprocessing to
7790 ensure that it will be found regardless of the shell PATH. This ensures
7791 that multiprocessing.cpu_count works on default installs of MacOSX.
7792
7793- Issue #11501: disutils.archive_utils.make_zipfile no longer fails if zlib is
7794 not installed. Instead, the zipfile.ZIP_STORED compression is used to create
7795 the ZipFile. Patch by Natalia B. Bidart.
7796
7797- Issue #11289: `smtp.SMTP` class is now a context manager so it can be used
7798 in a `with` statement. Contributed by Giampaolo Rodola.
7799
7800- Issue #11554: Fixed support for Japanese codecs; previously the body output
7801 encoding was not done if euc-jp or shift-jis was specified as the charset.
7802
Georg Brandl86dc7322012-10-01 18:58:45 +02007803- Issue #11407: `TestCase.run` returns the result object used or created.
7804 Contributed by Janathan Hartley.
7805
7806- Issue #11500: Fixed a bug in the OS X proxy bypass code for fully qualified
7807 IP addresses in the proxy exception list.
7808
7809- Issue #11491: dbm.error is no longer raised when dbm.open is called with
7810 the "n" as the flag argument and the file exists. The behavior matches
7811 the documentation and general logic.
7812
7813- Issue #1162477: Postel Principle adjustment to email date parsing: handle the
7814 fact that some non-compliant MUAs use '.' instead of ':' in time specs.
7815
7816- Issue #11131: Fix sign of zero in decimal.Decimal plus and minus
7817 operations when the rounding mode is ROUND_FLOOR.
7818
7819- Issue #9935: Speed up pickling of instances of user-defined classes.
7820
7821- Issue #5622: Fix curses.wrapper to raise correct exception if curses
7822 initialization fails.
7823
7824- Issue #11408: In threading.Lock.acquire(), only call gettimeofday() when
7825 really necessary. Patch by Charles-François Natali.
7826
7827- Issue #11391: Writing to a mmap object created with
7828 ``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a
7829 TypeError. Patch by Charles-François Natali.
7830
Serhiy Storchaka14867992014-09-10 23:43:41 +03007831- Issue #9795: add context management protocol support for nntplib.NNTP class.
Georg Brandl86dc7322012-10-01 18:58:45 +02007832
7833- Issue #11306: mailbox in certain cases adapts to an inability to open
7834 certain files in read-write mode. Previously it detected this by
7835 checking for EACCES, now it also checks for EROFS.
7836
7837- Issue #11265: asyncore now correctly handles EPIPE, EBADF and EAGAIN errors
7838 on accept(), send() and recv().
7839
7840- Issue #11377: Deprecate platform.popen() and reimplement it with os.popen().
7841
7842- Issue #8513: On UNIX, subprocess supports bytes command string.
7843
7844- Issue #10866: Add socket.sethostname(). Initial patch by Ross Lagerwall.
7845
7846- Issue #11140: Lock.release() now raises a RuntimeError when attempting
7847 to release an unacquired lock, as claimed in the threading documentation.
7848 The _thread.error exception is now an alias of RuntimeError. Patch by
7849 Filip Gruszczyński. Patch for _dummy_thread by Aymeric Augustin.
7850
7851- Issue #8594: ftplib now provides a source_address parameter to specify which
7852 (address, port) to bind to before connecting.
7853
7854- Issue #11326: Add the missing connect_ex() implementation for SSL sockets,
7855 and make it work for non-blocking connects.
7856
7857- Issue #11297: Add collections.ChainMap().
7858
7859- Issue #10755: Add the posix.flistdir() function. Patch by Ross Lagerwall.
7860
7861- Issue #4761: Add the ``*at()`` family of functions (openat(), etc.) to the
7862 posix module. Patch by Ross Lagerwall.
7863
7864- Issue #7322: Trying to read from a socket's file-like object after a timeout
7865 occurred now raises an error instead of silently losing data.
7866
7867- Issue #11291: poplib.POP no longer suppresses errors on quit().
7868
7869- Issue #11177: asyncore's create_socket() arguments can now be omitted.
7870
7871- Issue #6064: Add a ``daemon`` keyword argument to the threading.Thread
7872 and multiprocessing.Process constructors in order to override the
7873 default behaviour of inheriting the daemonic property from the current
7874 thread/process.
7875
7876- Issue #10956: Buffered I/O classes retry reading or writing after a signal
7877 has arrived and the handler returned successfully.
7878
7879- Issue #10784: New os.getpriority() and os.setpriority() functions.
7880
7881- Issue #11114: Fix catastrophic performance of tell() on text files (up
7882 to 1000x faster in some cases). It is still one to two order of magnitudes
7883 slower than binary tell().
7884
7885- Issue #10882: Add os.sendfile function.
7886
7887- Issue #10868: Allow usage of the register method of an ABC as a class
7888 decorator.
7889
7890- Issue #11224: Fixed a regression in tarfile that affected the file-like
7891 objects returned by TarFile.extractfile() regarding performance, memory
7892 consumption and failures with the stream interface.
7893
7894- Issue #10924: Adding salt and Modular Crypt Format to crypt library.
7895 Moved old C wrapper to _crypt, and added a Python wrapper with
7896 enhanced salt generation and simpler API for password generation.
7897
7898- Issue #11074: Make 'tokenize' so it can be reloaded.
7899
7900- Issue #11085: Moved collections abstract base classes into a separate
7901 module called collections.abc, following the pattern used by importlib.abc.
7902 For backwards compatibility, the names are imported into the collections
7903 module.
7904
7905- Issue #4681: Allow mmap() to work on file sizes and offsets larger than
7906 4GB, even on 32-bit builds. Initial patch by Ross Lagerwall, adapted for
7907 32-bit Windows.
7908
7909- Issue #11169: compileall module uses repr() to format filenames and paths to
7910 escape surrogate characters and show spaces.
7911
7912- Issue #11089: Fix performance issue limiting the use of ConfigParser()
7913 with large config files.
7914
7915- Issue #10276: Fix the results of zlib.crc32() and zlib.adler32() on buffers
7916 larger than 4GB. Patch by Nadeem Vawda.
7917
7918- Issue #11388: Added a clear() method to MutableSequence
7919
7920- Issue #11174: Add argparse.MetavarTypeHelpFormatter, which uses type names
7921 for the names of optional and positional arguments in help messages.
7922
7923- Issue #9348: Raise an early error if argparse nargs and metavar don't match.
7924
Georg Brandl86dc7322012-10-01 18:58:45 +02007925- Issue #9026: Fix order of argparse sub-commands in help messages.
7926
7927- Issue #9347: Fix formatting for tuples in argparse type= error messages.
7928
7929- Issue #12191: Added shutil.chown() to change user and/or group owner of a
7930 given path also specifying their names.
7931
7932- Issue #13988: The _elementtree accelerator is used whenever available.
7933 Now xml.etree.cElementTree becomes a deprecated alias to ElementTree.
7934
7935Build
7936-----
7937
7938- Issue #6807: Run msisupport.mak earlier.
7939
7940- Issue #10580: Minor grammar change in Windows installer.
7941
7942- Issue #13326: Clean __pycache__ directories correctly on OpenBSD.
7943
7944- PEP 393: the configure option --with-wide-unicode is removed.
7945
7946- Issue #12852: Set _XOPEN_SOURCE to 700, instead of 600, to get POSIX 2008
7947 functions on OpenBSD (e.g. fdopendir).
7948
7949- Issue #11863: Remove support for legacy systems deprecated in Python 3.2
7950 (following PEP 11). These systems are systems using Mach C Threads,
7951 SunOS lightweight processes, GNU pth threads and IRIX threads.
7952
7953- Issue #8746: Correct faulty configure checks so that os.chflags() and
7954 os.lchflags() are once again built on systems that support these
7955 functions (BSD and OS X). Also add new stat file flags for OS X
7956 (UF_HIDDEN and UF_COMPRESSED).
7957
7958- Issue #10645: Installing Python no longer creates a
7959 Python-X.Y.Z-pyX.Y.egg-info file in the lib-dynload directory.
7960
7961- Do not accidentally include the directory containing sqlite.h twice when
7962 building sqlite3.
7963
7964- Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
7965 ensure "make install" creates symlinks in --prefix bin for the "-32"
7966 files in the framework bin directory like the installer does.
7967
7968- Issue #11347: Use --no-as-needed when linking libpython3.so.
7969
7970- Issue #11411: Fix 'make DESTDIR=' with a relative destination.
7971
7972- Issue #11268: Prevent Mac OS X Installer failure if Documentation
7973 package had previously been installed.
7974
7975- Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2.
7976
Georg Brandl86dc7322012-10-01 18:58:45 +02007977IDLE
7978----
7979
Victor Stinner554fd082014-03-17 22:33:49 +01007980- Issue #14409: IDLE now properly executes commands in the Shell window
7981 when it cannot read the normal config files on startup and
7982 has to use the built-in default key bindings.
7983 There was previously a bug in one of the defaults.
7984
7985- IDLE can be launched as python -m idlelib
7986
7987- Issue #3573: IDLE hangs when passing invalid command line args
7988 (directory(ies) instead of file(s)) (Patch by Guilherme Polo)
7989
7990- Issue #14200: IDLE shell crash on printing non-BMP unicode character.
7991
7992- Issue #5219: Prevent event handler cascade in IDLE.
7993
7994- Issue #964437: Make IDLE help window non-modal.
7995 Patch by Guilherme Polo and Roger Serwy.
7996
7997- Issue #13933: IDLE auto-complete did not work with some imported
7998 module, like hashlib. (Patch by Roger Serwy)
7999
8000- Issue #13506: Add '' to path for IDLE Shell when started and restarted with Restart Shell.
8001 Original patches by Marco Scataglini and Roger Serwy.
8002
8003- Issue #4625: If IDLE cannot write to its recent file or breakpoint files,
8004 display a message popup and continue rather than crash. Original patch by
8005 Roger Serwy.
8006
8007- Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
8008 Patch by Tal Einat.
8009
8010- Issue #13296: Fix IDLE to clear compile __future__ flags on shell restart.
8011 (Patch by Roger Serwy)
8012
8013- Issue #9871: Prevent IDLE 3 crash when given byte stings
8014 with invalid hex escape sequences, like b'\x0'.
8015 (Original patch by Claudiu Popa.)
8016
8017- Issue #12636: IDLE reads the coding cookie when executing a Python script.
8018
8019- Issue #12540: Prevent zombie IDLE processes on Windows due to changes
8020 in os.kill().
8021
8022- Issue #12590: IDLE editor window now always displays the first line
8023 when opening a long file. With Tk 8.5, the first line was hidden.
8024
8025- Issue #11088: don't crash when using F5 to run a script in IDLE on MacOSX
8026 with Tk 8.5.
8027
8028- Issue #1028: Tk returns invalid Unicode null in %A: UnicodeDecodeError.
8029 With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused
8030 IDLE to exit. Converted to valid Unicode null in PythonCmd().
8031
Georg Brandl86dc7322012-10-01 18:58:45 +02008032- Issue #11718: IDLE's open module dialog couldn't find the __init__.py
8033 file in a package.
8034
8035Tools/Demos
8036-----------
8037
8038- Issue #14053: patchcheck.py ("make patchcheck") now works with MQ patches.
8039 Patch by Francisco Martín Brugué.
8040
8041- Issue #13930: 2to3 is now able to write its converted output files to another
8042 directory tree as well as copying unchanged files and altering the file
8043 suffix. See its new -o, -W and --add-suffix options. This makes it more
8044 useful in many automated code translation workflows.
8045
8046- Issue #13628: python-gdb.py is now able to retrieve more frames in the Python
8047 traceback if Python is optimized.
8048
8049- Issue #11996: libpython (gdb), replace "py-bt" command by "py-bt-full" and
8050 add a smarter "py-bt" command printing a classic Python traceback.
8051
8052- Issue #11179: Make ccbench work under Python 3.1 and 2.7 again.
8053
8054- Issue #10639: reindent.py no longer converts newlines and will raise
8055 an error if attempting to convert a file with mixed newlines.
8056 "--newline" option added to specify new line character.
8057
8058Extension Modules
8059-----------------
8060
Victor Stinner554fd082014-03-17 22:33:49 +01008061- Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in
8062 non-pydebug builds. Several extension modules now compile cleanly when
8063 assert()s are enabled in standard builds (-DDEBUG flag).
8064
Georg Brandl86dc7322012-10-01 18:58:45 +02008065- Issue #13840: The error message produced by ctypes.create_string_buffer
8066 when given a Unicode string has been fixed.
8067
8068- Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
8069 Vilmos Nebehaj.
8070
8071- Issue #7777: socket: Add Reliable Datagram Sockets (PF_RDS) support.
8072
8073- Issue #13159: FileIO and BZ2Compressor/BZ2Decompressor now use a linear-time
8074 buffer growth strategy instead of a quadratic-time one.
8075
8076- Issue #10141: socket: Add SocketCAN (PF_CAN) support. Initial patch by
8077 Matthias Fuchs, updated by Tiago Gonçalves.
8078
8079- Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycle
8080 would be finalized after the reference to its underlying BufferedRWPair's
8081 writer got cleared by the GC.
8082
8083- Issue #12881: ctypes: Fix segfault with large structure field names.
8084
8085- Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by
8086 Thomas Jarosch.
8087
8088- Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype.
8089 Thanks to Suman Saha for finding the bug and providing a patch.
8090
8091- Issue #13022: Fix: _multiprocessing.recvfd() doesn't check that
8092 file descriptor was actually received.
8093
8094- Issue #1172711: Add 'long long' support to the array module.
8095 Initial patch by Oren Tirosh and Hirokazu Yamamoto.
8096
8097- Issue #12483: ctypes: Fix a crash when the destruction of a callback
8098 object triggers the garbage collector.
8099
8100- Issue #12950: Fix passing file descriptors in multiprocessing, under
8101 OpenIndiana/Illumos.
8102
8103- Issue #12764: Fix a crash in ctypes when the name of a Structure field is not
8104 a string.
8105
8106- Issue #11241: subclasses of ctypes.Array can now be subclassed.
8107
8108- Issue #9651: Fix a crash when ctypes.create_string_buffer(0) was passed to
8109 some functions like file.write().
8110
8111- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
8112 signature. Without this, architectures where sizeof void* != sizeof int are
8113 broken. Patch given by Hallvard B Furuseth.
8114
8115- Issue #12051: Fix segfault in json.dumps() while encoding highly-nested
8116 objects using the C accelerations.
8117
8118- Issue #12017: Fix segfault in json.loads() while decoding highly-nested
8119 objects using the C accelerations.
8120
8121- Issue #1838: Prevent segfault in ctypes, when _as_parameter_ on a class is set
8122 to an instance of the class.
8123
8124Tests
8125-----
8126
Victor Stinner554fd082014-03-17 22:33:49 +01008127- Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode.
8128 Patch by Mikhail Novikov.
8129
8130- Issue #13447: Add a test file to host regression tests for bugs in the
8131 scripts found in the Tools directory.
8132
8133- Issue #10881: Fix test_site failure with OS X framework builds.
8134
8135- Issue #13901: Prevent test_distutils failures on OS X with --enable-shared.
8136
8137- Issue #13862: Fix spurious failure in test_zlib due to runtime/compile time
8138 minor versions not matching.
8139
8140- Issue #12804: Fix test_socket and test_urllib2net failures when running tests
8141 on a system without internet access.
8142
8143- Issue #13726: Fix the ambiguous -S flag in regrtest. It is -o/--slow for slow
8144 tests.
8145
8146- Issue #11659: Fix ResourceWarning in test_subprocess introduced by #11459.
8147 Patch by Ben Hayden.
8148
8149- Issue #11577: fix ResourceWarning triggered by improved binhex test coverage
8150
8151- Issue #11509: Significantly increase test coverage of fileinput.
8152 Patch by Denver Coneybeare at PyCon 2011 Sprints.
8153
Georg Brandl86dc7322012-10-01 18:58:45 +02008154- Issue #11689: Fix a variable scoping error in an sqlite3 test
8155
8156- Issue #13786: Remove unimplemented 'trace' long option from regrtest.py.
8157
8158- Issue #13725: Fix regrtest to recognize the documented -d flag.
8159 Patch by Erno Tukia.
8160
8161- Issue #13304: Skip test case if user site-packages disabled (-s or
8162 PYTHONNOUSERSITE). (Patch by Carl Meyer)
8163
8164- Issue #5661: Add a test for ECONNRESET/EPIPE handling to test_asyncore. Patch
8165 by Xavier de Gaye.
8166
8167- Issue #13218: Fix test_ssl failures on Debian/Ubuntu.
8168
8169- Re-enable lib2to3's test_parser.py tests, though with an expected failure
8170 (see issue 13125).
8171
8172- Issue #12656: Add tests for IPv6 and Unix sockets to test_asyncore.
8173
8174- Issue #6484: Add unit tests for mailcap module (patch by Gregory Nofi)
8175
8176- Issue #11651: Improve the Makefile test targets to run more of the test suite
8177 more quickly. The --multiprocess option is now enabled by default, reducing
8178 the amount of time needed to run the tests. "make test" and "make quicktest"
8179 now include some resource-intensive tests, but no longer run the test suite
8180 twice to check for bugs in .pyc generation. Tools/scripts/run_test.py provides
8181 an easy platform-independent way to run test suite with sensible defaults.
8182
8183- Issue #12331: The test suite for the packaging module can now run from an
8184 installed Python.
8185
8186- Issue #12331: The test suite for lib2to3 can now run from an installed
8187 Python.
8188
Martin Panterc04fb562016-02-10 05:44:01 +00008189- Issue #12626: In regrtest, allow filtering tests using a glob filter
Georg Brandl86dc7322012-10-01 18:58:45 +02008190 with the ``-m`` (or ``--match``) option. This works with all test cases
8191 using the unittest module. This is useful with long test suites
8192 such as test_io or test_subprocess.
8193
8194- Issue #12624: It is now possible to fail after the first failure when
8195 running in verbose mode (``-v`` or ``-W``), by using the ``--failfast``
8196 (or ``-G``) option to regrtest. This is useful with long test suites
8197 such as test_io or test_subprocess.
8198
8199- Issue #12587: Correct faulty test file and reference in test_tokenize.
8200 (Patch by Robert Xiao)
8201
8202- Issue #12573: Add resource checks for dangling Thread and Process objects.
8203
8204- Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
8205 as the processor type on some Mac systems.
8206
8207- Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
8208 failure in name resolution.
8209
8210- Issue #11812: Solve transient socket failure to connect to 'localhost'
8211 in test_telnetlib.py.
8212
8213- Solved a potential deadlock in test_telnetlib.py. Related to issue #11812.
8214
8215- Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and
8216 an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder
8217 Web site.
8218
8219- Avoid failing in test_urllibnet.test_bad_address when some overzealous
8220 DNS service (e.g. OpenDNS) resolves a non-existent domain name. The test
8221 is now skipped instead.
8222
8223- Issue #12440: When testing whether some bits in SSLContext.options can be
8224 reset, check the version of the OpenSSL headers Python was compiled against,
8225 rather than the runtime version of the OpenSSL library.
8226
8227- Issue #11512: Add a test suite for the cgitb module. Patch by Robbie Clemons.
8228
8229- Issue #12497: Install test/data to prevent failures of the various codecmaps
8230 tests.
8231
8232- Issue #12496: Install test/capath directory to prevent test_connect_capath
8233 testcase failure in test_ssl.
8234
8235- Issue #12469: Run wakeup and pending signal tests in a subprocess to run the
8236 test in a fresh process with only one thread and to not change signal
8237 handling of the parent process.
8238
8239- Issue #8716: Avoid crashes caused by Aqua Tk on OSX when attempting to run
8240 test_tk or test_ttk_guionly under a username that is not currently logged
8241 in to the console windowserver (as may be the case under buildbot or ssh).
8242
8243- Issue #12407: Explicitly skip test_capi.EmbeddingTest under Windows.
8244
8245- Issue #12400: regrtest -W doesn't rerun the tests twice anymore, but captures
8246 the output and displays it on failure instead. regrtest -v doesn't print the
8247 error twice anymore if there is only one error.
8248
8249- Issue #12141: Install copies of template C module file so that
8250 test_build_ext of test_distutils and test_command_build_ext of
8251 test_packaging are no longer silently skipped when
8252 run outside of a build directory.
8253
8254- Issue #8746: Add additional tests for os.chflags() and os.lchflags().
8255 Patch by Garrett Cooper.
8256
8257- Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9
8258 2.8 + on Mac OS X. (Patch by Ronald Oussoren)
8259
8260- Issue #12057: Add tests for ISO 2022 codecs (iso2022_jp, iso2022_jp_2,
8261 iso2022_kr).
8262
8263- Issue #12096: Fix a race condition in test_threading.test_waitfor(). Patch
8264 written by Charles-François Natali.
8265
8266- Issue #11614: import __hello__ prints "Hello World!". Patch written by
8267 Andreas Stührk.
8268
8269- Issue #5723: Improve json tests to be executed with and without accelerations.
8270
8271- Issue #12041: Make test_wait3 more robust.
8272
8273- Issue #11873: Change regex in test_compileall to fix occasional failures when
Serhiy Storchaka56a6d852014-12-01 18:28:43 +02008274 the randomly generated temporary path happened to match the regex.
Georg Brandl86dc7322012-10-01 18:58:45 +02008275
8276- Issue #11958: Fix FTP tests for IPv6, bind to "::1" instead of "localhost".
8277 Patch written by Charles-Francois Natali.
8278
8279- Issue #8407, #11859: Fix tests of test_io using threads and an alarm: use
8280 pthread_sigmask() to ensure that the SIGALRM signal is received by the main
8281 thread.
8282
8283- Issue #11811: Factor out detection of IPv6 support on the current host
8284 and make it available as ``test.support.IPV6_ENABLED``. Patch by
8285 Charles-François Natali.
8286
8287- Issue #10914: Add a minimal embedding test to test_capi.
8288
8289- Issue #11223: Skip test_lock_acquire_interruption() and
8290 test_rlock_acquire_interruption() of test_threadsignals if a thread lock is
8291 implemented using a POSIX mutex and a POSIX condition variable. A POSIX
8292 condition variable cannot be interrupted by a signal (e.g. on Linux, the
8293 futex system call is restarted).
8294
8295- Issue #11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition.
8296
8297- Fix possible "file already exists" error when running the tests in parallel.
8298
8299- Issue #11719: Fix message about unexpected test_msilib skip on non-Windows
8300 platforms. Patch by Nadeem Vawda.
8301
8302- Issue #11727: Add a --timeout option to regrtest: if a test takes more than
8303 TIMEOUT seconds, dumps the traceback of all threads and exits.
8304
8305- Issue #11653: fix -W with -j in regrtest.
8306
8307- The email test suite now lives in the Lib/test/test_email package. The test
8308 harness code has also been modernized to allow use of new unittest features.
8309
8310- regrtest now discovers test packages as well as test modules.
8311
8312- Issue #11577: improve test coverage of binhex.py. Patch by Arkady Koplyarov.
8313
8314- New test_crashers added to exercise the scripts in the Lib/test/crashers
8315 directory and confirm they fail as expected
8316
8317- Issue #11578: added test for the timeit module. Patch by Michael Henry.
8318
8319- Issue #11503: improve test coverage of posixpath.py. Patch by Evan Dandrea.
8320
8321- Issue #11505: improves test coverage of string.py, increases granularity of
8322 string.Formatter tests. Initial patch by Alicia Arlen.
8323
8324- Issue #11548: Improve test coverage of the shutil module. Patch by
8325 Evan Dandrea.
8326
8327- Issue #11554: Reactivated test_email_codecs.
8328
8329- Issue #11505: improves test coverage of string.py. Patch by Alicia
8330 Arlen
8331
Victor Stinner554fd082014-03-17 22:33:49 +01008332- Issue #11490: test_subprocess.test_leaking_fds_on_error no longer gives a
Georg Brandl86dc7322012-10-01 18:58:45 +02008333 false positive if the last directory in the path is inaccessible.
8334
8335- Issue #11223: Fix test_threadsignals to fail, not hang, when the
8336 non-semaphore implementation of locks is used under POSIX.
8337
8338- Issue #10911: Add tests on CGI with non-ASCII characters. Patch written by
8339 Pierre Quentel.
8340
8341- Issue #9931: Fix hangs in GUI tests under Windows in certain conditions.
8342 Patch by Hirokazu Yamamoto.
8343
8344- Issue #10512: Properly close sockets under test.test_cgi.
8345
8346- Issue #10992: Make tests pass under coverage.
8347
8348- Issue #10826: Prevent sporadic failure in test_subprocess on Solaris due
8349 to open door files.
8350
8351- Issue #10990: Prevent tests from clobbering a set trace function.
8352
8353C-API
8354-----
8355
Victor Stinner554fd082014-03-17 22:33:49 +01008356- Issue #13452: PyUnicode_EncodeDecimal() doesn't support error handlers
8357 different than "strict" anymore. The caller was unable to compute the
8358 size of the output buffer: it depends on the error handler.
8359
8360- Issue #13560: Add PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize()
8361 and PyUnicode_EncodeLocale() functions to the C API to decode/encode from/to
8362 the current locale encoding.
8363
8364- Issue #10831: PyUnicode_FromFormat() supports %li, %lli and %zi formats.
8365
8366- Issue #11246: Fix PyUnicode_FromFormat("%V") to decode the byte string from
8367 UTF-8 (with replace error handler) instead of ISO-8859-1 (in strict mode).
8368 Patch written by Ray Allen.
8369
8370- Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on
8371 narrow build.
8372
Georg Brandl86dc7322012-10-01 18:58:45 +02008373- Add PyObject_GenericGetDict and PyObject_GeneriSetDict. They are generic
8374 implementations for the getter and setter of a ``__dict__`` descriptor of C
8375 types.
8376
8377- Issue #13727: Add 3 macros to access PyDateTime_Delta members:
8378 PyDateTime_DELTA_GET_DAYS, PyDateTime_DELTA_GET_SECONDS,
8379 PyDateTime_DELTA_GET_MICROSECONDS.
8380
8381- Issue #10542: Add 4 macros to work with surrogates: Py_UNICODE_IS_SURROGATE,
8382 Py_UNICODE_IS_HIGH_SURROGATE, Py_UNICODE_IS_LOW_SURROGATE,
8383 Py_UNICODE_JOIN_SURROGATES.
8384
8385- Issue #12724: Add Py_RETURN_NOTIMPLEMENTED macro for returning NotImplemented.
8386
8387- PY_PATCHLEVEL_REVISION has been removed, since it's meaningless with
8388 Mercurial.
8389
8390- Issue #12173: The first argument of PyImport_ImportModuleLevel is now `const
8391 char *` instead of `char *`.
8392
8393- Issue #12380: PyArg_ParseTuple now accepts a bytearray for the 'c' format.
8394
8395Documentation
8396-------------
8397
Victor Stinner554fd082014-03-17 22:33:49 +01008398- Issue #13989: Document that GzipFile does not support text mode, and give a
8399 more helpful error message when opened with an invalid mode string.
8400
8401- Issue #13921: Undocument and clean up sqlite3.OptimizedUnicode,
8402 which is obsolete in Python 3.x. It's now aliased to str for
8403 backwards compatibility.
8404
8405- Issue #12102: Document that buffered files must be flushed before being used
8406 with mmap. Patch by Steffen Daode Nurpmeso.
8407
8408- Issue #8982: Improve the documentation for the argparse Namespace object.
8409
8410- Issue #9343: Document that argparse parent parsers must be configured before
8411 their children.
8412
8413- Issue #13498: Clarify docs of os.makedirs()'s exist_ok argument. Done with
8414 great native-speaker help from R. David Murray.
8415
Georg Brandl86dc7322012-10-01 18:58:45 +02008416- Issues #13491 and #13995: Fix many errors in sqlite3 documentation.
8417 Initial patch for #13491 by Johannes Vogel.
8418
8419- Issue #13402: Document absoluteness of sys.executable.
8420
8421- Issue #13883: PYTHONCASEOK also works on OS X.
8422
R David Murray96e93672012-10-06 23:21:01 -04008423- Issue #9021: Add an introduction to the copy module documentation.
8424
8425- Issue #6005: Examples in the socket library documentation use sendall, where
8426 relevant, instead send method.
8427
8428- Issue #12798: Updated the mimetypes documentation.
8429
Georg Brandl86dc7322012-10-01 18:58:45 +02008430- Issue #12949: Document the kwonlyargcount argument for the PyCode_New
8431 C API function.
8432
8433- Issue #13513: Fix io.IOBase documentation to correctly link to the
8434 io.IOBase.readline method instead of the readline module.
8435
8436- Issue #13237: Reorganise subprocess documentation to emphasise convenience
8437 functions and the most commonly needed arguments to Popen.
8438
8439- Issue #13141: Demonstrate recommended style for socketserver examples.
8440
8441- Issue #11818: Fix tempfile examples for Python 3.
8442
8443
8444What's New in Python 3.2?
8445=========================
8446
8447*Release date: 20-Feb-2011*
8448
8449Core and Builtins
8450-----------------
8451
8452- Issue #11249: Fix potential crashes when using the limited API.
8453
8454Build
8455-----
8456
8457- Issue #11222: Fix non-framework shared library build on Mac OS X.
8458
8459- Issue #11184: Fix large-file support on AIX.
8460
8461- Issue #941346: Fix broken shared library build on AIX.
8462
8463Documentation
8464-------------
8465
8466- Issue #10709: Add updated AIX notes in Misc/README.AIX.
8467
8468
8469What's New in Python 3.2 Release Candidate 3?
8470=============================================
8471
8472*Release date: 13-Feb-2011*
8473
8474Core and Builtins
8475-----------------
8476
8477- Issue #11134: Add missing fields to typeslots.h.
8478
8479- Issue #11135: Remove redundant doc field from PyType_Spec.
8480
8481- Issue #11067: Add PyType_GetFlags, to support PyUnicode_Check in the limited
8482 ABI.
8483
8484- Issue #11118: Fix bogus export of None in python3.dll.
8485
8486Library
8487-------
8488
8489- Issue #11116: any error during addition of a message to a mailbox now causes a
8490 rollback, instead of leaving the mailbox partially modified.
8491
8492- Issue #11132: Fix passing of "optimize" parameter when recursing in
8493 compileall.compile_dir().
8494
8495- Issue #11110: Fix a potential decref of a NULL in sqlite3.
8496
8497- Issue #8275: Fix passing of callback arguments with ctypes under Win64. Patch
8498 by Stan Mihai.
8499
8500Build
8501-----
8502
8503- Issue #11079: The /Applications/Python x.x folder created by the Mac OS X
8504 installers now includes a link to the installed documentation and no longer
8505 includes an Extras directory. The Tools directory is now installed in the
8506 framework under share/doc.
8507
8508- Issue #11121: Fix building with --enable-shared.
8509
8510Tests
8511-----
8512
8513- Issue #10971: test_zipimport_support is once again compatible with the refleak
8514 hunter feature of test.regrtest.
8515
8516
8517What's New in Python 3.2 Release Candidate 2?
8518=============================================
8519
8520*Release date: 30-Jan-2011*
8521
8522Core and Builtins
8523-----------------
8524
Martin Panterc04fb562016-02-10 05:44:01 +00008525- Issue #10451: memoryview objects could allow mutating a readable buffer.
Georg Brandl86dc7322012-10-01 18:58:45 +02008526 Initial patch by Ross Lagerwall.
8527
8528Library
8529-------
8530
8531- Issue #9124: mailbox now accepts binary input and reads and writes mailbox
8532 files in binary mode, using the email package's binary support to parse
8533 arbitrary email messages. StringIO and text file input is deprecated,
8534 and string input fails early if non-ASCII characters are used, where
8535 previously it would fail when the email was processed in a later step.
8536
8537- Issue #10845: Mitigate the incompatibility between the multiprocessing
8538 module on Windows and the use of package, zipfile or directory execution
8539 by special casing main modules that actually *are* called __main__.py.
8540
8541- Issue #11045: Protect logging call against None argument.
8542
8543- Issue #11052: Correct IDLE menu accelerators on Mac OS X for Save
8544 commands.
8545
8546- Issue #11053: Fix IDLE "Syntax Error" windows to behave as in 2.x,
8547 preventing a confusing hung appearance on OS X with the windows
8548 obscured.
8549
8550- Issue #10940: Workaround an IDLE hang on Mac OS X 10.6 when using the
8551 menu accelerators for Open Module, Go to Line, and New Indent Width.
8552 The accelerators still work but no longer appear in the menu items.
8553
8554- Issue #10989: Fix a crash on SSLContext.load_verify_locations(None, True).
8555
8556- Issue #11020: Command-line pyclbr was broken because of missing 2-to-3
8557 conversion.
8558
8559- Issue #11019: Fixed BytesGenerator so that it correctly handles a Message
8560 with a None body.
8561
8562- Issue #11014: Make 'filter' argument in tarfile.Tarfile.add() into a
8563 keyword-only argument. The preceding positional argument was deprecated,
8564 so it made no sense to add filter as a positional argument.
8565
8566- Issue #11004: Repaired edge case in deque.count().
8567
8568- Issue #10974: IDLE no longer crashes if its recent files list includes files
8569 with non-ASCII characters in their path names.
8570
8571- Have hashlib.algorithms_available and hashlib.algorithms_guaranteed both
8572 return sets instead of one returning a tuple and the other a frozenset.
8573
8574- Issue #10987: Fix the recursion limit handling in the _pickle module.
8575
8576- Issue #10983: Fix several bugs making tunnel requests in http.client.
8577
8578- Issue #10955: zipimport uses ASCII encoding instead of cp437 to decode
8579 filenames, at bootstrap, if the codec registry is not ready yet. It is still
8580 possible to have non-ASCII filenames using the Unicode flag (UTF-8 encoding)
8581 for all file entries in the ZIP file.
8582
8583- Issue #10949: Improved robustness of rotating file handlers.
8584
8585- Issue #10955: Fix a potential crash when trying to mmap() a file past its
8586 length. Initial patch by Ross Lagerwall.
8587
8588- Issue #10898: Allow compiling the posix module when the C library defines
8589 a symbol named FSTAT.
8590
8591- Issue #10980: the HTTP server now encodes headers with iso-8859-1 (latin1)
8592 encoding. This is the preferred encoding of PEP 3333 and the base encoding
8593 of HTTP 1.1.
8594
8595- To match the behaviour of HTTP server, the HTTP client library now also
8596 encodes headers with iso-8859-1 (latin1) encoding. It was already doing
8597 that for incoming headers which makes this behaviour now consistent in
8598 both incoming and outgoing direction.
8599
8600- Issue #9509: argparse now properly handles IOErrors raised by
8601 argparse.FileType.
8602
8603- Issue #10961: The new pydoc server now better handles exceptions raised
8604 during request handling.
8605
8606- Issue #10680: Fix mutually exclusive arguments for argument groups in
8607 argparse.
8608
8609Build
8610-----
8611
8612- Issue #11054: Allow Mac OS X installer builds to again work on 10.5 with
8613 the system-provided Python.
8614
8615
8616What's New in Python 3.2 Release Candidate 1
8617============================================
8618
8619*Release date: 16-Jan-2011*
8620
8621Core and Builtins
8622-----------------
8623
8624- Issue #10889: range indexing and slicing now works correctly on ranges with
8625 a length that exceeds sys.maxsize.
8626
8627- Issue #10892: Don't segfault when trying to delete __abstractmethods__ from a
8628 class.
8629
8630- Issue #8020: Avoid a crash where the small objects allocator would read
8631 non-Python managed memory while it is being modified by another thread. Patch
8632 by Matt Bandy.
8633
8634- Issue #10841: On Windows, set the binary mode on stdin, stdout, stderr and all
8635 io.FileIO objects (to not translate newlines, \r\n <=> \n). The Python parser
8636 translates newlines (\r\n => \n).
8637
8638- Remove buffer API from stable ABI for now, see #10181.
8639
8640- Issue #8651: PyArg_Parse*() functions raise an OverflowError if the file
8641 doesn't have PY_SSIZE_T_CLEAN define and the size doesn't fit in an int
8642 (length bigger than 2^31-1 bytes).
8643
8644- Issue #9015, #9611: FileIO.readinto(), FileIO.write(), os.write() and
8645 stdprinter.write() clamp the length to INT_MAX on Windows.
8646
8647- Issue #8278: On Windows and with a NTFS filesystem, os.stat() and os.utime()
8648 can now handle dates after 2038.
8649
8650- Issue #10780: PyErr_SetFromWindowsErrWithFilename() and
8651 PyErr_SetExcFromWindowsErrWithFilename() decode the filename from the
8652 filesystem encoding instead of UTF-8.
8653
8654- Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem
8655 encoding instead of UTF-8.
8656
8657- Add sys.flags attribute for the new -q command-line option.
8658
8659- Issue #11506: Trying to assign to a bytes literal should result in a
8660 SyntaxError.
8661
8662Library
8663-------
8664
8665- Issue #10916: mmap should not segfault when a file is mapped using 0 as length
8666 and a non-zero offset, and an attempt to read past the end of file is made
8667 (IndexError is raised instead). Patch by Ross Lagerwall.
8668
8669- Issue #10154, #10090: change the normalization of UTF-8 to "UTF-8" instead
8670 of "UTF8" in the locale module as the latter is not supported MacOSX and OpenBSD.
8671
8672- Issue #10907: Warn OS X 10.6 IDLE users to use ActiveState Tcl/Tk 8.5, rather
8673 than the currently problematic Apple-supplied one, when running with the
8674 64-/32-bit installer variant.
8675
8676- Issue #4953: cgi.FieldStorage and cgi.parse() parse the request as bytes, not
8677 as unicode, and accept binary files. Add encoding and errors attributes to
8678 cgi.FieldStorage. Patch written by Pierre Quentel (with many inputs by Glenn
8679 Linderman).
8680
8681- Add encoding and errors arguments to urllib.parse_qs() and urllib.parse_qsl().
8682
8683- Issue #10899: No function type annotations in the standard library. Removed
8684 function type annotations from _pyio.py.
8685
8686- Issue #10875: Update Regular Expression HOWTO; patch by 'SilentGhost'.
8687
8688- Issue #10872: The repr() of TextIOWrapper objects now includes the mode
8689 if available.
8690
8691- Issue #10869: Fixed bug where ast.increment_lineno modified the root node
8692 twice.
8693
8694- Issue #5871: email.header.Header.encode now raises an error if any
8695 continuation line in the formatted value has no leading white space and looks
8696 like a header. Since Generator uses Header to format all headers, this check
8697 is made for all headers in any serialized message at serialization time. This
8698 provides protection against header injection attacks.
8699
8700- Issue #10859: Make ``contextlib.GeneratorContextManager`` officially
8701 private by renaming it to ``_GeneratorContextManager``.
8702
8703- Issue #10042: Fixed the total_ordering decorator to handle cross-type
8704 comparisons that could lead to infinite recursion.
8705
8706- Issue #10686: the email package now :rfc:`2047`\ -encodes headers with
8707 non-ASCII bytes (parsed by a BytesParser) when doing conversion to 7bit-clean
8708 presentation, instead of replacing them with ?s.
8709
8710- email.header.Header was incorrectly encoding folding whitespace when
8711 rfc2047-encoding header values with embedded newlines, leaving them without
8712 folding whitespace. It now uses the continuation_ws, as it does for
8713 continuation lines that it creates itself.
8714
8715- Issue #1777412, #10827: Changed the rules for 2-digit years. The
8716 time.asctime(), time.ctime() and time.strftime() functions will now format
8717 any year when ``time.accept2dyear`` is False and will accept years >= 1000
8718 otherwise. ``time.mktime`` and ``time.strftime`` now accept full range
8719 supported by the OS. With Visual Studio or on Solaris, the year is limited to
8720 the range [1; 9999]. Conversion of 2-digit years to 4-digit is deprecated.
8721
8722- Issue #7858: Raise an error properly when os.utime() fails under Windows
8723 on an existing file.
8724
8725- Issue #3839: wsgiref should not override a Content-Length header set by
8726 the application. Initial patch by Clovis Fabricio.
8727
8728- Issue #10492: bdb.Bdb.run() only traces the execution of the code, not the
8729 compilation (if the input is a string).
8730
8731- Issue #7995: When calling accept() on a socket with a timeout, the returned
8732 socket is now always blocking, regardless of the operating system.
8733
8734- Issue #10756: atexit normalizes the exception before displaying it. Patch by
8735 Andreas Stührk.
8736
8737- Issue #10790: email.header.Header.append's charset logic now works correctly
8738 for charsets whose output codec is different from its input codec.
8739
8740- Issue #10819: SocketIO.name property returns -1 when its closed, instead of
8741 raising a ValueError, to fix repr().
8742
8743- Issue #8650: zlib.compress() and zlib.decompress() raise an OverflowError if
8744 the input buffer length doesn't fit into an unsigned int (length bigger than
8745 2^32-1 bytes).
8746
8747- Issue #6643: Reinitialize locks held within the threading module after fork to
8748 avoid a potential rare deadlock or crash on some platforms.
8749
8750- Issue #10806, issue #9905: Fix subprocess pipes when some of the standard file
8751 descriptors (0, 1, 2) are closed in the parent process. Initial patch by Ross
8752 Lagerwall.
8753
8754- `unittest.TestCase` can be instantiated without a method name; for simpler
8755 exploration from the interactive interpreter.
8756
8757- Issue #10798: Reject supporting concurrent.futures if the system has too
8758 few POSIX semaphores.
8759
8760- Issue #10807: Remove base64, bz2, hex, quopri, rot13, uu and zlib codecs from
8761 the codec aliases. They are still accessible via codecs.lookup().
8762
8763- Issue #10801: In zipfile, support different encodings for the header and the
8764 filenames.
8765
8766- Issue #6285: IDLE no longer crashes on missing help file; patch by Scott
8767 David Daniels.
8768
8769- Fix collections.OrderedDict.setdefault() so that it works in subclasses that
8770 define __missing__().
8771
8772- Issue #10786: unittest.TextTestRunner default stream no longer bound at import
8773 time. `sys.stderr` now looked up at instantiation time. Fix contributed by
8774 Mark Roddy.
8775
8776- Issue #10753: Characters ';', '=' and ',' in the PATH_INFO environment variable
8777 won't be quoted when the URI is constructed by the wsgiref.util's request_uri
8778 method. According to RFC 3986, these characters can be a part of params in
8779 PATH component of URI and need not be quoted.
8780
8781- Issue #10738: Fix webbrowser.Opera.raise_opts.
8782
8783- Issue #9824: SimpleCookie now encodes , and ; in values to cater to how
8784 browsers actually parse cookies.
8785
8786- Issue #9333: os.symlink now available regardless of user privileges. The
8787 function now raises OSError on Windows >=6.0 when the user is unable to create
8788 symbolic links. XP and 2003 still raise NotImplementedError.
8789
8790- Issue #10783: struct.pack() no longer implicitly encodes unicode to UTF-8.
8791
8792- Issue #10730: Add SVG mime types to mimetypes module.
8793
8794- Issue #10768: Make the Tkinter ScrolledText widget work again.
8795
8796- Issue #10777: Fix "dictionary changed size during iteration" bug in
8797 ElementTree register_namespace().
8798
8799- Issue #10626: test_logging now preserves logger disabled states.
8800
8801- Issue #10774: test_logging now removes temp files created during tests.
8802
8803- Issue #5258/#10642: if site.py encounters a .pth file that generates an error,
8804 it now prints the filename, line number, and traceback to stderr and skips
8805 the rest of that individual file, instead of stopping processing entirely.
8806
8807- Issue #10763: subprocess.communicate() closes stdout and stderr if both are
8808 pipes (bug specific to Windows).
8809
8810- Issue #1693546: fix email.message RFC 2231 parameter encoding to be in better
8811 compliance (no "s around encoded values).
8812
8813- Improved the diff message in the unittest module's assertCountEqual().
8814
8815- Issue #1155362: email.utils.parsedate_tz now handles a missing space before
8816 the '-' of a timezone field as well as before a '+'.
8817
8818- Issue #4871: The zipfile module now gives a more useful error message if
8819 an attempt is made to use a string to specify the archive password.
8820
8821- Issue #10750: The ``raw`` attribute of buffered IO objects is now read-only.
8822
8823- Deprecated assertDictContainsSubset() in the unittest module.
8824
8825C-API
8826-----
8827
8828- PyObject_CallMethod now passes along any underlying AttributeError from
8829 PyObject_GetAttr, instead of replacing it with something less informative
8830
8831- Issue #10913: Deprecate misleading functions PyEval_AcquireLock() and
8832 PyEval_ReleaseLock(). The thread-state aware APIs should be used instead.
8833
8834- Issue #10333: Remove ancient GC API, which has been deprecated since Python
8835 2.2.
8836
8837Build
8838-----
8839
8840- Issue #10843: Update third-party library versions used in OS X 32-bit
8841 installer builds: bzip2 1.0.6, readline 6.1.2, SQLite 3.7.4 (with FTS3/FTS4
8842 and RTREE enabled), and ncursesw 5.5 (wide-char support enabled).
8843
8844- Issue #10820: Fix OS X framework installs to support version-specific
8845 scripts (#10679).
8846
8847- Issue #7716: Under Solaris, don't assume existence of /usr/xpg4/bin/grep in
8848 the configure script but use $GREP instead. Patch by Fabian Groffen.
8849
8850- Issue #10475: Don't hardcode compilers for LDSHARED/LDCXXSHARED on NetBSD
8851 and DragonFly BSD. Patch by Nicolas Joly.
8852
8853- Issue #10679: The "idle", "pydoc" and "2to3" scripts are now installed with
8854 a version-specific suffix on "make altinstall".
8855
8856- Issue #10655: Fix the build on PowerPC on Linux with GCC when building with
8857 timestamp profiling (--with-tsc): the preprocessor test for the PowerPC
8858 support now looks for "__powerpc__" as well as "__ppc__": the latter seems to
8859 only be present on OS X; the former is the correct one for Linux with GCC.
8860
8861- Issue #1099: Fix the build on MacOSX when building a framework with pydebug
8862 using GCC 4.0.
8863
8864Tools/Demos
8865-----------
8866
8867- Issue #10843: Install the Tools directory on OS X in the applications Extras
8868 (/Applications/Python 3.n/Extras/) where the Demo directory had previous been
8869 installed.
8870
8871- Issue #7962: The Demo directory is gone. Most of the old and unmaintained
8872 demos have been removed, others integrated in documentation or a new
8873 Tools/demo subdirectory.
8874
8875- Issue #10502: Addition of the unittestgui tool. Originally by Steve Purcell.
8876 Updated for test discovery by Mark Roddy and Python 3 compatibility by Brian
8877 Curtin.
8878
8879Tests
8880-----
8881
8882- Issue #11910: Fix test_heapq to skip the C tests when _heapq is missing.
8883
8884- Fix test_startfile to wait for child process to terminate before finishing.
8885
8886- Issue #10822: Fix test_posix:test_getgroups failure under Solaris. Patch
8887 by Ross Lagerwall.
8888
8889- Make the --coverage flag work for test.regrtest.
8890
8891- Issue #1677694: Refactor and improve test_timeout. Original patch by
8892 Björn Lindqvist.
8893
8894- Issue #5485: Add tests for the UseForeignDTD method of expat parser objects.
8895 Patch by Jean-Paul Calderone and Sandro Tosi.
8896
8897- Issue #6293: Have regrtest.py echo back sys.flags. This is done by default in
8898 whole runs and enabled selectively using ``--header`` when running an explicit
8899 list of tests. Original patch by Collin Winter.
8900
8901
8902What's New in Python 3.2 Beta 2?
8903================================
8904
8905*Release date: 19-Dec-2010*
8906
8907Core and Builtins
8908-----------------
8909
8910- Issue #8844: Regular and recursive lock acquisitions can now be interrupted
8911 by signals on platforms using pthreads. Patch by Reid Kleckner.
8912
8913- Issue #4236: PyModule_Create2 now checks the import machinery directly
8914 rather than the Py_IsInitialized flag, avoiding a Fatal Python
8915 error in certain circumstances when an import is done in __del__.
8916
8917- Issue #5587: add a repr to dict_proxy objects. Patch by David Stanek and
8918 Daniel Urban.
8919
8920Library
8921-------
8922
8923- Issue #3243: Support iterable bodies in httplib. Patch Contributions by
8924 Xuanji Li and Chris AtLee.
8925
8926- Issue #10611: SystemExit exception will no longer kill a unittest run.
8927
8928- Issue #9857: It is now possible to skip a test in a setUp, tearDown or clean
8929 up function.
8930
8931- Issue #10573: use actual/expected consistently in unittest methods.
8932 The order of the args of assertCountEqual is also changed.
8933
8934- Issue #9286: email.utils.parseaddr no longer concatenates blank-separated
8935 words in the local part of email addresses, thereby preserving the input.
8936
8937- Issue #6791: Limit header line length (to 65535 bytes) in http.client
8938 and http.server, to avoid denial of services from the other party.
8939
8940- Issue #10404: Use ctl-button-1 on OSX for the context menu in Idle.
8941
8942- Issue #9907: Fix tab handling on OSX when using editline by calling
8943 rl_initialize first, then setting our custom defaults, then reading .editrc.
8944
8945- Issue #4188: Avoid creating dummy thread objects when logging operations
8946 from the threading module (with the internal verbose flag activated).
8947
8948- Issue #10711: Remove HTTP 0.9 support from http.client. The ``strict``
8949 parameter to HTTPConnection and friends is deprecated.
8950
8951- Issue #9721: Fix the behavior of urljoin when the relative url starts with a
8952 ';' character. Patch by Wes Chow.
8953
8954- Issue #10714: Limit length of incoming request in http.server to 65536 bytes
8955 for security reasons. Initial patch by Ross Lagerwall.
8956
8957- Issue #9558: Fix distutils.command.build_ext with VS 8.0.
8958
8959- Issue #10667: Fast path for collections.Counter().
8960
8961- Issue #10695: passing the port as a string value to telnetlib no longer
8962 causes debug mode to fail.
8963
8964- Issue #1078919: add_header now automatically RFC2231 encodes parameters
8965 that contain non-ascii values.
8966
8967- Issue #10188 (partial resolution): tempfile.TemporaryDirectory emits
8968 a warning on sys.stderr rather than throwing a misleading exception
8969 if cleanup fails due to nulling out of modules during shutdown.
8970 Also avoids an AttributeError when mkdtemp call fails and issues
8971 a ResourceWarning on implicit cleanup via __del__.
8972
8973- Issue #10107: Warn about unsaved files in IDLE on OSX.
8974
8975- Issue #7213: subprocess.Popen's default for close_fds has been changed.
8976 It is now True in most cases other than on Windows when input, output or
8977 error handles are provided.
8978
8979- Issue #6559: subprocess.Popen has a new pass_fds parameter (actually
8980 added in 3.2beta1) to allow specifying a specific list of file descriptors
8981 to keep open in the child process.
8982
8983- Issue #1731717: Fixed the problem where subprocess.wait() could cause an
8984 OSError exception when The OS had been told to ignore SIGCLD in our process
8985 or otherwise not wait for exiting child processes.
8986
8987Tests
8988-----
8989
8990- Issue #775964: test_grp now skips YP/NIS entries instead of failing when
8991 encountering them.
8992
8993Tools/Demos
8994-----------
8995
8996- Issue #6075: IDLE on Mac OS X now works with both Carbon AquaTk and
8997 Cocoa AquaTk.
8998
8999- Issue #10710: ``Misc/setuid-prog.c`` is removed from the source tree.
9000
9001- Issue #10706: Remove outdated script runtests.sh. Either ``make test``
9002 or ``python -m test`` should be used instead.
9003
9004Build
9005-----
9006
9007- The Windows build now uses Tcl/Tk 8.5.9 and sqlite3 3.7.4.
9008
9009- Issue #9234: argparse supports alias names for subparsers.
9010
9011
9012What's New in Python 3.2 Beta 1?
9013================================
9014
9015*Release date: 05-Dec-2010*
9016
9017Core and Builtins
9018-----------------
9019
9020- Issue #10630: Return dict views from the dict proxy keys()/values()/items()
9021 methods.
9022
9023- Issue #10596: Fix float.__mod__ to have the same behaviour as float.__divmod__
9024 with respect to signed zeros. -4.0 % 4.0 should be 0.0, not -0.0.
9025
9026- Issue #1772833: Add the -q command-line option to suppress copyright and
9027 version output in interactive mode.
9028
9029- Provide an *optimize* parameter in the built-in compile() function.
9030
9031- Fixed several corner case issues on Windows in os.stat/os.lstat related to
9032 reparse points.
9033
9034- PEP 384 (Defining a Stable ABI) is implemented.
9035
9036- Issue #2690: Range objects support negative indices and slicing.
9037
9038- Issue #9915: Speed up sorting with a key.
9039
9040- Issue #8685: Speed up set difference ``a - b`` when source set ``a`` is much
9041 larger than operand ``b``. Patch by Andrew Bennetts.
9042
9043- Issue #10518: Bring back the callable() builtin.
9044
9045- Issue #7094: Added alternate formatting (specified by '#') to ``__format__``
9046 method of float, complex, and Decimal. This allows more precise control over
9047 when decimal points are displayed.
9048
9049- Issue #10474: range.count() should return integers.
9050
9051- Issue #1574217: isinstance now catches only AttributeError, rather than
9052 masking all errors.
9053
9054Library
9055-------
9056
9057- logging: added "handler of last resort". See http://bit.ly/last-resort-handler
9058
9059- test.support: Added TestHandler and Matcher classes for better support of
9060 assertions about logging.
9061
9062- Issue #4391: Use proper plural forms in argparse.
9063
9064- Issue #10601: sys.displayhook uses 'backslashreplace' error handler on
9065 UnicodeEncodeError.
9066
9067- Add the "display" and "undisplay" pdb commands.
9068
Martin Panterc04fb562016-02-10 05:44:01 +00009069- Issue #7245: Add a SIGINT handler in pdb that allows breaking a program again
Georg Brandl86dc7322012-10-01 18:58:45 +02009070 after a "continue" command.
9071
9072- Add the "interact" pdb command.
9073
9074- Issue #7905: Actually respect the keyencoding parameter to shelve.Shelf.
9075
9076- Issue #1569291: Speed up array.repeat().
9077
9078- Provide an interface to set the optimization level of compilation in
9079 py_compile, compileall and zipfile.PyZipFile.
9080
9081- Issue #7904: Changes to urllib.parse.urlsplit to handle schemes as defined by
9082 RFC3986. Anything before :// is considered a scheme and is followed by an
9083 authority (or netloc) and by '/' led path, which is optional.
9084
9085- Issue #6045: dbm.gnu databases now support get() and setdefault() methods.
9086
9087- Issue #10620: `python -m unittest` can accept file paths instead of module
9088 names for running specific tests.
9089
9090- Issue #9424: Deprecate the `unittest.TestCase` methods `assertEquals`,
9091 `assertNotEquals`, `assertAlmostEquals`, `assertNotAlmostEquals` and `assert_`
9092 and replace them with the correct methods in the Python test suite.
9093
9094- Issue #10272: The ssl module now raises socket.timeout instead of a generic
9095 SSLError on socket timeouts.
9096
9097- Issue #10528: Allow translators to reorder placeholders in localizable
9098 messages from argparse.
9099
9100- Issue #10497: Fix incorrect use of gettext in argparse.
9101
9102- Issue #10478: Reentrant calls inside buffered IO objects (for example by
9103 way of a signal handler) now raise a RuntimeError instead of freezing the
9104 current process.
9105
9106- logging: Added getLogRecordFactory/setLogRecordFactory with docs and tests.
9107
9108- Issue #10549: Fix pydoc traceback when text-documenting certain classes.
9109
9110- Issue #2001: New HTML server with enhanced Web page features. Patch by Ron
9111 Adam.
9112
9113- Issue #10360: In WeakSet, do not raise TypeErrors when testing for membership
9114 of non-weakrefable objects.
9115
9116- Issue #940286: pydoc.Helper.help() ignores input/output init parameters.
9117
9118- Issue #1745035: Add a command size and data size limit to smtpd.py, to prevent
9119 DoS attacks. Patch by Savio Sena.
9120
9121- Issue #4925: Add filename to error message when executable can't be found in
9122 subprocess.
9123
9124- Issue #10391: Don't dereference invalid memory in error messages in the ast
9125 module.
9126
9127- Issue #10027: st_nlink was not being set on Windows calls to os.stat or
9128 os.lstat. Patch by Hirokazu Yamamoto.
9129
9130- Issue #9333: Expose os.symlink only when the SeCreateSymbolicLinkPrivilege is
9131 held by the user's account, i.e., when the function can actually be used.
9132
9133- Issue #8879: Add os.link support for Windows.
9134
9135- Issue #7911: ``unittest.TestCase.longMessage`` defaults to True for improved
9136 failure messages by default. Patch by Mark Roddy.
9137
9138- Issue #1486713: HTMLParser now has an optional tolerant mode where it tries to
9139 guess at the correct parsing of invalid html.
9140
Serhiy Storchaka14867992014-09-10 23:43:41 +03009141- Issue #10554: Add context management protocol support to subprocess.Popen objects.
Georg Brandl86dc7322012-10-01 18:58:45 +02009142
9143- Issue #8989: email.utils.make_msgid now has a domain parameter that can
9144 override the domain name used in the generated msgid.
9145
9146- Issue #9299: Add exist_ok parameter to os.makedirs to suppress the 'File
9147 exists' exception when a target directory already exists with the specified
9148 mode. Patch by Ray Allen.
9149
9150- Issue #9573: os.fork() now works correctly when triggered as a side effect of
9151 a module import.
9152
9153- Issue #10464: netrc now correctly handles lines with embedded '#' characters.
9154
9155- Added itertools.accumulate().
9156
9157- Issue #4113: Added custom ``__repr__`` method to ``functools.partial``.
9158 Original patch by Daniel Urban.
9159
9160- Issue #10273: Rename `assertRegexpMatches` and `assertRaisesRegexp` to
9161 `assertRegex` and `assertRaisesRegex`.
9162
9163- Issue #10535: Enable silenced warnings in unittest by default.
9164
9165- Issue #9873: The URL parsing functions in urllib.parse now accept ASCII byte
9166 sequences as input in addition to character strings.
9167
9168- Issue #10586: The statistics API for the new functools.lru_cache has been
9169 changed to a single cache_info() method returning a named tuple.
9170
9171- Issue #10323: itertools.islice() now consumes the minimum number of inputs
9172 before stopping. Formerly, the final state of the underlying iterator was
9173 undefined.
9174
9175- Issue #10565: The collections.Iterator ABC now checks for both __iter__ and
9176 __next__.
9177
9178- Issue #10242: Fixed implementation of unittest.ItemsEqual and gave it a new
9179 more informative name, unittest.CountEqual.
9180
9181- Issue #10561: In pdb, clear the breakpoints by the breakpoint number.
9182
9183- Issue #2986: difflib.SequenceMatcher gets a new parameter, autojunk, which can
9184 be set to False to turn off the previously undocumented 'popularity'
9185 heuristic. Patch by Terry Reedy and Eli Bendersky.
9186
9187- Issue #10534: in difflib, expose bjunk and bpopular sets; deprecate
9188 undocumented and now redundant isbjunk and isbpopular methods.
9189
9190- Issue #9846: zipfile is now correctly closing underlying file objects.
9191
9192- Issue #10459: Update CJK character names to Unicode 6.0.
9193
9194- Issue #4493: urllib.request adds '/' in front of path components which does not
9195 start with '/. Common behavior exhibited by browsers and other clients.
9196
9197- Issue #6378: idle.bat now runs with the appropriate Python version rather than
9198 the system default. Patch by Sridhar Ratnakumar.
9199
9200- Issue #10470: 'python -m unittest' will now run test discovery by default,
9201 when no extra arguments have been provided.
9202
9203- Issue #3709: BaseHTTPRequestHandler will buffer the headers and write to
9204 output stream only when end_headers is invoked. This is a speedup and an
9205 internal optimization. Patch by Andrew Shaaf.
9206
9207- Issue #10220: Added inspect.getgeneratorstate. Initial patch by Rodolpho
9208 Eckhardt.
9209
9210- Issue #10453: compileall now uses argparse instead of getopt, and thus
9211 provides clean output when called with '-h'.
9212
9213- Issue #8078: Add constants for higher baud rates in the termios module. Patch
9214 by Rodolpho Eckhardt.
9215
9216- Issue #10407: Fix two NameErrors in distutils.
9217
9218- Issue #10371: Deprecated undocumented functions in the trace module.
9219
9220- Issue #10467: Fix BytesIO.readinto() after seeking into a position after the
9221 end of the file.
9222
9223- configparser: 100% test coverage.
9224
9225- Issue #10499: configparser supports pluggable interpolation handlers. The
9226 default classic interpolation handler is called BasicInterpolation. Another
9227 interpolation handler added (ExtendedInterpolation) which supports the syntax
9228 used by zc.buildout (e.g. interpolation between sections).
9229
9230- configparser: the SafeConfigParser class has been renamed to ConfigParser.
9231 The legacy ConfigParser class has been removed but its interpolation mechanism
9232 is still available as LegacyInterpolation.
9233
9234- configparser: Usage of RawConfigParser is now discouraged for new projects
9235 in favor of ConfigParser(interpolation=None).
9236
9237- Issue #1682942: configparser supports alternative option/value delimiters.
9238
9239- Issue #5412: configparser supports mapping protocol access.
9240
9241- Issue #9411: configparser supports specifying encoding for read operations.
9242
9243- Issue #9421: configparser's getint(), getfloat() and getboolean() methods
9244 accept vars and default arguments just like get() does.
9245
9246- Issue #9452: configparser supports reading from strings and dictionaries
9247 (thanks to the mapping protocol API, the latter can be used to copy data
9248 between parsers).
9249
9250- configparser: accepted INI file structure is now customizable, including
9251 comment prefixes, name of the DEFAULT section, empty lines in multiline
9252 values, and indentation.
9253
9254- Issue #10326: unittest.TestCase instances can be pickled.
9255
9256- Issue #9926: Wrapped TestSuite subclass does not get __call__ executed.
9257
9258- Issue #9920: Skip tests for cmath.atan and cmath.atanh applied to complex
9259 zeros on systems where the log1p function fails to respect the sign of zero.
9260 This fixes a test failure on AIX.
9261
9262- Issue #9732: Addition of getattr_static to the inspect module.
9263
9264- Issue #10446: Module documentation generated by pydoc now links to a
9265 version-specific online reference manual.
9266
9267- Make the 'No module named' exception message from importlib consistent.
9268
9269- Issue #10443: Add the SSLContext.set_default_verify_paths() method.
9270
9271- Issue #10440: Support RUSAGE_THREAD as a constant in the resource module.
9272 Patch by Robert Collins.
9273
9274- Issue #10429: IMAP.starttls() stored the capabilities as bytes objects, rather
9275 than strings.
9276
9277C-API
9278-----
9279
9280- Issue #10557: Added a new API function, PyUnicode_TransformDecimalToASCII(),
9281 which transforms non-ASCII decimal digits in a Unicode string to their ASCII
9282 equivalents.
9283
9284- Issue #9518: Extend the PyModuleDef_HEAD_INIT macro to explicitly
9285 zero-initialize all fields, fixing compiler warnings seen when building
9286 extension modules with gcc with "-Wmissing-field-initializers" (implied by
9287 "-W").
9288
9289- Issue #10255: Fix reference leak in Py_InitializeEx(). Patch by Neil
9290 Schemenauer.
9291
9292- structseq.h is now included in Python.h.
9293
9294- Loosen PyArg_ValidateKeywordArguments to allow dict subclasses.
9295
9296Tests
9297-----
9298
9299- regrtest.py once again ensures the test directory is removed from sys.path
9300 when it is invoked directly as the __main__ module.
9301
9302- `python -m test` can be used to run the test suite as well as `python -m
9303 test.regrtest`.
9304
9305- Do not fail test_socket when the IP address of the local hostname cannot be
9306 looked up.
9307
9308- Issue #8886: Use context managers throughout test_zipfile. Patch by Eric
9309 Carstensen.
9310
9311Build
9312-----
9313
9314- Issue #10325: Fix two issues in the fallback definitions for PY_ULLONG_MAX and
9315 PY_LLONG_MAX that made them unsuitable for use in preprocessor conditionals.
9316
9317Documentation
9318-------------
9319
9320- Issue #10299: List the built-in functions in a table in functions.rst.
9321
9322
9323What's New in Python 3.2 Alpha 4?
9324=================================
9325
9326*Release date: 13-Nov-2010*
9327
9328Core and Builtins
9329-----------------
9330
9331- Issue #10372: Import the warnings module only after the IO library is
9332 initialized, so as to avoid bootstrap issues with the '-W' option.
9333
9334- Issue #10293: Remove obsolete field in the PyMemoryView structure, unused
9335 undocumented value PyBUF_SHADOW, and strangely-looking code in
9336 PyMemoryView_GetContiguous.
9337
9338- Issue #6081: Add str.format_map(), similar to ``str.format(**mapping)``.
9339
9340- If FileIO.__init__ fails, close the file descriptor.
9341
9342- Issue #10221: dict.pop(k) now has a key error message that includes the
9343 missing key (same message d[k] returns for missing keys).
9344
9345- Issue #5437: A preallocated MemoryError instance should not keep traceback
9346 data (including local variables caught in the stack trace) alive infinitely.
9347
9348- Issue #10186: Fix the SyntaxError caret when the offset is equal to the length
9349 of the offending line.
9350
9351- Issue #10089: Add support for arbitrary -X options on the command line. They
9352 can be retrieved through a new attribute ``sys._xoptions``.
9353
9354- Issue #4388: On Mac OS X, decode command line arguments from UTF-8, instead of
9355 the locale encoding. If the LANG (and LC_ALL and LC_CTYPE) environment
9356 variable is not set, the locale encoding is ISO-8859-1, whereas most programs
9357 (including Python) expect UTF-8. Python already uses UTF-8 for the filesystem
9358 encoding and to encode command line arguments on this OS.
9359
9360- Issue #9713, #10114: Parser functions (e.g. PyParser_ASTFromFile) expect
9361 filenames encoded to the filesystem encoding with the surrogateescape error
9362 handler (to support undecodable bytes), instead of UTF-8 in strict mode.
9363
9364- Issue #9997: Don't let the name "top" have special significance in scope
9365 resolution.
9366
9367- Issue #9862: Compensate for broken PIPE_BUF in AIX by hard coding its value as
9368 the default 512 when compiling on AIX.
9369
9370- Use locale encoding instead of UTF-8 to encode and decode filenames if
9371 Py_FileSystemDefaultEncoding is not set.
9372
9373- Issue #10095: fp_setreadl() doesn't reopen the file, instead reuse the file
9374 descriptor.
9375
9376- Issue #9418: Moved private string methods ``_formatter_parser`` and
9377 ``_formatter_field_name_split`` into a new ``_string`` module.
9378
9379- Issue #9992: Remove PYTHONFSENCODING environment variable.
9380
9381Library
9382-------
9383
9384- Issue #12943: python -m tokenize support has been added to tokenize.
9385
9386- Issue #10465: fix broken delegating of attributes by gzip._PaddedFile.
9387
9388- Issue #10356: Decimal.__hash__(-1) should return -2.
9389
9390- Issue #1553375: logging: Added stack_info kwarg to display stack information.
9391
9392- Issue #5111: IPv6 Host in the Header is wrapped inside [ ]. Patch by Chandru.
9393
9394- Fix Fraction.__hash__ so that Fraction.__hash__(-1) is -2. (See also issue
9395 #10356.)
9396
9397- Issue #4471: Add the IMAP.starttls() method to enable encryption on standard
9398 IMAP4 connections. Original patch by Lorenzo M. Catucci.
9399
9400- Issue #1466065: Add 'validate' option to base64.b64decode to raise an error if
9401 there are non-base64 alphabet characters in the input.
9402
9403- Issue #10386: Add __all__ to token module; this simplifies importing in
9404 tokenize module and prevents leaking of private names through ``import *``.
9405
9406- Issue #4471: Properly shutdown socket in IMAP.shutdown(). Patch by Lorenzo
9407 M. Catucci.
9408
9409- Fix IMAP.login() to work properly.
9410
9411- Issue #9244: multiprocessing pool worker processes could terminate
9412 unexpectedly if the return value of a task could not be pickled. Only the
9413 ``repr`` of such errors are now sent back, wrapped in an
9414 ``MaybeEncodingError`` exception.
9415
9416- Issue #9244: The ``apply_async()`` and ``map_async()`` methods of
Martin Panter7462b6492015-11-02 03:37:02 +00009417 ``multiprocessing.Pool`` now accepts an ``error_callback`` argument. This can
Georg Brandl86dc7322012-10-01 18:58:45 +02009418 be a callback with the signature ``callback(exc)``, which will be called if
9419 the target raises an exception.
9420
9421- Issue #10022: The dictionary returned by the ``getpeercert()`` method of SSL
9422 sockets now has additional items such as ``issuer`` and ``notBefore``.
9423
9424- ``usenetrc`` is now false by default for NNTP objects.
9425
9426- Issue #1926: Add support for NNTP over SSL on port 563, as well as STARTTLS.
9427 Patch by Andrew Vant.
9428
9429- Issue #10335: Add tokenize.open(), detect the file encoding using
9430 tokenize.detect_encoding() and open it in read only mode.
9431
9432- Issue #10321: Add support for binary data to smtplib.SMTP.sendmail, and a new
9433 method send_message to send an email.message.Message object.
9434
9435- Issue #6011: sysconfig and distutils.sysconfig use the surrogateescape error
9436 handler to parse the Makefile file. Avoid a UnicodeDecodeError if the source
9437 code directory name contains a non-ASCII character and the locale encoding is
9438 ASCII.
9439
9440- Issue #10329: The trace module writes reports using the input Python script
9441 encoding, instead of the locale encoding. Patch written by Alexander
9442 Belopolsky.
9443
9444- Issue #10126: Fix distutils' test_build when Python was built with
9445 --enable-shared.
9446
9447- Issue #9281: Prevent race condition with mkdir in distutils. Patch by
9448 Arfrever.
9449
9450- Issue #10229: Fix caching error in gettext.
9451
9452- Issue #10252: Close file objects in a timely manner in distutils code and
9453 tests. Patch by Brian Brazil, completed by Éric Araujo.
9454
9455- Issue #10180: Pickling file objects is now explicitly forbidden, since
9456 unpickling them produced nonsensical results.
9457
9458- Issue #10311: The signal module now restores errno before returning from its
9459 low-level signal handler. Patch by Hallvard B Furuseth.
9460
9461- Issue #10282: Add a ``nntp_implementation`` attribute to NNTP objects.
9462
9463- Issue #10283: Add a ``group_pattern`` argument to NNTP.list().
9464
9465- Issue #10155: Add IISCGIHandler to wsgiref.handlers to support IIS CGI
9466 environment better, and to correct unicode environment values for WSGI 1.0.1.
9467
9468- Issue #10281: nntplib now returns None for absent fields in the OVER/XOVER
9469 response, instead of raising an exception.
9470
9471- wsgiref now implements and validates PEP 3333, rather than an experimental
9472 extension of PEP 333. (Note: earlier versions of Python 3.x may have
9473 incorrectly validated some non-compliant applications as WSGI compliant; if
9474 your app validates with Python <3.2b1+, but not on this version, it is likely
9475 the case that your app was not compliant.)
9476
9477- Issue #10280: NNTP.nntp_version should reflect the highest version advertised
9478 by the server.
9479
9480- Issue #10184: Touch directories only once when extracting a tarfile.
9481
9482- Issue #10199: New package, ``turtledemo`` now contains selected demo scripts
9483 that were formerly found under Demo/turtle.
9484
9485- Issue #10265: Close file objects explicitly in sunau. Patch by Brian Brazil.
9486
9487- Issue #10266: uu.decode didn't close in_file explicitly when it was given as a
9488 filename. Patch by Brian Brazil.
9489
9490- Issue #10110: Queue objects didn't recognize full queues when the maxsize
9491 parameter had been reduced.
9492
9493- Issue #10160: Speed up operator.attrgetter. Patch by Christos Georgiou.
9494
9495- logging: Added style option to basicConfig() to allow %, {} or $-formatting.
9496
9497- Issue #5729: json.dumps() now supports using a string such as '\t' for
9498 pretty-printing multilevel objects.
9499
9500- Issue #10253: FileIO leaks a file descriptor when trying to open a file for
9501 append that isn't seekable. Patch by Brian Brazil.
9502
Serhiy Storchaka14867992014-09-10 23:43:41 +03009503- Support context management protocol for file-like objects returned by mailbox
Georg Brandl86dc7322012-10-01 18:58:45 +02009504 ``get_file()`` methods.
9505
9506- Issue #10246: uu.encode didn't close file objects explicitly when filenames
9507 were given to it. Patch by Brian Brazil.
9508
9509- Issue #10198: fix duplicate header written to wave files when writeframes() is
9510 called without data.
9511
9512- Close file objects in modulefinder in a timely manner.
9513
Martin Panter7462b6492015-11-02 03:37:02 +00009514- Close an io.TextIOWrapper object in email.parser in a timely manner.
Georg Brandl86dc7322012-10-01 18:58:45 +02009515
9516- Close a file object in distutils.sysconfig in a timely manner.
9517
9518- Close a file object in pkgutil in a timely manner.
9519
9520- Issue #10233: Close file objects in a timely manner in the tarfile module and
9521 its test suite.
9522
9523- Issue #10093: ResourceWarnings are now issued when files and sockets are
9524 deallocated without explicit closing. These warnings are silenced by default,
9525 except in pydebug mode.
9526
9527- tarfile.py: Add support for all missing variants of the GNU sparse extensions
9528 and create files with holes when extracting sparse members.
9529
9530- Issue #10218: Return timeout status from ``Condition.wait`` in threading.
9531
9532- Issue #7351: Add ``zipfile.BadZipFile`` spelling of the exception name and
9533 deprecate the old name ``zipfile.BadZipfile``.
9534
9535- Issue #5027: The standard ``xml`` namespace is now understood by
9536 xml.sax.saxutils.XMLGenerator as being bound to
9537 http://www.w3.org/XML/1998/namespace. Patch by Troy J. Farrell.
9538
9539- Issue #5975: Add csv.unix_dialect class.
9540
9541- Issue #7761: telnetlib.interact failures on Windows fixed.
9542
9543- logging: Added style option to Formatter to allow %, {} or $-formatting.
9544
9545- Issue #5178: Added tempfile.TemporaryDirectory class that can be used as a
9546 context manager.
9547
9548- Issue #1349106: Generator (and BytesGenerator) flatten method and Header
9549 encode method now support a 'linesep' argument.
9550
9551- Issue #5639: Add a *server_hostname* argument to ``SSLContext.wrap_socket`` in
9552 order to support the TLS SNI extension. ``HTTPSConnection`` and ``urlopen()``
9553 also use this argument, so that HTTPS virtual hosts are now supported.
9554
9555- Issue #10166: Avoid recursion in pstats Stats.add() for many stats items.
9556
9557- Issue #10163: Skip unreadable registry keys during mimetypes initialization.
9558
9559- logging: Made StreamHandler terminator configurable.
9560
9561- logging: Allowed filters to be just callables.
9562
9563- logging: Added tests for _logRecordClass changes.
9564
9565- Issue #10092: Properly reset locale in calendar.Locale*Calendar classes.
9566
9567- logging: Added _logRecordClass, getLogRecordClass, setLogRecordClass to
9568 increase flexibility of LogRecord creation.
9569
9570- Issue #5117: Case normalization was needed on ntpath.relpath(). Also fixed
9571 root directory issue on posixpath.relpath(). (Ported working fixes from
9572 ntpath.)
9573
9574- Issue #1343: xml.sax.saxutils.XMLGenerator now has an option
9575 short_empty_elements to direct it to use self-closing tags when appropriate.
9576
9577- Issue #9807 (part 1): Expose the ABI flags in sys.abiflags. Add --abiflags
9578 switch to python-config for command line access.
9579
9580- Issue #6098: Don't claim DOM level 3 conformance in minidom.
9581
9582- Issue #5762: Fix AttributeError raised by ``xml.dom.minidom`` when an empty
9583 XML namespace attribute is encountered.
9584
9585- Issue #2830: Add the ``html.escape()`` function, which quotes all problematic
9586 characters by default. Deprecate ``cgi.escape()``.
9587
9588- Issue #9409: Fix the regex to match all kind of filenames, for interactive
9589 debugging in doctests.
9590
9591- Issue #9183: ``datetime.timezone(datetime.timedelta(0))`` will now return the
9592 same instance as ``datetime.timezone.utc``.
9593
9594- Issue #7523: Add SOCK_CLOEXEC and SOCK_NONBLOCK to the socket module, where
9595 supported by the system. Patch by Nikita Vetoshkin.
9596
9597- Issue #10063: file:// scheme will stop accessing remote hosts via ftp
9598 protocol. file:// urls had fallback to access remote hosts via ftp. This was
9599 not correct, change is made to raise a URLError when a remote host is tried to
9600 access via file:// scheme.
9601
9602- Issue #1710703: Write structures for an empty ZIP archive when a ZipFile is
9603 created in modes 'a' or 'w' and then closed without adding any files. Raise
9604 BadZipfile (rather than IOError) when opening small non-ZIP files.
9605
9606- Issue #10041: The signature of optional arguments in socket.makefile() didn't
9607 match that of io.open(), and they also didn't get forwarded properly to
9608 TextIOWrapper in text mode. Patch by Kai Zhu.
9609
9610- Issue #9003: http.client.HTTPSConnection, urllib.request.HTTPSHandler and
9611 urllib.request.urlopen now take optional arguments to allow for server
9612 certificate checking, as recommended in public uses of HTTPS.
9613
9614- Issue #6612: Fix site and sysconfig to catch os.getcwd() error, eg. if the
9615 current directory was deleted. Patch written by W. Trevor King.
9616
9617- Issue #3873: Speed up unpickling from file objects that have a peek() method.
9618
9619- Issue #10075: Add a session_stats() method to SSLContext objects.
9620
9621- Issue #9948: Fixed problem of losing filename case information.
9622
9623Extension Modules
9624-----------------
9625
9626- Issue #5109: array.array constructor will now use fast code when
9627 initial data is provided in an array object with correct type.
9628
9629- Issue #6317: Now winsound.PlaySound only accepts unicode.
9630
9631- Issue #6317: Now winsound.PlaySound can accept non ascii filename.
9632
9633- Issue #9377: Use Unicode API for gethostname on Windows.
9634
9635- Issue #10143: Update "os.pathconf" values.
9636
Serhiy Storchaka14867992014-09-10 23:43:41 +03009637- Issue #6518: Support context management protocol for ossaudiodev types.
Georg Brandl86dc7322012-10-01 18:58:45 +02009638
9639- Issue #678250: Make mmap flush a noop on ACCESS_READ and ACCESS_COPY.
9640
9641- Issue #9054: Fix a crash occurring when using the pyexpat module with expat
9642 version 2.0.1.
9643
9644- Issue #5355: Provide mappings from Expat error numbers to string descriptions
9645 and backwards, in order to actually make it possible to analyze error codes
9646 provided by ExpatError.
9647
9648- The Unicode database was updated to 6.0.0.
9649
9650C-API
9651-----
9652
9653- Issue #10288: The deprecated family of "char"-handling macros
9654 (ISLOWER()/ISUPPER()/etc) have now been removed: use Py_ISLOWER() etc instead.
9655
9656- Issue #9778: Hash values are now always the size of pointers. A new Py_hash_t
9657 type has been introduced.
9658
9659Tools/Demos
9660-----------
9661
9662- Issue #10117: Tools/scripts/reindent.py now accepts source files that use
9663 encoding other than ASCII or UTF-8. Source encoding is preserved when
9664 reindented code is written to a file.
9665
9666- Issue #7287: Demo/imputil/knee.py was removed.
9667
9668Tests
9669-----
9670
9671- Issue #3699: Fix test_bigaddrspace and extend it to test bytestrings as well
9672 as unicode strings. Initial patch by Sandro Tosi.
9673
9674- Issue #10294: Remove dead code form test_unicode_file.
9675
9676- Issue #10123: Don't use non-ascii filenames in test_doctest tests. Add a new
9677 test specific to unicode (non-ascii name and filename).
9678
9679Build
9680-----
9681
9682- Issue #10268: Add a --enable-loadable-sqlite-extensions option to configure.
9683
9684- Issue #8852: Allow the socket module to build on OpenSolaris.
9685
9686- Drop -OPT:Olimit compiler option.
9687
9688- Issue #10094: Use versioned .so files on GNU/kfreeBSD and the GNU Hurd.
9689
9690- Accept Oracle Berkeley DB 5.0 and 5.1 as backend for the dbm extension.
9691
9692- Issue #7473: avoid link errors when building a framework with a different set
9693 of architectures than the one that is currently installed.
9694
9695
9696What's New in Python 3.2 Alpha 3?
9697=================================
9698
9699*Release date: 09-Oct-2010*
9700
9701Core and Builtins
9702-----------------
9703
9704- Issue #10068: Global objects which have reference cycles with their module's
9705 dict are now cleared again. This causes issue #7140 to appear again.
9706
9707- Issue #9738: Document PyErr_SetString() and PyErr_SetFromErrnoWithFilename()
9708 encodings.
9709
9710- ast.literal_eval() can now handle negative numbers. It is also a little more
9711 liberal in what it accepts without compromising the safety of the evaluation.
9712 For example, 3j+4 and 3+4+5 are both accepted.
9713
9714- Issue #10006: type.__abstractmethods__ now raises an AttributeError. As a
9715 result metaclasses can now be ABCs (see #9533).
9716
9717- Issue #8670: ctypes.c_wchar supports non-BMP characters with 32 bits wchar_t.
9718
9719- Issue #8670: PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() replace
9720 UTF-16 surrogate pairs by single non-BMP characters for 16 bits Py_UNICODE and
9721 32 bits wchar_t (eg. Linux in narrow build).
9722
9723- Issue #10003: Allow handling of SIGBREAK on Windows. Fixes a regression
9724 introduced by issue #9324.
9725
9726- Issue #9979: Create function PyUnicode_AsWideCharString().
9727
9728- Issue #7397: Mention that importlib.import_module() is probably what someone
9729 really wants to be using in __import__'s docstring.
9730
9731- Issue #8521: Allow CreateKeyEx, OpenKeyEx, and DeleteKeyEx functions of winreg
9732 to use named arguments.
9733
9734- Issue #9930: Remove bogus subtype check that was causing (e.g.)
9735 float.__rdiv__(2.0, 3) to return NotImplemented instead of the expected 1.5.
9736
9737- Issue #9808: Implement os.getlogin for Windows. Patch by Jon Anglin.
9738
9739- Issue #9901: Destroying the GIL in Py_Finalize() can fail if some other
9740 threads are still running. Instead, reinitialize the GIL on a second call to
9741 Py_Initialize().
9742
9743- All SyntaxErrors now have a column offset and therefore a caret when the error
9744 is printed.
9745
9746- Issue #9252: PyImport_Import no longer uses a fromlist hack to return the
9747 module that was imported, but instead gets the module from sys.modules.
9748
9749- Issue #9213: The range type_items now provides index() and count() methods, to
9750 conform to the Sequence ABC. Patch by Daniel Urban and Daniel Stutzbach.
9751
9752- Issue #7994: Issue a PendingDeprecationWarning if object.__format__ is called
9753 with a non-empty format string. This is an effort to future-proof user
9754 code. If a derived class does not currently implement __format__ but later
9755 adds its own __format__, it would most likely break user code that had
9756 supplied a format string. This will be changed to a DeprecationWaring in
9757 Python 3.3 and it will be an error in Python 3.4.
9758
9759- Issue #9828: Destroy the GIL in Py_Finalize(), so that it gets properly
9760 re-created on a subsequent call to Py_Initialize(). The problem (a crash)
9761 wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
9762
9763- Issue #9210: Configure option --with-wctype-functions was removed. Using the
9764 functions from the libc caused the methods .upper() and lower() to become
9765 locale aware and created subtly wrong results.
9766
9767- Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error on a
9768 non-ASCII byte in the format string.
9769
9770- Issue #4617: Previously it was illegal to delete a name from the local
9771 namespace if it occurs as a free variable in a nested block. This limitation
9772 of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF).
9773
9774- Issue #9804: ascii() now always represents unicode surrogate pairs as a single
9775 ``\UXXXXXXXX``, regardless of whether the character is printable or not.
9776 Also, the "backslashreplace" error handler now joins surrogate pairs into a
9777 single character on UCS-2 builds.
9778
9779- Issue #9757: memoryview objects get a release() method to release the
9780 underlying buffer (previously this was only done when deallocating the
9781 memoryview), and gain support for the context management protocol.
9782
9783- Issue #9797: pystate.c wrongly assumed that zero couldn't be a valid
9784 thread-local storage key.
9785
9786Library
9787-------
9788
9789- Issue #2236: distutils' mkpath ignored the mode parameter.
9790
9791- Fix typo in one sdist option (medata-check).
9792
9793- Issue #9199: Fix incorrect use of distutils.cmd.Command.announce.
9794
9795- Issue #1718574: Fix options that were supposed to accept arguments but did
9796 not in build_clib.
9797
9798- Issue #9437: Fix building C extensions with non-default LDFLAGS.
9799
9800- Issue #4661: email can now parse bytes input and generate either converted
9801 7bit output or bytes output. Email version bumped to 5.1.0.
9802
9803- Issue #1589: Add ssl.match_hostname(), to help implement server identity
9804 verification for higher-level protocols.
9805
9806- Issue #9759: GzipFile now raises ValueError when an operation is attempted
9807 after the file is closed. Patch by Jeffrey Finkelstein.
9808
9809- Issue #9042: Fix interaction of custom translation classes and caching in
9810 gettext.
9811
9812- Issue #6706: asyncore.dispatcher now provides a handle_accepted() method
9813 returning a (sock, addr) pair which is called when a connection has been
9814 established with a new remote endpoint. This is supposed to be used as a
9815 replacement for old handle_accept() and avoids the user to call accept()
9816 directly.
9817
9818- Issue #9065: tarfile no longer uses "root" as the default for the uname and
9819 gname field.
9820
9821- Issue #8980: Fixed a failure in distutils.command check that was shadowed by
9822 an environment that does not have docutils. Patch by Arfrever.
9823
9824- Issue #1050268: parseaddr now correctly quotes double quote and backslash
9825 characters that appear inside quoted strings in email addresses.
9826
9827- Issue #10004: quoprimime no longer generates a traceback when confronted with
9828 invalid characters after '=' in a Q-encoded word.
9829
9830- Issue #1491: BaseHTTPServer nows send a ``100 Continue`` response before
9831 sending a 200 OK for the Expect: 100-continue request header.
9832
9833- Issue #9360: Cleanup and improvements to the nntplib module. The API now
9834 conforms to the philosophy of bytes and unicode separation in Python 3. A
9835 test suite has also been added.
9836
9837- Issue #9962: GzipFile now has the peek() method.
9838
9839- Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
9840 retry the select() loop instead of bailing out. This is because select() can
9841 incorrectly report a socket as ready for reading (for example, if it received
9842 some data with an invalid checksum).
9843
9844- Issue #3612: Added new types to ctypes.wintypes. (CHAR and pointers)
9845
9846- Issue #9950: Fix socket.sendall() crash or misbehaviour when a signal is
9847 received. Now sendall() properly calls signal handlers if necessary, and
9848 retries sending if these returned successfully, including on sockets with a
9849 timeout.
9850
9851- Issue #9947: logging: Fixed locking bug in stopListening.
9852
9853- Issue #9945: logging: Fixed locking bugs in addHandler/removeHandler.
9854
9855- Issue #9936: Fixed executable lines' search in the trace module.
9856
9857- Issue #9790: Rework imports necessary for samefile and sameopenfile
9858 in ntpath.
9859
9860- Issue #9928: Properly initialize the types exported by the bz2 module.
9861
9862- Issue #1675951: Allow GzipFile to work with unseekable file objects. Patch by
9863 Florian Festi.
9864
9865- Logging: Added QueueListener class to facilitate logging usage for
9866 performance-critical threads.
9867
9868- Issue #9916: Add some missing errno symbols.
9869
9870- Issue #9877: Expose sysconfig.get_makefile_filename()
9871
9872- logging: Added hasHandlers() method to Logger and LoggerAdapter.
9873
9874- Issue #9908: Fix os.stat() on bytes paths under Windows 7.
9875
9876- Issue #2643: msync() is not called anymore when deallocating an open mmap
9877 object, only munmap().
9878
9879- logging: Changed LoggerAdapter implementation internally, to make it easier to
9880 subclass in a useful way.
9881
9882- logging: hasHandlers method was added to Logger, and isEnabledFor,
9883 getEffectiveLevel, hasHandlers and setLevel were added to LoggerAdapter.
9884 LoggerAdapter was introduced into the unit tests for logging.
9885
9886- Issue #1686: Fix string.Template when overriding the pattern attribute.
9887
9888- Issue #9854: SocketIO objects now observe the RawIOBase interface in
9889 non-blocking mode: they return None when an operation would block (instead of
9890 raising an exception).
9891
9892- Issue #1730136: Fix the comparison between a tk.font.Font and an object of
9893 another kind.
9894
9895- Issue #9441: logging has better coverage for rotating file handlers.
9896
9897- Issue #9865: collections.OrderedDict now has a __sizeof__ method.
9898
9899- Issue #9854: The default read() implementation in io.RawIOBase now handles
9900 non-blocking readinto() returning None correctly.
9901
9902- Issue #1552: socket.socketpair() now returns regular socket.socket objects
9903 supporting the whole socket API (rather than the "raw" _socket.socket
9904 objects).
9905
9906- Issue #9853: Fix the signature of SSLSocket.recvfrom() and SSLSocket.sendto()
9907 to match the corresponding socket methods.
9908
9909- Issue #9840: Added a decorator to reprlib for wrapping __repr__ methods to make
9910 them handle recursive calls within the same thread.
9911
9912- logging: Enhanced HTTPHandler with secure and credentials initializers.
9913
9914- Issue #767645: Set os.path.supports_unicode_filenames to True on Mac OS X.
9915
9916- Issue #9837: The read() method of ZipExtFile objects (as returned by
9917 ZipFile.open()) could return more bytes than requested.
9918
9919- Issue #9826: OrderedDict.__repr__ can now handle self-referential values:
9920 d['x'] = d.
9921
9922- Issue #9825: Using __del__ in the definition of collections.OrderedDict made
9923 it possible for the user to create self-referencing ordered dictionaries which
9924 become permanently uncollectable GC garbage. Reinstated the Python 3.1
9925 approach of using weakref proxies so that reference cycles never get created
9926 in the first place.
9927
9928- Issue #9579, #9580: Fix os.confstr() for value longer than 255 bytes and
9929 encode the value with filesystem encoding and surrogateescape (instead of
9930 utf-8 in strict mode) . Patch written by David Watson.
9931
9932- Issue #9632: Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING
9933 environment variable to set the filesystem encoding at Python startup.
9934 sys.setfilesystemencoding() creates inconsistencies because it is unable to
9935 reencode all filenames in all objects.
9936
9937- Issue #9410: Various optimizations to the pickle module, leading to speedups
9938 up to 4x (depending on the benchmark). Mostly ported from Unladen Swallow;
9939 initial patch by Alexandre Vassalotti.
9940
9941- The pprint module now supports printing OrderedDicts in their given order
9942 (formerly, it would sort the keys).
9943
9944- Logging: Added QueueHandler class to facilitate logging usage with
9945 multiprocessing.
9946
9947- Issue #9707: Rewritten reference implementation of threading.local which is
9948 friendlier towards reference cycles. This change is not normally visible
9949 since an optimized C implementation (_thread._local) is used instead.
9950
9951- Issue #6394: os.getppid() is now supported on Windows. Note that it will
9952 still return the id of the parent process after it has exited. This process
9953 id may even have been reused by another unrelated process.
9954
9955- Issue #9792: In case of connection failure, socket.create_connection() would
9956 swallow the exception and raise a new one, making it impossible to fetch the
9957 original errno, or to filter timeout errors. Now the original error is
9958 re-raised.
9959
9960- Issue #9758: When fcntl.ioctl() was called with mutable_flag set to True, and
9961 the passed buffer was exactly 1024 bytes long, the buffer wouldn't be updated
9962 back after the system call. Original patch by Brian Brazil.
9963
9964- Updates to the random module:
9965
9966 * Document which parts of the module are guaranteed to stay the same across
9967 versions and which parts are subject to change.
9968
9969 * Update the seed() method to use all of the bits in a string instead of just
9970 the hash value. This makes better use of the seed value and assures the
9971 seeding is platform independent. Issue #7889.
9972
9973 * Improved the random()-->integer algorithm used in choice(), shuffle(),
9974 sample(), randrange(), and randint(). Formerly, it used int(n*random())
9975 which has a slight bias whenever n is not a power of two. Issue #9025.
9976
9977 * Improved documentation of arguments to randrange(). Issue #9379.
9978
9979- collections.OrderedDict now supports a new method for repositioning keys to
9980 either end.
9981
9982- Issue #9754: Similarly to assertRaises and assertRaisesRegexp, unittest test
9983 cases now also have assertWarns and assertWarnsRegexp methods to check that a
9984 given warning type was triggered by the code under test.
9985
9986- Issue #5506: BytesIO objects now have a getbuffer() method exporting a view of
9987 their contents without duplicating them. The view is both readable and
9988 writable.
9989
9990- Issue #7566: Implement os.path.sameopenfile for Windows.
9991
9992- Issue #9293: I/O streams now raise ``io.UnsupportedOperation`` when an
9993 unsupported operation is attempted (for example, writing to a file open only
9994 for reading).
9995
9996- hashlib has two new constant attributes: algorithms_guaranteed and
Martin Panter0be894b2016-09-07 12:03:06 +00009997 algorithms_available that respectively list the names of hash algorithms
Georg Brandl86dc7322012-10-01 18:58:45 +02009998 guaranteed to exist in all Python implementations and the names of hash
9999 algorithms available in the current process.
10000
10001- A new package ``concurrent.futures`` as defined by PEP 3148.
10002
10003C-API
10004-----
10005
10006- Add PyErr_SyntaxLocationEx, which supports passing a column offset.
10007
10008- Issue #9834: Don't segfault in PySequence_GetSlice, PySequence_SetSlice, or
10009 PySequence_DelSlice when the object doesn't have any mapping operations
10010 defined.
10011
10012Tools/Demos
10013-----------
10014
10015- Issue #9188: The gdb extension now handles correctly narrow (UCS2) as well as
10016 wide (UCS4) unicode builds for both the host interpreter (embedded inside gdb)
10017 and the interpreter under test.
10018
10019Tests
10020-----
10021
10022- Issue #9308: Added tests for importing encoded modules that do not
10023 depend on specific stdlib modules being encoded in a certain way.
10024
10025- Issue #1051: Add a script (Lib/test/make_ssl_certs.py) to generate the custom
10026 certificate and private key files used by SSL-related certs.
10027
10028- Issue #9978: Wait until subprocess completes initialization. (Win32KillTests
10029 in test_os)
10030
10031- Issue #7110: regrtest now sends test failure reports and single-failure
10032 tracebacks to stderr rather than stdout.
10033
10034- Issue #9628: fix runtests.sh -x option so more than one test can be excluded.
10035
10036- Issue #9899: Fix test_tkinter.test_font on various platforms. Patch by Ned
10037 Deily.
10038
10039- Issue #9894: Do not hardcode ENOENT in test_subprocess.
10040
10041- Issue #9315: Added tests for the trace module. Patch by Eli Bendersky.
10042
10043- Issue #9323: Make test.regrtest.__file__ absolute, this was not always the
10044 case when running profile or trace, for example.
10045
10046- Issue #9568: Fix test_urllib2_localnet on OS X 10.3.
10047
10048Build
10049-----
10050
10051- Issue #10062: Allow building on platforms which do not have sem_timedwait.
10052
10053- Issue #10054: Some platforms provide uintptr_t in inttypes.h. Patch by Akira
10054 Kitada.
10055
10056- Issue #10055: Make json C89-compliant in UCS4 mode.
10057
10058- Issue #9552: Avoid unnecessary rebuild of OpenSSL. (Windows)
10059
10060- Issue #1633863: Don't ignore $CC under AIX.
10061
10062- Issue #9810: Compile bzip2 source files in Python's project file directly. It
10063 used to be built with bzip2's makefile.
10064
10065- Issue #9848: Stopping trying to build _weakref in setup.py as it is a built-in
10066 module.
10067
10068- Issue #9806: python-config now has an ``--extension-suffix`` option that
10069 outputs the suffix for dynamic libraries including the ABI version name
10070 defined by PEP 3149.
10071
10072- Issue #941346: Improve the build process under AIX and allow Python to be
10073 built as a shared library. Patch by Sébastien Sablé.
10074
10075- Issue #4026: Make the fcntl extension build under AIX. Patch by Sébastien
10076 Sablé.
10077
10078- Issue #9701: The MacOSX installer can patch the shell profile to ensure that
10079 the "bin" directory inside the framework is on the shell's search path. This
10080 feature now also supports the ZSH shell.
10081
10082
10083What's New in Python 3.2 Alpha 2?
10084=================================
10085
10086*Release date: 05-Sep-2010*
10087
10088Core and Builtins
10089-----------------
10090
10091- Issue #9225: Remove the ROT_FOUR and DUP_TOPX opcode, the latter replaced by
10092 the new (and simpler) DUP_TOP_TWO. Performance isn't changed, but our
10093 bytecode is a bit simplified. Patch by Demur Rumed.
10094
10095- Issue #9766: Rename poorly named variables exposed by _warnings to prevent
10096 confusion with the proper variables names from 'warnings' itself.
10097
10098- Issue #9212: dict_keys and dict_items now provide the isdisjoint() method, to
10099 conform to the Set ABC. Patch by Daniel Urban.
10100
10101- Issue #9737: Fix a crash when trying to delete a slice or an item from a
10102 memoryview object.
10103
10104- Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding() are
10105 now removed, since their effect was inexistent in 3.x (the default encoding is
10106 hardcoded to utf-8 and cannot be changed).
10107
10108- Issue #7415: PyUnicode_FromEncodedObject() now uses the new buffer API
10109 properly. Patch by Stefan Behnel.
10110
10111- Issue #5553: The Py_LOCAL_INLINE macro now results in inlining on most
10112 platforms. Previously, it inlined only when using Microsoft Visual C.
10113
10114- Issue #9712: Fix tokenize on identifiers that start with non-ascii names.
10115
10116- Issue #9688: __basicsize__ and __itemsize__ must be accessed as Py_ssize_t.
10117
10118- Issue #9684: Added a definition for SIZEOF_WCHAR_T to PC/pyconfig.h, to match
10119 the pyconfig.h generated by configure on other systems.
10120
10121- Issue #9666: Only catch AttributeError in hasattr(). All other exceptions that
10122 occur during attribute lookup are now propagated to the caller.
10123
10124- Issue #8622: Add PYTHONFSENCODING environment variable to override the
10125 filesystem encoding.
10126
10127- Issue #5127: The C functions that access the Unicode Database now accept and
10128 return characters from the full Unicode range, even on narrow unicode builds
10129 (Py_UNICODE_TOLOWER, Py_UNICODE_ISDECIMAL, and others). A visible difference
10130 in Python is that unicodedata.numeric() now returns the correct value for
10131 large code points, and repr() may consider more characters as printable.
10132
10133- Issue #9425: Create PyModule_GetFilenameObject() function to get the filename
10134 as a unicode object, instead of a byte string. Function needed to support
10135 unencodable filenames. Deprecate PyModule_GetFilename() in favor on the new
10136 function.
10137
10138- Issue #8063: Call _PyGILState_Init() earlier in Py_InitializeEx().
10139
10140- Issue #9612: The set object is now 64-bit clean under Windows.
10141
10142- Issue #8202: sys.argv[0] is now set to '-m' instead of '-c' when searching for
10143 the module file to be executed with the -m command line option.
10144
10145- Issue #9599: Create PySys_FormatStdout() and PySys_FormatStderr() functions to
10146 write a message formatted by PyUnicode_FromFormatV() to sys.stdout and
10147 sys.stderr.
10148
10149- Issue #9542: Create PyUnicode_FSDecoder() function, a ParseTuple converter:
10150 decode bytes objects to unicode using PyUnicode_DecodeFSDefaultAndSize(); str
10151 objects are output as-is.
10152
10153- Issue #9203: Computed gotos are now enabled by default on supported compilers
10154 (which are detected by the configure script). They can still be disable
10155 selectively by specifying --without-computed-gotos.
10156
10157- Issue #9425: Create PyErr_WarnFormat() function, similar to PyErr_WarnEx() but
10158 use PyUnicode_FromFormatV() to format the warning message.
10159
10160- Issue #8530: Prevent stringlib fastsearch from reading beyond the front of an
10161 array.
10162
10163- Issue #5319: Print an error if flushing stdout fails at interpreter shutdown.
10164
10165- Issue #9337: The str() of a float or complex number is now identical to its
10166 repr().
10167
10168- Issue #9416: Fix some issues with complex formatting where the output with no
10169 type specifier failed to match the str output:
10170
10171 - format(complex(-0.0, 2.0), '-') omitted the real part from the output,
10172 - format(complex(0.0, 2.0), '-') included a sign and parentheses.
10173
10174Extension Modules
10175-----------------
10176
10177- Issue #8013: time.asctime and time.ctime no longer call system
10178 asctime and ctime functions. The year range for time.asctime is now
10179 1900 through maxint. The range for time.ctime is the same as for
10180 time.localtime. The string produced by these functions is longer
10181 than 24 characters when year is greater than 9999.
10182
10183- Issue #6608: time.asctime is now checking struct tm fields its input
10184 before passing it to the system asctime. Patch by MunSic Jeong.
10185
10186- Issue #8734: Avoid crash in msvcrt.get_osfhandle() when an invalid file
10187 descriptor is provided. Patch by Pascal Chambon.
10188
10189- Issue #7736: Release the GIL around calls to opendir() and closedir() in the
10190 posix module. Patch by Marcin Bachry.
10191
10192- Issue #4835: make PyLong_FromSocket_t() and PyLong_AsSocket_t() private to the
10193 socket module, and fix the width of socket descriptors to be correctly
10194 detected under 64-bit Windows.
10195
10196- Issue #1027206: Support IDNA in gethostbyname, gethostbyname_ex, getaddrinfo
10197 and gethostbyaddr. getnameinfo is now restricted to numeric addresses as
10198 input.
10199
10200- Issue #9214: Set operations on a KeysView or ItemsView in collections now
10201 correctly return a set. Patch by Eli Bendersky.
10202
10203- Issue #5737: Add Solaris-specific mnemonics in the errno module. Patch by
10204 Matthew Ahrens.
10205
10206- Restore GIL in nis_cat in case of error. Decode NIS data to fs encoding, using
10207 the surrogate error handler.
10208
10209- Issue #665761: ``functools.reduce()`` will no longer mask exceptions other
10210 than ``TypeError`` raised by the iterator argument.
10211
10212- Issue #9570: Use PEP 383 decoding in os.mknod and os.mkfifo.
10213
10214- Issue #6915: Under Windows, os.listdir() didn't release the Global Interpreter
10215 Lock around all system calls. Original patch by Ryan Kelly.
10216
10217- Issue #8524: Add a detach() method to socket objects, so as to put the socket
10218 into the closed state without closing the underlying file descriptor.
10219
10220- Issue #477863: Emit a ResourceWarning at shutdown if gc.garbage is not empty.
10221
10222- Issue #6869: Fix a refcount problem in the _ctypes extension.
10223
10224- Issue #5504: ctypes should now work with systems where mmap can't be
10225 PROT_WRITE and PROT_EXEC.
10226
10227- Issue #9507: Named tuple repr will now automatically display the right name in
10228 a tuple subclass.
10229
10230- Issue #9324: Add parameter validation to signal.signal on Windows in order to
10231 prevent crashes.
10232
10233- Issue #9526: Remove some outdated (int) casts that were preventing the array
10234 module from working correctly with arrays of more than 2**31 elements.
10235
10236- Fix memory leak in ssl._ssl._test_decode_cert.
10237
10238- Issue #8065: Fix memory leak in readline module (from failure to free the
10239 result of history_get_history_state()).
10240
10241- Issue #9450: Fix memory leak in readline.replace_history_item and
10242 readline.remove_history_item for readline version >= 5.0.
10243
10244- Issue #8105: Validate file descriptor passed to mmap.mmap on Windows.
10245
Serhiy Storchaka14867992014-09-10 23:43:41 +030010246- Issue #8046: Add context management protocol support and .closed property to mmap
Georg Brandl86dc7322012-10-01 18:58:45 +020010247 objects.
10248
10249Library
10250-------
10251
10252- Issue #7451: Improve decoding performance of JSON objects, and reduce the
10253 memory consumption of said decoded objects when they use the same strings as
10254 keys.
10255
10256- Issue #1100562: Fix deep-copying of objects derived from the list and dict
10257 types. Patch by Michele Orrù and Björn Lindqvist.
10258
10259- Issue #9753: Fixed socket.dup, which did not always work correctly on Windows.
10260
10261- Issue #9421: Made the get<type> methods consistently accept the vars and
10262 default arguments on all parser classes.
10263
10264- Issue #7005: Fixed output of None values for RawConfigParser.write and
10265 ConfigParser.write.
10266
10267- Issue #8990: array.fromstring() and array.tostring() get renamed to
10268 frombytes() and tobytes(), respectively, to avoid confusion. Furthermore,
10269 array.frombytes(), array.extend() as well as the array.array() constructor now
10270 accept bytearray objects. Patch by Thomas Jollans.
10271
10272- Issue #808164: Fixed socket.close to avoid references to globals, to avoid
10273 issues when socket.close is called from a __del__ method.
10274
10275- Issue #9706: ssl module provides a better error handling in various
10276 circumstances.
10277
10278- Issue #1868: Eliminate subtle timing issues in thread-local objects by getting
10279 rid of the cached copy of thread-local attribute dictionary.
10280
10281- Issue #1512791: In setframerate() in the wave module, non-integral frame rates
10282 are rounded to the nearest integer.
10283
10284- Issue #8797: urllib2 does a retry for Basic Authentication failure instead of
10285 falling into recursion.
10286
10287- Issue #1194222: email.utils.parsedate now returns RFC2822 compliant four
10288 character years even if the message contains RFC822 two character years.
10289
10290- Issue #8750: Fixed MutableSet's methods to correctly handle reflexive
10291 operations on its self, namely x -= x and x ^= x.
10292
10293- Issue #9129: smtpd.py is vulnerable to DoS attacks deriving from missing error
10294 handling when accepting a new connection.
10295
10296- Issue #9601: ftplib now provides a workaround for non-compliant
10297 implementations such as IIS shipped with Windows server 2003 returning invalid
10298 response codes for MKD and PWD commands.
10299
10300- Issue #658749: asyncore's connect() method now correctly interprets winsock
10301 errors.
10302
10303- Issue #9501: Fixed logging regressions in cleanup code.
10304
10305- Fix functools.total_ordering() to skip methods inherited from object.
10306
10307- Issue #9572: Importlib should not raise an exception if a directory it thought
10308 it needed to create was done concurrently by another process.
10309
10310- Issue #9617: Signals received during a low-level write operation aren't
10311 ignored by the buffered IO layer anymore.
10312
10313- Issue #843590: Make "macintosh" an alias to the "mac_roman" encoding.
10314
10315- Create os.fsdecode(): decode from the filesystem encoding with surrogateescape
10316 error handler, or strict error handler on Windows.
10317
10318- Issue #3488: Provide convenient shorthand functions ``gzip.compress`` and
10319 ``gzip.decompress``. Original patch by Anand B. Pillai.
10320
10321- Issue #8807: poplib.POP3_SSL class now accepts a context parameter, which is a
10322 ssl.SSLContext object allowing bundling SSL configuration options,
10323 certificates and private keys into a single (potentially long-lived)
10324 structure.
10325
10326- Issue #8866: parameters passed to socket.getaddrinfo can now be specified as
10327 single keyword arguments.
10328
10329- Address XXX comment in dis.py by having inspect.py prefer to reuse the dis.py
10330 compiler flag values over defining its own.
10331
10332- Issue #9147: Added dis.code_info() which is similar to show_code() but returns
10333 formatted code information in a string rather than displaying on screen.
10334
10335- Issue #9567: functools.update_wrapper now adds a __wrapped__ attribute
10336 pointing to the original callable.
10337
10338- Issue #3445: functools.update_wrapper now tolerates missing attributes on
10339 wrapped callables.
10340
10341- Issue #5867: Add abc.abstractclassmethod and abc.abstractstaticmethod.
10342
10343- Issue #9605: posix.getlogin() decodes the username with file filesystem
10344 encoding and surrogateescape error handler. Patch written by David Watson.
10345
10346- Issue #9604: posix.initgroups() encodes the username using the fileystem
10347 encoding and surrogateescape error handler. Patch written by David Watson.
10348
10349- Issue #9603: posix.ttyname() and posix.ctermid() decode the terminal name
10350 using the filesystem encoding and surrogateescape error handler. Patch written
10351 by David Watson.
10352
10353- Issue #7647: The posix module now has the ST_RDONLY and ST_NOSUID constants,
10354 for use with the statvfs() function. Patch by Adam Jackson.
10355
10356- Issue #8688: MANIFEST files created by distutils now include a magic comment
10357 indicating they are generated. Manually maintained MANIFESTs without this
10358 marker will not be overwritten or removed.
10359
10360- Issue #7467: when reading a file from a ZIP archive, its CRC is checked and a
10361 BadZipfile error is raised if it doesn't match (as used to be the case in
10362 Python 2.5 and earlier).
10363
10364- Issue #9550: a BufferedReader could issue an additional read when the original
10365 read request had been satisfied, which could block indefinitely when the
10366 underlying raw IO channel was e.g. a socket. Report and original patch by
10367 Jason V. Miller.
10368
10369- Issue #3757: thread-local objects now support cyclic garbage collection.
10370 Thread-local objects involved in reference cycles will be deallocated timely
10371 by the cyclic GC, even if the underlying thread is still running.
10372
10373- Issue #9452: Add read_file, read_string, and read_dict to the configparser
10374 API; new source attribute to exceptions.
10375
10376- Issue #6231: Fix xml.etree.ElementInclude to include the tail of the current
10377 node.
10378
10379- Issue #8047: Fix the xml.etree serializer to return bytes by default. Use
10380 ``encoding="unicode"`` to generate a Unicode string.
10381
10382- Issue #8280: urllib2's Request method will remove fragments in the url. This
10383 is how it is supposed to work, wget and curl do the same. Previous behavior
10384 was wrong.
10385
10386- Issue #6683: For SMTP logins we now try all authentication methods advertised
10387 by the server. Many servers are buggy and advertise authentication methods
10388 they do not support in reality.
10389
10390- Issue #8814: function annotations (the ``__annotations__`` attribute) are now
10391 included in the set of attributes copied by default by functools.wraps and
10392 functools.update_wrapper. Patch by Terrence Cole.
10393
10394- Issue #2944: asyncore doesn't handle connection refused correctly.
10395
10396- Issue #4184: Private attributes on smtpd.SMTPChannel made public and deprecate
10397 the private attributes. Add tests for smtpd module.
10398
10399- Issue #3196: email header decoding is now forgiving if an RFC2047 encoded word
10400 encoded in base64 is lacking padding.
10401
10402- Issue #9444: Argparse now uses the first element of prefix_chars as the option
10403 character for the added 'h/help' option if prefix_chars does not contain a
10404 '-', instead of raising an error.
10405
10406- Issue #7372: Fix pstats regression when stripping paths from profile data
10407 generated with the profile module.
10408
10409- Issue #9428: Fix running scripts with the profile/cProfile modules from the
10410 command line.
10411
10412- Issue #7781: Fix restricting stats by entry counts in the pstats interactive
10413 browser.
10414
10415- Issue #9209: Do not crash in the pstats interactive browser on invalid regular
10416 expressions.
10417
10418- Update collections.OrderedDict to match the implementation in Py2.7 (based on
10419 lists instead of weakly referenced Link objects).
10420
10421- Issue #8397: Raise an error when attempting to mix iteration and regular reads
10422 on a BZ2File object, rather than returning incorrect results.
10423
10424- Issue #9448: Fix a leak of OS resources (mutexes or semaphores) when
10425 re-initializing a buffered IO object by calling its ``__init__`` method.
10426
10427- Issue #1713: Fix os.path.ismount(), which returned true for symbolic links
10428 across devices.
10429
10430- Issue #8826: Properly load old-style "expires" attribute in http.cookies.
10431
10432- Issue #1690103: Fix initial namespace for code run with trace.main().
10433
10434- Issue #7395: Fix tracebacks in pstats interactive browser.
10435
10436- Issue #8230: Fix Lib/test/sortperf.py.
10437
10438- Issue #8620: when a cmd.Cmd() is fed input that reaches EOF without a final
10439 newline, it no longer truncates the last character of the last command line.
10440
10441- Issue #5146: Handle UID THREAD command correctly in imaplib.
10442
10443- Issue #5147: Fix the header generated for cookie files written by
10444 http.cookiejar.MozillaCookieJar.
10445
10446- Issue #8198: In pydoc, output all help text to the correct stream when
10447 sys.stdout is reassigned.
10448
10449- Issue #7909: Do not touch paths with the special prefixes ``\\.\`` or ``\\?\``
10450 in ntpath.normpath().
10451
10452- Issue #1286: Allow using fileinput.FileInput as a context manager.
10453
10454- Add lru_cache() decorator to the functools module.
10455
10456Tools/Demos
10457-----------
10458
10459- Fix ``Tools/scripts/checkpyc.py`` after PEP 3147.
10460
10461- Issue #8867: Fix ``Tools/scripts/serve.py`` to work with files containing
10462 non-ASCII content.
10463
10464Tests
10465-----
10466
10467- Issue #9601: Provide a test case for ftplib.parse257.
10468
10469- Issue #8857: Provide a test case for socket.getaddrinfo.
10470
10471- Issue #7564: Skip test_ioctl if another process is attached to /dev/tty.
10472
10473- Issue #8433: Fix test_curses failure with newer versions of ncurses.
10474
10475- Issue #9496: Provide a test suite for the rlcompleter module. Patch by
10476 Michele Orrù.
10477
10478- Issue #8687: provide a test suite for sched.py module.
10479
10480Build
10481-----
10482
10483- Issue #1303434: Generate ZIP file containing all PDBs.
10484
10485- Issue #9193: PEP 3149 is accepted.
10486
10487- Issue #3101: Helper functions _add_one_to_index_C() and _add_one_to_index_F()
10488 become _Py_add_one_to_index_C() and _Py_add_one_to_index_F(), respectively.
10489
10490- Issue #9700: define HAVE_BROKEN_POSIX_SEMAPHORES under AIX 6.x. Patch by
10491 Sébastien Sablé.
10492
10493- Don't run pgen twice when using make -j.
10494
10495
10496What's New in Python 3.2 Alpha 1?
10497=================================
10498
10499*Release date: 01-Aug-2010*
10500
10501Core and Builtins
10502-----------------
10503
10504- Issue #8991: convertbuffer() rejects discontigious buffers.
10505
10506- Issue #7616: Fix copying of overlapping memoryview slices with the Intel
10507 compiler.
10508
10509- Issue #8413: structsequence now subclasses tuple.
10510
10511- Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the
10512 start byte and the continuation byte(s) are now considered invalid, instead of
10513 the number of bytes specified by the start byte. E.g.:
10514 '\xf1\x80AB'.decode('utf-8', 'replace') now returns u'\ufffdAB' and replaces
10515 with U+FFFD only the start byte ('\xf1') and the continuation byte ('\x80')
10516 even if '\xf1' is the start byte of a 4-bytes sequence. Previous versions
10517 returned a single u'\ufffd'.
10518
10519- Issue #9011: A negated imaginary literal (e.g., "-7j") now has real part -0.0
10520 rather than 0.0. So "-7j" is now exactly equivalent to "-(7j)".
10521
10522- Be more specific in error messages about positional arguments.
10523
10524- Issue #8949: "z" format of PyArg_Parse*() functions doesn't accept bytes
10525 objects, as described in the documentation.
10526
10527- Issue #6543: Write the traceback in the terminal encoding instead of utf-8.
10528 Fix the encoding of the modules filename. Patch written by Amaury Forgeot
10529 d'Arc.
10530
10531- Issue #9011: Remove buggy and unnecessary (in 3.x) ST->AST compilation code
10532 dealing with unary minus applied to a constant. The removed code was mutating
10533 the ST, causing a second compilation to fail.
10534
10535- Issue #850997: mbcs encoding (Windows only) handles errors argument: strict
10536 mode raises unicode errors. The encoder only supports "strict" and "replace"
10537 error handlers, the decoder only supports "strict" and "ignore" error
10538 handlers. Patch written by Mark Hammond.
10539
10540- Issue #8850: Remove "w" and "w#" formats from PyArg_Parse*() functions, use
10541 "w*" format instead. Add tests for "w*" format.
10542
10543- Issue #8592: PyArg_Parse*() functions raise a TypeError for "y", "u" and "Z"
10544 formats if the string contains a null byte/character. Write unit tests for
10545 string formats.
10546
10547- Issue #7490: To facilitate sharing of doctests between 2.x and 3.x test
10548 suites, the IGNORE_EXCEPTION_DETAIL directive now also ignores the module
10549 location of the raised exception.
10550
10551- Issue #8969: On Windows, use mbcs codec in strict mode to encode and decode
10552 filenames and enable os.fsencode().
10553
10554- Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError.
10555
10556- Issue #8941: Decoding big endian UTF-32 data in UCS-2 builds could crash the
10557 interpreter with characters outside the Basic Multilingual Plane (higher than
10558 0x10000).
10559
10560- Issue #8950: (See also issue #5080). Py_ArgParse*() functions now raise
10561 TypeError instead of giving a DeprecationWarning when a float is parsed using
10562 the 'L' code (for long long). (All other integer codes already raise
10563 TypeError in this case.)
10564
10565- Issue #8922: Normalize the encoding name in PyUnicode_AsEncodedString() to
10566 enable shortcuts for upper case encoding name. Add also a shortcut for
10567 "iso-8859-1" in PyUnicode_AsEncodedString() and PyUnicode_Decode().
10568
10569- Issue #8838: Remove codecs.charbuffer_encode() function. The buffer protocol
10570 doesn't support "char buffer" anymore in Python 3.
10571
10572- Issue #8339: Remove "t#" format of PyArg_Parse*() functions, use "s#" or "s*"
10573 instead. codecs.charbuffer_encode() now accepts modifiable buffer objects
10574 like bytearray.
10575
10576- Issue #8837: Remove "O?" format of PyArg_Parse*() functions. The format is no
10577 used anymore and it was never documented.
10578
10579- In str.format(), raise a ValueError when indexes to arguments are too large.
10580
10581- Issue #2844: Make int('42', n) consistently raise ValueError for invalid
10582 integers n (including n = -909).
10583
10584- Issue #8188: Introduce a new scheme for computing hashes of numbers (instances
10585 of int, float, complex, decimal.Decimal and fractions.Fraction) that makes it
10586 easy to maintain the invariant that hash(x) == hash(y) whenever x and y have
10587 equal value.
10588
10589- Issue #8748: Fix two issues with comparisons between complex and integer
10590 objects. (1) The comparison could incorrectly return True in some cases
10591 (2**53+1 == complex(2**53) == 2**53), breaking transitivity of equality.
10592 (2) The comparison raised an OverflowError for large integers, leading to
10593 unpredictable exceptions when combining integers and complex objects in sets
10594 or dicts.
10595
10596- Issue #8766: Initialize _warnings module before importing the first module.
10597 Fix a crash if an empty directory called "encodings" exists in sys.path.
10598
10599- Issue #8589: Decode PYTHONWARNINGS environment variable with the file system
10600 encoding and surrogateescape error handler instead of the locale encoding to
10601 be consistent with os.environ. Add PySys_AddWarnOptionUnicode() function.
10602
10603- PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (instead
10604 of strict) error handler to escape surrogates.
10605
10606- Issue #8715: Create PyUnicode_EncodeFSDefault() function: Encode a Unicode
10607 object to Py_FileSystemDefaultEncoding with the "surrogateescape" error
10608 handler, and return bytes. If Py_FileSystemDefaultEncoding is not set, fall
10609 back to UTF-8.
10610
10611- Enable shortcuts for common encodings in PyUnicode_AsEncodedString() for any
10612 error handler, not only the default error handler (strict).
10613
10614- Issue #8610: Load file system codec at startup, and display a fatal error on
10615 failure. Set the file system encoding to utf-8 (instead of None) if getting
10616 the locale encoding failed, or if nl_langinfo(CODESET) function is missing.
10617
10618- PyFile_FromFd() uses PyUnicode_DecodeFSDefault() instead of
10619 PyUnicode_FromString() to support surrogates in the filename and use the right
10620 encoding.
10621
10622- Issue #7507: Quote "!" in pipes.quote(); it is special to some shells.
10623
10624- PyUnicode_DecodeFSDefaultAndSize() uses surrogateescape error handler.
10625
10626- Issue #8419: Prevent the dict constructor from accepting non-string keyword
10627 arguments.
10628
10629- Issue #8124: PySys_WriteStdout() and PySys_WriteStderr() don't execute
10630 indirectly Python signal handlers anymore because mywrite() ignores exceptions
10631 (KeyboardInterrupt).
10632
10633- Issue #8092: Fix PyUnicode_EncodeUTF8() to support error handler producing
10634 unicode string (eg. backslashreplace).
10635
10636- Issue #8485: PyUnicode_FSConverter() doesn't accept byteearray objects
10637 anymore, you have to convert your bytearray filenames to bytes.
10638
10639- Issue #7332: Remove the 16KB stack-based buffer in
10640 PyMarshal_ReadLastObjectFromFile, which doesn't bring any noticeable benefit
10641 compared to the dynamic memory allocation fallback. Patch by Charles-François
10642 Natali.
10643
10644- Issue #8417: Raise an OverflowError when an integer larger than sys.maxsize is
10645 passed to bytes or bytearray.
10646
10647- Issue #7301: Add environment variable $PYTHONWARNINGS.
10648
10649- Issue #8329: Don't return the same lists from select.select when no fds are
10650 changed.
10651
10652- Issue #8259: 1L << (2**31) no longer produces an 'outrageous shift error' on
10653 64-bit machines. The shift count for either left or right shift is permitted
10654 to be up to sys.maxsize.
10655
10656- Ensure that tokenization of identifiers is not affected by locale.
10657
10658- Issue #1222585: Added LDCXXSHARED for C++ support. Patch by Arfrever.
10659
10660- Raise a TypeError when trying to delete a T_STRING_INPLACE struct member.
10661
10662- Issue #8211: Save/restore CFLAGS around AC_PROG_CC in configure.in, in case it
10663 is set.
10664
10665- Issue #8226: sys.setfilesystemencoding() raises a LookupError if the encoding
10666 is unknown.
10667
10668- Issue #1583863: A str subclass can now override the __str__ method.
10669
10670- Issue #8014: Setting a T_UINT or T_PYSSIZET attribute of an object with
10671 PyMemberDefs could produce an internal error; raise TypeError instead.
10672
10673- Issue #7845: Rich comparison methods on the complex type now return
10674 NotImplemented rather than raising a TypeError when comparing with an
10675 incompatible type; this allows user-defined classes to implement their own
10676 comparisons with complex.
10677
10678- Issue #3137: Don't ignore errors at startup, especially a keyboard interrupt
10679 (SIGINT). If an error occurs while importing the site module, the error is
10680 printed and Python exits. Initialize the GIL before importing the site module.
10681
10682- Issue #7173: Generator finalization could invalidate sys.exc_info().
10683
10684- Issue #7544: Preallocate thread memory before creating the thread to avoid a
10685 fatal error in low memory condition.
10686
10687- Issue #7820: The parser tokenizer restores all bytes in the right if the BOM
10688 check fails.
10689
10690- Handle errors from looking up __prepare__ correctly.
10691
10692- Issue #5939: Add additional runtime checking to ensure a valid capsule in
10693 Modules/_ctypes/callproc.c.
10694
10695- Issue #7309: Fix unchecked attribute access when converting
10696 UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings.
10697
10698- Issue #6902: Fix problem with built-in types format incorrectly with 0
10699 padding.
10700
10701- Issue #7988: Fix default alignment to be right aligned for complex.__format__.
10702 Now it matches other numeric types.
10703
10704- Issue #5988: Remove deprecated functions PyOS_ascii_formatd,
10705 PyOS_ascii_strtod, and PyOS_ascii_atof. Use PyOS_double_to_string and
10706 PyOS_string_to_double instead. See issue #5835 for the original deprecations.
10707
10708- Issue #7385: Fix a crash in `MemoryView_FromObject` when `PyObject_GetBuffer`
10709 fails. Patch by Florent Xicluna.
10710
10711- Issue #7788: Fix an interpreter crash produced by deleting a list slice with
10712 very large step value.
10713
10714- Issue #7766: Change sys.getwindowsversion() return value to a named tuple and
10715 add the additional members returned in an OSVERSIONINFOEX structure. The new
10716 members are service_pack_major, service_pack_minor, suite_mask, and
10717 product_type.
10718
10719- Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`) could
10720 crash in many places because of the PyByteArray_AS_STRING() macro returning
10721 NULL. The macro now returns a statically allocated empty string instead.
10722
10723- Issue #6690: Optimize the bytecode for expressions such as `x in {1, 2, 3}`,
10724 where the right hand operand is a set of constants, by turning the set into a
10725 frozenset and pre-building it as a constant. The comparison operation is made
10726 against the constant instead of building a new set each time it is executed (a
10727 similar optimization already existed which turned a list of constants into a
10728 pre-built tuple). Patch and additional tests by Dave Malcolm.
10729
10730- Issue #7622: Improve the split(), rsplit(), splitlines() and replace() methods
10731 of bytes, bytearray and unicode objects by using a common implementation based
10732 on stringlib's fast search. Patch by Florent Xicluna.
10733
10734- Issue #7632: Fix various str -> float conversion bugs present in 2.7 alpha 2,
10735 including: (1) a serious 'wrong output' bug that could occur for long (> 40
10736 digit) input strings, (2) a crash in dtoa.c that occurred in debug builds when
10737 parsing certain long numeric strings corresponding to subnormal values, (3) a
10738 memory leak for some values large enough to cause overflow, and (4) a number
10739 of flaws that could lead to incorrectly rounded results.
10740
10741- The __complex__ method is now looked up on the class of instances to make it
10742 consistent with other special methods.
10743
10744- Issue #7462: Implement the stringlib fast search algorithm for the `rfind`,
10745 `rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna.
10746
10747- Issue #7604: Deleting an unset slotted attribute did not raise an
10748 AttributeError.
10749
10750- Issue #7534: Fix handling of IEEE specials (infinities, nans, negative zero)
10751 in ** operator. The behaviour now conforms to that described in C99 Annex F.
10752
10753- Issue #1811: improve accuracy and cross-platform consistency for true division
10754 of integers: the result of a/b is now correctly rounded for ints a and b (at
10755 least on IEEE 754 platforms), and in particular does not depend on the
10756 internal representation of an int.
10757
10758- Issue #6834: replace the implementation for the 'python' and 'pythonw'
10759 executables on OSX.
10760
10761 These executables now work properly with the arch(1) command: ``arch -ppc
10762 python`` will start a universal binary version of python in PPC mode (unlike
10763 previous releases).
10764
10765- Issue #7466: Segmentation fault when the garbage collector is called in the
10766 middle of populating a tuple. Patch by Florent Xicluna.
10767
10768- Issue #7419: setlocale() could crash the interpreter on Windows when called
10769 with invalid values.
10770
10771- Issue #6077: On Windows, files opened with tempfile.TemporaryFile in "wt+"
10772 mode would appear truncated on the first '0x1a' byte (aka. Ctrl+Z).
10773
10774- Issue #7085: Fix crash when importing some extensions in a thread on MacOSX
10775 10.6.
10776
10777- Issue #1757126: Fix the cyrillic-asian alias for the ptcp154 encoding.
10778
10779- Issue #6970: Remove redundant calls when comparing objects that don't
10780 implement the relevant rich comparison methods.
10781
10782- Issue #7298: Fixes for range and reversed(range(...)). Iteration over
10783 range(a, b, c) incorrectly gave an empty iterator when a, b and c fit in C
10784 long but the length of the range did not. Also fix several cases where
10785 reversed(range(a, b, c)) gave wrong results, and fix a refleak for
10786 reversed(range(a, b, c)) with large arguments.
10787
10788- Issue #7244: itertools.izip_longest() no longer ignores exceptions raised
10789 during the formation of an output tuple.
10790
10791- Issue #3297: On wide unicode builds, do not split unicode characters into
10792 surrogates.
10793
10794- Remove length limitation when constructing a complex number from a string.
10795
10796- Issue #1087418: Boost performance of bitwise operations for longs.
10797
10798- Support for AtheOS has been completely removed from the code base. It was
10799 disabled since Python 3.0.
10800
10801- Support for several legacy threading libraries has been disabled. These
10802 libraries are: Mach C threads, SunOS LWP, GNU pth, Irix threads. Support code
10803 will be entirely removed in 3.3.
10804
10805- Support for OSF* has been disabled. If nobody stands up, support will be
10806 removed in 3.3. See <http://bugs.python.org/issue8606>.
10807
10808- Peephole constant folding had missed UNARY_POSITIVE.
10809
10810- Issue #1722344: threading._shutdown() is now called in Py_Finalize(), which
10811 fixes the problem of some exceptions being thrown at shutdown when the
10812 interpreter is killed. Patch by Adam Olsen.
10813
10814- Issue #7147: Remove support for compiling Python without complex number
10815 support.
10816
10817- Issue #7120: logging: Removed import of multiprocessing which is causing crash
10818 in GAE.
10819
10820- Issue #1754094: Improve the stack depth calculation in the compiler. There
10821 should be no other effect than a small decrease in memory use. Patch by
10822 Christopher Tur Lesniewski-Laas.
10823
10824- Issue #7065: Fix a crash in bytes.maketrans and bytearray.maketrans when using
10825 byte values greater than 127. Patch by Derk Drukker.
10826
10827- Issue #1571184: The Unicode database contains properties for more characters.
10828 The tables for code points representing numeric values, white spaces or line
10829 breaks are now generated from the official Unicode Character Database files,
10830 and include information from the Unihan.txt file.
10831
10832- Issue #7019: Raise ValueError when unmarshalling bad long data, instead of
10833 producing internally inconsistent Python longs.
10834
10835- Issue #6990: Fix threading.local subclasses leaving old state around after a
10836 reference cycle GC which could be recycled by new locals.
10837
10838- Issue #5460: Fix an ambiguity in the grammar.
10839
10840- Issue #1766304: Improve performance of membership tests on range objects.
10841
10842- Issue #6713: Improve performance of integer -> string conversions.
10843
10844- Issue #6846: Fix bug where bytearray.pop() returns negative integers.
10845
10846- Issue #6750: A text file opened with io.open() could duplicate its output when
10847 writing from multiple threads at the same time.
10848
10849- Issue #6707: dir() on an uninitialized module caused a crash.
10850
10851- Issue #6540: Fixed crash for bytearray.translate() with invalid parameters.
10852
10853- Issue #6573: set.union() stopped processing inputs if an instance of self
10854 occurred in the argument chain.
10855
10856- Issue #6070: On posix platforms import no longer copies the execute bit from
10857 the .py file to the .pyc file if it is set.
10858
10859- Issue #1616979: Added the cp720 (Arabic DOS) encoding.
10860
10861- Issue #6428: Since Python 3.0, the __bool__ method must return a bool object,
10862 and not an int. Fix the corresponding error message, and the documentation.
10863
10864- The deprecated PyCObject has been removed.
10865
10866- Issue #6347: Include inttypes.h as well as stdint.h in pyport.h. This fixes a
10867 build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead
10868 of stdint.h on that platform.
10869
10870- Issue #6373: Fixed a SystemError when encoding with the latin-1 codec and the
10871 'surrogateescape' error handler, a string which contains unpaired surrogates.
10872
10873- Issue #4856: Remove checks for win NT.
10874
10875- Issue #6687: PyBytes_FromObject() no longer accepts an integer as its argument
10876 to construct a null-initialized bytes object.
10877
10878- Issue #1023290: Add from_bytes() and to_bytes() methods to integers. These
10879 methods allow the conversion of integers to bytes, and vice-versa.
10880
10881- Issue #7382: Fix bug in bytes.__getnewargs__ that prevented bytes instances
10882 from being copied with copy.copy(), and bytes subclasses from being pickled
10883 properly.
10884
10885- Code objects now support weak references.
10886
10887- Issue #7072: isspace(0xa0) is true on Mac OS X.
10888
10889- Issue #8084: PEP 370 now conforms to system conventions for framework builds
10890 on MacOS X. That is, "python setup.py install --user" will install into
10891 "~/Library/Python/2.7" instead of "~/.local".
10892
10893C-API
10894-----
10895
10896- Issue #2443: A new macro, `Py_VA_COPY`, copies the state of the
10897 variable argument list. `Py_VA_COPY` is equivalent to C99
10898 `va_copy`, but available on all python platforms.
10899
10900- PySlice_GetIndicesEx now clips the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX]
10901 instead of [-PY_SSIZE_T_MAX-1, PY_SSIZE_T_MAX]. This makes it safe to do
10902 "step = -step" when reversing a slice.
10903
10904- Issue #5753: A new C API function, `PySys_SetArgvEx`, allows embedders of the
10905 interpreter to set sys.argv without also modifying sys.path. This helps fix
10906 `CVE-2008-5983
10907 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
10908
10909- Add PyArg_ValidateKeywordArguments, which checks if all keyword arguments are
10910 strings in an efficient manner.
10911
10912- Issue #8276: PyEval_CallObject() is now only available in macro form. The
10913 function declaration, which was kept for backwards compatibility reasons, is
10914 now removed (the macro was introduced in 1997!).
10915
10916- Issue #7767: New function PyLong_AsLongLongAndOverflow added, analogous to
10917 PyLong_AsLongAndOverflow.
10918
10919- Make PyUnicode_CompareWithASCIIString return not equal if the Python string
10920 has '\0' at the end.
10921
10922- Issue #5080: The argument parsing functions PyArg_ParseTuple,
10923 PyArg_ParseTupleAndKeywords, PyArg_VaParse, PyArg_VaParseTupleAndKeywords and
10924 PyArg_Parse now raise a DeprecationWarning for float arguments passed with the
10925 'L' format code. This will become a TypeError in a future version of Python,
10926 to match the behaviour of the other integer format codes.
10927
10928- Issue #7033: Function ``PyErr_NewExceptionWithDoc()`` added.
10929
10930- Issue #7414: 'C' code wasn't being skipped properly (for keyword arguments) in
10931 PyArg_ParseTupleAndKeywords.
10932
10933- Issue #7228: Add '%lld' and '%llu' support to PyString_FromFormat(V) and
10934 PyErr_Format, on machines with HAVE_LONG_LONG defined.
10935
10936- Issue #6151: Made PyDescr_COMMON conform to standard C (like PyObject_HEAD in
Martin Panter8d56c022016-05-29 04:13:35 +000010937 PEP 3123). The PyDescr_TYPE and PyDescr_NAME macros should be used for
Georg Brandl86dc7322012-10-01 18:58:45 +020010938 accessing the d_type and d_name members of structures using PyDescr_COMMON.
10939
10940- Issue #6405: Remove duplicate type declarations in descrobject.h.
10941
10942- The code flags for old __future__ features are now available again.
10943
10944- Issue #5954: Add a PyFrame_GetLineNumber() function to replace most uses of
10945 PyCode_Addr2Line().
10946
10947- Issue #5959: Add a PyCode_NewEmpty() function to create a new empty code
10948 object at a specified file, function, and line number.
10949
10950- Issue #1419652: Change the first argument to PyImport_AppendInittab() to
10951 ``const char *`` as the string is stored beyond the call.
10952
10953- Issue #2422: When compiled with the ``--with-valgrind`` option, the pymalloc
10954 allocator will be automatically disabled when running under Valgrind. This
10955 gives improved memory leak detection when running under Valgrind, while taking
10956 advantage of pymalloc at other times.
10957
10958Library
10959-------
10960
10961- In pdb, when Ctrl-C is entered while defining commands for a breakpoint, the
10962 old commands are restored.
10963
10964- For traceback debugging, the pdb listing now also shows the locations where
10965 the exception was originally (re)raised, if it differs from the last line
10966 executed (e.g. in case of finally clauses).
10967
10968- The pdb command "source" has been added. It displays the source code for a
10969 given object, if possible.
10970
10971- The pdb command "longlist" has been added. It displays the whole source code
10972 for the current function.
10973
10974- Issue #1503502: Make pdb.Pdb easier to subclass by putting message and error
10975 output into methods.
10976
10977- Issue #809887: Make the output of pdb's breakpoint deletions more consistent;
10978 emit a message when a breakpoint is enabled or disabled.
10979
10980- Issue #5294: Fix the behavior of pdb's "continue" command when called in the
10981 top-level debugged frame.
10982
10983- Issue #5727: Restore the ability to use readline when calling into pdb in
10984 doctests.
10985
10986- Issue #6719: In pdb, do not stop somewhere in the encodings machinery if the
10987 source file to be debugged is in a non-builtin encoding.
10988
10989- Issue #8048: Prevent doctests from failing when sys.displayhook has been
10990 reassigned.
10991
10992- Issue #8015: In pdb, do not crash when an empty line is entered as a
10993 breakpoint command.
10994
10995- In pdb, allow giving a line number to the "until" command.
10996
10997- Issue #1437051: For pdb, allow "continue" and related commands in .pdbrc
10998 files. Also, add a command-line option "-c" that runs a command as if given
10999 in .pdbrc.
11000
11001- Issue #4179: In pdb, allow "list ." as a command to return to the currently
11002 debugged line.
11003
11004- Issue #4108: In urllib.robotparser, if there are multiple ``User-agent: *``
11005 entries, consider the first one.
11006
11007- Issue #6630: Allow customizing regex flags when subclassing the
11008 string.Template class.
11009
11010- Issue #9411: Allow specifying an encoding for config files in the configparser
11011 module.
11012
11013- Issue #1682942: Improvements to configparser: support alternate delimiters,
11014 alternate comment prefixes and empty lines in values.
11015
11016- Issue #9354: Provide getsockopt() in asyncore's file_wrapper.
11017
11018- Issue #8966: ctypes: Remove implicit bytes-unicode conversion.
11019
11020- Issue #9378: python -m pickle <pickle file> will now load and display the
11021 first object in the pickle file.
11022
11023- Issue #4770: Restrict binascii module to accept only bytes (as specified).
11024 And fix the email package to encode to ASCII instead of ``raw-unicode-escape``
11025 before ASCII-to-binary decoding.
11026
11027- Issue #9384: ``python -m tkinter`` will now display a simple demo applet.
11028
11029- The default size of the re module's compiled regular expression cache has been
11030 increased from 100 to 500 and the cache replacement policy has changed from
11031 simply clearing the entire cache on overflow to forgetting the least recently
11032 used cached compiled regular expressions. This is a performance win for
11033 applications that use a lot of regular expressions and limits the impact of
11034 the performance hit anytime the cache is exceeded.
11035
11036- Issue #7113: Speed up loading in configparser. Patch by Łukasz Langa.
11037
11038- Issue #9032: XML-RPC client retries the request on EPIPE error. The EPIPE
11039 error occurs when the server closes the socket and the client sends a big
11040 XML-RPC request.
11041
11042- Issue #4629: getopt raises an error if an argument ends with "=", whereas
11043 getopt doesn't accept a value (eg. --help= is rejected if getopt uses
11044 ['help='] long options).
11045
11046- Issue #7989: Added pure python implementation of the `datetime` module. The C
11047 module is renamed to `_datetime` and if available, overrides all classes
11048 defined in datetime with fast C impementation. Python implementation is based
11049 on the original python prototype for the datetime module by Tim Peters with
11050 minor modifications by the PyPy project. The test suite now tests `datetime`
11051 module with and without `_datetime` acceleration using the same test cases.
11052
11053- Issue #7895: platform.mac_ver() no longer crashes after calling os.fork().
11054
Martin Panter9955a372015-10-07 10:26:23 +000011055- Issue #9323: Fixed a bug in trace.py that resulted in losing the name of the
Georg Brandl86dc7322012-10-01 18:58:45 +020011056 script being traced. Patch by Eli Bendersky.
11057
11058- Issue #9282: Fixed --listfuncs option of trace.py. Thanks Eli Bendersky for
11059 the patch.
11060
11061- Issue #3704: http.cookiejar was not properly handling URLs with a / in the
11062 parameters.
11063
11064- Issue #9268: ``pickletools.dis()`` now has an optional *annotate* argument
11065 which controls printing of opcode descriptions in ``dis()`` output.
11066
11067- Issue #1555570: email no longer inserts extra blank lines when a \r\n combo
11068 crosses an 8192 byte boundary.
11069
11070- Issue #9243: Fix sndhdr module and add unit tests, contributed by James Lee.
11071
11072- ``ast.literal_eval()`` now allows byte literals.
11073
11074- Issue #9137: Fix issue in MutableMapping.update, which incorrectly treated
11075 keyword arguments called 'self' or 'other' specially.
11076
11077- ``ast.literal_eval()`` now allows set literals.
11078
11079- Issue #9164: Ensure that sysconfig handles duplicate -arch flags in CFLAGS.
11080
11081- Issue #7646: The fnmatch pattern cache no longer grows without bound.
11082
11083- Issue #9136: Fix 'dictionary changed size during iteration' RuntimeError
11084 produced when profiling the decimal module. This was due to a dangerous
11085 iteration over 'locals()' in Context.__init__.
11086
11087- Fix extreme speed issue in Decimal.pow when the base is an exact power of 10
11088 and the exponent is tiny (for example, ``Decimal(10) **
11089 Decimal('1e-999999999')``).
11090
11091- Issue #9186: Fix math.log1p(-1.0) to raise ValueError, not OverflowError.
11092
11093- Issue #9130: Fix validation of relative imports in parser module.
11094
11095- Issue #9128: Fix validation of class decorators in parser module.
11096
11097- Issue #9094: python -m pickletools will now disassemble pickle files listed in
11098 the command line arguments. See output of python -m pickletools -h for more
11099 details.
11100
11101- Issue #5468: urlencode to handle bytes type and other encodings in its query
11102 parameter. Patch by Dan Mahn.
11103
11104- Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module,
11105 ensure that the input string length is a multiple of the frame size.
11106
11107- Issue #6507: Accept source strings in dis.dis(). Original patch by Daniel
11108 Urban.
11109
11110- Issue #7829: Clearly document that the dis module is exposing an
11111 implementation detail that is not stable between Python VMs or releases.
11112
11113- Issue #6589: cleanup asyncore.socket_map in case smtpd.SMTPServer constructor
11114 raises an exception.
11115
11116- Issue #9110: Addition of ContextDecorator to contextlib, for creating APIs
11117 that act as both context managers and decorators. contextmanager changes to
11118 use ContextDecorator.
11119
11120- Implement importlib.abc.SourceLoader and deprecate PyLoader and PyPycLoader
11121 for removal in Python 3.4.
11122
11123- Issue #9064: pdb's "up" and "down" commands now accept an optional argument
11124 giving the number of frames to go.
11125
11126- Issue #9018: os.path.normcase() now raises a TypeError if the argument is not
11127 ``str`` or ``bytes``.
11128
11129- Issue #9075: In the ssl module, remove the setting of a ``debug`` flag on an
11130 OpenSSL structure.
11131
11132- Issue #8682: The ssl module now temporary increments the reference count of a
11133 socket object got through ``PyWeakref_GetObject``, so as to avoid possible
11134 deallocation while the object is still being used.
11135
11136- Issue #1368368: FancyURLOpener class changed to throw an Exception on wrong
11137 password instead of presenting an interactive prompt. Older behavior can be
11138 obtained by passing retry=True to http_error_xxx methods of FancyURLOpener.
11139
11140- Issue #8720: Fix regression caused by fix for #4050 by making getsourcefile
11141 smart enough to find source files in the linecache.
11142
11143- Issue #5610: feedparser no longer eats extra characters at the end of a body
11144 part if the body part ends with a ``\r\n``.
11145
11146- Issue #8986: math.erfc was incorrectly raising OverflowError for values
11147 between -27.3 and -30.0 on some platforms.
11148
11149- Issue #8784: Set tarfile default encoding to 'utf-8' on Windows.
11150
11151- Issue #8966: If a ctypes structure field is an array of c_char, convert its
11152 value to bytes instead of str (as done for c_char and c_char_p).
11153
11154- Issue #8188: Comparisons between Decimal and Fraction objects are now
11155 permitted, returning a result based on the exact numerical values of the
11156 operands. This builds on issue #2531, which allowed Decimal-to-float
11157 comparisons; all comparisons involving numeric types (bool, int, float,
11158 complex, Decimal, Fraction) should now act as expected.
11159
11160- Issue #8897: Fix sunau module, use bytes to write the header. Patch written by
11161 Thomas Jollans.
11162
11163- Issue #8899: time.struct_time now has class and attribute docstrings.
11164
11165- Issue #6470: Drop UNC prefix in FixTk.
11166
11167- Issue #4768: base64 encoded email body parts were incorrectly stored as binary
11168 strings. They are now correctly converted to strings.
11169
11170- Issue #8833: tarfile created hard link entries with a size field != 0 by
11171 mistake.
11172
11173- Charset.body_encode now correctly handles base64 encoding by encoding with the
11174 output_charset before calling base64mime.encode. Passes the tests from 2.x
11175 issue #1368247.
11176
11177- Issue #8845: sqlite3 Connection objects now have a read-only in_transaction
11178 attribute that is True iff there are uncommitted changes.
11179
11180- Issue #1289118: datetime.timedelta objects can now be multiplied by float and
11181 divided by float and int objects. Results are rounded to the nearest multiple
11182 of timedelta.resolution with ties resolved using round-half-to-even method.
11183
11184- Issue #7150: Raise OverflowError if the result of adding or subtracting
11185 timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range.
11186
11187- Issue #8806: add SSL contexts support to ftplib.
11188
11189- Issue #4769: Fix main() function of the base64 module, use sys.stdin.buffer
11190 and sys.stdout.buffer (instead of sys.stdin and sys.stdout) to use the bytes
11191 API.
11192
11193- Issue #8770: Now sysconfig displays information when it's called as a script.
11194 Initial idea by Sridhar Ratnakumar.
11195
11196- Issue #6662: Fix parsing of malformatted charref (&#bad;), patch written by
11197 Fredrik Håård.
11198
11199- Issue #8540: Decimal module: rename the Context._clamp attribute to
11200 Context.clamp and make it public. This is useful in creating contexts that
11201 correspond to the decimal interchange formats specified in IEEE 754.
11202
11203- Issue #6268: Fix seek() method of codecs.open(), don't read or write the BOM
11204 twice after seek(0). Fix also reset() method of codecs, UTF-16, UTF-32 and
11205 StreamWriter classes.
11206
11207- Issue #3798: sys.exit(message) writes the message to sys.stderr file, instead
11208 of the C file stderr, to use stderr encoding and error handler.
11209
11210- Issue #8782: Add a trailing newline in linecache.updatecache to the last line
11211 of files without one.
11212
11213- Issue #8729: Return NotImplemented from collections.Mapping.__eq__ when
11214 comparing to a non-mapping.
11215
11216- Issue #8774: tabnanny uses the encoding cookie (#coding:...) to use the
11217 correct encoding.
11218
11219- Issue #4870: Add an `options` attribute to SSL contexts, as well as several
Martin Panterc04fb562016-02-10 05:44:01 +000011220 ``OP_*`` constants to the `ssl` module. This allows selectively disabling
Georg Brandl86dc7322012-10-01 18:58:45 +020011221 protocol versions, when used in combination with `PROTOCOL_SSLv23`.
11222
11223- Issue #8759: Fixed user paths in sysconfig for posix and os2 schemes.
11224
11225- Issue #8663: distutils.log emulates backslashreplace error handler. Fix
11226 compilation in a non-ASCII directory if stdout encoding is ASCII (eg. if
11227 stdout is not a TTY).
11228
11229- Issue #8513: os.get_exec_path() supports b'PATH' key and bytes value.
11230 subprocess.Popen() and os._execvpe() support bytes program name. Add
11231 os.supports_bytes_environ flag: True if the native OS type of the environment
11232 is bytes (eg. False on Windows).
11233
11234- Issue #8633: tarfile is now able to read and write archives with "raw" binary
11235 pax headers as described in POSIX.1-2008.
11236
11237- Issue #1285086: Speed up urllib.parse functions: quote, quote_from_bytes,
11238 unquote, unquote_to_bytes.
11239
Ezio Melotti85a86292013-08-17 16:57:41 +030011240- Issue #8688: Distutils now recalculates MANIFEST every time.
Georg Brandl86dc7322012-10-01 18:58:45 +020011241
11242- Issue #8477: ssl.RAND_egd() and ssl._test_decode_cert() support str with
11243 surrogates and bytes for the filename.
11244
11245- Issue #8550: Add first class ``SSLContext`` objects to the ssl module.
11246
11247- Issue #8681: Make the zlib module's error messages more informative when the
11248 zlib itself doesn't give any detailed explanation.
11249
11250- The audioop module now supports sound fragments of length greater than 2**31
11251 bytes on 64-bit machines, and is PY_SSIZE_T_CLEAN.
11252
Serhiy Storchaka14867992014-09-10 23:43:41 +030011253- Issue #4972: Add support for the context management protocol to the ftplib.FTP
Georg Brandl86dc7322012-10-01 18:58:45 +020011254 class.
11255
11256- Issue #8664: In py_compile, create __pycache__ when the compiled path is
11257 given.
11258
11259- Issue #8514: Add os.fsencode() function (Unix only): encode a string to bytes
11260 for use in the file system, environment variables or the command line.
11261
11262- Issue #8571: Fix an internal error when compressing or decompressing a chunk
11263 larger than 1GB with the zlib module's compressor and decompressor objects.
11264
11265- Issue #8603: Support bytes environmental variables on Unix: Add os.environb
11266 mapping and os.getenvb() function. os.unsetenv() encodes str argument to the
11267 file system encoding with the surrogateescape error handler (instead of
11268 utf8/strict) and accepts bytes. posix.environ keys and values are now bytes.
11269
11270- Issue #8573: asyncore _strerror() function might throw ValueError.
11271
11272- Issue #8483: asyncore.dispatcher's __getattr__ method produced confusing error
11273 messages when accessing undefined class attributes because of the cheap
11274 inheritance with the underlying socket object. The cheap inheritance has been
11275 deprecated.
11276
11277- Issue #4265: shutil.copyfile() was leaking file descriptors when disk fills.
11278 Patch by Tres Seaver.
11279
11280- Issue #8390: tarfile uses surrogateescape as the default error handler
11281 (instead of replace in read mode or strict in write mode).
11282
11283- Issue #7755: Use an unencumbered audio file for tests.
11284
11285- Issue #8621: uuid.uuid4() returned the same sequence of values in the parent
11286 and any children created using ``os.fork`` on MacOS X 10.6.
11287
11288- Issue #8567: Fix precedence of signals in Decimal module: when a Decimal
11289 operation raises multiple signals and more than one of those signals is
11290 trapped, the specification determines the order in which the signals should be
11291 handled. In many cases this order wasn't being followed, leading to the wrong
11292 Python exception being raised.
11293
11294- Issue #7865: The close() method of ``io`` objects should not swallow
11295 exceptions raised by the implicit flush(). Also qensure that calling close()
11296 several times is supported. Patch by Pascal Chambon.
11297
11298- Issue #4687: Fix accuracy of garbage collection runtimes displayed with
11299 gc.DEBUG_STATS.
11300
11301- Issue #8354: The siginterrupt setting is now preserved for all signals, not
11302 just SIGCHLD.
11303
11304- Issue #7192: webbrowser.get("firefox") now works on Mac OS X, as does
11305 webbrowser.get("safari").
11306
11307- Issue #8464: tarfile no longer creates files with execute permissions set when
11308 mode="w|" is used.
11309
11310- Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions of
11311 the Linux kernel. Patch by Yaniv Aknin.
11312
11313- Issue #8295: Added shutil.unpack_archive.
11314
11315- Issue #6312: Fixed http HEAD request when the transfer encoding is chunked.
11316 It should correctly return an empty response now.
11317
11318- Issue #8546: Reject None given as the buffering argument to _pyio.open.
11319
11320- Issue #8549: Fix compiling the _ssl extension under AIX. Patch by
11321 Sridhar Ratnakumar.
11322
11323- Issue #6656: fix locale.format_string to handle escaped percents
11324 and mappings.
11325
11326- Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown, where
11327 the method could block indefinitely if called just before the event loop
11328 started running. This also fixes the occasional freezes witnessed in
11329 test_httpservers.
11330
11331- Issue #8524: When creating an SSL socket, the timeout value of the original
11332 socket wasn't retained (instead, a socket with a positive timeout would be
11333 turned into a non-blocking SSL socket).
11334
11335- Issue #5103: SSL handshake would ignore the socket timeout and block
11336 indefinitely if the other end didn't respond.
11337
11338- The do_handshake() method of SSL objects now adjusts the blocking mode of the
11339 SSL structure if necessary (as other methods already do).
11340
11341- Issue #8391: os.execvpe() and os.getenv() supports unicode with surrogates and
11342 bytes strings for environment keys and values.
11343
11344- Issue #8467: Pure Python implementation of subprocess encodes the error
11345 message using surrogatepass error handler to support surrogates in the
11346 message.
11347
11348- Issue #8468: bz2.BZ2File() accepts str with surrogates and bytes filenames.
11349
11350- Issue #8451: Syslog module now uses basename(sys.argv[0]) instead of the
11351 string "python" as the *ident*. openlog() arguments are all optional and
11352 keywords.
11353
11354- Issue #8108: Fix the unwrap() method of SSL objects when the socket has a
11355 non-infinite timeout. Also make that method friendlier with applications
11356 wanting to continue using the socket in clear-text mode, by disabling
11357 OpenSSL's internal readahead. Thanks to Darryl Miles for guidance.
11358
11359- Issue #8496: make mailcap.lookup() always return a list, rather than an
11360 iterator. Patch by Gregory Nofi.
11361
11362- Issue #8195: Fix a crash in sqlite Connection.create_collation() if the
11363 collation name contains a surrogate character.
11364
11365- Issue #8484: Load all ciphers and digest algorithms when initializing the _ssl
11366 extension, such that verification of some SSL certificates doesn't fail
11367 because of an "unknown algorithm".
11368
11369- Issue #6547: Added the ignore_dangling_symlinks option to shutil.copytree.
11370
11371- Issue #1540112: Now allowing the choice of a copy function in shutil.copytree.
11372
11373- Issue #4814: timeout parameter is now applied also for connections resulting
11374 from PORT/EPRT commands.
11375
11376- Issue #8463: added missing reference to bztar in shutil's documentation.
11377
11378- Issue #7154: urllib.request can now detect the proxy settings on OSX 10.6 (as
11379 long as the user didn't specify 'automatic proxy configuration').
11380
11381- Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response code
11382 as stated in RFC-959 at chapter 5.4.
11383
11384- Issue #8394: _ctypes.dlopen() accepts bytes, bytearray and str with
11385 surrogates.
11386
11387- Issue #850728: Add a *timeout* parameter to the `acquire()` method of
11388 `threading.Semaphore` objects. Original patch by Torsten Landschoff.
11389
11390- Issue #8322: Add a *ciphers* argument to SSL sockets, so as to change the
11391 available cipher list. Helps fix test_ssl with OpenSSL 1.0.0.
11392
11393- Issue #8393: subprocess accepts bytes, bytearray and str with surrogates for
11394 the current working directory.
11395
11396- Issue #7606: XML-RPC traceback stored in X-traceback is now encoded to ASCII
11397 using backslashreplace error handler.
11398
11399- Issue #8412: os.system() now accepts bytes, bytearray and str with surrogates.
11400
11401- Issue #2987: RFC2732 support for urlparse (IPv6 addresses). Patch by Tony
11402 Locke and Hans Ulrich Niedermann.
11403
11404- Issue #5277: Fix quote counting when parsing RFC 2231 encoded parameters.
11405
11406- Issue #7316: The acquire() method of lock objects in the ``threading``
11407 module now takes an optional timeout argument in seconds. Timeout support
11408 relies on the system threading library, so as to avoid a semi-busy wait loop.
11409
11410- Issue #8383: pickle and pickletools use surrogatepass error handler when
11411 encoding unicode as utf8 to support lone surrogates and stay compatible with
11412 Python 2.x and 3.x.
11413
11414- Issue #7585: difflib context and unified diffs now place a tab between
11415 filename and date, conforming to the 'standards' they were originally designed
11416 to follow. This improves compatibility with patch tools.
11417
11418- Issue #7472: Fixed typo in email.encoders module; messages using ISO-2022
11419 character sets will now consistently use a Content-Transfer-Encoding of 7bit
11420 rather than sometimes being marked as 8bit.
11421
11422- Issue #8375: test_distutils now checks if the temporary directory are still
11423 present before it cleans them.
11424
11425- Issue #8374: Update the internal alias table in the ``locale`` module to
11426 cover recent locale changes and additions.
11427
11428- Issue #8321: Give access to OpenSSL version numbers from the `ssl` module,
11429 using the new attributes `ssl.OPENSSL_VERSION`, `ssl.OPENSSL_VERSION_INFO` and
11430 `ssl.OPENSSL_VERSION_NUMBER`.
11431
11432- Add functools.total_ordering() and functools.cmp_to_key().
11433
11434- Issue #8257: The Decimal construct now accepts a float instance directly,
11435 converting that float to a Decimal of equal value:
11436
11437 >>> Decimal(1.1)
11438 Decimal('1.100000000000000088817841970012523233890533447265625')
11439
11440- Issue #8294: The Fraction constructor now accepts Decimal and float instances
11441 directly.
11442
11443- Issue #7279: Comparisons involving a Decimal signaling NaN now signal
11444 InvalidOperation instead of returning False. (Comparisons involving a quiet
11445 NaN are unchanged.) Also, Decimal quiet NaNs are now hashable; Decimal
11446 signaling NaNs remain unhashable.
11447
11448- Issue #2531: Comparison operations between floats and Decimal instances now
11449 return a result based on the numeric values of the operands; previously they
11450 returned an arbitrary result based on the relative ordering of id(float) and
11451 id(Decimal). See also issue #8188, which adds Decimal-to-Fraction
11452 comparisons.
11453
11454- Added a subtract() method to collections.Counter().
11455
11456- Issue #8233: When run as a script, py_compile.py optionally takes a single
11457 argument `-` which tells it to read files to compile from stdin. Each line is
11458 read on demand and the named file is compiled immediately. (Original patch by
11459 Piotr Ożarowski).
11460
11461- Backwards incompatible change: Unicode codepoints line tabulation (0x0B) and
11462 form feed (0x0C) are now considered linebreaks, as specified in Unicode
11463 Standard Annex #14. See issue #7643. http://www.unicode.org/reports/tr14/
11464
11465- Comparisons using one of <, <=, >, >= between a complex instance and a
11466 Fractions instance now raise TypeError instead of returning True/False. This
11467 makes Fraction <=> complex comparisons consistent with int <=> complex, float
11468 <=> complex, and complex <=> complex comparisons.
11469
11470- Issue #8139: ossaudiodev didn't initialize its types properly, therefore some
11471 methods (such as oss_mixer_device.fileno()) were not available. Initial patch
11472 by Bertrand Janin.
11473
11474- Issue #8205: Remove the "Modules" directory from sys.path when Python is
11475 running from the build directory (POSIX only).
11476
11477- Issue #7512: shutil.copystat() could raise an OSError when the filesystem
11478 didn't support chflags() (for example ZFS under FreeBSD). The error is now
11479 silenced.
11480
11481- Issue #7860: platform.uname now reports the correct 'machine' type when Python
11482 is running in WOW64 mode on 64 bit Windows.
11483
11484- Issue #3890, #8222: Fix recv() and recv_into() on non-blocking SSL sockets.
11485 Also, enable the SSL_MODE_AUTO_RETRY flag on SSL sockets, so that blocking
11486 reads and writes are always retried by OpenSSL itself.
11487
11488- Issue #4282: Fix the main function of the profile module for a non-ASCII
11489 script, open the file in binary mode and not in text mode with the default
11490 (utf8) encoding.
11491
11492- Issue #8179: Fix macpath.realpath() on a non-existing path.
11493
11494- Issue #8024: Update the Unicode database to 5.2.
11495
11496- Issue #8168: py_compile now handles files with utf-8 BOMS.
11497
11498- ``tokenize.detect_encoding`` now returns ``'utf-8-sig'`` when a UTF-8 BOM is
11499 detected.
11500
11501- Issue #6716/2: Backslash-replace error output in compilall.
11502
11503- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox
11504 with Tcl/Tk-8.5.
11505
11506- Issue #8140: extend compileall to compile single files. Add -i option.
11507
11508- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of the
11509 locale.
11510
11511- The internals of the subprocess module on POSIX systems have been replaced by
11512 an extension module (_posixsubprocess) so that the fork()+exec() can be done
11513 safely without the possibility of deadlock in multithreaded applications.
11514
11515- subprocess.Popen now has restore_signals and start_new_session features. The
11516 default of restore_signals=True is a new behavior compared to earlier Python
11517 versions. This means that signals such as SIGPIPE are not ignored by default
11518 in subprocesses launched by Python (Issue #1652).
11519
11520- Issue #6472: The xml.etree package is updated to ElementTree 1.3. The
11521 cElementTree module is updated too.
11522
11523- Issue #7774: Set sys.executable to an empty string if argv[0] has been set to
Serhiy Storchaka6a7b3a72016-04-17 08:32:47 +030011524 a non existent program name and Python is unable to retrieve the real program
Georg Brandl86dc7322012-10-01 18:58:45 +020011525 name.
11526
11527- Issue #7880: Fix sysconfig when the python executable is a symbolic link.
11528
11529- Issue #6509: fix re.sub to work properly when the pattern, the string, and the
11530 replacement were all bytes. Patch by Antoine Pitrou.
11531
11532- The sqlite3 module was updated to pysqlite 2.6.0. This fixes several obscure
11533 bugs and allows loading SQLite extensions from shared libraries.
11534
11535- Issue #1054943: Fix ``unicodedata.normalize('NFC', text)`` for the Public
11536 Review Issue #29 (http://unicode.org/review/pr-29.html).
11537
11538- Issue #7494: fix a crash in _lsprof (cProfile) after clearing the profiler,
11539 reset also the pointer to the current pointer context.
11540
Serhiy Storchaka14867992014-09-10 23:43:41 +030011541- Issue #7232: Add support for the context management protocol to the TarFile
Georg Brandl86dc7322012-10-01 18:58:45 +020011542 class.
11543
11544- Issue #7250: Fix info leak of os.environ across multi-run uses of
11545 wsgiref.handlers.CGIHandler.
11546
11547- Issue #1729305: Fix doctest to handle encode error with "backslashreplace".
11548
11549- Issue #691291: codecs.open() should not convert end of lines on reading and
11550 writing.
11551
11552- Issue #7869: logging: improved diagnostic for format-time errors.
11553
11554- Issue #7868: logging: added loggerClass attribute to Manager.
11555
11556- logging: Implemented PEP 391.
11557
11558- Issue #1537721: Add a writeheader() method to csv.DictWriter.
11559
11560- Issue #7959: ctypes callback functions are now registered correctly with the
11561 cycle garbage collector.
11562
11563- Issue #5801: removed spurious empty lines in wsgiref.
11564
11565- Issue #6666: fix bug in trace.py that applied the list of directories to be
11566 ignored only to the first file. Noted by Bogdan Opanchuk.
11567
11568- Issue #7597: curses.use_env() can now be called before initscr(). Noted by
11569 Kan-Ru Chen.
11570
11571- Issue #7310: fix the __repr__ of os.environ to show the environment variables.
11572
11573- Issue #7970: email.Generator.flatten now correctly flattens message/rfc822
11574 messages parsed by email.Parser.HeaderParser.
11575
11576- Issue #7361: Importlib was not properly checking the number of bytes in
Martin Pantere26da7c2016-06-02 10:07:09 +000011577 bytecode file when it was less than 8 bytes.
Georg Brandl86dc7322012-10-01 18:58:45 +020011578
11579- Issue #7633: In the decimal module, Context class methods (with the exception
11580 of canonical and is_canonical) now accept instances of int and long wherever a
11581 Decimal instance is accepted, and implicitly convert that argument to Decimal.
11582 Previously only some arguments were converted.
11583
11584- Issue #7835: shelve should no longer produce mysterious warnings during
11585 interpreter shutdown.
11586
11587- Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">") in XML
11588 processing instructions and comments. These raw characters are allowed by the
11589 XML specification, and are necessary when outputting e.g. PHP code in a
11590 processing instruction. Patch by Neil Muller.
11591
11592- Issue #6233: ElementTree failed converting unicode characters to XML entities
11593 when they could't be represented in the requested output encoding. Patch by
11594 Jerry Chen.
11595
11596- Issue #6003: add an argument to ``zipfile.Zipfile.writestr`` to specify the
11597 compression type.
11598
11599- Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is
11600 specified, rather than fall through to AF_PACKET (in the `socket` module).
11601 Also, raise ValueError rather than TypeError when an unknown TIPC address type
11602 is specified. Patch by Brian Curtin.
11603
11604- Issue #6939: Fix file I/O objects in the `io` module to keep the original file
11605 position when calling `truncate()`. It would previously change the file
11606 position to the given argument, which goes against the tradition of
11607 ftruncate() and other truncation APIs. Patch by Pascal Chambon.
11608
11609- Issue #7610: Reworked implementation of the internal
11610 ``zipfile.ZipExtFile`` class used to represent files stored inside an
11611 archive. The new implementation is significantly faster and can be wrapped in
Martin Panter7462b6492015-11-02 03:37:02 +000011612 an ``io.BufferedReader`` object for more speedups. It also solves an
Georg Brandl86dc7322012-10-01 18:58:45 +020011613 issue where interleaved calls to `read()` and `readline()` give wrong results.
11614 Patch by Nir Aides.
11615
11616- Issue #6963: Added "maxtasksperchild" argument to multiprocessing.Pool,
11617 allowing for a maximum number of tasks within the pool to be completed by the
11618 worker before that worker is terminated, and a new one created to replace it.
11619
11620- Issue #7792: Registering non-classes to ABCs raised an obscure error.
11621
11622- Issue #7785: Don't accept bytes in FileIO.write().
11623
11624- Removed the functions 'verify' and 'vereq' from Lib/test/support.py.
11625
11626- Issue #7773: Fix an UnboundLocalError in platform.linux_distribution() when
11627 the release file is empty.
11628
11629- Issue #7561: Fix crashes when using bytearray objects with the posix
11630 module.
11631
11632- Issue #1670765: Prevent email.generator.Generator from re-wrapping headers in
11633 multipart/signed MIME parts, which fixes one of the sources of invalid
11634 modifications to such parts by Generator.
11635
11636- Issue #7703: Add support for the new buffer API to `binascii.a2bhqx`. Patch
11637 by Florent Xicluna, along with some additional tests.
11638
11639- Issue #7701: Fix crash in binascii.b2a_uu() in debug mode when given a 1-byte
11640 argument. Patch by Victor Stinner.
11641
11642- Issue #3299: Fix possible crash in the _sre module when given bad argument
11643 values in debug mode. Patch by Victor Stinner.
11644
11645- Issue #2846: Add support for gzip.GzipFile reading zero-padded files. Patch
11646 by Brian Curtin.
11647
Martin Panter0be894b2016-09-07 12:03:06 +000011648- Issue #7681: Use floor division in appropriate places in the wave module.
Georg Brandl86dc7322012-10-01 18:58:45 +020011649
11650- Issue #5372: Drop the reuse of .o files in Distutils' ccompiler (since
11651 Extension extra options may change the output without changing the .c
11652 file). Initial patch by Collin Winter.
11653
11654- Issue #7617: Make sure distutils.unixccompiler.UnixCCompiler recognizes gcc
11655 when it has a fully qualified configuration prefix. Initial patch by Arfrever.
11656
11657- Issue #7105: Make WeakKeyDictionary and WeakValueDictionary robust against the
11658 destruction of weakref'ed objects while iterating.
11659
11660- Issue #7455: Fix possible crash in cPickle on invalid input. Patch by Victor
11661 Stinner.
11662
11663- Issue #1628205: Socket file objects returned by socket.socket.makefile() now
11664 properly handles EINTR within the read, readline, write & flush methods. The
11665 socket.sendall() method now properly handles interrupted system calls.
11666
11667- Issue #7471: Improve the performance of GzipFile's buffering mechanism, and
11668 make it implement the `io.BufferedIOBase` ABC to allow for further speedups by
11669 wrapping it in an `io.BufferedReader`. Patch by Nir Aides.
11670
11671- Issue #3972: http.client.HTTPConnection now accepts an optional source_address
11672 parameter to allow specifying where your connections come from.
11673
11674- socket.create_connection now accepts an optional source_address parameter.
11675
11676- Issue #5511: now zipfile.ZipFile can be used as a context manager. Initial
11677 patch by Brian Curtin.
11678
11679- Issue #7556: Make sure Distutils' msvc9compile reads and writes the MSVC XML
11680 Manifest file in text mode so string patterns can be used in regular
11681 expressions.
11682
11683- Issue #7552: Removed line feed in the base64 Authorization header in the
11684 Distutils upload command to avoid an error when PyPI reads it. This occurs on
11685 long passwords. Initial patch by JP St. Pierre.
11686
11687- Issue #7231: urllib2 cannot handle https with proxy requiring auth. Patch by
11688 Tatsuhiro Tsujikawa.
11689
11690- Issue #4757: `zlib.compress` and other methods in the zlib module now raise a
11691 TypeError when given an `str` object (rather than a `bytes`-like object).
11692 Patch by Victor Stinner and Florent Xicluna.
11693
11694- Issue #7349: Make methods of file objects in the io module accept None as an
11695 argument where file-like objects (ie StringIO and BytesIO) accept them to mean
11696 the same as passing no argument.
11697
11698- Issue #7357: tarfile no longer suppresses fatal extraction errors by default.
11699
11700- Issue #5949: added check for correct lineends in input from IMAP server in
11701 imaplib.
11702
11703- Add count() and reverse() methods to collections.deque().
11704
11705- Fix variations of extending deques: d.extend(d) d.extendleft(d) d+=d
11706
11707- Issue #6986: Fix crash in the JSON C accelerator when called with the wrong
11708 parameter types. Patch by Victor Stinner.
11709
11710- Issue #7457: added a read_pkg_file method to
11711 distutils.dist.DistributionMetadata.
11712
11713- logging: Added optional `secure` parameter to SMTPHandler, to enable use of
11714 TLS with authentication credentials.
11715
11716- Issue #1923: Fixed the removal of meaningful spaces when PKG-INFO is generated
11717 in Distutils. Patch by Stephen Emslie.
11718
11719- Issue #4120: Drop reference to CRT from manifest when building extensions with
11720 msvc9compiler.
11721
11722- Issue #7333: The `posix` module gains an `initgroups()` function providing
11723 access to the initgroups(3) C library call on Unix systems which implement it.
11724 Patch by Jean-Paul Calderone.
11725
11726- Issue #7408: Fixed distutils.tests.sdist so it doesn't check for group
11727 ownership when the group is not forced, because the group may be different
11728 from the user's group and inherit from its container when the test is run.
11729
11730- Issue #4486: When an exception has an explicit cause, do not print its
11731 implicit context too. This affects the `traceback` module as well as built-in
11732 exception printing.
11733
11734- Issue #1515: Enable use of deepcopy() with instance methods. Patch by Robert
11735 Collins.
11736
11737- Issue #7403: logging: Fixed possible race condition in lock creation.
11738
11739- Issue #6845: Add restart support for binary upload in ftplib. The
11740 `storbinary()` method of FTP and FTP_TLS objects gains an optional `rest`
11741 argument. Patch by Pablo Mouzo.
11742
11743- Issue #5788: `datetime.timedelta` objects get a new `total_seconds()` method
11744 returning the total number of seconds in the duration. Patch by Brian
11745 Quinlan.
11746
11747- Issue #7133: SSL objects now support the new buffer API.
11748
11749- Issue #1488943: difflib.Differ() doesn't always add hints for tab characters.
11750
11751- Issue #6123: tarfile now opens empty archives correctly and consistently
11752 raises ReadError on empty files.
11753
11754- Issue #7354: distutils.tests.test_msvc9compiler - dragfullwindows can be 2.
11755
11756- Issue #5037: Proxy the __bytes__ special method instead to __bytes__ instead
11757 of __str__.
11758
11759- Issue #7341: Close the internal file object in the TarFile constructor in case
11760 of an error.
11761
11762- Issue #7293: distutils.test_msvc9compiler is fixed to work on any fresh
11763 Windows box. Help provided by David Bolen.
11764
11765- Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP using TLS
11766 or SSL. Patch by Giampaolo Rodola'.
11767
11768- Issue #7328: pydoc no longer corrupts sys.path when run with the '-m' switch.
11769
11770- Issue #4969: The mimetypes module now reads the MIME database from the
11771 registry under Windows. Patch by Gabriel Genellina.
11772
11773- Issue #6816: runpy now provides a run_path function that allows Python code to
11774 execute file paths that refer to source or compiled Python files as well as
11775 zipfiles, directories and other valid sys.path entries that contain a
11776 __main__.py file. This allows applications that run other Python scripts to
11777 support the same flexibility as the CPython command line itself.
11778
11779- Issue #7318: multiprocessing now uses a timeout when it fails to establish a
11780 connection with another process, rather than looping endlessly. The default
11781 timeout is 20 seconds, which should be amply sufficient for local connections.
11782
11783- Issue #7197: Allow unittest.TextTestRunner objects to be pickled and
11784 unpickled. This fixes crashes under Windows when trying to run
11785 test_multiprocessing in verbose mode.
11786
11787- Issue #7893: ``unittest.TextTestResult`` is made public and a ``resultclass``
11788 argument added to the TextTestRunner constructor allowing a different result
11789 class to be used without having to subclass.
11790
11791- Issue #7588: ``unittest.TextTestResult.getDescription`` now includes the test
11792 name in failure reports even if the test has a docstring.
11793
11794- Issue #3001: Add a C implementation of recursive locks which is used by
11795 default when instantiating a `threading.RLock` object. This makes recursive
11796 locks as fast as regular non-recursive locks (previously, they were slower by
11797 10x to 15x).
11798
11799- Issue #7282: Fix a memory leak when an RLock was used in a thread other than
11800 those started through `threading.Thread` (for example, using
11801 `_thread.start_new_thread()`).
11802
11803- Issue #7187: Importlib would not silence the IOError raised when trying to
11804 write new bytecode when it was made read-only.
11805
11806- Issue #7264: Fix a possible deadlock when deallocating thread-local objects
11807 which are part of a reference cycle.
11808
11809- Issue #7211: Allow 64-bit values for the `ident` and `data` fields of kevent
11810 objects on 64-bit systems. Patch by Michael Broghton.
11811
11812- Issue #6896: mailbox.Maildir now invalidates its internal cache each time a
11813 modification is done through it. This fixes inconsistencies and test failures
11814 on systems with slightly bogus mtime behaviour.
11815
11816- Issue #7246 & Issue #7208: getpass now properly flushes input before reading
11817 from stdin so that existing input does not confuse it and lead to incorrect
11818 entry or an IOError. It also properly flushes it afterwards to avoid the
11819 terminal echoing the input afterwards on OSes such as Solaris.
11820
11821- Issue #7233: Fix a number of two-argument Decimal methods to make sure that
11822 they accept an int or long as the second argument. Also fix buggy handling of
11823 large arguments (those with coefficient longer than the current precision) in
11824 shift and rotate.
11825
11826- Issue #4750: Store the basename of the original filename in the gzip FNAME
11827 header as required by RFC 1952.
11828
11829- Issue #1180: Added a new global option to ignore ~/.pydistutils.cfg in
11830 Distutils.
11831
11832- Issue #7218: Fix test_site for win32, the directory comparison was done with
11833 an uppercase.
11834
11835- Issue #7205: Fix a possible deadlock when using a BZ2File object from
11836 several threads at once.
11837
11838- Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424.
11839
11840- Issue #7099: Decimal.is_normal now returns True for numbers with exponent
11841 larger than emax.
11842
11843- Issue #7080: locale.strxfrm() raises a MemoryError on 64-bit non-Windows
11844 platforms, and assorted locale fixes by Derk Drukker.
11845
11846- Issue #5833: Fix extra space character in readline completion with the GNU
11847 readline library version 6.0.
11848
11849- Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment.
11850
11851- Issue #7086: Added TCP support to SysLogHandler, and tidied up some
11852 anachronisms in the code which were a relic of 1.5.2 compatibility.
11853
11854- Issue #7082: When falling back to the MIME 'name' parameter, the correct place
11855 to look for it is the Content-Type header.
11856
11857- Make tokenize.detect_coding() normalize utf-8 and iso-8859-1 variants like the
11858 builtin tokenizer.
11859
11860- Issue #7048: Force Decimal.logb to round its result when that result is too
11861 large to fit in the current precision.
11862
11863- Issue #6236, #6348: Fix various failures in the I/O library under AIX and
11864 other platforms, when using a non-gcc compiler. Patch by Derk Drukker.
11865
11866- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now
11867 always result in NULL.
11868
11869- Issue #5042: Structure sub-subclass does now initialize correctly with base
11870 class positional arguments.
11871
11872- Issue #6882: Import uuid creates zombies processes.
11873
11874- Issue #6635: Fix profiler printing usage message.
11875
11876- Issue #6856: Add a filter keyword argument to TarFile.add().
11877
11878- Issue #6888: pdb's alias command was broken when no arguments were given.
11879
11880- Issue #6857: Default format() alignment should be '>' for Decimal instances.
11881
11882- Issue #6795: int(Decimal('nan')) now raises ValueError instead of returning
11883 NaN or raising InvalidContext. Also, fix infinite recursion in
11884 long(Decimal('nan')).
11885
11886- Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no
11887 type specifier.
11888
11889- Issue #6239: ctypes.c_char_p return value must return bytes.
11890
11891- Issue #6838: Use a list to accumulate the value instead of repeatedly
11892 concatenating strings in http.client's HTTPResponse._read_chunked providing a
11893 significant speed increase when downloading large files servend with a
11894 Transfer-Encoding of 'chunked'.
11895
11896- Trying to import a submodule from a module that is not a package, ImportError
11897 should be raised, not AttributeError.
11898
11899- When the globals past to importlib.__import__() has __package__ set to None,
11900 fall back to computing what __package__ should be instead of giving up.
11901
11902- Raise a TypeError when the name of a module to be imported for
11903 importlib.__import__ is not a string (was raising an AttributeError before).
11904
11905- Allow the fromlist passed into importlib.__import__ to be any iterable.
11906
11907- Have importlib raise ImportError if None is found in sys.modules.
11908
11909- Issue #6054: Do not normalize stored pathnames in tarfile.
11910
11911- Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN
11912 payloads are now ordered by integer value rather than lexicographically.
11913
11914- Issue #1356969: Add missing info methods in tix.HList.
11915
11916- Issue #1522587: New constants and methods for the tix.Grid widget.
11917
11918- Issue #1250469: Fix the return value of tix.PanedWindow.panes.
11919
11920- Issue #1119673: Do not override tkinter.Text methods when creating a
11921 ScrolledText.
11922
11923- Issue #6665: Fix fnmatch to properly match filenames with newlines in them.
11924
11925- Issue #1135: Add the XView and YView mix-ins to avoid duplicating the xview*
11926 and yview* methods.
11927
11928- Issue #6629: Fix a data corruption issue in the new I/O library, which could
11929 occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or
11930 "wb+" mode) after having buffered a certain amount of data for reading. This
11931 bug was not present in the pure Python implementation.
11932
11933- Issue #6622: Fix "local variable 'secret' referenced before assignment" bug in
11934 POP3.apop.
11935
11936- Issue #2715: Remove remnants of Carbon.File from binhex module.
11937
11938- Issue #6595: The Decimal constructor now allows arbitrary Unicode decimal
11939 digits in input, as recommended by the standard. Previously it was restricted
11940 to accepting [0-9].
11941
11942- Issue #6106: telnetlib.Telnet.process_rawq doesn't handle default WILL/WONT
11943 DO/DONT correctly.
11944
11945- Issue #1424152: Fix for http.client, urllib.request to support SSL while
11946 working through proxy. Original patch by Christopher Li, changes made by
11947 Senthil Kumaran.
11948
11949- Add importlib.abc.ExecutionLoader to represent the PEP 302 protocol for
11950 loaders that allow for modules to be executed. Both importlib.abc.PyLoader and
11951 PyPycLoader inherit from this class and provide implementations in relation to
11952 other methods required by the ABCs.
11953
11954- importlib.abc.PyLoader did not inherit from importlib.abc.ResourceLoader like
11955 the documentation said it did even though the code in PyLoader relied on the
11956 abstract method required by ResourceLoader.
11957
11958- Issue #6431: Make Fraction type return NotImplemented when it doesn't know how
11959 to handle a comparison without loss of precision. Also add correct handling
11960 of infinities and nans for comparisons with float.
11961
11962- Issue #6415: Fixed warnings.warn segfault on bad formatted string.
11963
11964- Issue #6358: The exit status of a command started with os.popen() was reported
11965 differently than it did with python 2.x.
11966
11967- Issue #6323: The pdb debugger did not exit when running a script with a syntax
11968 error.
11969
11970- Issue #3392: The subprocess communicate() method no longer fails in select()
11971 when file descriptors are large; communicate() now uses poll() when possible.
11972
11973- Issue #6369: Fix an RLE decompression bug in the binhex module.
11974
11975- Issue #6344: Fixed a crash of mmap.read() when passed a negative argument.
11976
11977- The deprecated function string.maketrans has been removed.
11978
11979- Issue #4005: Fixed a crash of pydoc when there was a zip file present in
11980 sys.path.
11981
11982- Issue #6218: io.StringIO and io.BytesIO instances are now picklable.
11983
11984- The os.get_exec_path() function to return the list of directories that will be
11985 searched for an executable when launching a subprocess was added.
11986
11987- Issue #7481: When a threading.Thread failed to start it would leave the
11988 instance stuck in initial state and present in threading.enumerate().
11989
11990- Issue #1068268: The subprocess module now handles EINTR in internal os.waitpid
11991 and os.read system calls where appropriate.
11992
11993- Issue #6729: Added ctypes.c_ssize_t to represent ssize_t.
11994
11995- Issue #6247: The argparse module has been added to the standard library.
11996
11997- Issue #8235: _socket: Add the constant ``SO_SETFIB``. SO_SETFIB is a socket
11998 option available on FreeBSD 7.1 and newer.
11999
12000- Issue #9315: Fix for the trace module to record correct class name
12001 for tracing methods.
12002
12003Extension Modules
12004-----------------
12005
12006- Issue #9959: Tweak formula used for computing math.log of an integer,
12007 making it marginally more accurate for exact powers of 2.
12008
12009- Issue #9422: Fix memory leak when re-initializing a struct.Struct object.
12010
12011- Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly
12012 compared to other unix systems. In particular, os.getgroups() does not reflect
Martin Pantere26da7c2016-06-02 10:07:09 +000012013 any changes made using os.setgroups() but basically always returns the same
Georg Brandl86dc7322012-10-01 18:58:45 +020012014 information as the id command. os.getgroups() can now return more than 16
12015 groups on MacOSX.
12016
12017- Issue #6095: Make directory argument to os.listdir optional.
12018
12019- Issue #9277: Fix bug in struct.pack for bools in standard mode (e.g.,
12020 struct.pack('>?')): if conversion to bool raised an exception then that
12021 exception wasn't properly propagated on machines where char is unsigned.
12022
12023- Issue #5180: Fixed a bug that prevented loading 2.x pickles in 3.x python when
12024 they contain instances of old-style classes.
12025
12026- Issue #9165: Add new functions math.isfinite and cmath.isfinite, to accompany
12027 existing isinf and isnan functions.
12028
12029- Issue #1578269: Implement os.symlink for Windows 6.0+. Patch by Jason
12030 R. Coombs.
12031
Martin Pantere26da7c2016-06-02 10:07:09 +000012032- In struct.pack, correctly propagate exceptions from computing the truth of an
Georg Brandl86dc7322012-10-01 18:58:45 +020012033 object in the '?' format.
12034
12035- Issue #9000: datetime.timezone objects now have eval-friendly repr.
12036
12037- In the math module, correctly lookup __trunc__, __ceil__, and __floor__ as
12038 special methods.
12039
12040- Issue #9005: Prevent utctimetuple() from producing year 0 or year 10,000.
12041 Prior to this change, timezone adjustment in utctimetuple() could produce
12042 tm_year value of 0 or 10,000. Now an OverflowError is raised in these edge
12043 cases.
12044
12045- Issue #6641: The ``datetime.strptime`` method now supports the ``%z``
12046 directive. When the ``%z`` directive is present in the format string, an
12047 aware ``datetime`` object is returned with ``tzinfo`` bound to a
12048 ``datetime.timezone`` instance constructed from the parsed offset. If both
12049 ``%z`` and ``%Z`` are present, the data in ``%Z`` field is used for timezone
12050 name, but ``%Z`` data without ``%z`` is discarded.
12051
12052- Issue #5094: The ``datetime`` module now has a simple concrete class
12053 implementing ``datetime.tzinfo`` interface. Instances of the new class,
12054 ``datetime.timezone``, return fixed name and UTC offset from their
12055 ``tzname(dt)`` and ``utcoffset(dt)`` methods. The ``dst(dt)`` method always
12056 returns ``None``. A class attribute, ``utc`` contains an instance
12057 representing the UTC timezone. Original patch by Rafe Kaplan.
12058
12059- Issue #8973: Add __all__ to struct module; this ensures that help(struct)
12060 includes documentation for the struct.Struct class.
12061
12062- Issue #3129: Trailing digits in struct format string are no longer ignored.
12063 For example, "1" or "ilib123" are now invalid formats and cause
12064 ``struct.error`` to be raised. Patch by Caleb Deveraux.
12065
12066- Issue #7384: If the system readline library is linked against ncurses, the
12067 curses module must be linked against ncurses as well. Otherwise it is not safe
12068 to load both the readline and curses modules in an application.
12069
12070- Issue #2810: Fix cases where the Windows registry API returns ERROR_MORE_DATA,
12071 requiring a re-try in order to get the complete result.
12072
12073- Issue #8692: Optimize math.factorial: replace the previous naive algorithm
12074 with an improved 'binary-split' algorithm that uses fewer multiplications and
12075 allows many of the multiplications to be performed using plain C integer
12076 arithmetic instead of PyLong arithmetic. Also uses a lookup table for small
12077 arguments.
12078
12079- Issue #8674: Fixed a number of incorrect or undefined-behaviour-inducing
12080 overflow checks in the audioop module.
12081
12082- Issue #8644: The accuracy of td.total_seconds() has been improved (by
12083 calculating with integer arithmetic instead of float arithmetic internally):
12084 the result is now always correctly rounded, and is equivalent to ``td /
12085 timedelta(seconds=1)``.
12086
12087- Issue #2706: Allow division of a timedelta by another timedelta: timedelta /
12088 timedelta, timedelta % timedelta, timedelta // timedelta and divmod(timedelta,
12089 timedelta) are all supported.
12090
12091- Issue #8314: Fix unsigned long long bug in libffi on Sparc v8.
12092
12093- Issue #8300: When passing a non-integer argument to struct.pack with any
12094 integer format code, struct.pack first attempts to convert the non-integer
12095 using its __index__ method. If that method is non-existent or raises
12096 TypeError it goes on to try the __int__ method, as described below.
12097
12098- Issue #8142: Update libffi to the 3.0.9 release.
12099
12100- Issue #6949: Allow the _dbm extension to be built with db 4.8.x.
12101
12102- Issue #6544: Fix a reference leak in the kqueue implementation's error
12103 handling.
12104
12105- Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as
12106 msvcr100.dll is not a platform assembly anymore.
12107
12108- Issue #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}.
12109
12110- Issue #7078: Set struct.__doc__ from _struct.__doc__.
12111
12112- Issue #3366: Add erf, erfc, expm1, gamma, lgamma functions to math module.
12113
12114- Issue #6877: It is now possible to link the readline extension to the libedit
12115 readline emulation on OSX 10.5 or later.
12116
12117- Issue #6848: Fix curses module build failure on OS X 10.6.
12118
12119- Fix a segfault that could be triggered by expat with specially formed input.
12120
12121- Issue #6561: '\d' in a regex now matches only characters with Unicode category
12122 'Nd' (Number, Decimal Digit). Previously it also matched characters with
12123 category 'No'.
12124
12125- Issue #4509: Array objects are no longer modified after an operation failing
12126 due to the resize restriction in-place when the object has exported buffers.
12127
12128- Issue #2389: Array objects are now pickled in a portable manner.
12129
12130- Expat: Fix DoS via XML document with malformed UTF-8 sequences
12131 (CVE_2009_3560).
12132
12133- Issue #7242: On Solaris 9 and earlier calling os.fork() from within a thread
12134 could raise an incorrect RuntimeError about not holding the import lock. The
12135 import lock is now reinitialized after fork.
12136
12137- Issue #7999: os.setreuid() and os.setregid() would refuse to accept a -1
12138 parameter on some platforms such as OS X.
12139
12140- Build the ossaudio extension on GNU/kFreeBSD.
12141
12142- Issue #7347: winreg: Add CreateKeyEx and DeleteKeyEx, as well as fix a bug in
12143 the return value of QueryReflectionKey.
12144
12145- Issue #7567: PyCurses_setupterm: Don't call ``setupterm`` twice.
12146
12147Build
12148-----
12149
12150- Use OpenSSL 1.0.0a on Windows.
12151
12152- Issue #9280: Make sharedinstall depend on sharedmods.
12153
12154- Issue #9189: Make a user-specified CFLAGS, CPPFLAGS, or LDFLAGS setting
12155 override the configure and makefile defaults, without deleting options the
12156 user didn't intend to override. Developers should no longer need to specify
12157 OPT or EXTRA_CFLAGS, although those variables are still present for
12158 backward-compatibility.
12159
12160- Issue #8854: Fix finding Visual Studio 2008 on Windows x64.
12161
12162- Issue #1759169, #8864: Drop _XOPEN_SOURCE on Solaris, define it for
12163 multiprocessing only.
12164
12165- Issue #8625: Turn off optimization in --with-pydebug builds with gcc.
12166 (Optimization was unintentionally turned on in gcc --with-pydebug builds as a
12167 result of the issue #1628484 fix, combined with autoconf's strange choice of
12168 default CFLAGS produced by AC_PROG_CC for gcc.)
12169
12170- Issue #3646: It is now easily possible to install a Python framework into your
12171 home directory on MacOSX, see Mac/README for more information.
12172
12173- Issue #3928: os.mknod() now available in Solaris, also.
12174
12175- Issue #3326: Build Python without -fno-strict-aliasing when the gcc does not
12176 give false warnings.
12177
12178- Issue #1628484: The Makefile doesn't ignore the CFLAGS environment variable
12179 anymore. It also forwards the LDFLAGS settings to the linker when building a
12180 shared library.
12181
12182- Issue #6716: Quote -x arguments of compileall in MSI installer. Exclude 2to3
12183 tests from compileall.
12184
12185- Issue #3920, #7903: Define _BSD_SOURCE on OpenBSD 4.4 through 4.9.
12186
12187- Issue #7632: When Py_USING_MEMORY_DEBUGGER is defined, disable the private
12188 memory allocation scheme in dtoa.c and use PyMem_Malloc and PyMem_Free
12189 instead. Also disable caching of powers of 5.
12190
12191- Issue #6491: Allow --with-dbmliborder to specify that no dbms will be built.
12192
12193- Issue #6943: Use pkg-config to find the libffi headers when the
12194 --with-system-ffi flag is used.
12195
12196- Issue #7609: Add a --with-system-expat option that causes the system's expat
12197 library to be used for the pyexpat module instead of the one included with
12198 Python.
12199
12200- Issue #7589: Only build the nis module when the correct header files are
12201 found.
12202
12203- Switch to OpenSSL 0.9.8l and sqlite 3.6.21 on Windows.
12204
12205- Issue #5792: Extend the short float repr support to x86 systems using
12206 icc or suncc.
12207
12208- Issue #6603: Change READ_TIMESTAMP macro in ceval.c so that it compiles
12209 correctly under gcc on x86-64. This fixes a reported problem with the
12210 --with-tsc build on x86-64.
12211
12212- Issue #6802: Fix build issues on MacOSX 10.6.
12213
12214- Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6.
12215
12216- Issue #4601: 'make install' did not set the appropriate permissions on
12217 directories.
12218
12219- Issue #5390: Add uninstall icon independent of whether file extensions are
12220 installed.
12221
12222- Issue #7541: When using ``python-config`` with a framework install the
12223 compiler might use the wrong library.
12224
12225- python-config now supports multiple options on the same command line.
12226
12227- Issue #8509: Fix quoting in help strings and code snippets in configure.in.
12228
12229- Issue #8510: Update to autoconf2.65.
12230
12231Documentation
12232-------------
12233
12234- Issue #9817: Add expat COPYING file; add expat, libffi and expat licenses
12235 to Doc/license.rst.
12236
12237- Issue #9524: Document that two CTRL* signals are meant for use only
12238 with os.kill.
12239
12240- Issue #9255: Document that the 'test' package is meant for internal Python use
12241 only.
12242
12243- A small WSGI server was added as Tools/scripts/serve.py, and is used to
12244 implement a local documentation server via 'make serve' in the doc directory.
12245
12246- Updating `Using Python` documentation to include description of CPython's -J
12247 and -X options.
12248
12249- Document that importing a module that has None in sys.modules triggers an
12250 ImportError.
12251
12252- Issue #6556: Fixed the Distutils configuration files location explanation for
12253 Windows.
12254
12255- Update python manual page (options -B, -O0, -s, environment variables
12256 PYTHONDONTWRITEBYTECODE, PYTHONNOUSERSITE).
12257
12258- Issue #8909: Added the size of the bitmap used in the installer created by
12259 distutils' bdist_wininst. Patch by Anatoly Techtonik.
12260
12261Tests
12262-----
12263
12264- Issue #9251: test_threaded_import didn't fail when run through regrtest if the
12265 import lock was disabled.
12266
12267- Issue #8605: Skip test_gdb if Python is compiled with optimizations.
12268
12269- Issue #7449: Skip test_socketserver if threading support is disabled.
12270
12271- Issue #8672: Add a zlib test ensuring that an incomplete stream can be handled
12272 by a decompressor object without errors (it returns incomplete uncompressed
12273 data).
12274
12275- Issue #8533: regrtest uses backslashreplace error handler for stdout to avoid
12276 UnicodeEncodeError (write non-ASCII character to stdout using ASCII encoding).
12277
12278- Issue #8576: Remove use of find_unused_port() in test_smtplib and
12279 test_multiprocessing. Patch by Paul Moore.
12280
12281- Issue #7449: Fix many tests to support Python compiled without thread
12282 support. Patches written by Jerry Seutter.
12283
12284- Issue #8108: test_ftplib's non-blocking SSL server now has proper handling of
12285 SSL shutdowns.
12286
12287- Issues #8279, #8330, #8437, #8480, #8495: Fix test_gdb failures, patch written
12288 by Dave Malcolm.
12289
12290- Issue #3864: Skip three test_signal tests on freebsd6 because they fail if any
12291 thread was previously started, most likely due to a platform bug.
12292
12293- Issue #8193: Fix test_zlib failure with zlib 1.2.4.
12294
12295- Issue #8248: Add some tests for the bool type. Patch by Gregory Nofi.
12296
12297- Issue #8263: Now regrtest.py will report a failure if it receives a
12298 KeyboardInterrupt (SIGINT).
12299
12300- Issue #8180 and #8207: Fix test_pep277 on OS X and add more tests for special
12301 Unicode normalization cases.
12302
12303- Issue #7783: test.support.open_urlresource invalidates the outdated files from
12304 the local cache.
12305
12306- Issue #7849: Now the utility ``check_warnings`` verifies if the warnings are
12307 effectively raised.
12308
12309- The four path modules (genericpath, macpath, ntpath, posixpath) share a common
12310 TestCase for some tests: test_genericpath.CommonTest.
12311
12312- Print platform information when running the whole test suite, or using the
12313 --verbose flag.
12314
12315- Issue #767675: enable test_pep277 on POSIX platforms with Unicode-friendly
12316 filesystem encoding.
12317
12318- Issue #6292: for the moment at least, the test suite runs cleanly if python is
12319 run with the -OO flag. Tests requiring docstrings are skipped.
12320
12321- Issue #7712: test.support gained a new `temp_cwd` context manager which is now
12322 also used by regrtest to run all the tests in a temporary directory. The
12323 original CWD is saved in `support.SAVEDCWD`. Thanks to Florent Xicluna who
12324 helped with the patch.
12325
12326- Issue #7924: Fix an intermittent 'XXX undetected error' failure in test_capi
12327 (only seen so far on platforms where the curses module wasn't built), due to
12328 an uncleared exception.
12329
12330- Issue #7728: test_timeout was changed to use support.bind_port instead of a
12331 hard coded port.
12332
12333- Issue #7376: Instead of running a self-test (which was failing) when called
12334 with no arguments, doctest.py now gives a usage message.
12335
12336- Issue #7396: fix regrtest -s, which was broken by the -j enhancement.
12337
12338- Issue #7498: test_multiprocessing now uses test.support.find_unused_port
12339 instead of a hardcoded port number in test_rapid_restart.
12340
12341- Issue #7431: Use TESTFN in test_linecache instead of trying to create a file
12342 in the Lib/test directory, which might be read-only for the user running the
12343 tests.
12344
12345- Issue #7324: Add a sanity check to regrtest argument parsing to catch the case
12346 of an option with no handler.
12347
12348- Issue #7312: Add a -F flag to run the selected tests in a loop until a test
12349 fails. Can be combined with -j.
12350
12351- Issue #6551: test_zipimport could import and then destroy some modules of the
12352 encodings package, which would make other tests fail further down the road
12353 because the internally cached encoders and decoders would point to empty
12354 global variables.
12355
12356- Issue #7295: Do not use a hardcoded file name in test_tarfile.
12357
12358- Issue #7270: Add some dedicated unit tests for multi-thread synchronization
12359 primitives such as Lock, RLock, Condition, Event and Semaphore.
12360
12361- Issue #7248 (part 2): Use a unique temporary directory for importlib source
12362 tests instead of tempfile.tempdir. This prevents the tests from sharing state
12363 between concurrent executions on the same system.
12364
12365- Issue #7248: In importlib.test.source.util a try/finally block did not make
12366 sure that some referenced objects actually were created in the block before
12367 calling methods on the object.
12368
12369- Issue #7222: Make thread "reaping" more reliable so that reference
12370 leak-chasing test runs give sensible results. The previous method of reaping
12371 threads could return successfully while some Thread objects were still
12372 referenced. This also introduces a new private function:
12373 ``_thread._count()``.
12374
12375- Issue #7151: Fixed regrtest -j so that output to stderr from a test no longer
12376 runs the risk of causing the worker thread to fail.
12377
12378- Issue #7055: test___all__ now greedily detects all modules which have an
12379 __all__ attribute, rather than using a hardcoded and incomplete list.
12380
12381- Issue #7058: Added save/restore for things like sys.argv and cwd to
12382 runtest_inner in regrtest, with warnings if the called test modifies them, and
12383 a new section in the summary report at the end.
12384
12385- Issue #7042: Fix test_signal (test_itimer_virtual) failure on OS X 10.6.
12386
12387- Fixed tests in importlib.test.source.test_abc_loader that were masking the
12388 proper exceptions that should be raised for missing or improper code object
12389 bytecode.
12390
12391- Removed importlib's custom test discovery code and switched to
12392 unittest.TestLoader.discover().
12393
12394Tools/Demos
12395-----------
12396
12397- Issue #5464, #8974: Implement plural forms in msgfmt.py.
12398
12399- iobench (a file I/O benchmark) and ccbench (a concurrency benchmark) were
12400 added to the `Tools/` directory. They were previously living in the sandbox.
12401
12402
12403What's New in Python 3.1?
12404=========================
12405
12406*Release date: 27-June-2009*
12407
12408Core and Builtins
12409-----------------
12410
12411- Issue #6334: Fix bug in range length calculation for ranges with
12412 large arguments.
12413
12414- Issue #6329: Fixed iteration for memoryview objects (it was being blocked
12415 because it wasn't recognized as a sequence).
12416
12417Library
12418-------
12419
12420- Issue #6126: Fixed pdb command-line usage.
12421
12422- Issue #6314: logging: performs extra checks on the "level" argument.
12423
12424- Issue #6274: Fixed possible file descriptors leak in subprocess.py
12425
12426- Accessing io.StringIO.buffer now raises an AttributeError instead of
12427 io.UnsupportedOperation.
12428
12429- Issue #6271: mmap tried to close invalid file handle (-1) when anonymous.
12430 (On Unix)
12431
12432- Issue #1202: zipfile module would cause a struct.error when attempting to
12433 store files with a CRC32 > 2**31-1.
12434
12435Extension Modules
12436-----------------
12437
12438- Issue #5590: Remove unused global variable in pyexpat extension.
12439
12440
12441What's New in Python 3.1 Release Candidate 2?
12442=============================================
12443
12444*Release date: 13-June-2009*
12445
12446Core and Builtins
12447-----------------
12448
12449- Fixed SystemError triggered by "range([], 1, -1)".
12450
12451- Issue #5924: On Windows, a large PYTHONPATH environment variable
12452 (more than 255 characters) would be completely ignored.
12453
12454- Issue #4547: When debugging a very large function, it was not always
12455 possible to update the lineno attribute of the current frame.
12456
12457- Issue #5330: C functions called with keyword arguments were not reported by
12458 the various profiling modules (profile, cProfile). Patch by Hagen Fürstenau.
12459
12460Library
12461-------
12462
12463- Issue #6438: Fixed distutils.cygwinccompiler.get_versions : the regular
12464 expression string pattern was trying to match against a bytes returned by
12465 Popen. Tested under win32 to build the py-postgresql project.
12466
12467- Issue #6258: Support AMD64 in bdist_msi.
12468
12469- Issue #6195: fixed doctest to no longer try to read 'source' data from
12470 binary files.
12471
12472- Issue #5262: Fixed bug in next rollover time computation in
12473 TimedRotatingFileHandler.
12474
12475- Issue #6217: The C implementation of io.TextIOWrapper didn't include the
12476 errors property. Additionally, the errors and encoding properties of StringIO
12477 are always None now.
12478
12479- Issue #6137: The pickle module now translates module names when loading
12480 or dumping pickles with a 2.x-compatible protocol, in order to make data
12481 sharing and migration easier. This behaviour can be disabled using the
12482 new `fix_imports` optional argument.
12483
12484- Removed the ipaddr module.
12485
12486- Issue #3613: base64.{encode,decode}string are now called
12487 base64.{encode,decode}bytes which reflects what type they accept and return.
12488 The old names are still there as deprecated aliases.
12489
12490- Issue #5767: Remove sgmlop support from xmlrpc.client.
12491
12492- Issue #6150: Fix test_unicode on wide-unicode builds.
12493
12494- Issue #6149: Fix initialization of WeakValueDictionary objects from non-empty
12495 parameters.
12496
12497Windows
12498-------
12499
12500- Issue #6221: Delete test registry key before running the test.
12501
12502- Issue #6158: Package Sine-1000Hz-300ms.aif in MSI file.
12503
12504C-API
12505-----
12506
12507- Issue #5735: Python compiled with --with-pydebug should throw an
12508 ImportError when trying to import modules compiled without
12509 --with-pydebug, and vice-versa.
12510
12511
12512Build
12513-----
12514
12515- Issue #6154: Make sure the intl library is added to LIBS if needed. Also
12516 added LIBS to OS X framework builds.
12517
12518- Issue #5809: Specifying both --enable-framework and --enable-shared is
Martin Pantere26da7c2016-06-02 10:07:09 +000012519 an error. Configure now explicitly tells you about this.
Georg Brandl86dc7322012-10-01 18:58:45 +020012520
12521
12522
12523What's New in Python 3.1 release candidate 1?
12524=============================================
12525
12526*Release date: 2009-05-30*
12527
12528Core and Builtins
12529-----------------
12530
12531- Issue #6097: Escape UTF-8 surrogates resulting from mbstocs conversion
12532 of the command line.
12533
12534- Issue #6012: Add cleanup support to O& argument parsing.
12535
12536- Issue #6089: Fixed str.format with certain invalid field specifiers
12537 that would raise SystemError.
12538
12539- Issue #5982: staticmethod and classmethod now expose the wrapped
12540 function with __func__.
12541
12542- Added support for multiple context managers in the same with-statement.
12543 Deprecated contextlib.nested() which is no longer needed.
12544
12545- Issue #5829: complex("1e500") no longer raises OverflowError. This
12546 makes it consistent with float("1e500") and interpretation of real
12547 and imaginary literals.
12548
12549- Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more.
12550
12551- Issue #5994: the marshal module now has docstrings.
12552
12553- Issue #5981: Fix three minor inf/nan issues in float.fromhex:
12554 (1) inf and nan strings with trailing whitespace were incorrectly
12555 rejected; (2) parsing of strings representing infinities and nans
12556 was locale aware; and (3) the interpretation of fromhex('-nan')
12557 didn't match that of float('-nan').
12558
12559Library
12560-------
12561
12562- Issue #4859: Implement PEP 383 for pwd, spwd, and grp.
12563
12564- smtplib 'login' and 'cram-md5' login are also fixed (see Issue #5259).
12565
12566- Issue #6121: pydoc now ignores leading and trailing spaces in the
12567 argument to the 'help' function.
12568
12569- Issue #6118: urllib.parse.quote_plus ignored the encoding and errors
12570 arguments for strings with a space in them.
12571
12572- collections.namedtuple() was not working with the following field
12573 names: cls, self, tuple, itemgetter, and property.
12574
12575- In unittest, using a skipping decorator on a class is now equivalent to
12576 skipping every test on the class. The ClassTestSuite class has been removed.
12577
12578- Issue #6050: Don't fail extracting a directory from a zipfile if
12579 the directory already exists.
12580
12581- Issue #1309352: fcntl now converts its third arguments to a C `long` rather
12582 than an int, which makes some operations possible under 64-bit Linux (e.g.
12583 DN_MULTISHOT with F_NOTIFY).
12584
12585- Issue #5761: Add the name of the underlying file to the repr() of various
12586 IO objects.
12587
12588- Issue #5259: smtplib plain auth login no longer gives a traceback. Fix
12589 by Musashi Tamura, tests by Marcin Bachry.
12590
12591- Issue #1983: Fix functions taking or returning a process identifier to use
12592 the dedicated C type ``pid_t`` instead of a C ``int``. Some platforms have
12593 a process identifier type wider than the standard C integer type.
12594
12595- Issue #4066: smtplib.SMTP_SSL._get_socket now correctly returns the socket.
12596 Patch by Farhan Ahmad, test by Marcin Bachry.
12597
12598- Issue #2116: Weak references and weak dictionaries now support copy()ing and
12599 deepcopy()ing.
12600
12601- Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr.
12602
12603- Issue #5918: Fix a crash in the parser module.
12604
12605- Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.
12606
12607- Issue #5006: Better handling of unicode byte-order marks (BOM) in the io
Martin Panter6245cb32016-04-15 02:14:19 +000012608 library. This means, for example, that opening a UTF-16 text file in
Georg Brandl86dc7322012-10-01 18:58:45 +020012609 append mode doesn't add a BOM at the end of the file if the file isn't
12610 empty.
12611
12612- Issue #4050: inspect.findsource/getsource now raise an IOError if the 'source'
12613 file is a binary. Patch by Brodie Rao, tests by Daniel Diniz. This fix
12614 corrects a pydoc regression.
12615
12616- Issue #5955: aifc's close method did not close the file it wrapped,
12617 now it does. This also means getfp method now returns the real fp.
12618
12619Installation
12620------------
12621
12622- Issue #6047: fullinstall has been removed because Python 3's executable will
12623 now be known as python3.
12624
12625- Lib/smtpd.py is no longer installed as a script.
12626
12627Extension Modules
12628-----------------
12629
12630- Issue #3061: Use wcsftime for time.strftime where available.
12631
12632- Issue #4873: Fix resource leaks in error cases of pwd and grp.
12633
12634- Issue #6093: Fix off-by-one error in locale.strxfrm.
12635
12636- The _functools and _locale modules are now built into the libpython shared
12637 library instead of as extension modules.
12638
12639Build
12640-----
12641
12642- Issue #3585: Add pkg-config support. It creates a python-2.7.pc file
12643 and a python3.pc symlink in the $(LIBDIR)/pkgconfig directory. Patch by
12644 Clinton Roy.
12645
12646Tests
12647-----
12648
12649- Issue #5442: Tests for importlib were not properly skipping case-sensitivity
12650 tests on darwin even when the OS was installed on a case-sensitive
12651 filesystem. Also fixed tests that should not be run when
12652 sys.dont_write_bytecode is true.
12653
12654
12655What's New in Python 3.1 beta 1?
12656================================
12657
12658*Release date: 2009-05-06*
12659
12660Core and Builtins
12661-----------------
12662
12663- Issue #5914: Add new C API function PyOS_string_to_double, and
12664 deprecate PyOS_ascii_strtod and PyOS_ascii_atof.
12665
12666- Issue #3382: float.__format__, complex.__format__, and %-formatting
12667 no longer map 'F' to 'f'. Because of issue #5859 (below), this only
12668 affects nan -> NAN and inf -> INF.
12669
12670- Issue #5799: ntpath (ie, os.path on Windows) fully supports UNC pathnames
12671 in all operations, including splitdrive, split, etc. splitunc() now issues
12672 a PendingDeprecation warning.
12673
12674- Issue #5920: For float.__format__, change the behavior with the
12675 empty presentation type (that is, not one of 'e', 'f', 'g', or 'n')
12676 to be like 'g' but with at least one decimal point and with a
12677 default precision of 12. Previously, the behavior the same but with
12678 a default precision of 6. This more closely matches str(), and
12679 reduces surprises when adding alignment flags to the empty
12680 presentation type. This also affects the new complex.__format__ in
12681 the same way.
12682
12683- Implement PEP 383, Non-decodable Bytes in System Character Interfaces.
12684
12685- Issue #5890: in subclasses of 'property' the __doc__ attribute was
12686 shadowed by classtype's, even if it was None. property now
12687 inserts the __doc__ into the subclass instance __dict__.
12688
12689- Issue #4426: The UTF-7 decoder was too strict and didn't accept some legal
12690 sequences. Patch by Nick Barnes and Victor Stinner.
12691
12692- Issue #3672: Reject surrogates in utf-8 codec; add surrogatepass error handler.
12693
12694- Issue #5883: In the io module, the BufferedIOBase and TextIOBase ABCs have
12695 received a new method, detach(). detach() disconnects the underlying stream
12696 from the buffer or text IO and returns it.
12697
12698- Issue #5859: Remove switch from '%f' to '%g'-style formatting for
12699 floats with absolute value over 1e50. Also remove length
12700 restrictions for float formatting: '%.67f' % 12.34 and '%.120e' %
12701 12.34 no longer raise an exception.
12702
12703- Issue #1588: Add complex.__format__. For example,
12704 format(complex(1, 2./3), '.5') now produces a sensible result.
12705
12706- Issue #5864: Fix empty format code formatting for floats so that it
12707 never gives more than the requested number of significant digits.
12708
12709- Issue #5793: Rationalize isdigit / isalpha / tolower, etc. Includes
12710 new Py_ISDIGIT / Py_ISALPHA / Py_TOLOWER, etc. in pctypes.h.
12711
12712- Issue #5835: Deprecate PyOS_ascii_formatd.
12713
12714- Issue #4971: Fix titlecase for characters that are their own
12715 titlecase, but not their own uppercase.
12716
12717- Issue #5283: Setting __class__ in __del__ caused a segfault.
12718
12719- Issue #5816: complex(repr(z)) now recovers z exactly, even when
12720 z involves nans, infs or negative zeros.
12721
12722- Issue #3166: Make int -> float conversions correctly rounded.
12723
12724- Issue #1869 (and many duplicates): make round(x, n) correctly
12725 rounded for a float x, by using the decimal <-> binary conversions
12726 from Python/dtoa.c. As a consequence, (e.g.) round(x, 2) now
12727 consistently agrees with format(x, '.2f').
12728
12729- Issue #5787: object.__getattribute__(some_type, "__bases__") segfaulted on
12730 some builtin types.
12731
12732- Issue #5772: format(1e100, '<') produces '1e+100', not '1.0e+100'.
12733
12734- Issue #5515: str.format() type 'n' combined with commas and leading
12735 zeros no longer gives odd results with ints and floats.
12736
12737- Implement PEP 378, Format Specifier for Thousands Separator, for
12738 floats.
12739
12740- The str function switches to exponential notation at
12741 1e11, not 1e12. This avoids printing 13 significant digits in
12742 situations where only 12 of them are correct. Example problem
12743 value: str(1e11 + 0.5). (This minor issue has existed in 2.x for a
12744 long time.)
12745
12746- Issue #1580: On most platforms, use a 'short' float repr: for a
12747 finite float x, repr(x) now outputs a string based on the shortest
12748 sequence of decimal digits that rounds to x. Previous behaviour was
12749 to output 17 significant digits and then strip trailing zeros.
12750 Another minor difference is that the new repr switches to
12751 exponential notation at 1e16 instead of the previous 1e17; this
12752 avoids misleading output in some cases.
12753
12754 There's a new sys attribute sys.float_repr_style, which takes
12755 the value 'short' to indicate that we're using short float repr,
12756 and 'legacy' if the short float repr isn't available for one
12757 reason or another.
12758
12759 The float repr change involves incorporating David Gay's 'perfect
12760 rounding' code into the Python core (it's in Python/dtoa.c). As a
12761 secondary consequence, all string-to-float and float-to-string
12762 conversions (including all float formatting operations) will be
12763 correctly rounded on these platforms.
12764
12765 See issue #1580 discussions for details of platforms for which
12766 this change does not apply.
12767
12768- Issue #5759: float() didn't call __float__ on str subclasses.
12769
12770- The string.maketrans() function is deprecated; there is a new static method
12771 maketrans() on the bytes and bytearray classes. This removes confusion about
12772 the types string.maketrans() is supposed to work with, and mirrors the
12773 methods available on the str class.
12774
12775- Issue #2170: refactored xml.dom.minidom.normalize, increasing both
12776 its clarity and its speed.
12777
12778- Issue #1113244: Py_XINCREF, Py_DECREF, Py_XDECREF: Add ``do { ... } while (0)``
12779 to avoid compiler warnings.
12780
12781- Issue #3739: The unicode-internal encoder now reports the number of characters
12782 consumed like any other encoder (instead of the number of bytes).
12783
12784Installation
12785------------
12786
12787- Issue #5756: Install idle and pydoc with a 3 suffix.
12788
12789Library
12790-------
12791
12792- Issue #8203: Fix IDLE Credits dialog: view_file() uses its encoding argument.
12793
12794- Issue #5311: bdist_msi can now build packages that do not depend on a
12795 specific Python version.
12796
12797- Issue #5150: IDLE's format menu now has an option to strip trailing
12798 whitespace.
12799
12800- Issue #5940: distutils.command.build_clib.check_library_list was not doing
12801 the right type checkings anymore.
12802
12803- Issue #4875: On win32, ctypes.util.find_library does no longer
12804 return directories.
12805
12806- Issue #5142: Add the ability to skip modules while stepping to pdb.
12807
12808- Issue #1309567: Fix linecache behavior of stripping subdirectories when
12809 looking for files given by a relative filename.
12810
12811- Issue #5923: Update the ``turtle`` module to version 1.1, add two new
12812 turtle demos in Demo/turtle.
12813
12814- Issue #5692: In ``zipfile.Zipfile``, fix wrong path calculation when
12815 extracting a file to the root directory.
12816
12817- Issue #5913: os.listdir() should fail for empty path on windows.
12818
12819- Issue #5084: unpickling now interns the attribute names of pickled objects,
12820 saving memory and avoiding growth in size of subsequent pickles. Proposal
12821 and original patch by Jake McGuire.
12822
12823- The json module now works exclusively with str and not bytes.
12824
12825- Issue #3959: The ipaddr module has been added to the standard library.
12826 Contributed by Google.
12827
12828- Issue #3002: ``shutil.copyfile()`` and ``shutil.copytree()`` now raise an
12829 error when a named pipe is encountered, rather than blocking infinitely.
12830
12831- Issue #5857: tokenize.tokenize() now returns named tuples.
12832
12833- Issue #4305: ctypes should now build again on mipsel-linux-gnu
12834
12835- Issue #1734234: Massively speedup ``unicodedata.normalize()`` when the
12836 string is already in normalized form, by performing a quick check beforehand.
12837 Original patch by Rauli Ruohonen.
12838
12839- Issue #5853: calling a function of the mimetypes module from several threads
12840 at once could hit the recursion limit if the mimetypes database hadn't been
12841 initialized before.
12842
12843- Issue #5854: Updated __all__ to include some missing names and remove some
12844 names which should not be exported.
12845
12846- Issue #3102: All global symbols that the _ctypes extension defines
12847 are now prefixed with 'Py' or '_ctypes'.
12848
12849- Issue #5041: ctypes does now allow pickling wide character.
12850
12851- Issue #5812: For the two-argument form of the Fraction constructor,
12852 Fraction(m, n), m and n are permitted to be arbitrary Rational
12853 instances.
12854
12855- Issue #5812: Fraction('1e6') is valid: more generally, any string
12856 that's valid for float() is now valid for Fraction(), with the
12857 exception of strings representing NaNs and infinities.
12858
12859- Issue #5734: BufferedRWPair was poorly tested and had several glaring
12860 bugs. Patch by Brian Quinlan.
12861
12862- Issue #1161031: fix readwrite select flag handling: POLLPRI now
12863 results in a handle_expt_event call, not handle_read_event, and POLLERR
12864 and POLLNVAL now call handle_close, not handle_expt_event. Also,
12865 dispatcher now has an 'ignore_log_types' attribute for suppressing
12866 log messages, which is set to 'warning' by default.
12867
12868- Issue #2703: SimpleXMLRPCDispatcher.__init__: Provide default values for
12869 new arguments introduced in 2.5.
12870
12871- Issue #5828 (Invalid behavior of unicode.lower): Fixed bogus logic in
12872 makeunicodedata.py and regenerated the Unicode database (This fixes
12873 u'\u1d79'.lower() == '\x00').
12874
12875Extension Modules
12876-----------------
12877
12878- Issue #5881: Remove old undocumented compatibility interfaces in hashlib and
12879 pwd.
12880
12881- Issue #5463: In struct module, remove deprecated float coercion
12882 for integer type codes: struct.pack('L', 0.3) should now raise
12883 an error. The _PY_STRUCT_FLOAT_COERCE constant has been removed.
12884 The version number has been bumped to 0.3.
12885
12886- Issue #5359: Readd the Berkeley DB detection code to allow _dbm be built
12887 using Berkeley DB.
12888
12889Tests
12890-----
12891
12892- Issue #5354: New test support function import_fresh_module() makes
12893 it easy to import both normal and optimised versions of modules.
12894 test_heapq and test_warnings have been adjusted to use it, tests for
12895 other modules with both C and Python implementations in the stdlib
12896 can be adjusted to use it over time.
12897
12898- Issue #5837: Certain sequences of calls to set() and unset() for
12899 support.EnvironmentVarGuard objects restored the environment variables
12900 incorrectly on __exit__.
12901
12902C-API
12903-----
12904
12905- Issue #5630: A replacement PyCObject API, PyCapsule, has been added.
12906
12907
12908What's New in Python 3.1 alpha 2?
12909=================================
12910
12911*Release date: 2009-4-4*
12912
12913Core and Builtins
12914-----------------
12915
12916- Implement PEP 378, Format Specifier for Thousands Separator, for
12917 integers.
12918
12919- Issue #5666: Py_BuildValue's 'c' code should create byte strings.
12920
12921- Issue #5499: The 'c' code for argument parsing functions now only accepts a
12922 byte, and the 'C' code only accepts a unicode character.
12923
12924- Fix a problem in PyErr_NormalizeException that leads to "undetected errors"
12925 when hitting the recursion limit under certain circumstances.
12926
12927- Issue #1665206: Remove the last eager import in _warnings.c and make it lazy.
12928
12929- Fix a segfault when running test_exceptions with coverage, caused by
12930 insufficient checks in accessors of Exception.__context__.
12931
12932- Issue #5604: non-ASCII characters in module name passed to
12933 imp.find_module() were converted to UTF-8 while the path is
12934 converted to the default filesystem encoding, causing nonsense.
12935
12936- Issue #5126: str.isprintable() returned False for space characters.
12937
12938- Issue #4865: On MacOSX /Library/Python/2.7/site-packages is added to
12939 the end sys.path, for compatibility with the system install of Python.
12940
12941- Issue #4688: Add a heuristic so that tuples and dicts containing only
12942 untrackable objects are not tracked by the garbage collector. This can
12943 reduce the size of collections and therefore the garbage collection overhead
12944 on long-running programs, depending on their particular use of datatypes.
12945
12946- Issue #5512: Rewrite PyLong long division algorithm (x_divrem) to
12947 improve its performance. Long divisions and remainder operations
12948 are now between 50% and 150% faster.
12949
12950- Issue #4258: Make it possible to use base 2**30 instead of base
12951 2**15 for the internal representation of integers, for performance
12952 reasons. Base 2**30 is enabled by default on 64-bit machines. Add
12953 --enable-big-digits option to configure, which overrides the
12954 default. Add sys.int_info structseq to provide information about
12955 the internal format.
12956
12957- Issue #4474: PyUnicode_FromWideChar now converts characters outside
12958 the BMP to surrogate pairs, on systems with sizeof(wchar_t) == 4
12959 and sizeof(Py_UNICODE) == 2.
12960
12961- Issue #5237: Allow auto-numbered fields in str.format(). For
12962 example: '{} {}'.format(1, 2) == '1 2'.
12963
12964- Issue #5392: when a very low recursion limit was set, the interpreter would
12965 abort with a fatal error after the recursion limit was hit twice.
12966
12967- Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with
12968 short file names.
12969
12970Library
12971-------
12972
12973- Issue #2625: added missing items() call to the for loop in
12974 mailbox.MH.get_message().
12975
12976- Issue #5640: Fix _multibytecodec so that CJK codecs don't repeat
12977 error substitutions from non-strict codec error callbacks in
12978 incrementalencoder and StreamWriter.
12979
12980- Issue #5656: Fix the coverage reporting when running the test suite with
12981 the -T argument.
12982
12983- Issue #5647: MutableSet.__iand__() no longer mutates self during iteration.
12984
12985- Issue #5624: Fix the _winreg module name still used in several modules.
12986
Martin Panter7462b6492015-11-02 03:37:02 +000012987- Issue #5628: Fix io.TextIOWrapper.read() with an unreadable buffer.
Georg Brandl86dc7322012-10-01 18:58:45 +020012988
12989- Issue #5619: Multiprocessing children disobey the debug flag and causes
12990 popups on windows buildbots. Patch applied to work around this issue.
12991
12992- Issue #5400: Added patch for multiprocessing on netbsd compilation/support
12993
12994- Issue #5387: Fixed mmap.move crash by integer overflow.
12995
12996- Issue #5261: Patch multiprocessing's semaphore.c to support context
12997 manager use: "with multiprocessing.Lock()" works now.
12998
12999- Issue #5236: Change time.strptime() to only take strings. Didn't work with
13000 bytes already but the failure was non-obvious.
13001
13002- Issue #5177: Multiprocessing's SocketListener class now uses
13003 socket.SO_REUSEADDR on all connections so that the user no longer needs
13004 to wait 120 seconds for the socket to expire.
13005
13006- Issue #5595: Fix UnboundedLocalError in ntpath.ismount().
13007
13008- Issue #1174606: Calling read() without arguments of an unbounded file
13009 (typically /dev/zero under Unix) could crash the interpreter.
13010
13011- The max_buffer_size arguments of io.BufferedWriter, io.BufferedRWPair, and
13012 io.BufferedRandom have been deprecated for removal in Python 3.2.
13013
13014- Issue #5068: Fixed the tarfile._BZ2Proxy.read() method that would loop
13015 forever on incomplete input. That caused tarfile.open() to hang when used
13016 with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or
13017 partial bzip2 compressed data.
13018
13019- Issue #2110: Add support for thousands separator and 'n' type
13020 specifier to Decimal.__format__
13021
13022- Fix Decimal.__format__ bug that swapped the meanings of the '<' and
13023 '>' alignment characters.
13024
13025- The error detection code in FileIO.close() could fail to reflect the `errno`
13026 value, and report it as -1 instead.
13027
13028- Issue #5016: FileIO.seekable() could return False if the file position
13029 was negative when truncated to a C int. Patch by Victor Stinner.
13030
13031Extension Modules
13032-----------------
13033
13034- Issue #5391: mmap now deals exclusively with bytes.
13035
13036- Issue #5463: In struct module, remove deprecated overflow wrapping
13037 when packing an integer: struct.pack('=L', -1) now raises
13038 struct.error instead of returning b'\xff\xff\xff\xff'. The
13039 _PY_STRUCT_RANGE_CHECKING and _PY_STRUCT_OVERFLOW_MASKING constants
13040 have been removed from the struct module.
13041
13042
13043What's New in Python 3.1 alpha 1
13044================================
13045
13046*Release date: 2009-03-07*
13047
13048Core and Builtins
13049-----------------
13050
13051- The io module has been reimplemented in C for speed.
13052
13053- Give dict views an informative __repr__.
13054
13055- Issue #5247: Improve error message when unknown format codes are
13056 used when using str.format() with str, int, and float arguments.
13057
13058- Issue #5249: time.strftime returned malformed string when format string
13059 contained non ascii character on windows.
13060
13061- Issue #4626: compile(), exec(), and eval() ignore the coding cookie if the
13062 source has already been decoded into str.
13063
13064- Issue #5186: Reduce hash collisions for objects with no __hash__ method by
13065 rotating the object pointer by 4 bits to the right.
13066
13067- Issue #4575: Fix Py_IS_INFINITY macro to work correctly on x87 FPUs:
13068 it now forces its argument to double before testing for infinity.
13069
13070- Issue #5137: Make len() correctly raise a TypeError when a __len__ method
13071 returns a non-number type.
13072
13073- Issue #5182: Removed memoryview.__str__.
13074
13075- Issue #1717: Removed builtin cmp() function, dropped tp_compare
13076 slot, the C API functions PyObject_Compare and PyUnicode_Compare and
13077 the type definition cmpfunc. The tp_compare slot has been renamed
13078 to tp_reserved, and is reserved for future usage.
13079
13080- Issue #1242657: the __len__() and __length_hint__() calls in several tools
13081 were suppressing all exceptions. These include list() and bytearray().
13082
13083- Issue #4707: round(x, n) now returns an integer if x is an integer.
13084 Previously it returned a float.
13085
13086- Issue #4753: By enabling a configure option named '--with-computed-gotos'
13087 on compilers that support it (notably: gcc, SunPro, icc), the bytecode
13088 evaluation loop is compiled with a new dispatch mechanism which gives
13089 speedups of up to 20%, depending on the system, on various benchmarks.
13090
13091- Issue #4874: Most builtin decoders now reject unicode input.
13092
13093- Issue #4842: Don't allow trailing 'L' when constructing an integer
13094 from a string.
13095
13096- Issue #4991: os.fdopen now raises an OSError for invalid file descriptors.
13097
13098- Issue #4838: When a module is deallocated, free the memory backing the
13099 optional module state data.
13100
13101- Issue #4910: Rename nb_long slot to nb_reserved, and change its
13102 type to ``(void *)``.
13103
13104- Issue #4935: The overflow checking code in the expandtabs() method common
13105 to str, bytes and bytearray could be optimized away by the compiler, letting
13106 the interpreter segfault instead of raising an error.
13107
13108- Issue #3720: Fix a crash when an iterator modifies its class and removes its
13109 __next__ method.
13110
13111- Issue #4910: Builtin int() function and PyNumber_Long/PyNumber_Int API
13112 function no longer attempt to call the __long__ slot to convert an object
13113 to an integer. Only the __int__ and __trunc__ slots are examined.
13114
13115- Issue #4893: Use NT threading on CE.
13116
13117- Issue #4915: Port sysmodule to Windows CE.
13118
13119- Issue #4868: utf-8, utf-16 and latin1 decoding are now 2x to 4x faster. The
13120 common cases are optimized thanks to a dedicated fast path and a moderate
13121 amount of loop unrolling.
13122
13123- Issue #4074: Change the criteria for doing a full garbage collection (i.e.
13124 collecting the oldest generation) so that allocating lots of objects without
13125 destroying them does not show quadratic performance. Based on a proposal by
13126 Martin von Löwis at
13127 http://mail.python.org/pipermail/python-dev/2008-June/080579.html.
13128
13129- Issue #4604: Some objects of the I/O library could still be used after
13130 having been closed (for instance, a read() call could return some
13131 previously buffered data). Patch by Dmitry Vasiliev.
13132
13133- Issue #4705: Fix the -u ("unbuffered binary stdout and stderr") command-line
13134 flag to work properly. Furthermore, when specifying -u, the text stdout
13135 and stderr streams have line-by-line buffering enabled (the default being
13136 to buffer arbitrary chunks of data).
13137
13138- The internal table, _PyLong_DigitValue, is now an array of unsigned chars
13139 instead of ints (reducing its size from 4 to 8 times thereby reducing
13140 Python's overall memory).
13141
13142- Issue #1180193: When importing a module from a .pyc (or .pyo) file with
13143 an existing .py counterpart, override the co_filename attributes of all
13144 code objects if the original filename is obsolete (which can happen if the
13145 file has been renamed, moved, or if it is accessed through different paths).
13146 Patch by Ziga Seilnacht and Jean-Paul Calderone.
13147
13148- Issue #4580: Fix slicing of memoryviews when the item size is greater than
13149 one byte. Also fixes the meaning of len() so that it returns the number of
13150 items, rather than the size in bytes.
13151
13152- Issue #4075: Use OutputDebugStringW in Py_FatalError.
13153
13154- Issue #4747: When the terminal does not use utf-8, executing a script with
13155 non-ascii characters in its name could fail with a "SyntaxError: None" error.
13156
13157- Issue #4797: IOError.filename was not set when ``_fileio.FileIO`` failed
13158 to open file with a bytes filename on Windows.
13159
13160- Issue #3680: Reference cycles created through a dict, set or deque iterator
13161 did not get collected.
13162
13163- Issue #4701: PyObject_Hash now implicitly calls PyType_Ready on types
13164 where the tp_hash and tp_dict slots are both NULL.
13165
13166- Issue #4759: None is now allowed as the first argument of
13167 bytearray.translate(). It was always allowed for bytes.translate().
13168
13169- Added test case to ensure attempts to read from a file opened for writing
13170 fail.
13171
13172- Issue #3106: Speedup some comparisons (str/str and int/int).
13173
13174- Issue #2183: Simplify and optimize bytecode for list, dict and set
13175 comprehensions. Original patch for list comprehensions by Neal Norwitz.
13176
13177- Issue #2467: gc.DEBUG_STATS reported invalid elapsed times. Also, always
13178 print elapsed times, not only when some objects are uncollectable /
13179 unreachable. Original patch by Neil Schemenauer.
13180
13181- Issue #3439: Add a bit_length method to int.
13182
13183- Issue #2173: When getting device encoding, check that return value of
13184 nl_langinfo is not the empty string. This was causing silent build
13185 failures on OS X.
13186
13187- Issue #4597: Fixed several opcodes that weren't always propagating
13188 exceptions.
13189
13190- Issue #4589: Fixed exception handling when the __exit__ function of a
13191 context manager returns a value that cannot be converted to a bool.
13192
13193- Issue #4445: Replace "sizeof(PyBytesObject)" with
13194 "offsetof(PyBytesObject, ob_sval) + 1" when allocating memory for
13195 bytes instances. On a typical machine this saves 3 bytes of memory
13196 (on average) per allocation of a bytes instance.
13197
13198- Issue #4533: File read operation was dreadfully slow due to a slowly
13199 growing read buffer. Fixed by using the same growth rate algorithm as
13200 Python 2.x.
13201
13202- Issue #4509: Various issues surrounding resize of bytearray objects to
13203 which there are buffer exports (e.g. memoryview instances).
13204
13205- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()``
13206 method on file objects with closefd=False. The file descriptor is still
13207 kept open but the file object behaves like a closed file. The ``FileIO``
13208 object also got a new readonly attribute ``closefd``.
13209
13210- Issue #4569: Interpreter crash when mutating a memoryview with an item size
13211 larger than 1.
13212
13213- Issue #4748: Lambda generators no longer return a value.
13214
13215- The re.sub(), re.subn() and re.split() functions now accept a flags parameter.
13216
13217- Issue #5108: Handle %s like %S, %R and %A in PyUnicode_FromFormatV(): Call
13218 PyUnicode_DecodeUTF8() once, remember the result and output it in a second
13219 step. This avoids problems with counting UTF-8 bytes that ignores the effect
13220 of using the replace error handler in PyUnicode_DecodeUTF8().
13221
13222Library
13223-------
13224
13225- Issue #7071: byte-compilation in Distutils is now done with respect to
13226 sys.dont_write_bytecode.
13227
13228- Issue #7066: archive_util.make_archive now restores the cwd if an error is
13229 raised. Initial patch by Ezio Melotti.
13230
13231- Issue #6516: Added owner/group support when creating tar archives in
13232 Distutils.
13233
13234- Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils.
13235
13236- Issue #6163: Fixed HP-UX runtime library dir options in
13237 distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and
13238 Michael Haubenwallner.
13239
13240- Issue #6693: New functions in site.py to get user/global site packages paths.
13241
13242- Issue #6511: ZipFile now raises BadZipfile (instead of an IOError) when
13243 opening an empty or very small file.
13244
13245- Issue #6545: Removed assert statements in distutils.Extension, so the
13246 behavior is similar when used with -O.
13247
13248- unittest has been split up into a package. All old names should still work.
13249
13250- Issue #6466: now distutils.cygwinccompiler and distutils.emxccompiler
13251 uses the same refactored function to get gcc/ld/dllwrap versions numbers.
13252 It's `distutils.util.get_compiler_versions`. Added deprecation warnings
13253 for the obsolete get_versions() functions.
13254
13255- Issue #6433: fixed issues with multiprocessing.pool.map hanging on empty list
13256
13257- Issue #6314: logging: Extra checks on the "level" argument in more places.
13258
13259- Issue #2622: Fixed an ImportError when importing email.message from a
13260 standalone application built with py2exe or py2app.
13261
13262- Issue #6455: Fixed test_build_ext under win32.
13263
13264- Issue #6377: Enabled the compiler option, and deprecate its usage as an
13265 attribute.
13266
13267- Issue #6413: Fixed the log level in distutils.dist for announce.
13268
13269- Issue #6403: Fixed package path usage in build_ext.
13270
13271- Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was
13272 unconditionally calling "os.close(sys.stdin.fileno())" resulting in file
13273 descriptor errors
13274
13275- Issue #6365: Distutils build_ext inplace mode was copying the compiled
13276 extension in a subdirectory if the extension name had dots.
13277
13278- Issue #6164: Added an AIX specific linker argument in Distutils
13279 unixcompiler. Original patch by Sridhar Ratnakumar.
13280
13281- Issue #6286: Now Distutils upload command is based on urllib2 instead of
13282 httplib, allowing the usage of http_proxy.
13283
13284- Issue #6287: Added the license field in Distutils documentation.
13285
13286- Issue #6263: Fixed syntax error in distutils.cygwincompiler.
13287
13288- Issue #5201: distutils.sysconfig.parse_makefile() now understands `$$`
13289 in Makefiles. This prevents compile errors when using syntax like:
13290 `LDFLAGS='-rpath=\$$LIB:/some/other/path'`. Patch by Floris Bruynooghe.
13291
13292- Issue #6131: test_modulefinder leaked when run after test_distutils.
13293 Patch by Hirokazu Yamamoto.
13294
13295- Issue #6048: Now Distutils uses the tarfile module in archive_util.
13296
13297- Issue #6062: In distutils, fixed the package option of build_ext. Feedback
13298 and tests on pywin32 by Tim Golden.
13299
13300- Issue #6053: Fixed distutils tests on win32. patch by Hirokazu Yamamoto.
13301
13302- Issue #6046: Fixed the library extension when distutils build_ext is used
13303 inplace. Initial patch by Roumen Petrov.
13304
13305- Issue #6041: Now distutils `sdist` and `register` commands use `check` as a
13306 subcommand.
13307
13308- Issue #6022: a test file was created in the current working directory by
13309 test_get_outputs in Distutils.
13310
13311- Issue #5977: distutils build_ext.get_outputs was not taking into account the
13312 inplace option. Initial patch by kxroberto.
13313
13314- Issue #5984: distutils.command.build_ext.check_extensions_list checks were broken
13315 for old-style extensions.
13316
13317- Issue #5976: Fixed Distutils test_check_environ.
13318
13319- Issue #5941: Distutils build_clib command was not working anymore because
Martin Panterd2a584b2016-10-10 00:24:34 +000013320 of an incomplete customization of the archiver command. Added ARFLAGS in the
Georg Brandl86dc7322012-10-01 18:58:45 +020013321 Makefile besides AR and make Distutils use it. Original patch by David
13322 Cournapeau.
13323
13324- Issue #2245: aifc now skips chunk types it doesn't recognize, per spec.
13325
13326- Issue #5874: distutils.tests.test_config_cmd is not locale-sensitive
13327 anymore.
13328
13329- Issue #5810: Fixed Distutils test_build_scripts so it uses
13330 sysconfig.get_config_vars.
13331
13332- Issue #4951: Fixed failure in test_httpservers.
13333
13334- Issue #5795: Fixed test_distutils failure on Debian ppc.
13335
13336- Issue #5607: fixed Distutils test_get_platform for Mac OS X fat binaries.
13337
13338- Issue #5741: don't disallow "%%" (which is an escape for "%") when setting
13339 a value in SafeConfigParser.
13340
13341- Issue #5732: added a new command in Distutils: check.
13342
13343- Issue #5731: Distutils bdist_wininst no longer worked on non-Windows
13344 platforms. Initial patch by Paul Moore.
13345
13346- Issue #5095: Added bdist_msi to the list of bdist supported formats.
13347 Initial fix by Steven Bethard.
13348
13349- Issue #1491431: Fixed distutils.filelist.glob_to_re for edge cases.
13350 Initial fix by Wayne Davison.
13351
13352- Issue #5694: removed spurious test output in Distutils (test_clean).
13353
13354- Issue #1326077: fix the formatting of SyntaxErrors by the traceback module.
13355
13356- Issue #1665206 (partially): Move imports in cgitb to the top of the module
13357 instead of performing them in functions. Helps prevent import deadlocking in
13358 threads.
13359
13360- Issue #2522: locale.format now checks its first argument to ensure it has
13361 been passed only one pattern, avoiding mysterious errors where it appeared
13362 that it was failing to do localization.
13363
13364- Issue #5583: Added optional Extensions in Distutils. Initial patch by Georg
13365 Brandl.
13366
13367- Issue #1222: locale.format() bug when the thousands separator is a space
13368 character.
13369
13370- Issue #5472: Fixed distutils.test_util tear down. Original patch by
13371 Tim Golden.
13372
13373- collections.deque() objects now have a read-only attribute called maxlen.
13374
13375- Issue #2638: Show a window constructed with tkSimpleDialog.Dialog only after
13376 it is has been populated and properly configured in order to prevent
13377 window flashing.
13378
13379- Issue #4792: Prevent a segfault in _tkinter by using the
13380 guaranteed to be safe interp argument given to the PythonCmd in place of
13381 the Tcl interpreter taken from a PythonCmd_ClientData.
13382
13383- Issue #5193: Guarantee that tkinter.Text.search returns a string.
13384
13385- Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler.
13386 Original patch by Akira Kitada.
13387
13388- Issue #5334: array.fromfile() failed to insert values when EOFError was raised.
13389
13390- Issue #5385: Fixed mmap crash after resize failure on windows.
13391
13392- Issue #5179: Fixed subprocess handle leak on failure on windows.
13393
13394- PEP 372: Added collections.OrderedDict().
13395
13396- The _asdict() for method for namedtuples now returns an OrderedDict().
13397
13398- configparser now defaults to using an ordered dictionary.
13399
13400- Issue #5401: Fixed a performance problem in mimetypes when ``from mimetypes
13401 import guess_extension`` was used.
13402
13403- Issue #1733986: Fixed mmap crash in accessing elements of second map object
13404 with same tagname but larger size than first map. (Windows)
13405
13406- Issue #5386: mmap.write_byte didn't check map size, so it could cause buffer
13407 overrun.
13408
13409- Issue #1533164: Installed but not listed ``*.pyo`` was breaking Distutils
13410 bdist_rpm command.
13411
13412- Issue #5378: added --quiet option to Distutils bdist_rpm command.
13413
13414- Issue #5052: make Distutils compatible with 2.3 again.
13415
13416- Issue #5316: Fixed buildbot failures introduced by multiple inheritance
13417 in Distutils tests.
13418
13419- Issue #5287: Add exception handling around findCaller() call to help out
13420 IronPython.
13421
13422- Issue #5282: Fixed mmap resize on 32bit windows and unix. When offset > 0,
13423 The file was resized to wrong size.
13424
13425- Issue #5292: Fixed mmap crash on its boundary access m[len(m)].
13426
13427- Issue #2279: distutils.sdist.add_defaults now add files
13428 from the package_data and the data_files metadata.
13429
13430- Issue #5257: refactored all tests in distutils, so they use
13431 support.TempdirManager, to avoid writing in the tests directory.
13432
13433- Issue #4524: distutils build_script command failed with --with-suffix=3.
13434 Initial patch by Amaury Forgeot d'Arc.
13435
13436- Issue #2461: added tests for distutils.util
13437
13438- Issue #4998: The memory saving effect of __slots__ had been lost on Fractions
13439 which inherited from numbers.py which did not have __slots__ defined. The
13440 numbers hierarchy now has its own __slots__ declarations.
13441
13442- Issue #4631: Fix urlopen() result when an HTTP response uses chunked
13443 encoding.
13444
13445- Issue #5203: Fixed ctypes segfaults when passing a unicode string to a
13446 function without argtypes (only occurs if HAVE_USABLE_WCHAR_T is false).
13447
13448- Issue #3386: distutils.sysconfig.get_python_lib prefix argument was ignored
13449 under NT and OS2. Patch by Philip Jenvey.
13450
13451- Issue #5128: Make compileall properly inspect bytecode to determine if needs
13452 to be recreated. This avoids a timing hole thanks to the old reliance on the
13453 ctime of the files involved.
13454
13455- Issue #5122: Synchronize tk load failure check to prevent a potential
13456 deadlock.
13457
13458- Issue #1818: collections.namedtuple() now supports a keyword argument
13459 'rename' which lets invalid fieldnames be automatically converted to
13460 positional names in the form, _1, _2, ...
13461
13462- Issue #4890: Handle empty text search pattern in Tkinter.Text.search.
13463
13464- Issue #4512 (part 2): Promote ``ZipImporter._get_filename()`` to be a
13465 public documented method ``ZipImporter.get_filename()``.
13466
13467- Issue #4195: The ``runpy`` module (and the ``-m`` switch) now support
13468 the execution of packages by looking for and executing a ``__main__``
13469 submodule when a package name is supplied. Initial patch by Andi
13470 Vajda.
13471
13472- Issue #1731706: Call Tcl_ConditionFinalize for Tcl_Conditions that will
13473 not be used again (this requires Tcl/Tk 8.3.1), also fix a memory leak in
13474 Tkapp_Call when calling from a thread different than the one that created
13475 the Tcl interpreter. Patch by Robert Hancock.
13476
13477- Issue #4285: Change sys.version_info to be a named tuple. Patch by
13478 Ross Light.
13479
13480- Issue #1520877: Now distutils.sysconfig reads $AR from the
13481 environment/Makefile. Patch by Douglas Greiman.
13482
13483- Issue #1276768: The verbose option was not used in the code of
13484 distutils.file_util and distutils.dir_util.
13485
13486- Issue #5132: Fixed trouble building extensions under Solaris with
13487 --enabled-shared activated. Initial patch by Dave Peterson.
13488
13489- Issue #1581476: Always use the Tcl global namespace when calling into Tcl.
13490
13491- The shelve module now defaults to pickle protocol 3.
13492
13493- Fix a bug in the trace module where a bytes object from co_lnotab had its
13494 items being passed through ord().
13495
13496- Issue #2047: shutil.move() could believe that its destination path was
13497 inside its source path if it began with the same letters (e.g. "src" vs.
13498 "src.new").
13499
13500- Added the ttk module. See issue #2983: Ttk support for Tkinter.
13501
13502- Removed isSequenceType(), isMappingType, and isNumberType() from the
13503 operator module; use the abstract base classes instead. Also removed
13504 the repeat() function; use mul() instead.
13505
13506- Issue #5021: doctest.testfile() did not create __name__ and
13507 collections.namedtuple() relied on __name__ being defined.
13508
13509- Backport importlib from Python 3.1. Only the import_module() function has
13510 been backported to help facilitate transitions from 2.7 to 3.1.
13511
13512- Issue #1885: distutils. When running sdist with --formats=tar,gztar
Martin Pantere26da7c2016-06-02 10:07:09 +000013513 the tar file was overridden by the gztar one.
Georg Brandl86dc7322012-10-01 18:58:45 +020013514
13515- Issue #4863: distutils.mwerkscompiler has been removed.
13516
13517- Added a new itertools functions: combinations_with_replacement()
13518 and compress().
13519
13520- Issue #5032: added a step argument to itertools.count() and
13521 allowed non-integer arguments.
13522
13523- Fix and properly document the multiprocessing module's logging
13524 support, expose the internal levels and provide proper usage
13525 examples.
13526
13527- Issue #1672332: fix unpickling of subnormal floats, which was
13528 producing a ValueError on some platforms.
13529
13530- Issue #3881: Help Tcl to load even when started through the
13531 unreadable local symlink to "Program Files" on Vista.
13532
13533- Issue #4710: Extract directories properly in the zipfile module;
13534 allow adding directories to a zipfile.
13535
13536- Issue #3807: _multiprocessing build fails when configure is passed
13537 --without-threads argument. When this occurs, _multiprocessing will
13538 be disabled, and not compiled.
13539
13540- Issue #5008: When a file is opened in append mode with the new IO library,
13541 do an explicit seek to the end of file (so that e.g. tell() returns the
13542 file size rather than 0). This is consistent with the behaviour of the
13543 traditional 2.x file object.
13544
13545- Issue #5013: Fixed a bug in FileHandler which occurred when the delay
13546 parameter was set.
13547
13548- Issue #4842: Always append a trailing 'L' when pickling longs using
13549 pickle protocol 0. When reading, the 'L' is optional.
13550
13551- Add the importlib package.
13552
13553- Issue #4301: Patch the logging module to add processName support, remove
13554 _check_logger_class from multiprocessing.
13555
13556- Issue #3325: Remove python2.x try: except: imports for old cPickle from
13557 multiprocessing.
13558
13559- Issue #4959: inspect.formatargspec now works for keyword only arguments
13560 without defaults.
13561
13562- Issue #3321: ``_multiprocessing.Connection()`` doesn't check handle; added checks
13563 for Unix machines for negative handles and large int handles. Without this check
13564 it is possible to segfault the interpreter.
13565
13566- Issue #4449: AssertionError in mp_benchmarks.py, caused by an underlying issue
13567 in sharedctypes.py.
13568
13569- Issue #1225107: inspect.isclass() returned True for instances with a custom
13570 __getattr__.
13571
13572- Issue #3826 and #4791: The socket module now closes the underlying socket
13573 appropriately when it is being used via socket.makefile() objects
13574 rather than delaying the close by waiting for garbage collection to do it.
13575
13576- Issue #1696199: Add collections.Counter() for rapid and convenient
13577 counting.
13578
Serhiy Storchaka14867992014-09-10 23:43:41 +030013579- Issue #3860: GzipFile and BZ2File now support the context management protocol.
Georg Brandl86dc7322012-10-01 18:58:45 +020013580
13581- Issue #4867: Fixed a crash in ctypes when passing a string to a
13582 function without defining argtypes.
13583
13584- Issue #4272: Add an optional argument to the GzipFile constructor to override
13585 the timestamp in the gzip stream. The default value remains the current time.
13586 The information can be used by e.g. gunzip when decompressing. Patch by
13587 Jacques Frechet.
13588
13589- Restore Python 2.3 compatibility for decimal.py.
13590
13591- Issue #3638: Remove functions from _tkinter module level that depend on
13592 TkappObject to work with multiple threads.
13593
13594- Issue #4718: Adapt the wsgiref package so that it actually works with
13595 Python 3.x, in accordance with the `official amendments of the spec
13596 <http://www.wsgi.org/wsgi/Amendments_1.0>`_.
13597
13598- Issue #4796: Added Decimal.from_float() and Context.create_decimal_from_float()
13599 to the decimal module.
13600
13601- Fractions.from_float() no longer loses precision for integers too big to
13602 cast as floats.
13603
13604- Issue #4812: add missing underscore prefix to some internal-use-only
13605 constants in the decimal module. (Dec_0 becomes _Dec_0, etc.)
13606
13607- Issue #4790: The nsmallest() and nlargest() functions in the heapq module
13608 did unnecessary work in the common case where no key function was specified.
13609
13610- Issue #4795: inspect.isgeneratorfunction() returns False instead of None when
13611 the function is not a generator.
13612
13613- Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case
13614 no MSVC compiler is found under Windows. Original patch by Philip Jenvey.
13615
13616- Issue #4646: distutils was choking on empty options arg in the setup
13617 function. Original patch by Thomas Heller.
13618
13619- Issue #3767: Convert Tk object to string in tkColorChooser.
13620
13621- Issue #3248: Allow placing ScrolledText in a PanedWindow.
13622
13623- Issue #4444: Allow assertRaises() to be used as a context handler, so that
13624 the code under test can be written inline if more practical.
13625
13626- Issue #4739: Add pydoc help topics for symbols, so that e.g. help('@')
13627 works as expected in the interactive environment.
13628
13629- Issue #4756: zipfile.is_zipfile() now supports file-like objects. Patch by
13630 Gabriel Genellina.
13631
Martin Panter6245cb32016-04-15 02:14:19 +000013632- Issue #4574: reading a UTF16-encoded text file crashes if \r on 64-char
Georg Brandl86dc7322012-10-01 18:58:45 +020013633 boundary.
13634
13635- Issue #4223: inspect.getsource() will now correctly display source code
13636 for packages loaded via zipimport (or any other conformant PEP 302
13637 loader). Original patch by Alexander Belopolsky.
13638
13639- Issue #4201: pdb can now access and display source code loaded via
13640 zipimport (or any other conformant PEP 302 loader). Original patch by
13641 Alexander Belopolsky.
13642
13643- Issue #4197: doctests in modules loaded via zipimport (or any other PEP
13644 302 conformant loader) will now work correctly in most cases (they
13645 are still subject to the constraints that exist for all code running
13646 from inside a module loaded via a PEP 302 loader and attempting to
13647 perform IO operations based on __file__). Original patch by
13648 Alexander Belopolsky.
13649
13650- Issues #4082 and #4512: Add runpy support to zipimport in a manner that
13651 allows backporting to maintenance branches. Original patch by
13652 Alexander Belopolsky.
13653
13654- Issue #4163: textwrap module: allow word splitting on a hyphen preceded by
13655 a non-ASCII letter.
13656
13657- Issue #4616: TarFile.utime(): Restore directory times on Windows.
13658
13659- Issue #4021: tokenize.detect_encoding() now raises a SyntaxError when the
13660 codec cannot be found. This is for compatibility with the builtin behavior.
13661
13662- Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to
13663 give correct results in the case where one argument is a quiet NaN
13664 and the other is a finite number that requires rounding.
13665
13666- Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat
13667 libs.
13668
13669- Added the subprocess.check_call_output() convenience function to get output
13670 from a subprocess on success or raise an exception on error.
13671
13672- Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters to
13673 support unusual filenames (such as those containing semi-colons) in
13674 Content-Disposition headers.
13675
13676- Issue #4384: Added logging integration with warnings module using
13677 captureWarnings(). This change includes a NullHandler which does nothing;
13678 it will be of use to library developers who want to avoid the "No handlers
13679 could be found for logger XXX" message which can appear if the library user
13680 doesn't configure logging.
13681
13682- Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an
13683 exception.
13684
13685- Issue #4529: fix the parser module's validation of try-except-finally
13686 statements.
13687
13688- Issue #4458: getopt.gnu_getopt() now recognizes a single "-" as an argument,
13689 not a malformed option.
13690
13691- Added the subprocess.check_output() convenience function to get output
13692 from a subprocess on success or raise an exception on error.
13693
13694- Issue #4542: On Windows, binascii.crc32 still accepted str as binary input;
13695 the corresponding tests now pass.
13696
13697- Issue #4537: webbrowser.UnixBrowser would fail to open the browser because
13698 it was calling the wrong open() function.
13699
13700- Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters to
13701 support unusual filenames (such as those containing semi-colons) in
13702 Content-Disposition headers.
13703
13704- Issue #4861: ctypes.util.find_library(): Robustify. Fix library detection on
13705 biarch systems. Try to rely on ldconfig only, without using objdump and gcc.
13706
13707- Issue #5104: The socket module now raises OverflowError when 16-bit port and
13708 protocol numbers are supplied outside the allowed 0-65536 range on bind()
13709 and getservbyport().
13710
13711- Windows locale mapping updated to Vista.
13712
13713Tools/Demos
13714-----------
13715
13716- Issue #4704: remove use of cmp() in pybench, bump its version number to 2.1,
13717 and make it 2.6-compatible.
13718
13719- Ttk demos added in Demo/tkinter/ttk/
13720
13721- Issue #4677: add two list comprehension tests to pybench.
13722
13723
13724Build
13725-----
13726
13727- Issue #6094: Build correctly with Subversion 1.7.
13728
13729- Issue #5847: Remove -n switch on "Edit with IDLE" menu item.
13730
13731- Issue #5726: Make Modules/ld_so_aix return the actual exit code of the
13732 linker, rather than always exit successfully. Patch by Floris Bruynooghe.
13733
13734- Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
13735 the order that backends for the dbm extension are checked.
13736
13737- Link the shared python library with $(MODLIBS).
13738
13739- Issue #5134: Silence compiler warnings when compiling sqlite with VC++.
13740
13741- Issue #4494: Fix build with Py_NO_ENABLE_SHARED on Windows.
13742
13743- Issue #4895: Use _strdup on Windows CE.
13744
13745- Issue #4472: "configure --enable-shared" now works on OSX
13746
13747- Issues #4728 and #4060: WORDS_BIGEDIAN is now correct in Universal builds.
13748
13749- Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs".
13750
13751- Issue #4289: Remove Cancel button from AdvancedDlg.
13752
13753- Issue #1656675: Register a drop handler for .py* files on Windows.
13754
13755- Issue #4120: Exclude manifest from extension modules in VS2008.
13756
13757- Issue #4091: Install pythonxy.dll in system32 again.
13758
13759- Issue #4018: Disable "for me" installations on Vista.
13760
13761- Issue #3758: Add ``patchcheck`` build target to .PHONY.
13762
13763- Issue #4204: Fixed module build errors on FreeBSD 4.
13764
13765
13766C-API
13767-----
13768
13769- Issue #6624: yArg_ParseTuple with "s" format when parsing argument with
13770 NUL: Bogus TypeError detail string.
13771
13772- Issue #5175: PyLong_AsUnsignedLongLong now raises OverflowError
13773 for negative arguments. Previously, it raised TypeError.
13774
13775- Issue #4720: The format for PyArg_ParseTupleAndKeywords can begin with '|'.
13776
13777- Issue #3632: from the gdb debugger, the 'pyo' macro can now be called when
13778 the GIL is released, or owned by another thread.
13779
13780- Issue #4122: On Windows, fix a compilation error when using the
13781 Py_UNICODE_ISSPACE macro in an extension module.
13782
13783
13784Extension Modules
13785-----------------
13786
13787- Issue #3745: Fix hashlib to always reject unicode and non buffer-api
13788 supporting objects as input no matter how it was compiled (built in
13789 implementations or external openssl library).
13790
13791- Issue #4397: Fix occasional test_socket failure on OS X.
13792
13793- Issue #4279: Fix build of parsermodule under Cygwin.
13794
13795- Issue #4751: hashlib now releases the GIL when hashing large buffers
13796 (with a hardwired threshold of 2048 bytes), allowing better parallelization
13797 on multi-CPU systems. Contributed by Lukas Lueg (ebfe) and Victor Stinner.
13798
13799- Issue #4051: Prevent conflict of UNICODE macros in cPickle.
13800
Martin Panterc04fb562016-02-10 05:44:01 +000013801- Issue #4738: Each zlib object now has a separate lock, allowing several streams
13802 to be compressed or decompressed at once on multi-CPU systems. Also, the GIL
Georg Brandl86dc7322012-10-01 18:58:45 +020013803 is now released when computing the CRC of a large buffer. Patch by ebfe.
13804
13805- Issue #4228: Pack negative values the same way as 2.4 in struct's L format.
13806
13807- Issue #1040026: Fix os.times result on systems where HZ is incorrect.
13808
13809- Issues #3167, #3682: Fix test_math failures for log, log10 on Solaris,
13810 OpenBSD.
13811
13812- Issue #4583: array.array would not always prohibit resizing when a buffer
13813 has been exported, resulting in an interpreter crash when accessing the
13814 buffer.
13815
13816
13817- Issue #5228: Make functools.partial objects can now be pickled.
13818
13819Tests
13820-----
13821
13822- Issue #6152: New option '-j'/'--multiprocess' for regrtest allows running
13823 regression tests in parallel, shortening the total runtime.
13824
13825- Issue #5450: Moved tests involving loading tk from Lib/test/test_tcl to
13826 Lib/tkinter/test/test_tkinter/test_loadtk. With this, these tests demonstrate
13827 the same behaviour as test_ttkguionly (and now also test_tk) which is to
13828 skip the tests if DISPLAY is defined but can't be used.
13829
13830- regrtest no longer treats ImportError as equivalent to SkipTest. Imports
13831 that should cause a test to be skipped are now done using import_module
13832 from test support, which does the conversion.
13833
13834- Issue #5083: New 'gui' resource for regrtest.
13835
13836
13837Docs
13838----
13839
13840
Barry Warsaw97f005d2008-12-03 16:46:14 +000013841What's New in Python 3.0 final
13842==============================
13843
13844*Release date: 03-Dec-2008*
13845
13846Core and Builtins
13847-----------------
13848
13849- Issue #3996: On Windows, the PyOS_CheckStack function would cause the
13850 interpreter to abort ("Fatal Python error: Could not reset the stack!")
13851 instead of throwing a MemoryError.
13852
13853- Issue #3689: The list reversed iterator now supports __length_hint__
13854 instead of __len__. Behavior now matches other reversed iterators.
13855
13856- Issue #4367: Python would segfault during compiling when the unicodedata
13857 module couldn't be imported and \N escapes were present.
13858
13859- Fix build failure of _cursesmodule.c building with -D_FORTIFY_SOURCE=2.
13860
13861Library
13862-------
13863
13864- Issue #4387: binascii now refuses to accept str as binary input.
13865
13866- Issue #4073: Add 2to3 support to build_scripts, refactor that support
13867 in build_py.
13868
13869- IDLE would print a "Unhandled server exception!" message when internal
13870 debugging is enabled.
13871
13872- Issue #4455: IDLE failed to display the windows list when two windows have
13873 the same title.
13874
13875- Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an
13876 exception.
13877
13878- Issue #4433: Fixed an access violation when garbage collecting
13879 _ctypes.COMError instances.
13880
13881- Issue #4429: Fixed UnicodeDecodeError in ctypes.
13882
13883- Issue #4373: Corrected a potential reference leak in the pickle module and
13884 silenced a false positive ref leak in distutils.tests.test_build_ext.
13885
13886- Issue #4382: dbm.dumb did not specify the expected file encoding for opened
13887 files.
13888
13889- Issue #4383: When IDLE cannot make the connection to its subprocess, it would
13890 fail to properly display the error message.
13891
13892Build
13893-----
13894
13895- Issue #4407: Fix source file that caused the compileall step in Windows installer
13896 to fail.
13897
13898Docs
13899----
13900
13901- Issue #4449: Fixed multiprocessing examples
13902
13903- Issue #3799: Document that dbm.gnu and dbm.ndbm will accept string arguments
13904 for keys and values which will be converted to bytes before committal.
13905
13906
13907What's New in Python 3.0 release candidate 3?
13908=============================================
13909
13910*Release date: 20-Nov-2008*
13911
13912
13913Core and Builtins
13914-----------------
13915
13916- Issue #4349: sys.path included a non-existent platform directory because of a
13917 faulty Makefile.
13918
13919- Issue #3327: Don't overallocate in the modules_by_index list.
13920
13921- Issue #1721812: Binary set operations and copy() returned the input type
13922 instead of the appropriate base type. This was incorrect because set
13923 subclasses would be created without their __init__() method being called.
13924 The corrected behavior brings sets into line with lists and dicts.
13925
13926- Issue #4296: Fix PyObject_RichCompareBool so that "x in [x]" evaluates to
13927 True, even when x doesn't compare equal to itself. This was a regression
13928 from 2.6.
13929
13930- Issue #3705: Command-line arguments were not correctly decoded when the
13931 terminal does not use UTF8.
13932
13933Library
13934-------
13935
13936- Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if
13937 the ctypes module is not present.
13938
13939- FileIO's mode attribute now always includes ``"b"``.
13940
13941- Issue #3799: Fix dbm.dumb to accept strings as well as bytes for keys. String
13942 keys are now written out in UTF-8.
13943
13944- Issue #4338: Fix distutils upload command.
13945
13946- Issue #4354: Fix distutils register command.
13947
13948- Issue #4116: Resolve member name conflict in ScrolledCanvas.__init__.
13949
13950- Issue #4307: The named tuple that ``inspect.getfullargspec()`` returns now
13951 uses ``kwonlydefaults`` instead of ``kwdefaults``.
13952
Martin Panter7462b6492015-11-02 03:37:02 +000013953- Issue #4298: Fix a segfault when pickle.loads is passed ill-formed input.
Barry Warsaw97f005d2008-12-03 16:46:14 +000013954
13955- Issue #4283: Fix a left-over "iteritems" call in distutils.
13956
13957Build
13958-----
13959
13960- Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs".
13961
13962- Issue #4289: Remove Cancel button from AdvancedDlg.
13963
13964- Issue #1656675: Register a drop handler for .py* files on Windows.
13965
13966Tools/Demos
13967-----------
13968
13969- Demos of the socketserver module now work with Python 3.
13970
13971
13972What's New in Python 3.0 release candidate 2
13973============================================
13974
13975*Release date: 05-Nov-2008*
13976
13977Core and Builtins
13978-----------------
13979
13980- Issue #4211: The __path__ attribute of frozen packages is now a list instead
13981 of a string as required by PEP 302.
13982
13983- Issue #3727: Fixed poplib.
13984
13985- Issue #3714: Fixed nntplib by using bytes where appropriate.
13986
13987- Issue #1210: Fixed imaplib and its documentation.
13988
Victor Stinner554fd082014-03-17 22:33:49 +010013989- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()``
Barry Warsaw97f005d2008-12-03 16:46:14 +000013990 method on file objects with closefd=False. The file descriptor is still
13991 kept open but the file object behaves like a closed file. The ``FileIO``
13992 object also got a new readonly attribute ``closefd``.
13993
13994- Issue #3626: On cygwin, starting python with a non-existent script name
13995 would not display anything if the file name is only 1 character long.
13996
13997- Issue #4176: Fixed a crash when pickling an object which ``__reduce__``
13998 method does not return iterators for the 4th and 5th items.
13999
14000- Issue #3723: Fixed initialization of subinterpreters.
14001
14002- Issue #4213: The file system encoding is now normalized by the
14003 codec subsystem, for example UTF-8 is turned into utf-8.
14004
14005- Issue #4200: Changed the atexit module to store its state in its
14006 PyModuleDef atexitmodule. This fixes a bug with multiple subinterpeters.
14007
14008- Issue #4237: io.FileIO() was raising invalid warnings caused by
14009 insufficient initialization of PyFileIOObject struct members.
14010
14011- Issue #4170: Pickling a collections.defaultdict object would crash the
14012 interpreter.
14013
14014- Issue #4146: Compilation on OpenBSD has been restored.
14015
14016- Issue #3574: compile() incorrectly handled source code encoded as Latin-1.
14017
14018- Issues #2384 and #3975: Tracebacks were not correctly printed when the
14019 source file contains a ``coding:`` header: the wrong line was displayed, and
14020 the encoding was not respected.
14021
14022- Issue #3740: Null-initialize module state.
14023
14024- Issue #3946: PyObject_CheckReadBuffer crashed on a memoryview object.
14025
14026- Issue #1688: On Windows, the input() prompt was not correctly displayed if it
14027 contains non-ascii characters.
14028
14029- Bug #3951: Py_USING_MEMORY_DEBUGGER should not be enabled by default.
14030
14031Library
14032-------
14033
14034- Issue #3664: The pickle module could segfault if a subclass of Pickler fails
14035 to call the base __init__ method.
14036
14037- Issue #3725: telnetlib now works completely in bytes.
14038
14039- Issue #4072: Restore build_py_2to3.
14040
14041- Issue #4014: Don't claim that Python has an Alpha release status, in addition
14042 to claiming it is Mature.
14043
14044- Issue #3187: Add sys.setfilesystemencoding.
14045
14046- Issue #3187: Better support for "undecodable" filenames. Code by Victor
14047 Stinner, with small tweaks by GvR.
14048
14049- Issue #3965: Allow repeated calls to turtle.Screen, by making it a
14050 true singleton object.
14051
14052- Issue #3911: ftplib.FTP.makeport() could give invalid port numbers.
14053
14054- Issue #3929: When the database cannot be opened, dbm.open() would incorrectly
14055 raise a TypeError: "'tuple' object is not callable" instead of the expected
14056 dbm.error.
14057
14058- Bug #3884: Make the turtle module toplevel again.
14059
14060- Issue #3547: Fixed ctypes structures bitfields of varying integer
14061 sizes.
14062
14063Extension Modules
14064-----------------
14065
14066- Issue #3659: Subclasses of str didn't work as SQL parameters.
14067
14068Build
14069-----
14070
14071- Issue #4120: Exclude manifest from extension modules in VS2008.
14072
14073- Issue #4091: Install pythonxy.dll in system32 again.
14074
14075- Issue #4018: Disable "for me" installations on Vista.
14076
14077- Issue #4204: Fixed module build errors on FreeBSD 4.
14078
14079Tools/Demos
14080-----------
14081
14082- Issue #3717: Fix Demo/embed/demo.c.
14083
14084- Issue #4072: Add a distutils demo for build_py_2to3.
14085
14086
14087What's New in Python 3.0 release candidate 1
14088============================================
14089
14090*Release date: 17-Sep-2008*
14091
14092Core and Builtins
14093-----------------
14094
14095- Issue #3827: memoryview lost its size attribute in favor of using len(view).
14096
14097- Issue #3813: could not lanch python.exe via symbolic link on cygwin.
14098
14099- Issue #3705: fix crash when given a non-ascii value on the command line for
14100 the "-c" and "-m" parameters. Now the behaviour is as expected under Linux,
14101 although under Windows it fails at a later point.
14102
14103- Issue #3279: Importing site at interpreter was failing silently because the
14104 site module uses the open builtin which was not initialized at the time.
14105
14106- Issue #3660: Corrected a reference leak in str.encode() when the encoder
14107 does not return a bytes object.
14108
14109- Issue #3774: Added a few more checks in PyTokenizer_FindEncoding to handle
14110 error conditions.
14111
14112- Issue #3594: Fix Parser/tokenizer.c:fp_setreadl() to open the file being
14113 tokenized by either a file path or file pointer for the benefit of
14114 PyTokenizer_FindEncoding().
14115
14116- Issue #3696: Error parsing arguments on OpenBSD <= 4.4 and Cygwin. On
14117 these systems, the mbstowcs() function is slightly buggy and must be
14118 replaced with strlen() for the purpose of counting of number of wide
14119 characters needed to represent the multi-byte character string.
14120
14121- Issue #3697: "Fatal Python error: Cannot recover from stack overflow"
14122 could be easily encountered under Windows in debug mode when exercising
14123 the recursion limit checking code, due to bogus handling of recursion
14124 limit when USE_STACKCHEK was enabled.
14125
Martin Panter4e525582016-05-22 03:01:52 +000014126- Issue #3639: The _warnings module could segfault the interpreter when
Barry Warsaw97f005d2008-12-03 16:46:14 +000014127 unexpected types were passed in as arguments.
14128
14129- Issue #3712: The memoryview object had a reference leak and didn't support
14130 cyclic garbage collection.
14131
14132- Issue #3668: Fix a memory leak with the "s*" argument parser in
Victor Stinner554fd082014-03-17 22:33:49 +010014133 PyArg_ParseTuple and friends, which occurred when the argument for "s*"
Barry Warsaw97f005d2008-12-03 16:46:14 +000014134 was correctly parsed but parsing of subsequent arguments failed.
14135
14136- Issue #3611: An exception __context__ could be cleared in a complex pattern
14137 involving a __del__ method re-raising an exception.
14138
Victor Stinner554fd082014-03-17 22:33:49 +010014139- Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to
Barry Warsaw97f005d2008-12-03 16:46:14 +000014140 match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__
14141 mechanism. In the process, fix a bug where isinstance() and issubclass(),
14142 when given a tuple of classes as second argument, were looking up
14143 __instancecheck__ / __subclasscheck__ on the tuple rather than on each
14144 type object.
14145
14146- Issue #3663: Py_None was decref'd when printing SyntaxErrors.
14147
14148- Issue #3651: Fix various memory leaks when using the buffer
14149 interface, or when the "s#" code of PyArg_ParseTuple is given a
14150 bytes object.
14151
14152- Issue #3657: Fix uninitialized memory read when pickling longs.
14153 Found by valgrind.
14154
14155- Apply security patches from Apple.
14156
14157- Fix crashes on memory allocation failure found with failmalloc.
14158
14159- Fix memory leaks found with valgrind and update suppressions file.
14160
14161- Fix compiler warnings in opt mode which would lead to invalid memory reads.
14162
14163- Fix problem using wrong name in decimal module reported by pychecker.
14164
14165- Issue #3650: Fixed a reference leak in bytes.split('x').
14166
14167- bytes(o) now tries to use o.__bytes__() before using fallbacks.
14168
14169- Issue #1204: The configure script now tests for additional libraries
14170 that may be required when linking against readline. This fixes issues
14171 with x86_64 builds on some platforms (a few Linux flavors and OpenBSD).
14172
14173C API
14174-----
14175
14176- PyObject_Bytes and PyBytes_FromObject were added.
14177
14178Library
14179-------
14180
14181- Issue #3756: make re.escape() handle bytes as well as str.
14182
14183- Issue #3800: fix filter() related bug in formatter.py.
14184
14185- Issue #874900: fix behaviour of threading module after a fork.
14186
14187- Issue #3535: zipfile couldn't read some zip files larger than 2GB.
14188
14189- Issue #3776: Deprecate the bsddb package for removal in 3.0.
14190
14191- Issue #3762: platform.architecture() fails if python is lanched via
14192 its symbolic link.
14193
14194- Issue #3660: fix a memory leak in the C accelerator of the pickle module.
14195
14196- Issue #3160: the "bdist_wininst" distutils command didn't work.
14197
14198- Issue #1658: tkinter changes dict size during iteration in both
14199 tkinter.BaseWidget and tkinter.scrolledtext.ScrolledText.
14200
14201- The bsddb module (and therefore the dbm.bsd module) has been removed.
14202 It is now maintained outside of the standard library at
14203 http://www.jcea.es/programacion/pybsddb.htm.
14204
Martin Panter4e525582016-05-22 03:01:52 +000014205- Issue #600362: Relocated parse_qs() and parse_qsl(), from the cgi module
Barry Warsaw97f005d2008-12-03 16:46:14 +000014206 to the urlparse one. Added a DeprecationWarning in the old module, it
14207 will be deprecated in the future.
14208
14209- Issue #3719: platform.architecture() fails if there are spaces in the
14210 path to the Python binary.
14211
Martin Panter4e525582016-05-22 03:01:52 +000014212- Issue #3602: As part of the merge of r66135, make the parameters on
Barry Warsaw97f005d2008-12-03 16:46:14 +000014213 warnings.catch_warnings() keyword-only. Also remove a DeprecationWarning.
14214
14215- The deprecation warnings for the camelCase threading API names were removed.
14216
Victor Stinner554fd082014-03-17 22:33:49 +010014217- Issue #3110: multiprocessing fails to compiel on solaris 10 due to missing
Barry Warsaw97f005d2008-12-03 16:46:14 +000014218 SEM_VALUE_MAX.
14219
14220Extension Modules
14221-----------------
14222
14223- Issue #3782: os.write() must not accept unicode strings.
14224
14225- Issue #2975: When compiling several extension modules with Visual Studio 2008
14226 from the same python interpreter, some environment variables would grow
14227 without limit.
14228
14229- Issue #3643: Added a few more checks to _testcapi to prevent segfaults by
14230 exploitation of poor argument checking.
14231
14232- bsddb code updated to version 4.7.3pre2. This code is the same than
Martin Panter6245cb32016-04-15 02:14:19 +000014233 Python 2.6 one, since the intention is to keep a unified 2.x/3.x codebase.
Barry Warsaw97f005d2008-12-03 16:46:14 +000014234 The Python code is automatically translated using "2to3". Please, do not
14235 update this code in Python 3.0 by hand. Update the 2.6 one and then
14236 do "2to3".
14237
14238- The _bytesio and _stringio modules are now compiled into the python binary.
14239
14240- Issue #3492 and #3790: Fixed the zlib module and zipimport module uses of
14241 mutable bytearray objects where they should have been using immutable bytes.
14242
14243- Issue #3797: Fixed the dbm, marshal, mmap, ossaudiodev, & winreg modules to
14244 return bytes objects instead of bytearray objects.
14245
14246
14247Tools/Demos
14248-----------
14249
14250- Fix Misc/gdbinit so it works.
14251
14252
14253Build
14254-----
14255
14256- Issue #3812: Failed to build python if configure --without-threads.
14257
14258- Issue #3791: Remove the bsddb module from the Windows installer, and the
14259 core bsddb library from the Windows build files.
14260
14261
14262What's new in Python 3.0b3?
14263===========================
14264
14265*Release date: 20-Aug-2008*
14266
14267Core and Builtins
14268-----------------
14269
14270- Issue #3653: Fix a segfault when sys.excepthook was called with invalid
14271 arguments.
14272
14273- Issue #2394: implement more of the memoryview API, with the caveat that
14274 only one-dimensional contiguous buffers are supported and exercised right
14275 now. Slicing, slice assignment and comparison (equality and inequality)
14276 have been added. Also, the tolist() method has been implemented, but only
Georg Brandl98b52ef2009-05-25 22:20:44 +000014277 for byte buffers. Finally, the API has been updated to return bytes objects
Barry Warsaw97f005d2008-12-03 16:46:14 +000014278 wherever it used to return bytearrays.
14279
14280- Issue #3560: clean up the new C PyMemoryView API so that naming is
14281 internally consistent; add macros PyMemoryView_GET_BASE() and
14282 PyMemoryView_GET_BUFFER() to access useful properties of a memory views
14283 without relying on a particular implementation; remove the ill-named
14284 PyMemoryView() function (PyMemoryView_GET_BUFFER() can be used instead).
14285
14286- ctypes function pointers that are COM methods have a boolean True
14287 value again.
14288
14289- Issue #1819: function calls with several named parameters are now on
14290 average 35% faster (as measured by pybench).
14291
14292- The undocumented C APIs PyUnicode_AsString() and
14293 PyUnicode_AsStringAndSize() were made private to the interpreter, in
14294 order to be able to refine their interfaces for Python 3.1.
14295
14296 If you need to access the UTF-8 representation of a Unicode object
14297 as bytes string, please use PyUnicode_AsUTF8String() instead.
14298
14299- Issue #3460: PyUnicode_Join() implementation is 10% to 80% faster thanks
Martin Panterc04fb562016-02-10 05:44:01 +000014300 to Python 3.0's stricter semantics which allow avoiding successive
Barry Warsaw97f005d2008-12-03 16:46:14 +000014301 reallocations of the result string (this also affects str.join()).
14302
14303
14304Library
14305-------
14306
14307- Issue #1276: Added temporary aliases for CJK Mac encodings to resolve
14308 a build problem on MacOS with CJK locales. It adds four temporary
14309 mappings to existing legacy codecs that are virtually compatible
14310 with Mac encodings. They will be replaced by codecs correctly
14311 implemented in 3.1.
14312
14313- Issue #3614: Corrected a typo in xmlrpc.client, leading to a NameError
14314 "global name 'header' is not defined".
14315
14316- Issue #2834: update the regular expression library to match the unicode
14317 standards of py3k. In other words, mixing bytes and unicode strings
14318 (be it as pattern, search string or replacement string) raises a TypeError.
14319 Moreover, the re.UNICODE flag is enabled automatically for unicode patterns,
14320 and can be disabled by specifying a new re.ASCII flag; as for bytes
14321 patterns, ASCII matching is the only option and trying to specify re.UNICODE
14322 for such patterns raises a ValueError.
14323
14324- Issue #3300: make urllib.parse.[un]quote() default to UTF-8.
14325 Code contributed by Matt Giuca. quote() now encodes the input
14326 before quoting, unquote() decodes after unquoting. There are
14327 new arguments to change the encoding and errors settings.
14328 There are also new APIs to skip the encode/decode steps.
14329 [un]quote_plus() are also affected.
14330
14331- Issue #2235: numbers.Number now blocks inheritance of the default id()
14332 based hash because that hash mechanism is not correct for numeric types.
14333 All concrete numeric types that inherit from Number (rather than just
14334 registering with it) must explicitly provide a hash implementation in
14335 order for their instances to be hashable.
14336
14337- Issue #2676: in the email package, content-type parsing was hanging on
14338 pathological input because of quadratic or exponential behaviour of a
14339 regular expression.
14340
14341- Issue #3476: binary buffered reading through the new "io" library is now
14342 thread-safe.
14343
14344- Issue #1342811: Fix leak in Tkinter.Menu.delete. Commands associated to
14345 menu entries were not deleted.
14346
14347- Remove the TarFileCompat class from tarfile.py.
14348
14349- Issue #2491: os.fdopen is now almost an alias for the built-in open(), and
14350 accepts the same parameters. It just checks that its first argument is an
14351 integer.
14352
14353- Issue #3394: zipfile.writestr sets external attributes when passed a
14354 file name rather than a ZipInfo instance, so files are extracted with
14355 mode 0600 rather than 000 under Unix.
14356
14357- Issue #2523: Fix quadratic behaviour when read()ing a binary file without
14358 asking for a specific length.
14359
14360Extension Modules
14361-----------------
14362
14363- Bug #3542: Support Unicode strings in _msi module.
14364
14365What's new in Python 3.0b2?
14366===========================
14367
14368*Release date: 17-Jul-2008*
14369
14370Core and Builtins
14371-----------------
14372
14373- Issue #3008: the float type has a new instance method 'float.hex'
14374 and a new class method 'float.fromhex' to convert floating-point
14375 numbers to and from hexadecimal strings, respectively.
14376
14377- Issue #3083: Add alternate (#) formatting for bin, oct, hex output
14378 for str.format(). This adds the prefix 0b, 0o, or 0x, respectively.
14379
14380- Issue #3280: like chr(), the "%c" format now accepts unicode code points
14381 beyond the Basic Multilingual Plane (above 0xffff) on all configurations. On
14382 "narrow Unicode" builds, the result is a string of 2 code units, forming a
14383 UTF-16 surrogate pair.
14384
14385- Issue #3282: str.isprintable() should return False for undefined
14386 Unicode characters.
14387
14388- Issue #3236: Return small longs from PyLong_FromString.
14389
14390- Exception tracebacks now support exception chaining.
14391
14392Library
14393-------
14394
14395- Removed the sunaudio module. Use sunau instead.
14396
14397- Issue #3554: ctypes.string_at and ctypes.wstring_at did call Python
14398 api functions without holding the GIL, which could lead to a fatal
14399 error when they failed.
14400
14401- Issue #799428: Fix Tkinter.Misc._nametowidget to unwrap Tcl command objects.
14402
14403- Removed "ast" function aliases from the parser module.
14404
14405- Issue #3313: Fixed a crash when a failed dlopen() call does not set
14406 a valid dlerror() message.
14407
14408- Issue #3258: Fixed a crash when a ctypes POINTER type to an
14409 incomplete structure was created.
14410
14411- Issue #2683: Fix inconsistency in subprocess.Popen.communicate(): the
14412 argument now must be a bytes object in any case.
14413
14414- Issue #3145: help("modules whatever") failed when trying to load the source
14415 code of every single module of the standard library, including invalid files
14416 used in the test suite.
14417
14418- The gettext library now consistently uses Unicode strings for message ids
14419 and message strings, and ``ugettext()`` and the like don't exist anymore.
14420
14421- The traceback module has been expanded to handle chained exceptions.
14422
14423C API
14424-----
14425
14426- Issue #3247: the function Py_FindMethod was removed. Modern types should
14427 use the tp_methods slot instead.
14428
14429Tools/Demos
14430-----------
14431
14432- The Mac/Demos directory has been removed.
14433
14434- All of the Mac scripts have been removed (including BuildApplet.py).
14435
14436
14437What's new in Python 3.0b1?
14438===========================
14439
14440*Release date: 18-Jun-2008*
14441
14442Core and Builtins
14443-----------------
14444
14445- Issue #3211: warnings.warn_explicit() did not guard against its 'registry'
14446 argument being anything other than a dict or None. Also fixed a bug in error
14447 handling when 'message' and 'category' were both set to None, triggering a
14448 bus error.
14449
14450- Issue #3100: Corrected a crash on deallocation of a subclassed weakref which
14451 holds the last (strong) reference to its referent.
14452
14453- Issue #2630: implement PEP 3138. repr() now returns printable
14454 Unicode characters unescaped, to get an ASCII-only representation
14455 of an object use ascii().
14456
14457- Issue #1342: On windows, Python could not start when installed in a
14458 directory with non-ascii characters.
14459
14460- Implement PEP 3121: new module initialization and finalization API.
14461
14462- Removed the already-defunct ``-t`` option.
14463
14464- Issue #2957: Corrected a ValueError "recursion limit exceeded", when
14465 unmarshalling many code objects, which happens when importing a
14466 large .pyc file (~1000 functions).
14467
14468- Issue #2963: fix merging oversight that disabled method cache for
14469 all types.
14470
14471- Issue #2964: fix a missing INCREF in instancemethod_descr_get.
14472
14473- Issue #2895: Don't crash when given bytes objects as keyword names.
14474
14475- Issue #2798: When parsing arguments with PyArg_ParseTuple, the "s"
14476 code now allows any unicode string and returns a utf-8 encoded
14477 buffer, just like the "s#" code already does. The "z" code was
14478 corrected as well.
14479
14480- Issue #2863: generators now have a ``gen.__name__`` attribute that
14481 equals ``gen.gi_code.co_name``, like ``func.__name___`` that equals
14482 ``func.func_code.co_name``. The repr() of a generator now also
14483 contains this name.
14484
14485- Issue #2831: enumerate() now has a ``start`` argument.
14486
14487- Issue #2801: fix bug in the float.is_integer method where a
14488 ValueError was sometimes incorrectly raised.
14489
14490- The ``--with-toolbox-glue`` option (and the associated
14491 pymactoolbox.h) have been removed.
14492
14493- Issue #2196: hasattr() now lets exceptions which do not inherit
14494 Exception (KeyboardInterrupt, and SystemExit) propagate instead of
14495 ignoring them.
14496
14497- #3021 Exception reraising sematics have been significantly improved. However,
14498 f_exc_type, f_exc_value, and f_exc_traceback cannot be accessed from Python
14499 code anymore.
14500
14501- Three of PyNumberMethods' members, nb_coerce, nb_hex, and nb_oct, have been
14502 removed.
14503
14504Extension Modules
14505-----------------
14506
14507- Renamed ``_winreg`` module to ``winreg``.
14508
14509- Support os.O_ASYNC and fcntl.FASYNC if the constants exist on the
14510 platform.
14511
14512- Support for Windows 9x has been removed from the winsound module.
14513
14514- Issue #2870: cmathmodule.c compile error.
14515
14516Library
14517-------
14518
14519- The methods ``is_in_tuple()``, ``is_vararg()``, and ``is_keywordarg()`` of
14520 symtable.Symbol have been removed.
14521
14522- Patch #3133: http.server.CGIHTTPRequestHandler did not work on windows.
14523
14524- a new ``urllib`` package was created. It consists of code from
14525 ``urllib``, ``urllib2``, ``urlparse``, and ``robotparser``. The old
14526 modules have all been removed. The new package has five submodules:
14527 ``urllib.parse``, ``urllib.request``, ``urllib.response``,
14528 ``urllib.error``, and ``urllib.robotparser``. The
14529 ``urllib.request.urlopen()`` function uses the url opener from
14530 ``urllib2``. (Note that the unittests have not been renamed for the
14531 beta, but they will be renamed in the future.)
14532
14533- rfc822 has been removed in favor of the email package.
14534
14535- mimetools has been removed in favor of the email package.
14536
14537- Patch #2849: Remove use of rfc822 module from standard library.
14538
14539- Added C optimized implementation of io.StringIO.
14540
14541- The ``pickle`` module is now automatically use an optimized C
14542 implementation of Pickler and Unpickler when available. The
14543 ``cPickle`` module is no longer needed.
14544
14545- Removed the ``htmllib`` and ``sgmllib`` modules.
14546
14547- The deprecated ``SmartCookie`` and ``SimpleCookie`` classes have
14548 been removed from ``http.cookies``.
14549
14550- The ``commands`` module has been removed. Its getoutput() and
14551 getstatusoutput() functions have been moved to the ``subprocess`` module.
14552
14553- The ``http`` package was created; it contains the old ``httplib``
14554 as ``http.client``, ``Cookie`` as ``http.cookies``, ``cookielib``
14555 as ``http.cookiejar``, and the content of the three ``HTTPServer``
14556 modules as ``http.server``.
14557
14558- The ``xmlrpc`` package was created; it contains the old
14559 ``xmlrpclib`` module as ``xmlrpc.client`` and the content of
14560 the old ``SimpleXMLRPCServer`` and ``DocXMLRPCServer`` modules
14561 as ``xmlrpc.server``.
14562
14563- The ``dbm`` package was created, containing the old modules
14564 ``anydbm`` and ``whichdb`` in its ``__init__.py``, and having
14565 ``dbm.gnu`` (was ``gdbm``), ``dbm.bsd`` (was ``dbhash``),
14566 ``dbm.ndbm`` (was ``dbm``) and ``dbm.dumb`` (was ``dumbdbm``)
14567 as submodules.
14568
14569- The ``repr`` module has been renamed to ``reprlib``.
14570
14571- The ``statvfs`` module has been removed.
14572
14573- Issue #1713041: fix pprint's handling of maximum depth.
14574
14575- Issue #2250: Exceptions raised during evaluation of names in
14576 rlcompleter's ``Completer.complete()`` method are now caught and
14577 ignored.
14578
14579- Patch #2659: Added ``break_on_hyphens`` option to textwrap's
14580 ``TextWrapper`` class.
14581
14582- Issue #2487: change the semantics of math.ldexp(x, n) when n is too
14583 large to fit in a C long. ldexp(x, n) now returns a zero (with
14584 suitable sign) if n is large and negative; previously, it raised
14585 OverflowError.
14586
14587- The ``ConfigParser`` module has been renamed to ``configparser``.
14588
14589- Issue #2865: webbrowser.open() works again in a KDE environment.
14590
14591- The ``multifile`` module has been removed.
14592
14593- The ``SocketServer`` module has been renamed to ``socketserver``.
14594
14595- Fixed the ``__all__`` setting on ``collections`` to include
14596 ``UserList`` and ``UserString``.
14597
14598- The sre module has been removed.
14599
14600- The Queue module has been renamed to queue.
14601
14602- The copy_reg module has been renamed to copyreg.
14603
14604- The mhlib module has been removed.
14605
14606- The ihooks module has been removed.
14607
14608- The fpformat module has been removed.
14609
14610- The dircache module has been removed.
14611
14612- The Canvas module has been removed.
14613
14614- The Decimal module gained the magic methods __round__, __ceil__,
14615 __floor__ and __trunc__, to give support for round, math.ceil,
14616 math.floor and math.trunc.
14617
14618- The user module has been removed.
14619
14620- The mutex module has been removed.
14621
14622- The imputil module has been removed.
14623
14624- os.path.walk has been removed in favor of os.walk.
14625
14626- pdb gained the "until" command.
14627
14628- The test.test_support module has been renamed to test.support.
14629
14630- The threading module API was renamed to be PEP 8 compliant. The
14631 old names are still present, but will be removed in the near future.
14632
14633Tools/Demos
14634-----------
14635
14636- The bgen tool has been removed.
14637
14638Build
14639-----
14640
14641
14642What's New in Python 3.0a5?
14643===========================
14644
14645*Release date: 08-May-2008*
14646
14647Core and Builtins
14648-----------------
14649
14650- Fixed misbehaviour of PyLong_FromSsize_t on systems where
14651 sizeof(size_t) > sizeof(long).
14652
14653- Issue #2221: Corrected a SystemError "error return without exception
14654 set", when the code executed by exec() raises an exception, and
14655 sys.stdout.flush() also raises an error.
14656
14657- Bug #2565: The repr() of type objects now calls them 'class', not
14658 'type' - whether they are builtin types or not.
14659
14660- The command line processing was converted to pass Unicode strings
14661 through as unmodified as possible; as a consequence, the C API
14662 related to command line arguments was changed to use wchar_t.
14663
14664- All backslashes in raw strings are interpreted literally. This
14665 means that '\u' and '\U' escapes are not treated specially.
14666
14667Extension Modules
14668-----------------
14669
14670Library
14671-------
14672
14673- ctypes objects now support the PEP3118 buffer interface.
14674
14675- Issue #2682: ctypes callback functions now longer contain a cyclic
14676 reference to themselves.
14677
14678- Issue #2058: Remove the buf attribute and add __slots__ to the
14679 TarInfo class in order to reduce tarfile's memory usage.
14680
14681- Bug #2606: Avoid calling .sort() on a dict_keys object.
14682
14683- The bundled libffi copy is now in sync with the recently released
14684 libffi3.0.5 version, apart from some small changes to
14685 Modules/_ctypes/libffi/configure.ac.
14686
14687Build
14688-----
14689
14690- Issue #1496032: On alpha, use -mieee when gcc is the compiler.
14691
14692- "make install" is now an alias for "make altinstall", to prevent
14693 accidentally overwriting a Python 2.x installation. Use "make
14694 fullinstall" to force Python 3.0 to be installed as "python".
14695
14696- Issue #2544: On HP-UX systems, use 'gcc -shared' for linking when
14697 gcc is used as compiler.
14698
14699
14700What's New in Python 3.0a4?
14701===========================
14702
14703*Release date: 02-Apr-2008*
14704
14705Core and Builtins
14706-----------------
14707
14708- Bug #2301: Don't try decoding the source code into the original
14709 encoding for syntax errors.
14710
14711Extension Modules
14712-----------------
14713
14714- The dl module was removed, use the ctypes module instead.
14715
14716- Use wchar_t functions in _locale module.
14717
14718Library
14719-------
14720
14721- The class distutils.commands.build_py.build_py_2to3 can be used as a
14722 build_py replacement to automatically run 2to3 on modules that are
14723 going to be installed.
14724
14725- A new pickle protocol (protocol 3) is added with explicit support
14726 for bytes. This is the default protocol. It intentionally cannot
14727 be unpickled by Python 2.x.
14728
14729- When a pickle written by Python 2.x contains an (8-bit) str
14730 instance, this is now decoded to a (Unicode) str instance. The
14731 encoding used to do this defaults to ASCII, but can be overridden
14732 via two new keyword arguments to the Unpickler class. Previously
14733 this would create bytes instances, which is usually wrong: str
14734 instances are often used to pickle attribute names etc., and text is
14735 more common than binary data anyway.
14736
14737- Default to ASCII as the locale.getpreferredencoding, if the POSIX
14738 system doesn't support CODESET and LANG isn't set or doesn't allow
14739 deduction of an encoding.
14740
14741- Issue #1202: zlib.crc32 and zlib.adler32 now return an unsigned
14742 value.
14743
14744- Issue #719888: Updated tokenize to use a bytes API. generate_tokens
14745 has been renamed tokenize and now works with bytes rather than
14746 strings. A new detect_encoding function has been added for
14747 determining source file encoding according to PEP-0263. Token
14748 sequences returned by tokenize always start with an ENCODING token
14749 which specifies the encoding used to decode the file. This token is
14750 used to encode the output of untokenize back to bytes.
14751
14752
14753What's New in Python 3.0a3?
14754===========================
14755
14756*Release date: 29-Feb-2008*
14757
14758Core and Builtins
14759-----------------
14760
14761- Issue #2282: io.TextIOWrapper was not overriding seekable() from
14762 io.IOBase.
14763
14764- Issue #2115: Important speedup in setting __slot__ attributes. Also
14765 prevent a possible crash: an Abstract Base Class would try to access
14766 a slot on a registered virtual subclass.
14767
14768- Fixed repr() and str() of complex numbers with infinity or nan as
14769 real or imaginary part.
14770
14771- Clear all free list during a gc.collect() of the highest generation
14772 in order to allow pymalloc to free more arenas. Python may give back
14773 memory to the OS earlier.
14774
14775- Issue #2045: Fix an infinite recursion triggered when printing a
14776 subclass of collections.defaultdict, if its default_factory is set
14777 to a bound method.
14778
14779- Fixed a minor memory leak in dictobject.c. The content of the free
14780 list was not freed on interpreter shutdown.
14781
14782- Limit free list of method and builtin function objects to 256
14783 entries each.
14784
14785- Patch #1953: Added ``sys._compact_freelists()`` and the C API
14786 functions ``PyInt_CompactFreeList`` and ``PyFloat_CompactFreeList``
14787 to compact the internal free lists of pre-allocted ints and floats.
14788
14789- Bug #1983: Fixed return type of fork(), fork1() and forkpty() calls.
14790 Python expected the return type int but the fork familie returns
14791 pi_t.
14792
14793- Issue #1678380: Fix a bug that identifies 0j and -0j when they
14794 appear in the same code unit.
14795
14796- Issue #2025: Added tuple.count() and tuple.index() methods to comply
14797 with the collections.Sequence API.
14798
14799- Fixed multiple reinitialization of the Python interpreter. The small
14800 int list in longobject.c has caused a seg fault during the third
14801 finalization.
14802
14803- Issue #1973: bytes.fromhex('') raised SystemError.
14804
14805- Issue #1771: remove cmp parameter from sorted() and list.sort().
14806
14807- Issue #1969: split and rsplit in bytearray are inconsistent.
14808
14809- map() no longer accepts None for the first argument. Use zip()
14810 instead.
14811
14812- Issue #1769: Now int("- 1") is not allowed any more.
14813
14814- Object/longobject.c: long(float('nan')) raises an OverflowError
14815 instead of returning 0.
14816
14817- Issue #1762972: __file__ points to the source file instead of the
14818 pyc/pyo file if the py file exists.
14819
14820- Issue #1393: object_richcompare() returns NotImplemented instead of
14821 False if the objects aren't equal, to give the other side a chance.
14822
14823- Issue #1692: Interpreter was not displaying location of SyntaxError.
14824
14825- Improve some exception messages when Windows fails to load an
14826 extension module. Now we get for example '%1 is not a valid Win32
14827 application' instead of 'error code 193'. Also use Unicode strings
14828 to deal with non-English locales.
14829
14830- Issue #1587: Added instancemethod wrapper for PyCFunctions. The
14831 Python C API has gained a new type *PyInstanceMethod_Type* and the
14832 functions *PyInstanceMethod_Check(o)*, *PyInstanceMethod_New(func)*
14833 and *PyInstanceMethod_Function(im)*.
14834
14835- Constants gc.DEBUG_OBJECT and gc.DEBUG_INSTANCE have been removed
14836 from the gc module; gc.DEBUG_COLLECTABLE or gc.DEBUG_UNCOLLECTABLE
14837 are now enough to print the corresponding list of objects considered
14838 by the garbage collector.
14839
14840- Issue #1573: Improper use of the keyword-only syntax makes the
14841 parser crash.
14842
14843- Issue #1564: The set implementation should special-case PyUnicode
14844 instead of PyString.
14845
14846- Patch #1031213: Decode source line in SyntaxErrors back to its
14847 original source encoding.
14848
14849- inspect.getsource() includes the decorators again.
14850
14851- Bug #1713: posixpath.ismount() claims symlink to a mountpoint is a
14852 mountpoint.
14853
14854- Fix utf-8-sig incremental decoder, which didn't recognise a BOM when
14855 the first chunk fed to the decoder started with a BOM, but was
14856 longer than 3 bytes.
14857
14858Extension Modules
14859-----------------
14860
14861- Code for itertools ifilter(), imap(), and izip() moved to bultins
14862 and renamed to filter(), map(), and zip(). Also, renamed
14863 izip_longest() to zip_longest() and ifilterfalse() to filterfalse().
14864
14865- Issue #1762972: Readded the reload() function as imp.reload().
14866
14867- Bug #2111: mmap segfaults when trying to write a block opened with
14868 PROT_READ.
14869
14870- Issue #2063: correct order of utime and stime in os.times() result
14871 on Windows.
14872
14873Library
14874-------
14875
14876- Weakref dictionaries now inherit from MutableMapping.
14877
14878- Created new UserDict class in collections module. This one inherits
14879 from and complies with the MutableMapping ABC. Also, moved
14880 UserString and UserList to the collections module. The
14881 MutableUserString class was removed.
14882
14883- Removed UserDict.DictMixin. Replaced all its uses with
14884 collections.MutableMapping.
14885
14886- Issue #1703: getpass() should flush after writing prompt.
14887
14888- Issue #1585: IDLE uses non-existent xrange() function.
14889
14890- Issue #1578: Problems in win_getpass.
14891
14892Build
14893-----
14894
14895- Renamed --enable-unicode configure flag to --with-wide-unicode,
14896 since Unicode strings can't be disabled anymore.
14897
14898C API
14899-----
14900
14901- Issue #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE,
14902 Py_TYPE and Py_REFCNT.
14903
14904- New API PyImport_ImportModuleNoBlock(), works like
14905 PyImport_ImportModule() but won't block on the import lock
14906 (returning an error instead).
14907
14908
14909What's New in Python 3.0a2?
14910===========================
14911
14912*Release date: 07-Dec-2007*
14913
14914(Note: this list is incomplete.)
14915
14916Core and Builtins
14917-----------------
14918
14919- str8 now has the same construction signature as bytes.
14920
14921- Comparisons between str and str8 now return False/True for ==/!=.
14922 sqlite3 returns str8 when recreating on object from it's __conform__
14923 value. The struct module returns str8 for all string-related
14924 formats. This was true before this change, but becomes more
14925 apparent thanks to string comparisons always being False.
14926
14927- Replaced `PyFile_FromFile()` with `PyFile_FromFd(fd, name. mode,
14928 buffer, encoding, newline)`.
14929
14930- Fixed `imp.find_module()` to obey the -*- coding: -*- header.
14931
14932- Changed `__file__` and `co_filename` to unicode. The path names are decoded
14933 with `Py_FileSystemDefaultEncoding` and a new API method
14934 `PyUnicode_DecodeFSDefault(char*)` was added.
14935
14936- io.open() and _fileio.FileIO have grown a new argument closefd. A
14937 false value disables the closing of the file descriptor.
14938
14939- Added a new option -b to issues warnings (-bb for errors) about
14940 certain operations between bytes/buffer and str like str(b'') and
14941 comparison.
14942
Martin Pantera90a4a92016-05-30 04:04:50 +000014943- The standard streams sys.stdin, stdout and stderr may be None
14944 when the C runtime library returns an invalid file descriptor
Barry Warsaw97f005d2008-12-03 16:46:14 +000014945 for the streams (fileno(stdin) < 0). For now this happens only for
14946 Windows GUI apps and scripts started with `pythonw.exe`.
14947
14948- Added PCbuild9 directory for VS 2008.
14949
14950- Renamed structmember.h WRITE_RESTRICTED to PY_WRITE_RESTRICTED to
14951 work around a name clash with VS 2008 on Windows.
14952
14953- Unbound methods are gone for good. ClassObject.method returns an
14954 ordinary function object, instance.method still returns a bound
14955 method object. The API of bound methods is cleaned up, too. The
14956 im_class attribute is removed and im_func + im_self are renamed to
14957 __func__ and __self__. The factory PyMethod_New takes only func and
14958 instance as argument.
14959
14960- intobject.h is no longer included by Python.h. The remains were
14961 moved to longobject.h. It still exists to define several aliases
14962 from PyInt to PyLong functions.
14963
14964- Removed sys.maxint, use sys.maxsize instead.
14965
14966Extension Modules
14967-----------------
14968
14969- The `hotshot` profiler has been removed; use `cProfile` instead.
14970
14971Library
14972-------
14973
14974- When loading an external file using testfile(), the passed-in
14975 encoding argument was being ignored if __loader__ is defined and
14976 forcing the source to be UTF-8.
14977
14978- The methods `os.tmpnam()`, `os.tempnam()` and `os.tmpfile()` have
14979 been removed in favor of the tempfile module.
14980
14981- Removed the 'new' module.
14982
Martin Pantere26da7c2016-06-02 10:07:09 +000014983- Removed all types from the 'types' module that are easily accessible
Barry Warsaw97f005d2008-12-03 16:46:14 +000014984 through builtins.
14985
14986
14987What's New in Python 3.0a1?
14988===========================
14989
14990*Release date: 31-Aug-2007*
14991
14992Core and Builtins
14993-----------------
14994
14995- PEP 3131: Support non-ASCII identifiers.
14996
14997- PEP 3120: Change default encoding to UTF-8.
14998
14999- PEP 3123: Use proper C inheritance for PyObject.
15000
15001- Removed the __oct__ and __hex__ special methods and added a bin()
15002 builtin function.
15003
15004- PEP 3127: octal literals now start with "0o". Old-style octal
15005 literals are invalid. There are binary literals with a prefix of
15006 "0b". This also affects int(x, 0).
15007
15008- None, True, False are now keywords.
15009
15010- PEP 3119: isinstance() and issubclass() can be overridden.
15011
15012- Remove BaseException.message.
15013
15014- Remove tuple parameter unpacking (PEP 3113).
15015
15016- Remove the f_restricted attribute from frames. This naturally leads
15017 to the removal of PyEval_GetRestricted() and PyFrame_IsRestricted().
15018
15019- PEP 3132 was accepted. That means that you can do ``a, *b =
15020 range(5)`` to assign 0 to a and [1, 2, 3, 4] to b.
15021
15022- range() now returns an iterator rather than a list. Floats are not
15023 allowed. xrange() is no longer defined.
15024
15025- Patch #1660500: hide iteration variable in list comps, add set comps
15026 and use common code to handle compilation of iterative expressions.
15027
15028- By default, != returns the opposite of ==, unless the latter returns
15029 NotImplemented.
15030
15031- Patch #1680961: sys.exitfunc has been removed and replaced with a
15032 private C-level API.
15033
15034- PEP 3115: new metaclasses: the metaclass is now specified as a
15035 keyword arg in the class statement, which can now use the full
15036 syntax of a parameter list. Also, the metaclass can implement a
15037 __prepare__ function which will be called to create the dictionary
15038 for the new class namespace.
15039
15040- The long-deprecated argument "pend" of PyFloat_FromString() has been
15041 removed.
15042
15043- The dir() function has been extended to call the __dir__() method on
15044 its argument, if it exists. If not, it will work like before. This
15045 allows customizing the output of dir() in the presence of a
15046 __getattr__().
15047
15048- Removed support for __members__ and __methods__.
15049
15050- Removed indexing/slicing on BaseException.
15051
15052- input() became raw_input(): the name input() now implements the
15053 functionality formerly known as raw_input(); the name raw_input() is
15054 no longer defined.
15055
15056- Classes listed in an 'except' clause must inherit from
15057 BaseException.
15058
15059- PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone;
15060 and .keys(), .items(), .values() return dict views, which behave
15061 like sets.
15062
15063- PEP 3105: print is now a function. Also (not in the PEP) the
15064 'softspace' attribute of files is now gone (since print() doesn't
15065 use it). A side effect of this change is that you can get
15066 incomplete output lines in interactive sessions:
15067
15068 >>> print(42, end="")
15069 42>>>
15070
15071 We may be able to fix this after the I/O library rewrite.
15072
15073- PEP 3102: keyword-only arguments.
15074
15075- Int/Long unification is complete. The 'long' built-in type and
15076 literals with trailing 'L' or 'l' have been removed. Performance
15077 may be sub-optimal (haven't really benchmarked).
15078
15079- 'except E, V' must now be spelled as 'except E as V' and deletes V
15080 at the end of the except clause; V must be a simple name.
15081
15082- Added function annotations per PEP 3107.
15083
15084- Added nonlocal declaration from PEP 3104:
15085
15086 >>> def f(x):
15087 ... def inc():
15088 ... nonlocal x
15089 ... x += 1
15090 ... return x
15091 ... return inc
15092 ...
15093 >>> inc = f(0)
15094 >>> inc()
15095 1
15096 >>> inc()
15097 2
15098
15099- Moved intern() to sys.intern().
15100
15101- exec is now a function.
15102
15103- Renamed nb_nonzero to nb_bool and __nonzero__ to __bool__.
15104
15105- Classic classes are a thing of the past. All classes are new style.
15106
15107- Exceptions *must* derive from BaseException.
15108
15109- Integer division always returns a float. The -Q option is no more.
15110 All the following are gone:
15111
15112 * PyNumber_Divide and PyNumber_InPlaceDivide
15113 * __div__, __rdiv__, and __idiv__
15114 * nb_divide, nb_inplace_divide
15115 * operator.div, operator.idiv, operator.__div__, operator.__idiv__
15116 (Only __truediv__ and __floordiv__ remain, not sure how to handle
15117 them if we want to re-use __div__ and friends. If we do, it will
15118 make it harder to write code for both 2.x and 3.x.)
15119
15120- 'as' and 'with' are keywords.
15121
15122- Absolute import is the default behavior for 'import foo' etc.
15123
15124- Removed support for syntax: backticks (ie, `x`), <>.
15125
15126- Removed these Python builtins: apply(), callable(), coerce(),
15127 execfile(), file(), reduce(), reload().
15128
15129- Removed these Python methods: {}.has_key.
15130
15131- Removed these opcodes: BINARY_DIVIDE, INPLACE_DIVIDE, UNARY_CONVERT.
15132
15133- Remove C API support for restricted execution.
15134
15135- zip(), map() and filter() now return iterators, behaving like their
15136 itertools counterparts. This also affect map()'s behavior on
15137 sequences of unequal length -- it now stops after the shortest one
15138 is exhausted.
15139
15140- Additions: set literals, set comprehensions, ellipsis literal.
15141
15142- Added class decorators per PEP 3129.
15143
15144
15145Extension Modules
15146-----------------
15147
15148- Removed the imageop module. Obsolete long with its unit tests
15149 becoming useless from the removal of rgbimg and imgfile.
15150
15151- Removed these attributes from the operator module: div, idiv,
15152 __div__, __idiv__, isCallable, sequenceIncludes.
15153
15154- Removed these attributes from the sys module: exc_clear(), exc_type,
15155 exc_value, exc_traceback.
15156
15157
15158Library
15159-------
15160
15161- Removed the compiler package. Use of the _ast module and (an
15162 eventual) AST -> bytecode mechanism.
15163
15164- Removed these modules: audiodev, Bastion, bsddb185, exceptions,
15165 linuxaudiodev, md5, MimeWriter, mimify, popen2, rexec, sets, sha,
15166 stringold, strop, sunaudiodev, timing, xmllib.
15167
15168- Moved the toaiff module to Tools/Demos.
15169
15170- Removed obsolete IRIX modules: al/AL, cd/CD, cddb, cdplayer, cl/CL,
15171 DEVICE, ERRNO, FILE, fl/FL, flp, fm, GET, gl/GL, GLWS, IN, imgfile,
15172 IOCTL, jpeg, panel, panelparser, readcd, sgi, sv/SV, torgb, WAIT.
15173
15174- Removed obsolete functions: commands.getstatus(), os.popen*().
15175
15176- Removed functions in the string module that are also string methods;
15177 Remove string.{letters, lowercase, uppercase}.
15178
15179- Removed support for long obsolete platforms: plat-aix3, plat-irix5.
15180
15181- Removed xmlrpclib.SlowParser. It was based on xmllib.
15182
15183- Patch #1680961: atexit has been reimplemented in C.
15184
15185- Add new codecs for UTF-32, UTF-32-LE and UTF-32-BE.
15186
15187Build
15188-----
15189
15190C API
15191-----
15192
15193- Removed these Python slots: __coerce__, __div__, __idiv__, __rdiv__.
15194
15195- Removed these C APIs: PyNumber_Coerce(), PyNumber_CoerceEx(),
15196 PyMember_Get, PyMember_Set.
15197
15198- Removed these C slots/fields: nb_divide, nb_inplace_divide.
15199
15200- Removed these macros: staticforward, statichere, PyArg_GetInt,
15201 PyArg_NoArgs, _PyObject_Del.
15202
15203- Removed these typedefs: intargfunc, intintargfunc, intobjargproc,
15204 intintobjargproc, getreadbufferproc, getwritebufferproc,
15205 getsegcountproc, getcharbufferproc, memberlist.
15206
15207Tests
15208-----
15209
15210- Removed test.testall as test.regrtest replaces it.
15211
15212Documentation
15213-------------
15214
15215Mac
15216---
15217
15218- The cfmfile module was removed.
15219
15220Platforms
15221---------
15222
15223- Support for BeOS and AtheOS was removed (according to PEP 11).
15224
Martin Panter0be894b2016-09-07 12:03:06 +000015225- Support for RiscOS, Irix, Tru64 was removed (allegedly).
Barry Warsaw97f005d2008-12-03 16:46:14 +000015226
15227Tools/Demos
15228-----------
15229
15230
Christian Heimesc3f30c42008-02-22 16:37:40 +000015231What's New in Python 2.5 release candidate 1?
15232=============================================
15233
15234*Release date: 17-AUG-2006*
15235
15236Core and builtins
15237-----------------
15238
15239- Unicode objects will no longer raise an exception when being
15240 compared equal or unequal to a string and a UnicodeDecodeError
15241 exception occurs, e.g. as result of a decoding failure.
15242
15243 Instead, the equal (==) and unequal (!=) comparison operators will
15244 now issue a UnicodeWarning and interpret the two objects as
15245 unequal. The UnicodeWarning can be filtered as desired using
15246 the warning framework, e.g. silenced completely, turned into an
15247 exception, logged, etc.
15248
15249 Note that compare operators other than equal and unequal will still
15250 raise UnicodeDecodeError exceptions as they've always done.
15251
15252- Fix segfault when doing string formatting on subclasses of long.
15253
15254- Fix bug related to __len__ functions using values > 2**32 on 64-bit machines
15255 with new-style classes.
15256
15257- Fix bug related to __len__ functions returning negative values with
15258 classic classes.
15259
15260- Patch #1538606, Fix __index__() clipping. There were some problems
15261 discovered with the API and how integers that didn't fit into Py_ssize_t
15262 were handled. This patch attempts to provide enough alternatives
15263 to effectively use __index__.
15264
15265- Bug #1536021: __hash__ may now return long int; the final hash
15266 value is obtained by invoking hash on the long int.
15267
15268- Bug #1536786: buffer comparison could emit a RuntimeWarning.
15269
15270- Bug #1535165: fixed a segfault in input() and raw_input() when
15271 sys.stdin is closed.
15272
15273- On Windows, the PyErr_Warn function is now exported from
15274 the Python dll again.
15275
15276- Bug #1191458: tracing over for loops now produces a line event
15277 on each iteration. Fixing this problem required changing the .pyc
15278 magic number. This means that .pyc files generated before 2.5c1
15279 will be regenerated.
15280
15281- Bug #1333982: string/number constants were inappropriately stored
15282 in the byte code and co_consts even if they were not used, ie
15283 immediately popped off the stack.
15284
15285- Fixed a reference-counting problem in property().
15286
15287
15288Library
15289-------
15290
15291- Fix a bug in the ``compiler`` package that caused invalid code to be
15292 generated for generator expressions.
15293
15294- The distutils version has been changed to 2.5.0. The change to
15295 keep it programmatically in sync with the Python version running
15296 the code (introduced in 2.5b3) has been reverted. It will continue
15297 to be maintained manually as static string literal.
15298
15299- If the Python part of a ctypes callback function returns None,
15300 and this cannot be converted to the required C type, an exception is
15301 printed with PyErr_WriteUnraisable. Before this change, the C
15302 callback returned arbitrary values to the calling code.
15303
15304- The __repr__ method of a NULL ctypes.py_object() no longer raises
15305 an exception.
15306
15307- uuid.UUID now has a bytes_le attribute. This returns the UUID in
15308 little-endian byte order for Windows. In addition, uuid.py gained some
15309 workarounds for clocks with low resolution, to stop the code yielding
15310 duplicate UUIDs.
15311
15312- Patch #1540892: site.py Quitter() class attempts to close sys.stdin
15313 before raising SystemExit, allowing IDLE to honor quit() and exit().
15314
15315- Bug #1224621: make tabnanny recognize IndentationErrors raised by tokenize.
15316
15317- Patch #1536071: trace.py should now find the full module name of a
15318 file correctly even on Windows.
15319
15320- logging's atexit hook now runs even if the rest of the module has
15321 already been cleaned up.
15322
15323- Bug #1112549, fix DoS attack on cgi.FieldStorage.
15324
15325- Bug #1531405, format_exception no longer raises an exception if
15326 str(exception) raised an exception.
15327
15328- Fix a bug in the ``compiler`` package that caused invalid code to be
15329 generated for nested functions.
15330
15331
15332Extension Modules
15333-----------------
15334
15335- Patch #1511317: don't crash on invalid hostname (alias) info.
15336
15337- Patch #1535500: fix segfault in BZ2File.writelines and make sure it
15338 raises the correct exceptions.
15339
15340- Patch # 1536908: enable building ctypes on OpenBSD/AMD64. The
15341 '-no-stack-protector' compiler flag for OpenBSD has been removed.
15342
15343- Patch #1532975 was applied, which fixes Bug #1533481: ctypes now
15344 uses the _as_parameter_ attribute when objects are passed to foreign
15345 function calls. The ctypes version number was changed to 1.0.1.
15346
15347- Bug #1530559, struct.pack raises TypeError where it used to convert.
15348 Passing float arguments to struct.pack when integers are expected
15349 now triggers a DeprecationWarning.
15350
15351
15352Tests
15353-----
15354
15355- test_socketserver should now work on cygwin and not fail sporadically
15356 on other platforms.
15357
15358- test_mailbox should now work on cygwin versions 2006-08-10 and later.
15359
15360- Bug #1535182: really test the xreadlines() method of bz2 objects.
15361
15362- test_threading now skips testing alternate thread stack sizes on
15363 platforms that don't support changing thread stack size.
15364
15365
15366Documentation
15367-------------
15368
15369- Patch #1534922: unittest docs were corrected and enhanced.
15370
15371
15372Build
15373-----
15374
15375- Bug #1535502, build _hashlib on Windows, and use masm assembler
15376 code in OpenSSL.
15377
15378- Bug #1534738, win32 debug version of _msi should be _msi_d.pyd.
15379
15380- Bug #1530448, ctypes build failure on Solaris 10 was fixed.
15381
15382
15383C API
15384-----
15385
15386- New API for Unicode rich comparisons: PyUnicode_RichCompare()
15387
15388- Bug #1069160. Internal correctness changes were made to
15389 ``PyThreadState_SetAsyncExc()``. A test case was added, and
15390 the documentation was changed to state that the return value
15391 is always 1 (normal) or 0 (if the specified thread wasn't found).
15392
15393
15394What's New in Python 2.5 beta 3?
15395================================
15396
15397*Release date: 03-AUG-2006*
15398
15399Core and builtins
15400-----------------
15401
15402- _PyWeakref_GetWeakrefCount() now returns a Py_ssize_t; it previously
15403 returned a long (see PEP 353).
15404
15405- Bug #1515471: string.replace() accepts character buffers again.
15406
15407- Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn().
15408 This provides the proper warning for struct.pack().
15409 PyErr_Warn() is now deprecated in favor of PyErr_WarnEx().
15410
15411- Patch #1531113: Fix augmented assignment with yield expressions.
15412 Also fix a SystemError when trying to assign to yield expressions.
15413
15414- Bug #1529871: The speed enhancement patch #921466 broke Python's compliance
15415 with PEP 302. This was fixed by adding an ``imp.NullImporter`` type that is
15416 used in ``sys.path_importer_cache`` to cache non-directory paths and avoid
15417 excessive filesystem operations during imports.
15418
15419- Bug #1521947: When checking for overflow, ``PyOS_strtol()`` used some
15420 operations on signed longs that are formally undefined by C.
15421 Unfortunately, at least one compiler now cares about that, so complicated
15422 the code to make that compiler happy again.
15423
15424- Bug #1524310: Properly report errors from FindNextFile in os.listdir.
15425
15426- Patch #1232023: Stop including current directory in search
15427 path on Windows.
15428
15429- Fix some potential crashes found with failmalloc.
15430
15431- Fix warnings reported by Klocwork's static analysis tool.
15432
15433- Bug #1512814, Fix incorrect lineno's when code within a function
15434 had more than 255 blank lines.
15435
15436- Patch #1521179: Python now accepts the standard options ``--help`` and
15437 ``--version`` as well as ``/?`` on Windows.
15438
15439- Bug #1520864: unpacking singleton tuples in a 'for' loop (for x, in) works
15440 again. Fixing this problem required changing the .pyc magic number.
15441 This means that .pyc files generated before 2.5b3 will be regenerated.
15442
15443- Bug #1524317: Compiling Python ``--without-threads`` failed.
15444 The Python core compiles again, and, in a build without threads, the
15445 new ``sys._current_frames()`` returns a dictionary with one entry,
15446 mapping the faux "thread id" 0 to the current frame.
15447
15448- Bug #1525447: build on MacOS X on a case-sensitive filesystem.
15449
15450
15451Library
15452-------
15453
15454- Fix #1693149. Now you can pass several modules separated by
15455 comma to trace.py in the same --ignore-module option.
15456
15457- Correction of patch #1455898: In the mbcs decoder, set final=False
15458 for stream decoder, but final=True for the decode function.
15459
15460- os.urandom no longer masks unrelated exceptions like SystemExit or
15461 KeyboardInterrupt.
15462
15463- Bug #1525866: Don't copy directory stat times in
15464 shutil.copytree on Windows
15465
15466- Bug #1002398: The documentation for os.path.sameopenfile now correctly
15467 refers to file descriptors, not file objects.
15468
15469- The renaming of the xml package to xmlcore, and the import hackery done
15470 to make it appear at both names, has been removed. Bug #1511497,
15471 #1513611, and probably others.
15472
15473- Bug #1441397: The compiler module now recognizes module and function
15474 docstrings correctly as it did in Python 2.4.
15475
15476- Bug #1529297: The rewrite of doctest for Python 2.4 unintentionally
15477 lost that tests are sorted by name before being run. This rarely
15478 matters for well-written tests, but can create baffling symptoms if
15479 side effects from one test to the next affect outcomes. ``DocTestFinder``
15480 has been changed to sort the list of tests it returns.
15481
15482- The distutils version has been changed to 2.5.0, and is now kept
15483 in sync with sys.version_info[:3].
15484
15485- Bug #978833: Really close underlying socket in _socketobject.close.
15486
15487- Bug #1459963: urllib and urllib2 now normalize HTTP header names with
15488 title().
15489
15490- Patch #1525766: In pkgutil.walk_packages, correctly pass the onerror callback
15491 to recursive calls and call it with the failing package name.
15492
15493- Bug #1525817: Don't truncate short lines in IDLE's tool tips.
15494
15495- Patch #1515343: Fix printing of deprecated string exceptions with a
15496 value in the traceback module.
15497
15498- Resync optparse with Optik 1.5.3: minor tweaks for/to tests.
15499
15500- Patch #1524429: Use repr() instead of backticks in Tkinter again.
15501
15502- Bug #1520914: Change time.strftime() to accept a zero for any position in its
15503 argument tuple. For arguments where zero is illegal, the value is forced to
15504 the minimum value that is correct. This is to support an undocumented but
15505 common way people used to fill in inconsequential information in the time
15506 tuple pre-2.4.
15507
15508- Patch #1220874: Update the binhex module for Mach-O.
15509
15510- The email package has improved RFC 2231 support, specifically for
15511 recognizing the difference between encoded (name*0*=<blah>) and non-encoded
15512 (name*0=<blah>) parameter continuations. This may change the types of
15513 values returned from email.message.Message.get_param() and friends.
15514 Specifically in some cases where non-encoded continuations were used,
15515 get_param() used to return a 3-tuple of (None, None, string) whereas now it
15516 will just return the string (since non-encoded continuations don't have
15517 charset and language parts).
15518
15519 Also, whereas % values were decoded in all parameter continuations, they are
15520 now only decoded in encoded parameter parts.
15521
15522- Bug #1517990: IDLE keybindings on MacOS X now work correctly
15523
15524- Bug #1517996: IDLE now longer shows the default Tk menu when a
15525 path browser, class browser or debugger is the frontmost window on MacOS X
15526
15527- Patch #1520294: Support for getset and member descriptors in types.py,
15528 inspect.py, and pydoc.py. Specifically, this allows for querying the type
15529 of an object against these built-in types and more importantly, for getting
15530 their docstrings printed in the interactive interpreter's help() function.
15531
15532
15533Extension Modules
15534-----------------
15535
15536- Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs during
15537 a socket operation on a socket with a timeout, the exception will be
15538 caught correctly. Previously, the exception was not caught.
15539
15540- Patch #1529514: The _ctypes extension is now compiled on more
15541 openbsd target platforms.
15542
15543- The ``__reduce__()`` method of the new ``collections.defaultdict`` had
15544 a memory leak, affecting pickles and deep copies.
15545
15546- Bug #1471938: Fix curses module build problem on Solaris 8; patch by
15547 Paul Eggert.
15548
15549- Patch #1448199: Release interpreter lock in _winreg.ConnectRegistry.
15550
15551- Patch #1521817: Index range checking on ctypes arrays containing
15552 exactly one element enabled again. This allows iterating over these
15553 arrays, without the need to check the array size before.
15554
15555- Bug #1521375: When the code in ctypes.util.find_library was
15556 run with root privileges, it could overwrite or delete
15557 /dev/null in certain cases; this is now fixed.
15558
15559- Bug #1467450: On Mac OS X 10.3, RTLD_GLOBAL is now used as the
15560 default mode for loading shared libraries in ctypes.
15561
15562- Because of a misspelled preprocessor symbol, ctypes was always
15563 compiled without thread support; this is now fixed.
15564
15565- pybsddb Bug #1527939: bsddb module DBEnv dbremove and dbrename
15566 methods now allow their database parameter to be None as the
15567 sleepycat API allows.
15568
15569- Bug #1526460: Fix socketmodule compile on NetBSD as it has a different
15570 bluetooth API compared with Linux and FreeBSD.
15571
15572Tests
15573-----
15574
15575- Bug #1501330: Change test_ossaudiodev to be much more tolerant in terms of
15576 how long the test file should take to play. Now accepts taking 2.93 secs
15577 (exact time) +/- 10% instead of the hard-coded 3.1 sec.
15578
15579- Patch #1529686: The standard tests ``test_defaultdict``, ``test_iterlen``,
15580 ``test_uuid`` and ``test_email_codecs`` didn't actually run any tests when
15581 run via ``regrtest.py``. Now they do.
15582
15583Build
15584-----
15585
15586- Bug #1439538: Drop usage of test -e in configure as it is not portable.
15587
15588Mac
15589---
15590
15591- PythonLauncher now works correctly when the path to the script contains
15592 characters that are treated specially by the shell (such as quotes).
15593
15594- Bug #1527397: PythonLauncher now launches scripts with the working directory
15595 set to the directory that contains the script instead of the user home
15596 directory. That latter was an implementation accident and not what users
15597 expect.
15598
15599
15600What's New in Python 2.5 beta 2?
15601================================
15602
15603*Release date: 11-JUL-2006*
15604
15605Core and builtins
15606-----------------
15607
15608- Bug #1441486: The literal representation of -(sys.maxint - 1)
Martin Panter7462b6492015-11-02 03:37:02 +000015609 again evaluates to an int object, not a long.
Christian Heimesc3f30c42008-02-22 16:37:40 +000015610
15611- Bug #1501934: The scope of global variables that are locally assigned
15612 using augmented assignment is now correctly determined.
15613
15614- Bug #927248: Recursive method-wrapper objects can now safely
15615 be released.
15616
15617- Bug #1417699: Reject locale-specific decimal point in float()
15618 and atof().
15619
15620- Bug #1511381: codec_getstreamcodec() in codec.c is corrected to
15621 omit a default "error" argument for NULL pointer. This allows
15622 the parser to take a codec from cjkcodecs again.
15623
15624- Bug #1519018: 'as' is now validated properly in import statements.
15625
15626- On 64 bit systems, int literals that use less than 64 bits are
15627 now ints rather than longs.
15628
15629- Bug #1512814, Fix incorrect lineno's when code at module scope
15630 started after line 256.
15631
15632- New function ``sys._current_frames()`` returns a dict mapping thread
15633 id to topmost thread stack frame. This is for expert use, and is
15634 especially useful for debugging application deadlocks. The functionality
15635 was previously available in Fazal Majid's ``threadframe`` extension
15636 module, but it wasn't possible to do this in a wholly threadsafe way from
15637 an extension.
15638
15639Library
15640-------
15641
15642- Bug #1257728: Mention Cygwin in distutils error message about a missing
15643 VS 2003.
15644
15645- Patch #1519566: Update turtle demo, make begin_fill idempotent.
15646
15647- Bug #1508010: msvccompiler now requires the DISTUTILS_USE_SDK
15648 environment variable to be set in order to the SDK environment
15649 for finding the compiler, include files, etc.
15650
15651- Bug #1515998: Properly generate logical ids for files in bdist_msi.
15652
15653- warnings.py now ignores ImportWarning by default
15654
15655- string.Template() now correctly handles tuple-values. Previously,
15656 multi-value tuples would raise an exception and single-value tuples would
15657 be treated as the value they contain, instead.
15658
15659- Bug #822974: Honor timeout in telnetlib.{expect,read_until}
15660 even if some data are received.
15661
15662- Bug #1267547: Put proper recursive setup.py call into the
15663 spec file generated by bdist_rpm.
15664
15665- Bug #1514693: Update turtle's heading when switching between
15666 degrees and radians.
15667
15668- Reimplement turtle.circle using a polyline, to allow correct
15669 filling of arcs.
15670
15671- Bug #1514703: Only setup canvas window in turtle when the canvas
15672 is created.
15673
15674- Bug #1513223: .close() of a _socketobj now releases the underlying
15675 socket again, which then gets closed as it becomes unreferenced.
15676
15677- Bug #1504333: Make sgmllib support angle brackets in quoted
15678 attribute values.
15679
15680- Bug #853506: Fix IPv6 address parsing in unquoted attributes in
15681 sgmllib ('[' and ']' were not accepted).
15682
15683- Fix a bug in the turtle module's end_fill function.
15684
15685- Bug #1510580: The 'warnings' module improperly required that a Warning
15686 category be either a types.ClassType and a subclass of Warning. The proper
15687 check is just that it is a subclass with Warning as the documentation states.
15688
15689- The compiler module now correctly compiles the new try-except-finally
15690 statement (bug #1509132).
15691
15692- The wsgiref package is now installed properly on Unix.
15693
15694- A bug was fixed in logging.config.fileConfig() which caused a crash on
15695 shutdown when fileConfig() was called multiple times.
15696
15697- The sqlite3 module did cut off data from the SQLite database at the first
15698 null character before sending it to a custom converter. This has been fixed
15699 now.
15700
15701Extension Modules
15702-----------------
15703
15704- #1494314: Fix a regression with high-numbered sockets in 2.4.3. This
15705 means that select() on sockets > FD_SETSIZE (typically 1024) work again.
15706 The patch makes sockets use poll() internally where available.
15707
15708- Assigning None to pointer type fields in ctypes structures possible
15709 overwrote the wrong fields, this is fixed now.
15710
15711- Fixed a segfault in _ctypes when ctypes.wintypes were imported
15712 on non-Windows platforms.
15713
15714- Bug #1518190: The ctypes.c_void_p constructor now accepts any
15715 integer or long, without range checking.
15716
15717- Patch #1517790: It is now possible to use custom objects in the ctypes
15718 foreign function argtypes sequence as long as they provide a from_param
15719 method, no longer is it required that the object is a ctypes type.
15720
15721- The '_ctypes' extension module now works when Python is configured
15722 with the --without-threads option.
15723
15724- Bug #1513646: os.access on Windows now correctly determines write
15725 access, again.
15726
15727- Bug #1512695: cPickle.loads could crash if it was interrupted with
15728 a KeyboardInterrupt.
15729
15730- Bug #1296433: parsing XML with a non-default encoding and
15731 a CharacterDataHandler could crash the interpreter in pyexpat.
15732
15733- Patch #1516912: improve Modules support for OpenVMS.
15734
15735Build
15736-----
15737
15738- Automate Windows build process for the Win64 SSL module.
15739
15740- 'configure' now detects the zlib library the same way as distutils.
15741 Previously, the slight difference could cause compilation errors of the
15742 'zlib' module on systems with more than one version of zlib.
15743
15744- The MSI compileall step was fixed to also support a TARGETDIR
15745 with spaces in it.
15746
15747- Bug #1517388: sqlite3.dll is now installed on Windows independent
15748 of Tcl/Tk.
15749
15750- Bug #1513032: 'make install' failed on FreeBSD 5.3 due to lib-old
15751 trying to be installed even though it's empty.
15752
15753Tests
15754-----
15755
15756- Call os.waitpid() at the end of tests that spawn child processes in order
15757 to minimize resources (zombies).
15758
15759Documentation
15760-------------
15761
15762- Cover ImportWarning, PendingDeprecationWarning and simplefilter() in the
15763 documentation for the warnings module.
15764
15765- Patch #1509163: MS Toolkit Compiler no longer available.
15766
15767- Patch #1504046: Add documentation for xml.etree.
15768
15769
15770What's New in Python 2.5 beta 1?
15771================================
15772
15773*Release date: 20-JUN-2006*
15774
15775Core and builtins
15776-----------------
15777
15778- Patch #1507676: Error messages returned by invalid abstract object operations
15779 (such as iterating over an integer) have been improved and now include the
15780 type of the offending object to help with debugging.
15781
15782- Bug #992017: A classic class that defined a __coerce__() method that returned
15783 its arguments swapped would infinitely recurse and segfault the interpreter.
15784
15785- Fix the socket tests so they can be run concurrently.
15786
15787- Removed 5 integers from C frame objects (PyFrameObject).
15788 f_nlocals, f_ncells, f_nfreevars, f_stack_size, f_restricted.
15789
15790- Bug #532646: object.__call__() will continue looking for the __call__
15791 attribute on objects until one without one is found. This leads to recursion
15792 when you take a class and set its __call__ attribute to an instance of the
15793 class. Originally fixed for classic classes, but this fix is for new-style.
15794 Removes the infinite_rec_3 crasher.
15795
15796- The string and unicode methods startswith() and endswith() now accept
15797 a tuple of prefixes/suffixes to look for. Implements RFE #1491485.
15798
15799- Buffer objects, at the C level, never used the char buffer
15800 implementation even when the char buffer for the wrapped object was
15801 explicitly requested (originally returned the read or write buffer).
15802 Now a TypeError is raised if the char buffer is not present but is
15803 requested.
15804
15805- Patch #1346214: Statements like "if 0: suite" are now again optimized
15806 away like they were in Python 2.4.
15807
15808- Builtin exceptions are now full-blown new-style classes instead of
15809 instances pretending to be classes, which speeds up exception handling
15810 by about 80% in comparison to 2.5a2.
15811
15812- Patch #1494554: Update unicodedata.numeric and unicode.isnumeric to
15813 Unicode 4.1.
15814
15815- Patch #921466: sys.path_importer_cache is now used to cache valid and
15816 invalid file paths for the built-in import machinery which leads to
15817 fewer open calls on startup.
15818
15819- Patch #1442927: ``long(str, base)`` is now up to 6x faster for non-power-
15820 of-2 bases. The largest speedup is for inputs with about 1000 decimal
15821 digits. Conversion from non-power-of-2 bases remains quadratic-time in
15822 the number of input digits (it was and remains linear-time for bases
15823 2, 4, 8, 16 and 32).
15824
15825- Bug #1334662: ``int(string, base)`` could deliver a wrong answer
15826 when ``base`` was not 2, 4, 8, 10, 16 or 32, and ``string`` represented
15827 an integer close to ``sys.maxint``. This was repaired by patch
15828 #1335972, which also gives a nice speedup.
15829
15830- Patch #1337051: reduced size of frame objects.
15831
15832- PyErr_NewException now accepts a tuple of base classes as its
15833 "base" parameter.
15834
15835- Patch #876206: function call speedup by retaining allocated frame
15836 objects.
15837
15838- Bug #1462152: file() now checks more thoroughly for invalid mode
15839 strings and removes a possible "U" before passing the mode to the
15840 C library function.
15841
15842- Patch #1488312, Fix memory alignment problem on SPARC in unicode
15843
15844- Bug #1487966: Fix SystemError with conditional expression in assignment
15845
15846- WindowsError now has two error code attributes: errno, which carries
15847 the error values from errno.h, and winerror, which carries the error
15848 values from winerror.h. Previous versions put the winerror.h values
15849 (from GetLastError()) into the errno attribute.
15850
15851- Patch #1475845: Raise IndentationError for unexpected indent.
15852
15853- Patch #1479181: split open() and file() from being aliases for each other.
15854
15855- Patch #1497053 & bug #1275608: Exceptions occurring in ``__eq__()``
15856 methods were always silently ignored by dictionaries when comparing keys.
15857 They are now passed through (except when using the C API function
15858 ``PyDict_GetItem()``, whose semantics did not change).
15859
15860- Bug #1456209: In some obscure cases it was possible for a class with a
15861 custom ``__eq__()`` method to confuse dict internals when class instances
15862 were used as a dict's keys and the ``__eq__()`` method mutated the dict.
15863 No, you don't have any code that did this ;-)
15864
15865Extension Modules
15866-----------------
15867
15868- Bug #1295808: expat symbols should be namespaced in pyexpat
15869
15870- Patch #1462338: Upgrade pyexpat to expat 2.0.0
15871
15872- Change binascii.hexlify to accept a read-only buffer instead of only a char
15873 buffer and actually follow its documentation.
15874
15875- Fixed a potentially invalid memory access of CJKCodecs' shift-jis decoder.
15876
15877- Patch #1478788 (modified version): The functional extension module has
15878 been renamed to _functools and a functools Python wrapper module added.
15879 This provides a home for additional function related utilities that are
15880 not specifically about functional programming. See PEP 309.
15881
15882- Patch #1493701: performance enhancements for struct module.
15883
15884- Patch #1490224: time.altzone is now set correctly on Cygwin.
15885
15886- Patch #1435422: zlib's compress and decompress objects now have a
15887 copy() method.
15888
15889- Patch #1454481: thread stack size is now tunable at runtime for thread
15890 enabled builds on Windows and systems with Posix threads support.
15891
15892- On Win32, os.listdir now supports arbitrarily-long Unicode path names
15893 (up to the system limit of 32K characters).
15894
15895- Use Win32 API to implement os.{access,chdir,chmod,mkdir,remove,rename,rmdir,utime}.
15896 As a result, these functions now raise WindowsError instead of OSError.
15897
15898- ``time.clock()`` on Win64 should use the high-performance Windows
15899 ``QueryPerformanceCounter()`` now (as was already the case on 32-bit
15900 Windows platforms).
15901
15902- Calling Tk_Init twice is refused if the first call failed as that
15903 may deadlock.
15904
15905- bsddb: added the DB_ARCH_REMOVE flag and fixed db.DBEnv.log_archive() to
15906 accept it without potentially using an uninitialized pointer.
15907
15908- bsddb: added support for the DBEnv.log_stat() and DBEnv.lsn_reset() methods
15909 assuming BerkeleyDB >= 4.0 and 4.4 respectively. [pybsddb project SF
15910 patch numbers 1494885 and 1494902]
15911
15912- bsddb: added an interface for the BerkeleyDB >= 4.3 DBSequence class.
15913 [pybsddb project SF patch number 1466734]
15914
15915- bsddb: fix DBCursor.pget() bug with keyword argument names when no data
15916 parameter is supplied. [SF pybsddb bug #1477863]
15917
15918- bsddb: the __len__ method of a DB object has been fixed to return correct
15919 results. It could previously incorrectly return 0 in some cases.
15920 Fixes SF bug 1493322 (pybsddb bug 1184012).
15921
15922- bsddb: the bsddb.dbtables Modify method now raises the proper error and
15923 aborts the db transaction safely when a modifier callback fails.
15924 Fixes SF python patch/bug #1408584.
15925
15926- bsddb: multithreaded DB access using the simple bsddb module interface
15927 now works reliably. It has been updated to use automatic BerkeleyDB
15928 deadlock detection and the bsddb.dbutils.DeadlockWrap wrapper to retry
15929 database calls that would previously deadlock. [SF python bug #775414]
15930
15931- Patch #1446489: add support for the ZIP64 extensions to zipfile.
15932
15933- Patch #1506645: add Python wrappers for the curses functions
15934 is_term_resized, resize_term and resizeterm.
15935
15936Library
15937-------
15938
15939- Patch #815924: Restore ability to pass type= and icon= in tkMessageBox
15940 functions.
15941
15942- Patch #812986: Update turtle output even if not tracing.
15943
15944- Patch #1494750: Destroy master after deleting children in
15945 Tkinter.BaseWidget.
15946
15947- Patch #1096231: Add ``default`` argument to Tkinter.Wm.wm_iconbitmap.
15948
15949- Patch #763580: Add name and value arguments to Tkinter variable
15950 classes.
15951
15952- Bug #1117556: SimpleHTTPServer now tries to find and use the system's
15953 mime.types file for determining MIME types.
15954
15955- Bug #1339007: Shelf objects now don't raise an exception in their
15956 __del__ method when initialization failed.
15957
15958- Patch #1455898: The MBCS codec now supports the incremental mode for
15959 double-byte encodings.
15960
15961- ``difflib``'s ``SequenceMatcher.get_matching_blocks()`` was changed to
15962 guarantee that adjacent triples in the return list always describe
15963 non-adjacent blocks. Previously, a pair of matching blocks could end
15964 up being described by multiple adjacent triples that formed a partition
15965 of the matching pair.
15966
15967- Bug #1498146: fix optparse to handle Unicode strings in option help,
15968 description, and epilog.
15969
15970- Bug #1366250: minor optparse documentation error.
15971
15972- Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately;
15973 clarify docs.
15974
15975- The wsgiref package has been added to the standard library.
15976
15977- The functions update_wrapper() and wraps() have been added to the functools
15978 module. These make it easier to copy relevant metadata from the original
15979 function when writing wrapper functions.
15980
15981- The optional ``isprivate`` argument to ``doctest.testmod()``, and the
15982 ``doctest.is_private()`` function, both deprecated in 2.4, were removed.
15983
15984- Patch #1359618: Speed up charmap encoder by using a trie structure
15985 for lookup.
15986
15987- The functions in the ``pprint`` module now sort dictionaries by key
15988 before computing the display. Before 2.5, ``pprint`` sorted a dictionary
15989 if and only if its display required more than one line, although that
15990 wasn't documented. The new behavior increases predictability; e.g.,
15991 using ``pprint.pprint(a_dict)`` in a doctest is now reliable.
15992
15993- Patch #1497027: try HTTP digest auth before basic auth in urllib2
15994 (thanks for J. J. Lee).
15995
15996- Patch #1496206: improve urllib2 handling of passwords with respect to
15997 default HTTP and HTTPS ports.
15998
15999- Patch #1080727: add "encoding" parameter to doctest.DocFileSuite.
16000
16001- Patch #1281707: speed up gzip.readline.
16002
16003- Patch #1180296: Two new functions were added to the locale module:
16004 format_string() to get the effect of "format % items" but locale-aware,
16005 and currency() to format a monetary number with currency sign.
16006
16007- Patch #1486962: Several bugs in the turtle Tk demo module were fixed
16008 and several features added, such as speed and geometry control.
16009
16010- Patch #1488881: add support for external file objects in bz2 compressed
16011 tarfiles.
16012
16013- Patch #721464: pdb.Pdb instances can now be given explicit stdin and
16014 stdout arguments, making it possible to redirect input and output
16015 for remote debugging.
16016
16017- Patch #1484695: Update the tarfile module to version 0.8. This fixes
16018 a couple of issues, notably handling of long file names using the
16019 GNU LONGNAME extension.
16020
16021- Patch #1478292. ``doctest.register_optionflag(name)`` shouldn't create a
16022 new flag when ``name`` is already the name of an option flag.
16023
16024- Bug #1385040: don't allow "def foo(a=1, b): pass" in the compiler
16025 package.
16026
16027- Patch #1472854: make the rlcompleter.Completer class usable on non-
16028 UNIX platforms.
16029
16030- Patch #1470846: fix urllib2 ProxyBasicAuthHandler.
16031
16032- Bug #1472827: correctly escape newlines and tabs in attribute values in
16033 the saxutils.XMLGenerator class.
16034
16035
16036Build
16037-----
16038
16039- Bug #1502728: Correctly link against librt library on HP-UX.
16040
16041- OpenBSD 3.9 is supported now.
16042
16043- Patch #1492356: Port to Windows CE.
16044
16045- Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
16046
16047- Patch #1471883: Add --enable-universalsdk.
16048
16049C API
16050-----
16051
16052Tests
16053-----
16054
16055Tools
16056-----
16057
16058Documentation
16059-------------
16060
16061
16062
16063What's New in Python 2.5 alpha 2?
16064=================================
16065
16066*Release date: 27-APR-2006*
16067
16068Core and builtins
16069-----------------
16070
16071- Bug #1465834: 'bdist_wininst preinstall script support' was fixed
16072 by converting these apis from macros into exported functions again:
16073
16074 PyParser_SimpleParseFile PyParser_SimpleParseString PyRun_AnyFile
16075 PyRun_AnyFileEx PyRun_AnyFileFlags PyRun_File PyRun_FileEx
16076 PyRun_FileFlags PyRun_InteractiveLoop PyRun_InteractiveOne
16077 PyRun_SimpleFile PyRun_SimpleFileEx PyRun_SimpleString
16078 PyRun_String Py_CompileString
16079
16080- Under COUNT_ALLOCS, types are not necessarily immortal anymore.
16081
16082- All uses of PyStructSequence_InitType have been changed to initialize
16083 the type objects only once, even if the interpreter is initialized
16084 multiple times.
16085
16086- Bug #1454485, array.array('u') could crash the interpreter. This was
16087 due to PyArgs_ParseTuple(args, 'u#', ...) trying to convert buffers (strings)
16088 to unicode when it didn't make sense. 'u#' now requires a unicode string.
16089
16090- Py_UNICODE is unsigned. It was always documented as unsigned, but
16091 due to a bug had a signed value in previous versions.
16092
16093- Patch #837242: ``id()`` of any Python object always gives a positive
16094 number now, which might be a long integer. ``PyLong_FromVoidPtr`` and
16095 ``PyLong_AsVoidPtr`` have been changed accordingly. Note that it has
16096 never been correct to implement a ``__hash()__`` method that returns the
16097 ``id()`` of an object:
16098
16099 def __hash__(self):
16100 return id(self) # WRONG
16101
16102 because a hash result must be a (short) Python int but it was always
16103 possible for ``id()`` to return a Python long. However, because ``id()``
16104 could return negative values before, on a 32-bit box an ``id()`` result
16105 was always usable as a hash value before this patch. That's no longer
16106 necessarily so.
16107
16108- Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c)
16109 to load extension modules and now provides the dl module. As a result,
16110 sys.setdlopenflags() now works correctly on these systems. (SF patch
16111 #1454844)
16112
16113- Patch #1463867: enhanced garbage collection to allow cleanup of cycles
16114 involving generators that have paused outside of any ``try`` or ``with``
16115 blocks. (In 2.5a1, a paused generator that was part of a reference
16116 cycle could not be garbage collected, regardless of whether it was
16117 paused in a ``try`` or ``with`` block.)
16118
16119Extension Modules
16120-----------------
16121
16122- Patch #1191065: Fix preprocessor problems on systems where recvfrom
16123 is a macro.
16124
16125- Bug #1467952: os.listdir() now correctly raises an error if readdir()
16126 fails with an error condition.
16127
16128- Fixed bsddb.db.DBError derived exceptions so they can be unpickled.
16129
16130- Bug #1117761: bsddb.*open() no longer raises an exception when using
16131 the cachesize parameter.
16132
16133- Bug #1149413: bsddb.*open() no longer raises an exception when using
16134 a temporary db (file=None) with the 'n' flag to truncate on open.
16135
16136- Bug #1332852: bsddb module minimum BerkeleyDB version raised to 3.3
16137 as older versions cause excessive test failures.
16138
16139- Patch #1062014: AF_UNIX sockets under Linux have a special
16140 abstract namespace that is now fully supported.
16141
16142Library
16143-------
16144
16145- Bug #1223937: subprocess.CalledProcessError reports the exit status
16146 of the process using the returncode attribute, instead of
16147 abusing errno.
16148
16149- Patch #1475231: ``doctest`` has a new ``SKIP`` option, which causes
16150 a doctest to be skipped (the code is not run, and the expected output
16151 or exception is ignored).
16152
16153- Fixed contextlib.nested to cope with exceptions being raised and
16154 caught inside exit handlers.
16155
16156- Updated optparse module to Optik 1.5.1 (allow numeric constants in
16157 hex, octal, or binary; add ``append_const`` action; keep going if
16158 gettext cannot be imported; added ``OptionParser.destroy()`` method;
16159 added ``epilog`` for better help generation).
16160
16161- Bug #1473760: ``tempfile.TemporaryFile()`` could hang on Windows, when
16162 called from a thread spawned as a side effect of importing a module.
16163
16164- The pydoc module now supports documenting packages contained in
16165 .zip or .egg files.
16166
16167- The pkgutil module now has several new utility functions, such
16168 as ``walk_packages()`` to support working with packages that are either
16169 in the filesystem or zip files.
16170
16171- The mailbox module can now modify and delete messages from
16172 mailboxes, in addition to simply reading them. Thanks to Gregory
16173 K. Johnson for writing the code, and to the 2005 Google Summer of
16174 Code for funding his work.
16175
16176- The ``__del__`` method of class ``local`` in module ``_threading_local``
16177 returned before accomplishing any of its intended cleanup.
16178
16179- Patch #790710: Add breakpoint command lists in pdb.
16180
16181- Patch #1063914: Add Tkinter.Misc.clipboard_get().
16182
16183- Patch #1191700: Adjust column alignment in bdb breakpoint lists.
16184
16185- SimpleXMLRPCServer relied on the fcntl module, which is unavailable on
16186 Windows. Bug #1469163.
16187
16188- The warnings, linecache, inspect, traceback, site, and doctest modules
16189 were updated to work correctly with modules imported from zipfiles or
16190 via other PEP 302 __loader__ objects.
16191
16192- Patch #1467770: Reduce usage of subprocess._active to processes which
16193 the application hasn't waited on.
16194
16195- Patch #1462222: Fix Tix.Grid.
16196
16197- Fix exception when doing glob.glob('anything*/')
16198
16199- The pstats.Stats class accepts an optional stream keyword argument to
16200 direct output to an alternate file-like object.
16201
16202Build
16203-----
16204
16205- The Makefile now has a reindent target, which runs reindent.py on
16206 the library.
16207
16208- Patch #1470875: Building Python with MS Free Compiler
16209
16210- Patch #1161914: Add a python-config script.
16211
16212- Patch #1324762:Remove ccpython.cc; replace --with-cxx with
16213 --with-cxx-main. Link with C++ compiler only if --with-cxx-main was
16214 specified. (Can be overridden by explicitly setting LINKCC.) Decouple
16215 CXX from --with-cxx-main, see description in README.
16216
16217- Patch #1429775: Link extension modules with the shared libpython.
16218
16219- Fixed a libffi build problem on MIPS systems.
16220
16221- ``PyString_FromFormat``, ``PyErr_Format``, and ``PyString_FromFormatV``
16222 now accept formats "%u" for unsigned ints, "%lu" for unsigned longs,
16223 and "%zu" for unsigned integers of type ``size_t``.
16224
16225Tests
16226-----
16227
16228- test_contextlib now checks contextlib.nested can cope with exceptions
16229 being raised and caught inside exit handlers.
16230
16231- test_cmd_line now checks operation of the -m and -c command switches
16232
16233- The test_contextlib test in 2.5a1 wasn't actually run unless you ran
16234 it separately and by hand. It also wasn't cleaning up its changes to
16235 the current Decimal context.
16236
16237- regrtest.py now has a -M option to run tests that test the new limits of
16238 containers, on 64-bit architectures. Running these tests is only sensible
16239 on 64-bit machines with more than two gigabytes of memory. The argument
16240 passed is the maximum amount of memory for the tests to use.
16241
16242Tools
16243-----
16244
16245- Added the Python benchmark suite pybench to the Tools/ directory;
16246 contributed by Marc-Andre Lemburg.
16247
16248Documentation
16249-------------
16250
16251- Patch #1473132: Improve docs for ``tp_clear`` and ``tp_traverse``.
16252
16253- PEP 343: Added Context Types section to the library reference
16254 and attempted to bring other PEP 343 related documentation into
16255 line with the implementation and/or python-dev discussions.
16256
16257- Bug #1337990: clarified that ``doctest`` does not support examples
16258 requiring both expected output and an exception.
16259
16260
16261What's New in Python 2.5 alpha 1?
16262=================================
16263
16264*Release date: 05-APR-2006*
16265
16266Core and builtins
16267-----------------
16268
16269- PEP 338: -m command line switch now delegates to runpy.run_module
16270 allowing it to support modules in packages and zipfiles
16271
16272- On Windows, .DLL is not an accepted file name extension for
16273 extension modules anymore; extensions are only found if they
16274 end in .PYD.
16275
16276- Bug #1421664: sys.stderr.encoding is now set to the same value as
16277 sys.stdout.encoding.
16278
16279- __import__ accepts keyword arguments.
16280
16281- Patch #1460496: round() now accepts keyword arguments.
16282
16283- Fixed bug #1459029 - unicode reprs were double-escaped.
16284
16285- Patch #1396919: The system scope threads are reenabled on FreeBSD
16286 5.4 and later versions.
16287
16288- Bug #1115379: Compiling a Unicode string with an encoding declaration
16289 now gives a SyntaxError.
16290
16291- Previously, Python code had no easy way to access the contents of a
16292 cell object. Now, a ``cell_contents`` attribute has been added
16293 (closes patch #1170323).
16294
16295- Patch #1123430: Python's small-object allocator now returns an arena to
16296 the system ``free()`` when all memory within an arena becomes unused
16297 again. Prior to Python 2.5, arenas (256KB chunks of memory) were never
16298 freed. Some applications will see a drop in virtual memory size now,
16299 especially long-running applications that, from time to time, temporarily
16300 use a large number of small objects. Note that when Python returns an
16301 arena to the platform C's ``free()``, there's no guarantee that the
16302 platform C library will in turn return that memory to the operating system.
16303 The effect of the patch is to stop making that impossible, and in tests it
16304 appears to be effective at least on Microsoft C and gcc-based systems.
16305 Thanks to Evan Jones for hard work and patience.
16306
16307- Patch #1434038: property() now uses the getter's docstring if there is
16308 no "doc" argument given. This makes it possible to legitimately use
16309 property() as a decorator to produce a read-only property.
16310
16311- PEP 357, patch 1436368: add an __index__ method to int/long and a matching
16312 nb_index slot to the PyNumberMethods struct. The slot is consulted instead
16313 of requiring an int or long in slicing and a few other contexts, enabling
16314 other objects (e.g. Numeric Python's integers) to be used as slice indices.
16315
16316- Fixed various bugs reported by Coverity's Prevent tool.
16317
16318- PEP 352, patch #1104669: Make exceptions new-style objects. Introduced the
16319 new exception base class, BaseException, which has a new message attribute.
16320 KeyboardInterrupt and SystemExit to directly inherit from BaseException now.
16321 Raising a string exception now raises a DeprecationWarning.
16322
16323- Patch #1438387, PEP 328: relative and absolute imports. Imports can now be
16324 explicitly relative, using 'from .module import name' to mean 'from the same
16325 package as this module is in. Imports without dots still default to the
16326 old relative-then-absolute, unless 'from __future__ import
16327 absolute_import' is used.
16328
16329- Properly check if 'warnings' raises an exception (usually when a filter set
16330 to "error" is triggered) when raising a warning for raising string
16331 exceptions.
16332
16333- CO_GENERATOR_ALLOWED is no longer defined. This behavior is the default.
16334 The name was removed from Include/code.h.
16335
16336- PEP 308: conditional expressions were added: (x if cond else y).
16337
16338- Patch 1433928:
16339 - The copy module now "copies" function objects (as atomic objects).
16340 - dict.__getitem__ now looks for a __missing__ hook before raising
16341 KeyError.
16342
16343- PEP 343: with statement implemented. Needs ``from __future__ import
16344 with_statement``. Use of 'with' as a variable will generate a warning.
16345 Use of 'as' as a variable will also generate a warning (unless it's
16346 part of an import statement).
16347 The following objects have __context__ methods:
16348 - The built-in file type.
16349 - The thread.LockType type.
16350 - The following types defined by the threading module:
16351 Lock, RLock, Condition, Semaphore, BoundedSemaphore.
16352 - The decimal.Context class.
16353
16354- Fix the encodings package codec search function to only search
16355 inside its own package. Fixes problem reported in patch #1433198.
16356
16357 Note: Codec packages should implement and register their own
16358 codec search function. PEP 100 has the details.
16359
16360- PEP 353: Using ``Py_ssize_t`` as the index type.
16361
16362- ``PYMALLOC_DEBUG`` builds now add ``4*sizeof(size_t)`` bytes of debugging
16363 info to each allocated block, since the ``Py_ssize_t`` changes (PEP 353)
16364 now allow Python to make use of memory blocks exceeding 2**32 bytes for
16365 some purposes on 64-bit boxes. A ``PYMALLOC_DEBUG`` build was limited
16366 to 4-byte allocations before.
16367
16368- Patch #1400181, fix unicode string formatting to not use the locale.
16369 This is how string objects work. u'%f' could use , instead of .
16370 for the decimal point. Now both strings and unicode always use periods.
16371
16372- Bug #1244610, #1392915, fix build problem on OpenBSD 3.7 and 3.8.
16373 configure would break checking curses.h.
16374
Georg Brandl93dc9eb2010-03-14 10:56:14 +000016375- Bug #959576: The pwd module is now built in. This allows Python to be
Christian Heimesc3f30c42008-02-22 16:37:40 +000016376 built on UNIX platforms without $HOME set.
16377
16378- Bug #1072182, fix some potential problems if characters are signed.
16379
16380- Bug #889500, fix line number on SyntaxWarning for global declarations.
16381
16382- Bug #1378022, UTF-8 files with a leading BOM crashed the interpreter.
16383
16384- Support for converting hex strings to floats no longer works.
16385 This was not portable. float('0x3') now raises a ValueError.
16386
16387- Patch #1382163: Expose Subversion revision number to Python. New C API
16388 function Py_GetBuildNumber(). New attribute sys.subversion. Build number
16389 is now displayed in interactive prompt banner.
16390
16391- Implementation of PEP 341 - Unification of try/except and try/finally.
16392 "except" clauses can now be written together with a "finally" clause in
16393 one try statement instead of two nested ones. Patch #1355913.
16394
16395- Bug #1379994: Builtin unicode_escape and raw_unicode_escape codec
16396 now encodes backslash correctly.
16397
16398- Patch #1350409: Work around signal handling bug in Visual Studio 2005.
16399
16400- Bug #1281408: Py_BuildValue now works correctly even with unsigned longs
16401 and long longs.
16402
16403- SF Bug #1350188, "setdlopenflags" leads to crash upon "import"
16404 It was possible for dlerror() to return a NULL pointer, so
16405 it will now use a default error message in this case.
16406
16407- Replaced most Unicode charmap codecs with new ones using the
Georg Brandl93dc9eb2010-03-14 10:56:14 +000016408 new Unicode translate string feature in the built-in charmap
Christian Heimesc3f30c42008-02-22 16:37:40 +000016409 codec; the codecs were created from the mapping tables available
16410 at ftp.unicode.org and contain a few updates (e.g. the Mac OS
16411 encodings now include a mapping for the Apple logo)
16412
16413- Added a few more codecs for Mac OS encodings
16414
16415- Sped up some Unicode operations.
16416
16417- A new AST parser implementation was completed. The abstract
16418 syntax tree is available for read-only (non-compile) access
16419 to Python code; an _ast module was added.
16420
16421- SF bug #1167751: fix incorrect code being produced for generator expressions.
16422 The following code now raises a SyntaxError: foo(a = i for i in range(10))
16423
16424- SF Bug #976608: fix SystemError when mtime of an imported file is -1.
16425
16426- SF Bug #887946: fix segfault when redirecting stdin from a directory.
16427 Provide a warning when a directory is passed on the command line.
16428
16429- Fix segfault with invalid coding.
16430
16431- SF bug #772896: unknown encoding results in MemoryError.
16432
16433- All iterators now have a Boolean value of True. Formerly, some iterators
16434 supported a __len__() method which evaluated to False when the iterator
16435 was empty.
16436
16437- On 64-bit platforms, when __len__() returns a value that cannot be
16438 represented as a C int, raise OverflowError.
16439
16440- test__locale is skipped on OS X < 10.4 (only partial locale support is
16441 present).
16442
16443- SF bug #893549: parsing keyword arguments was broken with a few format
16444 codes.
16445
16446- Changes donated by Elemental Security to make it work on AIX 5.3
16447 with IBM's 64-bit compiler (SF patch #1284289). This also closes SF
16448 bug #105470: test_pwd fails on 64bit system (Opteron).
16449
16450- Changes donated by Elemental Security to make it work on HP-UX 11 on
16451 Itanium2 with HP's 64-bit compiler (SF patch #1225212).
16452
16453- Disallow keyword arguments for type constructors that don't use them
16454 (fixes bug #1119418).
16455
16456- Forward UnicodeDecodeError into SyntaxError for source encoding errors.
16457
16458- SF bug #900092: When tracing (e.g. for hotshot), restore 'return' events for
16459 exceptions that cause a function to exit.
16460
16461- The implementation of set() and frozenset() was revised to use its
16462 own internal data structure. Memory consumption is reduced by 1/3
16463 and there are modest speed-ups as well. The API is unchanged.
16464
16465- SF bug #1238681: freed pointer is used in longobject.c:long_pow().
16466
16467- SF bug #1229429: PyObject_CallMethod failed to decrement some
16468 reference counts in some error exit cases.
16469
16470- SF bug #1185883: Python's small-object memory allocator took over
16471 a block managed by the platform C library whenever a realloc specified
16472 a small new size. However, there's no portable way to know then how
16473 much of the address space following the pointer is valid, so there's no
16474 portable way to copy data from the C-managed block into Python's
16475 small-object space without risking a memory fault. Python's small-object
16476 realloc now leaves such blocks under the control of the platform C
16477 realloc.
16478
16479- SF bug #1232517: An overflow error was not detected properly when
16480 attempting to convert a large float to an int in os.utime().
16481
16482- SF bug #1224347: hex longs now print with lowercase letters just
16483 like their int counterparts.
16484
16485- SF bug #1163563: the original fix for bug #1010677 ("thread Module
16486 Breaks PyGILState_Ensure()") broke badly in the case of multiple
16487 interpreter states; back out that fix and do a better job (see
16488 http://mail.python.org/pipermail/python-dev/2005-June/054258.html
16489 for a longer write-up of the problem).
16490
16491- SF patch #1180995: marshal now uses a binary format by default when
16492 serializing floats.
16493
16494- SF patch #1181301: on platforms that appear to use IEEE 754 floats,
16495 the routines that promise to produce IEEE 754 binary representations
16496 of floats now simply copy bytes around.
16497
16498- bug #967182: disallow opening files with 'wU' or 'aU' as specified by PEP
16499 278.
16500
16501- patch #1109424: int, long, float, complex, and unicode now check for the
16502 proper magic slot for type conversions when subclassed. Previously the
16503 magic slot was ignored during conversion. Semantics now match the way
16504 subclasses of str always behaved. int/long/float, conversion of an instance
16505 to the base class has been moved to the proper nb_* magic slot and out of
16506 PyNumber_*().
Antoine Pitroufbd4f802012-08-11 16:51:50 +020016507 Thanks Walter Dörwald.
Christian Heimesc3f30c42008-02-22 16:37:40 +000016508
16509- Descriptors defined in C with a PyGetSetDef structure, where the setter is
16510 NULL, now raise an AttributeError when attempting to set or delete the
16511 attribute. Previously a TypeError was raised, but this was inconsistent
16512 with the equivalent pure-Python implementation.
16513
16514- It is now safe to call PyGILState_Release() before
16515 PyEval_InitThreads() (note that if there is reason to believe there
16516 are multiple threads around you still must call PyEval_InitThreads()
16517 before using the Python API; this fix is for extension modules that
16518 have no way of knowing if Python is multi-threaded yet).
16519
16520- Typing Ctrl-C whilst raw_input() was waiting in a build with threads
16521 disabled caused a crash.
16522
16523- Bug #1165306: instancemethod_new allowed the creation of a method
16524 with im_class == im_self == NULL, which caused a crash when called.
16525
16526- Move exception finalisation later in the shutdown process - this
16527 fixes the crash seen in bug #1165761
16528
16529- Added two new builtins, any() and all().
16530
16531- Defining a class with empty parentheses is now allowed
16532 (e.g., ``class C(): pass`` is no longer a syntax error).
16533 Patch #1176012 added support to the 'parser' module and 'compiler' package
16534 (thanks to logistix for that added support).
16535
16536- Patch #1115086: Support PY_LONGLONG in structmember.
16537
16538- Bug #1155938: new style classes did not check that __init__() was
16539 returning None.
16540
16541- Patch #802188: Report characters after line continuation character
16542 ('\') with a specific error message.
16543
16544- Bug #723201: Raise a TypeError for passing bad objects to 'L' format.
16545
16546- Bug #1124295: the __name__ attribute of file objects was
16547 inadvertently made inaccessible in restricted mode.
16548
16549- Bug #1074011: closing sys.std{out,err} now causes a flush() and
16550 an ferror() call.
16551
16552- min() and max() now support key= arguments with the same meaning as in
16553 list.sort().
16554
16555- The peephole optimizer now performs simple constant folding in expressions:
16556 (2+3) --> (5).
16557
16558- set and frozenset objects can now be marshalled. SF #1098985.
16559
16560- Bug #1077106: Poor argument checking could cause memory corruption
16561 in calls to os.read().
16562
16563- The parser did not complain about future statements in illegal
16564 positions. It once again reports a syntax error if a future
16565 statement occurs after anything other than a doc string.
16566
16567- Change the %s format specifier for str objects so that it returns a
16568 unicode instance if the argument is not an instance of basestring and
16569 calling __str__ on the argument returns a unicode instance.
16570
16571- Patch #1413181: changed ``PyThreadState_Delete()`` to forget about the
16572 current thread state when the auto-GIL-state machinery knows about
16573 it (since the thread state is being deleted, continuing to remember it
16574 can't help, but can hurt if another thread happens to get created with
16575 the same thread id).
16576
16577Extension Modules
16578-----------------
16579
16580- Patch #1380952: fix SSL objects timing out on consecutive read()s
16581
16582- Patch #1309579: wait3 and wait4 were added to the posix module.
16583
16584- Patch #1231053: The audioop module now supports encoding/decoding of alaw.
16585 In addition, the existing ulaw code was updated.
16586
16587- RFE #567972: Socket objects' family, type and proto properties are
16588 now exposed via new attributes.
16589
16590- Everything under lib-old was removed. This includes the following modules:
16591 Para, addpack, cmp, cmpcache, codehack, dircmp, dump, find, fmt, grep,
16592 lockfile, newdir, ni, packmail, poly, rand, statcache, tb, tzparse,
16593 util, whatsound, whrandom, zmod
16594
16595- The following modules were removed: regsub, reconvert, regex, regex_syntax.
16596
16597- re and sre were swapped, so help(re) provides full help. importing sre
16598 is deprecated. The undocumented re.engine variable no longer exists.
16599
16600- Bug #1448490: Fixed a bug that ISO-2022 codecs could not handle
16601 SS2 (single-shift 2) escape sequences correctly.
16602
16603- The unicodedata module was updated to the 4.1 version of the Unicode
16604 database. The 3.2 version is still available as unicodedata.db_3_2_0
16605 for applications that require this specific version (such as IDNA).
16606
16607- The timing module is no longer built by default. It was deprecated
16608 in PEP 4 in Python 2.0 or earlier.
16609
16610- Patch 1433928: Added a new type, defaultdict, to the collections module.
16611 This uses the new __missing__ hook behavior added to dict (see above).
16612
16613- Bug #854823: socketmodule now builds on Sun platforms even when
16614 INET_ADDRSTRLEN is not defined.
16615
16616- Patch #1393157: os.startfile() now has an optional argument to specify
16617 a "command verb" to invoke on the file.
16618
16619- Bug #876637, prevent stack corruption when socket descriptor
16620 is larger than FD_SETSIZE.
16621
16622- Patch #1407135, bug #1424041: harmonize mmap behavior of anonymous memory.
16623 mmap.mmap(-1, size) now returns anonymous memory in both Unix and Windows.
16624 mmap.mmap(0, size) should not be used on Windows for anonymous memory.
16625
16626- Patch #1422385: The nis module now supports access to domains other
16627 than the system default domain.
16628
16629- Use Win32 API to implement os.stat/fstat. As a result, subsecond timestamps
16630 are reported, the limit on path name lengths is removed, and stat reports
16631 WindowsError now (instead of OSError).
16632
16633- Add bsddb.db.DBEnv.set_tx_timestamp allowing time based database recovery.
16634
16635- Bug #1413192, fix seg fault in bsddb if a transaction was deleted
16636 before the env.
16637
16638- Patch #1103116: Basic AF_NETLINK support.
16639
16640- Bug #1402308, (possible) segfault when using mmap.mmap(-1, ...)
16641
16642- Bug #1400822, _curses over{lay,write} doesn't work when passing 6 ints.
16643 Also fix ungetmouse() which did not accept arguments properly.
16644 The code now conforms to the documented signature.
16645
16646- Bug #1400115, Fix segfault when calling curses.panel.userptr()
16647 without prior setting of the userptr.
16648
16649- Fix 64-bit problems in bsddb.
16650
16651- Patch #1365916: fix some unsafe 64-bit mmap methods.
16652
16653- Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn build
16654 problem on AIX.
16655
16656- Bug #869197: os.setgroups rejects long integer arguments
16657
16658- Bug #1346533, select.poll() doesn't raise an error if timeout > sys.maxint
16659
16660- Bug #1344508, Fix UNIX mmap leaking file descriptors
16661
16662- Patch #1338314, Bug #1336623: fix tarfile so it can extract
16663 REGTYPE directories from tarfiles written by old programs.
16664
16665- Patch #1407992, fixes broken bsddb module db associate when using
16666 BerkeleyDB 3.3, 4.0 or 4.1.
16667
16668- Get bsddb module to build with BerkeleyDB version 4.4
16669
16670- Get bsddb module to build with BerkeleyDB version 3.2
16671
16672- Patch #1309009, Fix segfault in pyexpat when the XML document is in latin_1,
16673 but Python incorrectly assumes it is in UTF-8 format
16674
16675- Fix parse errors in the readline module when compiling without threads.
16676
16677- Patch #1288833: Removed thread lock from socket.getaddrinfo on
16678 FreeBSD 5.3 and later versions which got thread-safe getaddrinfo(3).
16679
16680- Patches #1298449 and #1298499: Add some missing checks for error
16681 returns in cStringIO.c.
16682
16683- Patch #1297028: fix segfault if call type on MultibyteCodec,
16684 MultibyteStreamReader, or MultibyteStreamWriter
16685
16686- Fix memory leak in posix.access().
16687
16688- Patch #1213831: Fix typo in unicodedata._getcode.
16689
16690- Bug #1007046: os.startfile() did not accept unicode strings encoded in
16691 the file system encoding.
16692
16693- Patch #756021: Special-case socket.inet_aton('255.255.255.255') for
16694 platforms that don't have inet_aton().
16695
16696- Bug #1215928: Fix bz2.BZ2File.seek() for 64-bit file offsets.
16697
16698- Bug #1191043: Fix bz2.BZ2File.(x)readlines for files containing one
16699 line without newlines.
16700
16701- Bug #728515: mmap.resize() now resizes the file on Unix as it did
16702 on Windows.
16703
16704- Patch #1180695: Add nanosecond stat resolution, and st_gen,
16705 st_birthtime for FreeBSD.
16706
16707- Patch #1231069: The fcntl.ioctl function now uses the 'I' code for
16708 the request code argument, which results in more C-like behaviour
16709 for large or negative values.
16710
16711- Bug #1234979: For the argument of thread.Lock.acquire, the Windows
16712 implementation treated all integer values except 1 as false.
16713
16714- Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.
16715
Serhiy Storchakad65c9492015-11-02 14:10:23 +020016716- Patch #1212117: os.stat().st_flags is now accessible as an attribute
Christian Heimesc3f30c42008-02-22 16:37:40 +000016717 if available on the platform.
16718
16719- Patch #1103951: Expose O_SHLOCK and O_EXLOCK in the posix module if
16720 available on the platform.
16721
16722- Bug #1166660: The readline module could segfault if hook functions
16723 were set in a different thread than that which called readline.
16724
16725- collections.deque objects now support a remove() method.
16726
16727- operator.itemgetter() and operator.attrgetter() now support retrieving
16728 multiple fields. This provides direct support for sorting on multiple
16729 keys (primary, secondary, etc).
16730
16731- os.access now supports Unicode path names on non-Win32 systems.
16732
16733- Patches #925152, #1118602: Avoid reading after the end of the buffer
16734 in pyexpat.GetInputContext.
16735
16736- Patches #749830, #1144555: allow UNIX mmap size to default to current
16737 file size.
16738
16739- Added functional.partial(). See PEP309.
16740
16741- Patch #1093585: raise a ValueError for negative history items in readline.
16742 {remove_history,replace_history}
16743
16744- The spwd module has been added, allowing access to the shadow password
16745 database.
16746
16747- stat_float_times is now True.
16748
16749- array.array objects are now picklable.
16750
16751- the cPickle module no longer accepts the deprecated None option in the
16752 args tuple returned by __reduce__().
16753
16754- itertools.islice() now accepts None for the start and step arguments.
16755 This allows islice() to work more readily with slices:
16756 islice(s.start, s.stop, s.step)
16757
16758- datetime.datetime() now has a strptime class method which can be used to
16759 create datetime object using a string and format.
16760
16761- Patch #1117961: Replace the MD5 implementation from RSA Data Security Inc
16762 with the implementation from http://sourceforge.net/projects/libmd5-rfc/.
16763
16764Library
16765-------
16766
16767- Patch #1388073: Numerous __-prefixed attributes of unittest.TestCase have
16768 been renamed to have only a single underscore prefix. This was done to
16769 make subclassing easier.
16770
16771- PEP 338: new module runpy defines a run_module function to support
16772 executing modules which provide access to source code or a code object
16773 via the PEP 302 import mechanisms.
16774
16775- The email module's parsedate_tz function now sets the daylight savings
16776 flag to -1 (unknown) since it can't tell from the date whether it should
16777 be set.
16778
16779- Patch #624325: urlparse.urlparse() and urlparse.urlsplit() results
16780 now sport attributes that provide access to the parts of the result.
16781
16782- Patch #1462498: sgmllib now handles entity and character references
16783 in attribute values.
16784
16785- Added the sqlite3 package. This is based on pysqlite2.1.3, and provides
16786 a DB-API interface in the standard library. You'll need sqlite 3.0.8 or
16787 later to build this - if you have an earlier version, the C extension
16788 module will not be built.
16789
16790- Bug #1460340: ``random.sample(dict)`` failed in various ways. Dicts
16791 aren't officially supported here, and trying to use them will probably
16792 raise an exception some day. But dicts have been allowed, and "mostly
16793 worked", so support for them won't go away without warning.
16794
16795- Bug #1445068: getpass.getpass() can now be given an explicit stream
16796 argument to specify where to write the prompt.
16797
16798- Patch #1462313, bug #1443328: the pickle modules now can handle classes
16799 that have __private names in their __slots__.
16800
16801- Bug #1250170: mimetools now handles socket.gethostname() failures gracefully.
16802
16803- patch #1457316: "setup.py upload" now supports --identity to select the
16804 key to be used for signing the uploaded code.
16805
16806- Queue.Queue objects now support .task_done() and .join() methods
16807 to make it easier to monitor when daemon threads have completed
16808 processing all enqueued tasks. Patch #1455676.
16809
16810- popen2.Popen objects now preserve the command in a .cmd attribute.
16811
16812- Added the ctypes ffi package.
16813
16814- email 4.0 package now integrated. This is largely the same as the email 3.0
16815 package that was included in Python 2.3, except that PEP 8 module names are
16816 now used (e.g. mail.message instead of email.Message). The MIME classes
16817 have been moved to a subpackage (e.g. email.mime.text instead of
16818 email.MIMEText). The old names are still supported for now. Several
16819 deprecated Message methods have been removed and lots of bugs have been
16820 fixed. More details can be found in the email package documentation.
16821
16822- Patches #1436130/#1443155: codecs.lookup() now returns a CodecInfo object
16823 (a subclass of tuple) that provides incremental decoders and encoders
16824 (a way to use stateful codecs without the stream API). Python functions
16825 codecs.getincrementaldecoder() and codecs.getincrementalencoder() as well
16826 as C functions PyCodec_IncrementalEncoder() and PyCodec_IncrementalDecoder()
16827 have been added.
16828
16829- Patch #1359365: Calling next() on a closed StringIO.String object raises
16830 a ValueError instead of a StopIteration now (like file and cString.String do).
16831 cStringIO.StringIO.isatty() will raise a ValueError now if close() has been
16832 called before (like file and StringIO.StringIO do).
16833
16834- A regrtest option -w was added to re-run failed tests in verbose mode.
16835
16836- Patch #1446372: quit and exit can now be called from the interactive
16837 interpreter to exit.
16838
16839- The function get_count() has been added to the gc module, and gc.collect()
16840 grew an optional 'generation' argument.
16841
16842- A library msilib to generate Windows Installer files, and a distutils
16843 command bdist_msi have been added.
16844
16845- PEP 343: new module contextlib.py defines decorator @contextmanager
16846 and helpful context managers nested() and closing().
16847
16848- The compiler package now supports future imports after the module docstring.
16849
16850- Bug #1413790: zipfile now sanitizes absolute archive names that are
16851 not allowed by the specs.
16852
16853- Patch #1215184: FileInput now can be given an opening hook which can
16854 be used to control how files are opened.
16855
16856- Patch #1212287: fileinput.input() now has a mode parameter for
16857 specifying the file mode input files should be opened with.
16858
16859- Patch #1215184: fileinput now has a fileno() function for getting the
16860 current file number.
16861
16862- Patch #1349274: gettext.install() now optionally installs additional
Georg Brandl93dc9eb2010-03-14 10:56:14 +000016863 translation functions other than _() in the builtins namespace.
Christian Heimesc3f30c42008-02-22 16:37:40 +000016864
16865- Patch #1337756: fileinput now accepts Unicode filenames.
16866
16867- Patch #1373643: The chunk module can now read chunks larger than
16868 two gigabytes.
16869
16870- Patch #1417555: SimpleHTTPServer now returns Last-Modified headers.
16871
16872- Bug #1430298: It is now possible to send a mail with an empty
16873 return address using smtplib.
16874
16875- Bug #1432260: The names of lambda functions are now properly displayed
16876 in pydoc.
16877
16878- Patch #1412872: zipfile now sets the creator system to 3 (Unix)
16879 unless the system is Win32.
16880
16881- Patch #1349118: urllib now supports user:pass@ style proxy
16882 specifications, raises IOErrors when proxies for unsupported protocols
16883 are defined, and uses the https proxy on https redirections.
16884
16885- Bug #902075: urllib2 now supports 'host:port' style proxy specifications.
16886
16887- Bug #1407902: Add support for sftp:// URIs to urlparse.
16888
16889- Bug #1371247: Update Windows locale identifiers in locale.py.
16890
16891- Bug #1394565: SimpleHTTPServer now doesn't choke on query parameters
16892 any more.
16893
16894- Bug #1403410: The warnings module now doesn't get confused
16895 when it can't find out the module name it generates a warning for.
16896
16897- Patch #1177307: Added a new codec utf_8_sig for UTF-8 with a BOM signature.
16898
16899- Patch #1157027: cookielib mishandles RFC 2109 cookies in Netscape mode
16900
16901- Patch #1117398: cookielib.LWPCookieJar and .MozillaCookieJar now raise
16902 LoadError as documented, instead of IOError. For compatibility,
16903 LoadError subclasses IOError.
16904
16905- Added the hashlib module. It provides secure hash functions for MD5 and
16906 SHA1, 224, 256, 384, and 512. Note that recent developments make the
16907 historic MD5 and SHA1 unsuitable for cryptographic-strength applications.
16908 In <http://mail.python.org/pipermail/python-dev/2005-December/058850.html>
16909 Ronald L. Rivest offered this advice for Python:
16910
16911 "The consensus of researchers in this area (at least as
16912 expressed at the NIST Hash Function Workshop 10/31/05),
16913 is that SHA-256 is a good choice for the time being, but
16914 that research should continue, and other alternatives may
16915 arise from this research. The larger SHA's also seem OK."
16916
16917- Added a subset of Fredrik Lundh's ElementTree package. Available
16918 modules are xml.etree.ElementTree, xml.etree.ElementPath, and
16919 xml.etree.ElementInclude, from ElementTree 1.2.6.
16920
16921- Patch #1162825: Support non-ASCII characters in IDLE window titles.
16922
16923- Bug #1365984: urllib now opens "data:" URLs again.
16924
16925- Patch #1314396: prevent deadlock for threading.Thread.join() when an exception
16926 is raised within the method itself on a previous call (e.g., passing in an
16927 illegal argument)
16928
16929- Bug #1340337: change time.strptime() to always return ValueError when there
16930 is an error in the format string.
16931
16932- Patch #754022: Greatly enhanced webbrowser.py (by Oleg Broytmann).
16933
16934- Bug #729103: pydoc.py: Fix docother() method to accept additional
16935 "parent" argument.
16936
16937- Patch #1300515: xdrlib.py: Fix pack_fstring() to really use null bytes
16938 for padding.
16939
16940- Bug #1296004: httplib.py: Limit maximal amount of data read from the
16941 socket to avoid a MemoryError on Windows.
16942
16943- Patch #1166948: locale.py: Prefer LC_ALL, LC_CTYPE and LANG over LANGUAGE
16944 to get the correct encoding.
16945
16946- Patch #1166938: locale.py: Parse LANGUAGE as a colon separated list of
16947 languages.
16948
16949- Patch #1268314: Cache lines in StreamReader.readlines for performance.
16950
16951- Bug #1290505: Fix clearing the regex cache for time.strptime().
16952
16953- Bug #1167128: Fix size of a symlink in a tarfile to be 0.
16954
16955- Patch #810023: Fix off-by-one bug in urllib.urlretrieve reporthook
16956 functionality.
16957
16958- Bug #1163178: Make IDNA return an empty string when the input is empty.
16959
16960- Patch #848017: Make Cookie more RFC-compliant. Use CRLF as default output
16961 separator and do not output trailing semicolon.
16962
16963- Patch #1062060: urllib.urlretrieve() now raises a new exception, named
16964 ContentTooShortException, when the actually downloaded size does not
16965 match the Content-Length header.
16966
16967- Bug #1121494: distutils.dir_utils.mkpath now accepts Unicode strings.
16968
16969- Bug #1178484: Return complete lines from codec stream readers
16970 even if there is an exception in later lines, resulting in
16971 correct line numbers for decoding errors in source code.
16972
16973- Bug #1192315: Disallow negative arguments to clear() in pdb.
16974
16975- Patch #827386: Support absolute source paths in msvccompiler.py.
16976
16977- Patch #1105730: Apply the new implementation of commonprefix in posixpath
16978 to ntpath, macpath, os2emxpath and riscospath.
16979
16980- Fix a problem in Tkinter introduced by SF patch #869468: delete bogus
16981 __hasattr__ and __delattr__ methods on class Tk that were breaking
16982 Tkdnd.
16983
16984- Bug #1015140: disambiguated the term "article id" in nntplib docs and
16985 docstrings to either "article number" or "message id".
16986
16987- Bug #1238170: threading.Thread.__init__ no longer has "kwargs={}" as a
16988 parameter, but uses the usual "kwargs=None".
16989
16990- textwrap now processes text chunks at O(n) speed instead of O(n**2).
16991 Patch #1209527 (Contributed by Connelly).
16992
16993- urllib2 has now an attribute 'httpresponses' mapping from HTTP status code
16994 to W3C name (404 -> 'Not Found'). RFE #1216944.
16995
16996- Bug #1177468: Don't cache the /dev/urandom file descriptor for os.urandom,
16997 as this can cause problems with apps closing all file descriptors.
16998
16999- Bug #839151: Fix an attempt to access sys.argv in the warnings module;
17000 it can be missing in embedded interpreters
17001
17002- Bug #1155638: Fix a bug which affected HTTP 0.9 responses in httplib.
17003
17004- Bug #1100201: Cross-site scripting was possible on BaseHTTPServer via
17005 error messages.
17006
17007- Bug #1108948: Cookie.py produced invalid JavaScript code.
17008
17009- The tokenize module now detects and reports indentation errors.
17010 Bug #1224621.
17011
17012- The tokenize module has a new untokenize() function to support a full
17013 roundtrip from lexed tokens back to Python source code. In addition,
17014 the generate_tokens() function now accepts a callable argument that
17015 terminates by raising StopIteration.
17016
17017- Bug #1196315: fix weakref.WeakValueDictionary constructor.
17018
17019- Bug #1213894: os.path.realpath didn't resolve symlinks that were the first
17020 component of the path.
17021
17022- Patch #1120353: The xmlrpclib module provides better, more transparent,
17023 support for datetime.{datetime,date,time} objects. With use_datetime set
17024 to True, applications shouldn't have to fiddle with the DateTime wrapper
17025 class at all.
17026
17027- distutils.commands.upload was added to support uploading distribution
17028 files to PyPI.
17029
17030- distutils.commands.register now encodes the data as UTF-8 before posting
17031 them to PyPI.
17032
17033- decimal operator and comparison methods now return NotImplemented
17034 instead of raising a TypeError when interacting with other types. This
17035 allows other classes to implement __radd__ style methods and have them
17036 work as expected.
17037
17038- Bug #1163325: Decimal infinities failed to hash. Attempting to
17039 hash a NaN raised an InvalidOperation instead of a TypeError.
17040
17041- Patch #918101: Add tarfile open mode r|* for auto-detection of the
17042 stream compression; add, for symmetry reasons, r:* as a synonym of r.
17043
17044- Patch #1043890: Add extractall method to tarfile.
17045
17046- Patch #1075887: Don't require MSVC in distutils if there is nothing
17047 to build.
17048
17049- Patch #1103407: Properly deal with tarfile iterators when untarring
17050 symbolic links on Windows.
17051
17052- Patch #645894: Use getrusage for computing the time consumption in
17053 profile.py if available.
17054
17055- Patch #1046831: Use get_python_version where appropriate in sysconfig.py.
17056
17057- Patch #1117454: Remove code to special-case cookies without values
17058 in LWPCookieJar.
17059
17060- Patch #1117339: Add cookielib special name tests.
17061
17062- Patch #1112812: Make bsddb/__init__.py more friendly for modulefinder.
17063
17064- Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush.
17065
Martin Panterc04fb562016-02-10 05:44:01 +000017066- Patch #1107973: Allow iterating over the lines of a tarfile.ExFileObject.
Christian Heimesc3f30c42008-02-22 16:37:40 +000017067
17068- Patch #1104111: Alter setup.py --help and --help-commands.
17069
17070- Patch #1121234: Properly cleanup _exit and tkerror commands.
17071
17072- Patch #1049151: xdrlib now unpacks booleans as True or False.
17073
17074- Fixed bug in a NameError bug in cookielib. Patch #1116583.
17075
17076- Applied a security fix to SimpleXMLRPCserver (PSF-2005-001). This
17077 disables recursive traversal through instance attributes, which can
17078 be exploited in various ways.
17079
17080- Bug #1222790: in SimpleXMLRPCServer, set the reuse-address and close-on-exec
17081 flags on the HTTP listening socket.
17082
17083- Bug #792570: SimpleXMLRPCServer had problems if the request grew too large.
17084 Fixed by reading the HTTP body in chunks instead of one big socket.read().
17085
17086- Patches #893642, #1039083: add allow_none, encoding arguments to
17087 constructors of SimpleXMLRPCServer and CGIXMLRPCRequestHandler.
17088
17089- Bug #1110478: Revert os.environ.update to do putenv again.
17090
17091- Bug #1103844: fix distutils.install.dump_dirs() with negated options.
17092
17093- os.{SEEK_SET, SEEK_CUR, SEEK_END} have been added for convenience.
17094
17095- Enhancements to the csv module:
17096
17097 + Dialects are now validated by the underlying C code, better
17098 reflecting its capabilities, and improving its compliance with
17099 PEP 305.
17100 + Dialect parameter parsing has been re-implemented to improve error
17101 reporting.
17102 + quotechar=None and quoting=QUOTE_NONE now work the way PEP 305
17103 dictates.
17104 + the parser now removes the escapechar prefix from escaped characters.
17105 + when quoting=QUOTE_NONNUMERIC, the writer now tests for numeric
17106 types, rather than any object that can be represented as a numeric.
17107 + when quoting=QUOTE_NONNUMERIC, the reader now casts unquoted fields
17108 to floats.
17109 + reader now allows \r characters to be quoted (previously it only allowed
17110 \n to be quoted).
17111 + writer doublequote handling improved.
17112 + Dialect classes passed to the module are no longer instantiated by
17113 the module before being parsed (the former validation scheme required
17114 this, but the mechanism was unreliable).
17115 + The dialect registry now contains instances of the internal
17116 C-coded dialect type, rather than references to python objects.
17117 + the internal c-coded dialect type is now immutable.
17118 + register_dialect now accepts the same keyword dialect specifications
17119 as the reader and writer, allowing the user to register dialects
17120 without first creating a dialect class.
17121 + a configurable limit to the size of parsed fields has been added -
17122 previously, an unmatched quote character could result in the entire
17123 file being read into the field buffer before an error was reported.
17124 + A new module method csv.field_size_limit() has been added that sets
17125 the parser field size limit (returning the former limit). The initial
17126 limit is 128kB.
17127 + A line_num attribute has been added to the reader object, which tracks
17128 the number of lines read from the source iterator. This is not
17129 the same as the number of records returned, as records can span
17130 multiple lines.
17131 + reader and writer objects were not being registered with the cyclic-GC.
17132 This has been fixed.
17133
17134- _DummyThread objects in the threading module now delete self.__block that is
17135 inherited from _Thread since it uses up a lock allocated by 'thread'. The
17136 lock primitives tend to be limited in number and thus should not be wasted on
17137 a _DummyThread object. Fixes bug #1089632.
17138
17139- The imghdr module now detects Exif files.
17140
17141- StringIO.truncate() now correctly adjusts the size attribute.
17142 (Bug #951915).
17143
17144- locale.py now uses an updated locale alias table (built using
17145 Tools/i18n/makelocalealias.py, a tool to parse the X11 locale
17146 alias file); the encoding lookup was enhanced to use Python's
17147 encoding alias table.
17148
17149- moved deprecated modules to Lib/lib-old: whrandom, tzparse, statcache.
17150
17151- the pickle module no longer accepts the deprecated None option in the
17152 args tuple returned by __reduce__().
17153
17154- optparse now optionally imports gettext. This allows its use in setup.py.
17155
17156- the pickle module no longer uses the deprecated bin parameter.
17157
17158- the shelve module no longer uses the deprecated binary parameter.
17159
17160- the pstats module no longer uses the deprecated ignore() method.
17161
17162- the filecmp module no longer uses the deprecated use_statcache argument.
17163
17164- unittest.TestCase.run() and unittest.TestSuite.run() can now be successfully
17165 extended or overridden by subclasses. Formerly, the subclassed method would
17166 be ignored by the rest of the module. (Bug #1078905).
17167
17168- heapq.nsmallest() and heapq.nlargest() now support key= arguments with
17169 the same meaning as in list.sort().
17170
17171- Bug #1076985: ``codecs.StreamReader.readline()`` now calls ``read()`` only
17172 once when a size argument is given. This prevents a buffer overflow in the
17173 tokenizer with very long source lines.
17174
17175- Bug #1083110: ``zlib.decompress.flush()`` would segfault if called
17176 immediately after creating the object, without any intervening
17177 ``.decompress()`` calls.
17178
17179- The reconvert.quote function can now emit triple-quoted strings. The
17180 reconvert module now has some simple documentation.
17181
17182- ``UserString.MutableString`` now supports negative indices in
17183 ``__setitem__`` and ``__delitem__``
17184
17185- Bug #1149508: ``textwrap`` now handles hyphenated numbers (eg. "2004-03-05")
17186 correctly.
17187
17188- Partial fixes for SF bugs #1163244 and #1175396: If a chunk read by
17189 ``codecs.StreamReader.readline()`` has a trailing "\r", read one more
17190 character even if the user has passed a size parameter to get a proper
17191 line ending. Remove the special handling of a "\r\n" that has been split
17192 between two lines.
17193
17194- Bug #1251300: On UCS-4 builds the "unicode-internal" codec will now complain
17195 about illegal code points. The codec now supports PEP 293 style error
17196 handlers.
17197
17198- Bug #1235646: ``codecs.StreamRecoder.next()`` now reencodes the data it reads
17199 from the input stream, so that the output is a byte string in the correct
17200 encoding instead of a unicode string.
17201
17202- Bug #1202493: Fixing SRE parser to handle '{}' as perl does, rather than
17203 considering it exactly like a '*'.
17204
17205- Bug #1245379: Add "unicode-1-1-utf-7" as an alias for "utf-7" to
17206 ``encodings.aliases``.
17207
17208- ` uu.encode()`` and ``uu.decode()`` now support unicode filenames.
17209
17210- Patch #1413711: Certain patterns of differences were making difflib
17211 touch the recursion limit.
17212
17213- Bug #947906: An object oriented interface has been added to the calendar
17214 module. It's possible to generate HTML calendar now and the module can be
17215 called as a script (e.g. via ``python -mcalendar``). Localized month and
Martin Panter0be894b2016-09-07 12:03:06 +000017216 weekday names can be output (even if an exotic encoding is used) using
Christian Heimesc3f30c42008-02-22 16:37:40 +000017217 special classes that use unicode.
17218
17219Build
17220-----
17221
17222- Fix test_float, test_long, and test_struct failures on Tru64 with gcc
17223 by using -mieee gcc option.
17224
17225- Patch #1432345: Make python compile on DragonFly.
17226
17227- Build support for Win64-AMD64 was added.
17228
17229- Patch #1428494: Prefer linking against ncursesw over ncurses library.
17230
17231- Patch #881820: look for openpty and forkpty also in libbsd.
17232
17233- The sources of zlib are now part of the Python distribution (zlib 1.2.3).
Georg Brandl93dc9eb2010-03-14 10:56:14 +000017234 The zlib module is now built in on Windows.
Christian Heimesc3f30c42008-02-22 16:37:40 +000017235
17236- Use -xcode=pic32 for CCSHARED on Solaris with SunPro.
17237
17238- Bug #1189330: configure did not correctly determine the necessary
17239 value of LINKCC if python was built with GCC 4.0.
17240
17241- Upgrade Windows build to zlib 1.2.3 which eliminates a potential security
17242 vulnerability in zlib 1.2.1 and 1.2.2.
17243
17244- EXTRA_CFLAGS has been introduced as an environment variable to hold compiler
17245 flags that change binary compatibility. Changes were also made to
17246 distutils.sysconfig to also use the environment variable when used during
17247 compilation of the interpreter and of C extensions through distutils.
17248
17249- SF patch 1171735: Darwin 8's headers are anal about POSIX compliance,
17250 and linking has changed (prebinding is now deprecated, and libcc_dynamic
17251 no longer exists). This configure patch makes things right.
17252
17253- Bug #1158607: Build with --disable-unicode again.
17254
17255- spwdmodule.c is built only if either HAVE_GETSPNAM or HAVE_HAVE_GETSPENT is
17256 defined. Discovered as a result of not being able to build on OS X.
17257
17258- setup.py now uses the directories specified in LDFLAGS using the -L option
17259 and in CPPFLAGS using the -I option for adding library and include
17260 directories, respectively, for compiling extension modules against. This has
17261 led to the core being compiled using the values in CPPFLAGS. It also removes
17262 the need for the special-casing of both DarwinPorts and Fink for darwin since
17263 the proper directories can be specified in LDFLAGS (``-L/sw/lib`` for Fink,
17264 ``-L/opt/local/lib`` for DarwinPorts) and CPPFLAGS (``-I/sw/include`` for
17265 Fink, ``-I/opt/local/include`` for DarwinPorts).
17266
17267- Test in configure.in that checks for tzset no longer dependent on tm->tm_zone
17268 to exist in the struct (not required by either ISO C nor the UNIX 2 spec).
17269 Tests for sanity in tzname when HAVE_TZNAME defined were also defined.
17270 Closes bug #1096244. Thanks Gregory Bond.
17271
17272C API
17273-----
17274
17275- ``PyMem_{Del, DEL}`` and ``PyMem_{Free, FREE}`` no longer map to
17276 ``PyObject_{Free, FREE}``. They map to the system ``free()`` now. If memory
17277 is obtained via the ``PyObject_`` family, it must be released via the
17278 ``PyObject_`` family, and likewise for the ``PyMem_`` family. This has
17279 always been officially true, but when Python's small-object allocator was
17280 introduced, an attempt was made to cater to a few extension modules
17281 discovered at the time that obtained memory via ``PyObject_New`` but
17282 released it via ``PyMem_DEL``. It's years later, and if such code still
17283 exists it will fail now (probably with segfaults, but calling wrong
17284 low-level memory management functions can yield many symptoms).
17285
17286- Added a C API for set and frozenset objects.
17287
17288- Removed PyRange_New().
17289
17290- Patch #1313939: PyUnicode_DecodeCharmap() accepts a unicode string as the
17291 mapping argument now. This string is used as a mapping table. Byte values
17292 greater than the length of the string and 0xFFFE are treated as undefined
17293 mappings.
17294
17295
17296Tests
17297-----
17298
17299- In test_os, st_?time is now truncated before comparing it with ST_?TIME.
17300
17301- Patch #1276356: New resource "urlfetch" is implemented. This enables
17302 even impatient people to run tests that require remote files.
17303
17304
17305Documentation
17306-------------
17307
17308- Bug #1402224: Add warning to dl docs about crashes.
17309
17310- Bug #1396471: Document that Windows' ftell() can return invalid
17311 values for text files with UNIX-style line endings.
17312
17313- Bug #1274828: Document os.path.splitunc().
17314
17315- Bug #1190204: Clarify which directories are searched by site.py.
17316
17317- Bug #1193849: Clarify os.path.expanduser() documentation.
17318
17319- Bug #1243192: re.UNICODE and re.LOCALE affect \d, \D, \s and \S.
17320
17321- Bug #755617: Document the effects of os.chown() on Windows.
17322
17323- Patch #1180012: The documentation for modulefinder is now in the library reference.
17324
17325- Patch #1213031: Document that os.chown() accepts argument values of -1.
17326
17327- Bug #1190563: Document os.waitpid() return value with WNOHANG flag.
17328
17329- Bug #1175022: Correct the example code for property().
17330
17331- Document the IterableUserDict class in the UserDict module.
17332 Closes bug #1166582.
17333
17334- Remove all latent references for "Macintosh" that referred to semantics for
17335 Mac OS 9 and change to reflect the state for OS X.
17336 Closes patch #1095802. Thanks Jack Jansen.
17337
17338Mac
17339---
17340
17341
17342New platforms
17343-------------
17344
17345- FreeBSD 7 support is added.
17346
17347
17348Tools/Demos
17349-----------
17350
17351- Created Misc/Vim/vim_syntax.py to auto-generate a python.vim file in that
17352 directory for syntax highlighting in Vim. Vim directory was added and placed
17353 vimrc to it (was previous up a level).
17354
17355- Added two new files to Tools/scripts: pysource.py, which recursively
17356 finds Python source files, and findnocoding.py, which finds Python
17357 source files that need an encoding declaration.
17358 Patch #784089, credits to Oleg Broytmann.
17359
17360- Bug #1072853: pindent.py used an uninitialized variable.
17361
17362- Patch #1177597: Correct Complex.__init__.
17363
17364- Fixed a display glitch in Pynche, which could cause the right arrow to
17365 wiggle over by a pixel.
17366
17367
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017368What's New in Python 2.4 final?
17369===============================
17370
17371*Release date: 30-NOV-2004*
17372
17373Core and builtins
17374-----------------
17375
17376- Bug 875692: Improve signal handling, especially when using threads, by
17377 forcing an early re-execution of PyEval_EvalFrame() "periodic" code when
17378 things_to_do is not cleared by Py_MakePendingCalls().
17379
17380
17381What's New in Python 2.4 (release candidate 1)
17382==============================================
17383
17384*Release date: 18-NOV-2004*
17385
17386Core and builtins
17387-----------------
17388
17389- Bug 1061968: Fixes in 2.4a3 to address thread bug 1010677 reintroduced
17390 the years-old thread shutdown race bug 225673. Numeric history lesson
17391 aside, all bugs in all three reports are fixed now.
17392
17393
17394Library
17395-------
17396
17397- Bug 1052242: If exceptions are raised by an atexit handler function an
17398 attempt is made to execute the remaining handlers. The last exception
17399 raised is re-raised.
17400
17401- ``doctest``'s new support for adding ``pdb.set_trace()`` calls to
17402 doctests was broken in a dramatic but shallow way. Fixed.
17403
17404- Bug 1065388: ``calendar``'s ``day_name``, ``day_abbr``, ``month_name``,
17405 and ``month_abbr`` attributes emulate sequences of locale-correct
17406 spellings of month and day names. Because the locale can change at
17407 any time, the correct spelling is recomputed whenever one of these is
17408 indexed. In the worst case, the index may be a slice object, so these
17409 recomputed every day or month name each time they were indexed. This is
17410 much slower than necessary in the usual case, when the index is just an
17411 integer. In that case, only the single spelling needed is recomputed
17412 now; and, when the index is a slice object, only the spellings needed
17413 by the slice are recomputed now.
17414
17415- Patch 1061679: Added ``__all__`` to pickletools.py.
17416
17417Build
17418-----
17419
17420- Bug 1034277 / Patch 1035255: Remove compilation of core against CoreServices
17421 and CoreFoundation on OS X. Involved removing PyMac_GetAppletScriptFile()
17422 which has no known users. Thanks Bob Ippolito.
17423
17424C API
17425-----
17426
17427- The PyRange_New() function is deprecated.
17428
17429
17430What's New in Python 2.4 beta 2?
17431================================
17432
17433*Release date: 03-NOV-2004*
17434
17435License
17436-------
17437
17438The Python Software Foundation changed the license under which Python
17439is released, to remove Python version numbers. There were no other
17440changes to the license. So, for example, wherever the license for
17441Python 2.3 said "Python 2.3", the new license says "Python". The
17442intent is to make it possible to refer to the PSF license in a more
17443durable way. For example, some people say they're confused by that
17444the Open Source Initiative's entry for the Python Software Foundation
17445License::
17446
17447 http://www.opensource.org/licenses/PythonSoftFoundation.php
17448
17449says "Python 2.1.1" all over it, wondering whether it applies only
17450to Python 2.1.1.
17451
17452The official name of the new license is the Python Software Foundation
17453License Version 2.
17454
17455Core and builtins
17456-----------------
17457
17458- Bug #1055820 Cyclic garbage collection was not protecting against that
17459 calling a live weakref to a piece of cyclic trash could resurrect an
17460 insane mutation of the trash if any Python code ran during gc (via
17461 running a dead object's __del__ method, running another callback on a
17462 weakref to a dead object, or via any Python code run in any other thread
17463 that managed to obtain the GIL while a __del__ or callback was running
17464 in the thread doing gc). The most likely symptom was "impossible"
17465 ``AttributeError`` exceptions, appearing seemingly at random, on weakly
17466 referenced objects. The cure was to clear all weakrefs to unreachable
17467 objects before allowing any callbacks to run.
17468
17469- Bug #1054139 _PyString_Resize() now invalidates its cached hash value.
17470
17471Extension Modules
17472-----------------
17473
17474- Bug #1048870: the compiler now generates distinct code objects for
17475 functions with identical bodies. This was producing confusing
17476 traceback messages which pointed to the function where the code
17477 object was first defined rather than the function being executed.
17478
17479Library
17480-------
17481
17482- Patch #1056967 changes the semantics of Template.safe_substitute() so that
17483 no ValueError is raised on an 'invalid' match group. Now the delimiter is
17484 returned.
17485
17486- Bug #1052503 pdb.runcall() was not passing along keyword arguments.
17487
17488- Bug #902037: XML.sax.saxutils.prepare_input_source() now combines relative
17489 paths with a base path before checking os.path.isfile().
17490
17491- The whichdb module can now be run from the command line.
17492
17493- Bug #1045381: time.strptime() can now infer the date using %U or %W (week of
17494 the year) when the day of the week and year are also specified.
17495
17496- Bug #1048816: fix bug in Ctrl-K at start of line in curses.textpad.Textbox
17497
17498- Bug #1017553: fix bug in tarfile.filemode()
17499
17500- Patch #737473: fix bug that old source code is shown in tracebacks even if
17501 the source code is updated and reloaded.
17502
17503Build
17504-----
17505
17506- Patch #1044395: --enable-shared is allowed in FreeBSD also.
17507
17508What's New in Python 2.4 beta 1?
17509================================
17510
17511*Release date: 15-OCT-2004*
17512
17513Core and builtins
17514-----------------
17515
17516- Patch #975056: Restartable signals were not correctly disabled on
17517 BSD systems. Consistently use PyOS_setsig() instead of signal().
17518
17519- The internal portable implementation of thread-local storage (TLS), used
17520 by the ``PyGILState_Ensure()``/``PyGILState_Release()`` API, was not
17521 thread-correct. This could lead to a variety of problems, up to and
17522 including segfaults. See bug 1041645 for an example.
17523
17524- Added a command line option, -m module, which searches sys.path for the
17525 module and then runs it. (Contributed by Nick Coghlan.)
17526
17527- The bytecode optimizer now folds tuples of constants into a single
17528 constant.
17529
17530- SF bug #513866: Float/long comparison anomaly. Prior to 2.4b1, when
17531 an integer was compared to a float, the integer was coerced to a float.
17532 That could yield spurious overflow errors (if the integer was very
17533 large), and to anomalies such as
17534 ``long(1e200)+1 == 1e200 == long(1e200)-1``. Coercion to float is no
17535 longer performed, and cases like ``long(1e200)-1 < 1e200``,
17536 ``long(1e200)+1 > 1e200`` and ``(1 << 20000) > 1e200`` are computed
17537 correctly now.
17538
17539Extension modules
17540-----------------
17541
17542- ``collections.deque`` objects didn't play quite right with garbage
17543 collection, which could lead to a segfault in a release build, or
17544 an assert failure in a debug build. Also, added overflow checks,
17545 better detection of mutation during iteration, and shielded deque
17546 comparisons from unusual subclass overrides of the __iter__() method.
17547
17548Library
17549-------
17550
17551- Patch 1046644: distutils build_ext grew two new options - --swig for
17552 specifying the swig executable to use, and --swig-opts to specify
17553 options to pass to swig. --swig-opts="-c++" is the new way to spell
17554 --swig-cpp.
17555
17556- Patch 983206: distutils now obeys environment variable LDSHARED, if
17557 it is set.
17558
17559- Added Peter Astrand's subprocess.py module. See PEP 324 for details.
17560
17561- time.strptime() now properly escapes timezones and all other locale-specific
17562 strings for regex-specific symbols. Was breaking under Japanese Windows when
17563 the timezone was specified as "Tokyo (standard time)".
17564 Closes bug #1039270.
17565
17566- Updates for the email package:
17567
17568 + email.Utils.formatdate() grew a 'usegmt' argument for HTTP support.
17569 + All deprecated APIs that in email 2.x issued warnings have been removed:
17570 _encoder argument to the MIMEText constructor, Message.add_payload(),
17571 Utils.dump_address_pair(), Utils.decode(), Utils.encode()
17572 + New deprecations: Generator.__call__(), Message.get_type(),
17573 Message.get_main_type(), Message.get_subtype(), the 'strict' argument to
17574 the Parser constructor. These will be removed in email 3.1.
17575 + Support for Python earlier than 2.3 has been removed (see PEP 291).
17576 + All defect classes have been renamed to end in 'Defect'.
17577 + Some FeedParser fixes; also a MultipartInvariantViolationDefect will be
17578 added to messages that claim to be multipart but really aren't.
17579 + Updates to documentation.
17580
17581- re's findall() and finditer() functions now take an optional flags argument
17582 just like the compile(), search(), and match() functions. Also, documented
17583 the previously existing start and stop parameters for the findall() and
17584 finditer() methods of regular expression objects.
17585
17586- rfc822 Messages now support iterating over the headers.
17587
17588- The (undocumented) tarfile.Tarfile.membernames has been removed;
17589 applications should use the getmember function.
17590
17591- httplib now offers symbolic constants for the HTTP status codes.
17592
17593- SF bug #1028306: Trying to compare a ``datetime.date`` to a
17594 ``datetime.datetime`` mistakenly compared only the year, month and day.
17595 Now it acts like a mixed-type comparison: ``False`` for ``==``,
17596 ``True`` for ``!=``, and raises ``TypeError`` for other comparison
17597 operators. Because datetime is a subclass of date, comparing only the
17598 base class (date) members can still be done, if that's desired, by
Martin Panter0be894b2016-09-07 12:03:06 +000017599 forcing using of the appropriate date method; e.g.,
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017600 ``a_date.__eq__(a_datetime)`` is true if and only if the year, month
17601 and day members of ``a_date`` and ``a_datetime`` are equal.
17602
17603- bdist_rpm now supports command line options --force-arch,
17604 {pre,post}-install, {pre,post}-uninstall, and
17605 {prep,build,install,clean,verify}-script.
17606
17607- SF patch #998993: The UTF-8 and the UTF-16 stateful decoders now support
17608 decoding incomplete input (when the input stream is temporarily exhausted).
17609 ``codecs.StreamReader`` now implements buffering, which enables proper
17610 readline support for the UTF-16 decoders. ``codecs.StreamReader.read()``
17611 has a new argument ``chars`` which specifies the number of characters to
17612 return. ``codecs.StreamReader.readline()`` and
17613 ``codecs.StreamReader.readlines()`` have a new argument ``keepends``.
17614 Trailing "\n"s will be stripped from the lines if ``keepends`` is false.
17615
17616- The documentation for doctest is greatly expanded, and now covers all
17617 the new public features (of which there are many).
17618
17619- ``doctest.master`` was put back in, and ``doctest.testmod()`` once again
17620 updates it. This isn't good, because every ``testmod()`` call
17621 contributes to bloating the "hidden" state of ``doctest.master``, but
17622 some old code apparently relies on it. For now, all we can do is
17623 encourage people to stitch doctests together via doctest's unittest
17624 integration features instead.
17625
17626- httplib now handles ipv6 address/port pairs.
17627
17628- SF bug #1017864: ConfigParser now correctly handles default keys,
17629 processing them with ``ConfigParser.optionxform`` when supplied,
17630 consistent with the handling of config file entries and runtime-set
17631 options.
17632
17633- SF bug #997050: Document, test, & check for non-string values in
17634 ConfigParser. Moved the new string-only restriction added in
17635 rev. 1.65 to the SafeConfigParser class, leaving existing
17636 ConfigParser & RawConfigParser behavior alone, and documented the
17637 conditions under which non-string values work.
17638
17639Build
17640-----
17641
17642- Building on darwin now includes /opt/local/include and /opt/local/lib for
17643 building extension modules. This is so as to include software installed as
17644 a DarwinPorts port <http://darwinports.opendarwin.org/>
17645
17646- pyport.h now defines a Py_IS_NAN macro. It works as-is when the
17647 platform C computes true for ``x != x`` if and only if X is a NaN.
17648 Other platforms can override the default definition with a platform-
17649 specific spelling in that platform's pyconfig.h. You can also override
17650 pyport.h's default Py_IS_INFINITY definition now.
17651
17652C API
17653-----
17654
17655- SF patch 1044089: New function ``PyEval_ThreadsInitialized()`` returns
17656 non-zero if PyEval_InitThreads() has been called.
17657
17658- The undocumented and unused extern int ``_PyThread_Started`` was removed.
17659
17660- The C API calls ``PyInterpreterState_New()`` and ``PyThreadState_New()``
17661 are two of the very few advertised as being safe to call without holding
17662 the GIL. However, this wasn't true in a debug build, as bug 1041645
17663 demonstrated. In a debug build, Python redirects the ``PyMem`` family
17664 of calls to Python's small-object allocator, to get the benefit of
17665 its extra debugging capabilities. But Python's small-object allocator
17666 isn't threadsafe, relying on the GIL to avoid the expense of doing its
17667 own locking. ``PyInterpreterState_New()`` and ``PyThreadState_New()``
17668 call the platform ``malloc()`` directly now, regardless of build type.
17669
17670- PyLong_AsUnsignedLong[Mask] now support int objects as well.
17671
17672- SF patch #998993: ``PyUnicode_DecodeUTF8Stateful`` and
17673 ``PyUnicode_DecodeUTF16Stateful`` have been added, which implement stateful
17674 decoding.
17675
17676Tests
17677-----
17678
17679- test__locale ported to unittest
17680
17681Mac
17682---
17683
17684- ``plistlib`` now supports non-dict root objects. There is also a new
17685 interface for reading and writing plist files: ``readPlist(pathOrFile)``
17686 and ``writePlist(rootObject, pathOrFile)``
17687
17688Tools/Demos
17689-----------
17690
17691- The text file comparison scripts ``ndiff.py`` and ``diff.py`` now
17692 read the input files in universal-newline mode. This spares them
17693 from consuming a great deal of time to deduce the useless result that,
17694 e.g., a file with Windows line ends and a file with Linux line ends
17695 have no lines in common.
17696
17697
17698What's New in Python 2.4 alpha 3?
17699=================================
17700
17701*Release date: 02-SEP-2004*
17702
17703Core and builtins
17704-----------------
17705
17706- SF patch #1007189: ``from ... import ...`` statements now allow the name
17707 list to be surrounded by parentheses.
17708
17709- Some speedups for long arithmetic, thanks to Trevor Perrin. Gradeschool
17710 multiplication was sped a little by optimizing the C code. Gradeschool
17711 squaring was sped by about a factor of 2, by exploiting that about half
17712 the digit products are duplicates in a square. Because exponentiation
17713 uses squaring often, this also speeds long power. For example, the time
17714 to compute 17**1000000 dropped from about 14 seconds to 9 on my box due
17715 to this much. The cutoff for Karatsuba multiplication was raised,
17716 since gradeschool multiplication got quicker, and the cutoff was
17717 aggressively small regardless. The exponentiation algorithm was switched
17718 from right-to-left to left-to-right, which is more efficient for small
17719 bases. In addition, if the exponent is large, the algorithm now does
17720 5 bits (instead of 1 bit) at a time. That cut the time to compute
17721 17**1000000 on my box in half again, down to about 4.5 seconds.
17722
17723- OverflowWarning is no longer generated. PEP 237 scheduled this to
17724 occur in Python 2.3, but since OverflowWarning was disabled by default,
17725 nobody realized it was still being generated. On the chance that user
17726 code is still using them, the Python builtin OverflowWarning, and
17727 corresponding C API PyExc_OverflowWarning, will exist until Python 2.5.
17728
17729- Py_InitializeEx has been added.
17730
17731- Fix the order of application of decorators. The proper order is bottom-up;
17732 the first decorator listed is the last one called.
17733
17734- SF patch #1005778. Fix a seg fault if the list size changed while
17735 calling list.index(). This could happen if a rich comparison function
17736 modified the list.
17737
17738- The ``func_name`` (a.k.a. ``__name__``) attribute of user-defined
17739 functions is now writable.
17740
17741- code_new (a.k.a new.code()) now checks its arguments sufficiently
17742 carefully that passing them on to PyCode_New() won't trigger calls
17743 to Py_FatalError() or PyErr_BadInternalCall(). It is still the case
17744 that the returned code object might be entirely insane.
17745
17746- Subclasses of string can no longer be interned. The semantics of
17747 interning were not clear here -- a subclass could be mutable, for
17748 example -- and had bugs. Explicitly interning a subclass of string
17749 via intern() will raise a TypeError. Internal operations that attempt
17750 to intern a string subclass will have no effect.
17751
17752- Bug 1003935: xrange() could report bogus OverflowErrors. Documented
17753 what xrange() intends, and repaired tests accordingly.
17754
17755Extension modules
17756-----------------
17757
17758- difflib now supports HTML side-by-side diff.
17759
17760- os.urandom has been added for systems that support sources of random
17761 data.
17762
Sean Reifscheider54cf12b2007-09-17 17:55:36 +000017763- Patch 1012740: truncate() on a writable cStringIO now resets the
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017764 position to the end of the stream. This is consistent with the original
17765 StringIO module and avoids inadvertently resurrecting data that was
17766 supposed to have been truncated away.
17767
17768- Added socket.socketpair().
17769
17770- Added CurrentByteIndex, CurrentColumnNumber, CurrentLineNumber
17771 members to xml.parsers.expat.XMLParser object.
17772
17773- The mpz, rotor, and xreadlines modules, all deprecated in earlier
17774 versions of Python, have now been removed.
17775
17776Library
17777-------
17778
17779- Patch #934356: if a module defines __all__, believe that rather than using
17780 heuristics for filtering out imported names.
17781
17782- Patch #941486: added os.path.lexists(), which returns True for broken
17783 symlinks, unlike os.path.exists().
17784
17785- the random module now uses os.urandom() for seeding if it is available.
17786 Added a new generator based on os.urandom().
17787
17788- difflib and diff.py can now generate HTML.
17789
17790- bdist_rpm now includes version and release in the BuildRoot, and
17791 replaces - by ``_`` in version and release.
17792
17793- distutils build/build_scripts now has an -e option to specify the
17794 path to the Python interpreter for installed scripts.
17795
17796- PEP 292 classes Template and SafeTemplate are added to the string module.
17797
17798- tarfile now generates GNU tar files by default.
17799
17800- HTTPResponse has now a getheaders method.
17801
17802- Patch #1006219: let inspect.getsource handle '@' decorators. Thanks Simon
17803 Percivall.
17804
17805- logging.handlers.SMTPHandler.date_time has been removed;
17806 the class now uses email.Utils.formatdate to generate the time stamp.
17807
17808- A new function tkFont.nametofont was added to return an existing
17809 font. The Font class constructor now has an additional exists argument
17810 which, if True, requests to return/configure an existing font, rather
17811 than creating a new one.
17812
17813- Updated the decimal package's min() and max() methods to match the
17814 latest revision of the General Decimal Arithmetic Specification.
17815 Quiet NaNs are ignored and equal values are sorted based on sign
17816 and exponent.
17817
17818- The decimal package's Context.copy() method now returns deep copies.
17819
17820- Deprecated sys.exitfunc in favor of the atexit module. The sys.exitfunc
17821 attribute will be kept around for backwards compatibility and atexit
17822 will just become the one preferred way to do it.
17823
17824- patch #675551: Add get_history_item and replace_history_item functions
17825 to the readline module.
17826
17827- bug #989672: pdb.doc and the help messages for the help_d and help_u methods
17828 of the pdb.Pdb class gives have been corrected. d(own) goes to a newer
17829 frame, u(p) to an older frame, not the other way around.
17830
17831- bug #990669: os.path.realpath() will resolve symlinks before normalizing the
17832 path, as normalizing the path may alter the meaning of the path if it
17833 contains symlinks.
17834
17835- bug #851123: shutil.copyfile will raise an exception when trying to copy a
17836 file onto a link to itself. Thanks Gregory Ball.
17837
17838- bug #570300: Fix inspect to resolve file locations using os.path.realpath()
17839 so as to properly list all functions in a module when the module itself is
17840 reached through a symlink. Thanks Johannes Gijsbers.
17841
17842- doctest refactoring continued. See the docs for details. As part of
17843 this effort, some old and little- (never?) used features are now
17844 deprecated: the Tester class, the module is_private() function, and the
17845 isprivate argument to testmod(). The Tester class supplied a feeble
17846 "by hand" way to combine multiple doctests, if you knew exactly what
17847 you were doing. The newer doctest features for unittest integration
17848 already did a better job of that, are stronger now than ever, and the
17849 new DocTestRunner class is a saner foundation if you want to do it by
17850 hand. The "private name" filtering gimmick was a mistake from the
17851 start, and testmod() changed long ago to ignore it by default. If
17852 you want to filter out tests, the new DocTestFinder class can be used
17853 to return a list of all doctests, and you can filter that list by
17854 any computable criteria before passing it to a DocTestRunner instance.
17855
17856- Bug #891637, patch #1005466: fix inspect.getargs() crash on def foo((bar)).
17857
17858Tools/Demos
17859-----------
17860
17861- IDLE's shortcut keys for windows are now case insensitive so that
17862 Control-V works the same as Control-v.
17863
17864- pygettext.py: Generate POT-Creation-Date header in ISO format.
17865
17866Build
17867-----
17868
17869- Backward incompatibility: longintrepr.h now triggers a compile-time
17870 error if SHIFT (the number of bits in a Python long "digit") isn't
17871 divisible by 5. This new requirement allows simple code for the new
17872 5-bits-at-a-time long_pow() implementation. If necessary, the
17873 restriction could be removed (by complicating long_pow(), or by
17874 falling back to the 1-bit-at-a-time algorithm), but there are no
17875 plans to do so.
17876
17877- bug #991962: When building with --disable-toolbox-glue on Darwin no
17878 attempt to build Mac-specific modules occurs.
17879
17880- The --with-tsc flag to configure to enable VM profiling with the
17881 processor's timestamp counter now works on PPC platforms.
17882
17883- patch #1006629: Define _XOPEN_SOURCE to 500 on Solaris 8/9 to match
17884 GCC's definition and avoid redefinition warnings.
17885
17886- Detect pthreads support (provided by gnu pth pthread emulation) on
17887 GNU/k*BSD systems.
17888
17889- bug #1005737, #1007249: Fixed several build problems and warnings
17890 found on old/legacy C compilers of HP-UX, IRIX and Tru64.
17891
17892C API
17893-----
17894
17895..
17896
17897Documentation
17898-------------
17899
17900- patch #1005936, bug #1009373: fix index entries which contain
17901 an underscore when viewed with Acrobat.
17902
17903- bug #990669: os.path.normpath may alter the meaning of a path if
17904 it contains symbolic links. This has been documented in a comment
17905 since 1992, but is now in the library reference as well.
17906
17907New platforms
17908-------------
17909
17910- FreeBSD 6 is now supported.
17911
17912Tests
17913-----
17914
17915..
17916
17917Windows
17918-------
17919
17920- Boosted the stack reservation for python.exe and pythonw.exe from
17921 the default 1MB to 2MB. Stack frames under VC 7.1 for 2.4 are enough
17922 bigger than under VC 6.0 for 2.3.4 that deeply recursive progams
17923 within the default sys.getrecursionlimit() default value of 1000 were
17924 able to suffer undetected C stack overflows. The standard test program
17925 test_compiler was one such program. If a Python process on Windows
17926 "just vanishes" without a trace, and without an error message of any
17927 kind, but with an exit code of 128, undetected stack overflow may be
17928 the problem.
17929
17930Mac
17931---
17932
17933..
17934
17935
17936What's New in Python 2.4 alpha 2?
17937=================================
17938
17939*Release date: 05-AUG-2004*
17940
17941Core and builtins
17942-----------------
17943
17944- Patch #980695: Implements efficient string concatenation for statements
17945 of the form s=s+t and s+=t. This will vary across implementations.
17946 Accordingly, the str.join() method is strongly preferred for performance
17947 sensitive code.
17948
17949- PEP-0318, Function Decorators have been added to the language. These are
17950 implemented using the Java-style @decorator syntax, like so::
17951
17952 @staticmethod
17953 def foo(bar):
17954
17955 (The PEP needs to be updated to reflect the current state)
17956
17957- When importing a module M raises an exception, Python no longer leaves M
17958 in sys.modules. Before 2.4a2 it did, and a subsequent import of M would
17959 succeed, picking up a module object from sys.modules reflecting as much
17960 of the initialization of M as completed before the exception was raised.
17961 Subsequent imports got no indication that M was in a partially-
17962 initialized state, and the importers could get into arbitrarily bad
17963 trouble as a result (the M they got was in an unintended state,
17964 arbitrarily far removed from M's author's intent). Now subsequent
17965 imports of M will continue raising exceptions (but if, for example, the
17966 source code for M is edited between import attempts, then perhaps later
17967 attempts will succeed, or raise a different exception).
17968
17969 This can break existing code, but in such cases the code was probably
17970 working before by accident. In the Python source, the only case of
17971 breakage discovered was in a test accidentally relying on a damaged
17972 module remaining in sys.modules. Cases are also known where tests
17973 deliberately provoking import errors remove damaged modules from
17974 sys.modules themselves, and such tests will break now if they do an
17975 unconditional del sys.modules[M].
17976
17977- u'%s' % obj will now try obj.__unicode__() first and fallback to
17978 obj.__str__() if no __unicode__ method can be found.
17979
17980- Patch #550732: Add PyArg_VaParseTupleAndKeywords(). Analogous to
17981 PyArg_VaParse(). Both are now documented. Thanks Greg Chapman.
17982
17983- Allow string and unicode return types from .encode()/.decode()
17984 methods on string and unicode objects. Added unicode.decode()
17985 which was missing for no apparent reason.
17986
17987- An attempt to fix the mess that is Python's behaviour with
17988 signal handlers and threads, complicated by readline's behaviour.
17989 It's quite possible that there are still bugs here.
17990
17991- Added C macros Py_CLEAR and Py_VISIT to ease the implementation of
17992 types that support garbage collection.
17993
17994- Compiler now treats None as a constant.
17995
17996- The type of values returned by __int__, __float__, __long__,
17997 __oct__, and __hex__ are now checked. Returning an invalid type
17998 will cause a TypeError to be raised. This matches the behavior of
17999 Jython.
18000
18001- Implemented bind_textdomain_codeset() in locale module.
18002
18003- Added a workaround for proper string operations in BSDs. str.split
18004 and str.is* methods can now work correctly with UTF-8 locales.
18005
18006- Bug #989185: unicode.iswide() and unicode.width() is dropped and
18007 the East Asian Width support is moved to unicodedata extension
18008 module.
18009
18010- Patch #941229: The source code encoding in interactive mode
18011 now refers sys.stdin.encoding not just ISO-8859-1 anymore. This
18012 allows for non-latin-1 users to write unicode strings directly.
18013
18014Extension modules
18015-----------------
18016
18017- cpickle now supports the same keyword arguments as pickle.
18018
18019Library
18020-------
18021
18022- Added new codecs and aliases for ISO_8859-11, ISO_8859-16 and
18023 TIS-620
18024
18025- Thanks to Edward Loper, doctest has been massively refactored, and
18026 many new features were added. Full docs will appear later. For now
18027 the doctest module comments and new test cases give good coverage.
18028 The refactoring provides many hook points for customizing behavior
18029 (such as how to report errors, and how to compare expected to actual
18030 output). New features include a <BLANKLINE> marker for expected
18031 output containing blank lines, options to produce unified or context
18032 diffs when actual output doesn't match expectations, an option to
18033 normalize whitespace before comparing, and an option to use an
18034 ellipsis to signify "don't care" regions of output.
18035
18036- Tkinter now supports the wish -sync and -use options.
18037
18038- The following methods in time support passing of None: ctime(), gmtime(),
18039 and localtime(). If None is provided, the current time is used (the
18040 same as when the argument is omitted).
18041 [SF bug 658254, patch 663482]
18042
Martin Panterc04fb562016-02-10 05:44:01 +000018043- nntplib does now allow ignoring a .netrc file.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018044
18045- urllib2 now recognizes Basic authentication even if other authentication
18046 schemes are offered.
18047
18048- Bug #1001053. wave.open() now accepts unicode filenames.
18049
18050- gzip.GzipFile has a new fileno() method, to retrieve the handle of the
18051 underlying file object (provided it has a fileno() method). This is
18052 needed if you want to use os.fsync() on a GzipFile.
18053
18054- imaplib has two new methods: deleteacl and myrights.
18055
18056- nntplib has two new methods: description and descriptions. They
18057 use a more RFC-compliant way of getting a newsgroup description.
18058
18059- Bug #993394. Fix a possible red herring of KeyError in 'threading' being
18060 raised during interpreter shutdown from a registered function with atexit
18061 when dummy_threading is being used.
18062
18063- Bug #857297/Patch #916874. Fix an error when extracting a hard link
18064 from a tarfile.
18065
18066- Patch #846659. Fix an error in tarfile.py when using
18067 GNU longname/longlink creation.
18068
Georg Brandl93dc9eb2010-03-14 10:56:14 +000018069- The obsolete FCNTL.py has been deleted. The built-in fcntl module
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018070 has been available (on platforms that support fcntl) since Python
18071 1.5a3, and all FCNTL.py did is export fcntl's names, after generating
18072 a deprecation warning telling you to use fcntl directly.
18073
18074- Several new unicode codecs are added: big5hkscs, euc_jis_2004,
18075 iso2022_jp_2004, shift_jis_2004.
18076
18077- Bug #788520. Queue.{get, get_nowait, put, put_nowait} have new
18078 implementations, exploiting Conditions (which didn't exist at the time
18079 Queue was introduced). A minor semantic change is that the Full and
18080 Empty exceptions raised by non-blocking calls now occur only if the
18081 queue truly was full or empty at the instant the queue was checked (of
18082 course the Queue may no longer be full or empty by the time a calling
18083 thread sees those exceptions, though). Before, the exceptions could
18084 also be raised if it was "merely inconvenient" for the implementation
18085 to determine the true state of the Queue (because the Queue was locked
18086 by some other method in progress).
18087
18088- Bugs #979794 and #980117: difflib.get_grouped_opcodes() now handles the
18089 case of comparing two empty lists. This affected both context_diff() and
18090 unified_diff(),
18091
18092- Bug #980938: smtplib now prints debug output to sys.stderr.
18093
18094- Bug #930024: posixpath.realpath() now handles infinite loops in symlinks by
18095 returning the last point in the path that was not part of any loop. Thanks
18096 AM Kuchling.
18097
18098- Bug #980327: ntpath not handles compressing erroneous slashes between the
18099 drive letter and the rest of the path. Also clearly handles UNC addresses now
18100 as well. Thanks Paul Moore.
18101
18102- bug #679953: zipfile.py should now work for files over 2 GB. The packed data
18103 for file sizes (compressed and uncompressed) was being stored as signed
18104 instead of unsigned.
18105
18106- decimal.py now only uses signals in the IBM spec. The other conditions are
18107 no longer part of the public API.
18108
18109- codecs module now has two new generic APIs: encode() and decode()
18110 which don't restrict the return types (unlike the unicode and
18111 string methods of the same name).
18112
18113- Non-blocking SSL sockets work again; they were broken in Python 2.3.
18114 SF patch 945642.
18115
18116- doctest unittest integration improvements:
18117
18118 o Improved the unitest test output for doctest-based unit tests
18119
18120 o Can now pass setUp and tearDown functions when creating
18121 DocTestSuites.
18122
18123- The threading module has a new class, local, for creating objects
18124 that provide thread-local data.
18125
18126- Bug #990307: when keep_empty_values is True, cgi.parse_qsl()
18127 no longer returns spurious empty fields.
18128
18129- Implemented bind_textdomain_codeset() in gettext module.
18130
18131- Introduced in gettext module the l*gettext() family of functions,
18132 which return translation strings encoded in the preferred encoding,
18133 as informed by locale module's getpreferredencoding().
18134
18135- optparse module (and tests) upgraded to Optik 1.5a1. Changes:
18136
18137 - Add expansion of default values in help text: the string
18138 "%default" in an option's help string is expanded to str() of
18139 that option's default value, or "none" if no default value.
18140
18141 - Bug #955889: option default values that happen to be strings are
18142 now processed in the same way as values from the command line; this
18143 allows generation of nicer help when using custom types. Can
18144 be disabled with parser.set_process_default_values(False).
18145
18146 - Bug #960515: don't crash when generating help for callback
18147 options that specify 'type', but not 'dest' or 'metavar'.
18148
18149 - Feature #815264: change the default help format for short options
18150 that take an argument from e.g. "-oARG" to "-o ARG"; add
18151 set_short_opt_delimiter() and set_long_opt_delimiter() methods to
18152 HelpFormatter to allow (slight) customization of the formatting.
18153
18154 - Patch #736940: internationalize Optik: all built-in user-
18155 targeted literal strings are passed through gettext.gettext(). (If
18156 you want translations (.po files), they're not included with Python
18157 -- you'll find them in the Optik source distribution from
18158 http://optik.sourceforge.net/ .)
18159
18160 - Bug #878453: respect $COLUMNS environment variable for
18161 wrapping help output.
18162
18163 - Feature #988122: expand "%prog" in the 'description' passed
18164 to OptionParser, just like in the 'usage' and 'version' strings.
18165 (This is *not* done in the 'description' passed to OptionGroup.)
18166
18167C API
18168-----
18169
18170- PyImport_ExecCodeModule() and PyImport_ExecCodeModuleEx(): if an
18171 error occurs while loading the module, these now delete the module's
18172 entry from sys.modules. All ways of loading modules eventually call
18173 one of these, so this is an error-case change in semantics for all
18174 ways of loading modules. In rare cases, a module loader may wish
18175 to keep a module object in sys.modules despite that the module's
18176 code cannot be executed. In such cases, the module loader must
18177 arrange to reinsert the name and module object in sys.modules.
18178 PyImport_ReloadModule() has been changed to reinsert the original
18179 module object into sys.modules if the module reload fails, so that
18180 its visible semantics have not changed.
18181
18182- A large pile of datetime field-extraction macros is now documented,
18183 thanks to Anthony Tuininga (patch #986010).
18184
18185Documentation
18186-------------
18187
18188- Improved the tutorial on creating types in C.
18189
18190 - point out the importance of reassigning data members before
18191 assigning their values
18192
18193 - correct my misconception about return values from visitprocs. Sigh.
18194
18195 - mention the labor saving Py_VISIT and Py_CLEAR macros.
18196
18197- Major rewrite of the math module docs, to address common confusions.
18198
18199Tests
18200-----
18201
18202- The test data files for the decimal test suite are now installed on
18203 platforms that use the Makefile.
18204
18205- SF patch 995225: The test file testtar.tar accidentally contained
18206 CVS keywords (like $Id$), which could cause spurious failures in
18207 test_tarfile.py depending on how the test file was checked out.
18208
18209
18210What's New in Python 2.4 alpha 1?
18211=================================
18212
18213*Release date: 08-JUL-2004*
18214
18215Core and builtins
18216-----------------
18217
18218- weakref.ref is now the type object also known as
18219 weakref.ReferenceType; it can be subclassed like any other new-style
18220 class. There's less per-entry overhead in WeakValueDictionary
18221 objects now (one object instead of three).
18222
18223- Bug #951851: Python crashed when reading import table of certain
18224 Windows DLLs.
18225
18226- Bug #215126. The locals argument to eval(), execfile(), and exec now
18227 accept any mapping type.
18228
18229- marshal now shares interned strings. This change introduces
18230 a new .pyc magic.
18231
18232- Bug #966623. classes created with type() in an exec(, {}) don't
18233 have a __module__, but code in typeobject assumed it would always
18234 be there.
18235
18236- Python no longer relies on the LC_NUMERIC locale setting to be
18237 the "C" locale; as a result, it no longer tries to prevent changing
18238 the LC_NUMERIC category.
18239
18240- Bug #952807: Unpickling pickled instances of subclasses of
18241 datetime.date, datetime.datetime and datetime.time could yield insane
18242 objects. Thanks to Jiwon Seo for a fix.
18243
18244- Bug #845802: Python crashes when __init__.py is a directory.
18245
18246- Unicode objects received two new methods: iswide() and width().
18247 These query East Asian width information, as specified in Unicode
18248 TR11.
18249
18250- Improved the tuple hashing algorithm to give fewer collisions in
18251 common cases. Fixes bug #942952.
18252
18253- Implemented generator expressions (PEP 289). Coded by Jiwon Seo.
18254
18255- Enabled the profiling of C extension functions (and builtins) - check
18256 new documentation and modified profile and bdb modules for more details
18257
18258- Set file.name to the object passed to open (instead of a new string)
18259
18260- Moved tracebackobject into traceback.h and renamed to PyTracebackObject
18261
18262- Optimized the byte coding for multiple assignments like "a,b=b,a" and
18263 "a,b,c=1,2,3". Improves their speed by 25% to 30%.
18264
18265- Limit the nested depth of a tuple for the second argument to isinstance()
18266 and issubclass() to the recursion limit of the interpreter.
18267 Fixes bug #858016 .
18268
18269- Optimized dict iterators, creating separate types for each
18270 and having them reveal their length. Also optimized the
18271 methods: keys(), values(), and items().
18272
18273- Implemented a newcode opcode, LIST_APPEND, that simplifies
18274 the generated bytecode for list comprehensions and further
18275 improves their performance (about 35%).
18276
18277- Implemented rich comparisons for floats, which seems to make
18278 comparisons involving NaNs somewhat less surprising when the
18279 underlying C compiler actually implements C99 semantics.
18280
18281- Optimized list.extend() to save memory and no longer create
18282 intermediate sequences. Also, extend() now pre-allocates the
18283 needed memory whenever the length of the iterable is known in
18284 advance -- this halves the time to extend the list.
18285
18286- Optimized list resize operations to make fewer calls to the system
18287 realloc(). Significantly speeds up list appends, list pops,
18288 list comprehensions, and the list constructor (when the input iterable
18289 length is not known).
18290
18291- Changed the internal list over-allocation scheme. For larger lists,
18292 overallocation ranged between 3% and 25%. Now, it is a constant 12%.
18293 For smaller lists (n<8), overallocation was upto eight elements. Now,
18294 the overallocation is no more than three elements -- this improves space
18295 utilization for applications that have large numbers of small lists.
18296
18297- Most list bodies now get re-used rather than freed. Speeds up list
18298 instantiation and deletion by saving calls to malloc() and free().
18299
18300- The dict.update() method now accepts all the same argument forms
18301 as the dict() constructor. This now includes item lists and/or
18302 keyword arguments.
18303
18304- Support for arbitrary objects supporting the read-only buffer
18305 interface as the co_code field of code objects (something that was
18306 only possible to create from C code) has been removed.
18307
18308- Made omitted callback and None equivalent for weakref.ref() and
18309 weakref.proxy(); the None case wasn't handled correctly in all
18310 cases.
18311
18312- Fixed problem where PyWeakref_NewRef() and PyWeakref_NewProxy()
18313 assumed that initial existing entries in an object's weakref list
18314 would not be removed while allocating a new weakref object. Since
18315 GC could be invoked at that time, however, that assumption was
18316 invalid. In a truly obscure case of GC being triggered during
Serhiy Storchaka6a7b3a72016-04-17 08:32:47 +030018317 creation for a new weakref object for a referent which already
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018318 has a weakref without a callback which is only referenced from
18319 cyclic trash, a memory error can occur. This consistently created a
18320 segfault in a debug build, but provided less predictable behavior in
18321 a release build.
18322
Georg Brandl93dc9eb2010-03-14 10:56:14 +000018323- input() built-in function now respects compiler flags such as
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018324 __future__ statements. SF patch 876178.
18325
18326- Removed PendingDeprecationWarning from apply(). apply() remains
18327 deprecated, but the nuisance warning will not be issued.
18328
18329- At Python shutdown time (Py_Finalize()), 2.3 called cyclic garbage
18330 collection twice, both before and after tearing down modules. The
18331 call after tearing down modules has been disabled, because too much
18332 of Python has been torn down then for __del__ methods and weakref
18333 callbacks to execute sanely. The most common symptom was a sequence
18334 of uninformative messages on stderr when Python shut down, produced
18335 by threads trying to raise exceptions, but unable to report the nature
18336 of their problems because too much of the sys module had already been
18337 destroyed.
18338
18339- Removed FutureWarnings related to hex/oct literals and conversions
18340 and left shifts. (Thanks to Kalle Svensson for SF patch 849227.)
18341 This addresses most of the remaining semantic changes promised by
18342 PEP 237, except for repr() of a long, which still shows the trailing
18343 'L'. The PEP appears to promise warnings for operations that
18344 changed semantics compared to Python 2.3, but this is not
18345 implemented; we've suffered through enough warnings related to
18346 hex/oct literals and I think it's best to be silent now.
18347
18348- For str and unicode objects, the ljust(), center(), and rjust()
18349 methods now accept an optional argument specifying a fill
18350 character other than a space.
18351
18352- When method objects have an attribute that can be satisfied either
18353 by the function object or by the method object, the function
18354 object's attribute usually wins. Christian Tismer pointed out that
Serhiy Storchaka56a6d852014-12-01 18:28:43 +020018355 this is really a mistake, because this only happens for special
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018356 methods (like __reduce__) where the method object's version is
18357 really more appropriate than the function's attribute. So from now
18358 on, all method attributes will have precedence over function
18359 attributes with the same name.
18360
18361- Critical bugfix, for SF bug 839548: if a weakref with a callback,
18362 its callback, and its weakly referenced object, all became part of
18363 cyclic garbage during a single run of garbage collection, the order
18364 in which they were torn down was unpredictable. It was possible for
18365 the callback to see partially-torn-down objects, leading to immediate
18366 segfaults, or, if the callback resurrected garbage objects, to
18367 resurrect insane objects that caused segfaults (or other surprises)
18368 later. In one sense this wasn't surprising, because Python's cyclic gc
18369 had no knowledge of Python's weakref objects. It does now. When
18370 weakrefs with callbacks become part of cyclic garbage now, those
18371 weakrefs are cleared first. The callbacks don't trigger then,
18372 preventing the problems. If you need callbacks to trigger, then just
18373 as when cyclic gc is not involved, you need to write your code so
18374 that weakref objects outlive the objects they weakly reference.
18375
18376- Critical bugfix, for SF bug 840829: if cyclic garbage collection
18377 happened to occur during a weakref callback for a new-style class
18378 instance, subtle memory corruption was the result (in a release build;
18379 in a debug build, a segfault occurred reliably very soon after).
18380 This has been repaired.
18381
18382- Compiler flags set in PYTHONSTARTUP are now active in __main__.
18383
Georg Brandl93dc9eb2010-03-14 10:56:14 +000018384- Added two built-in types, set() and frozenset().
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018385
Georg Brandl93dc9eb2010-03-14 10:56:14 +000018386- Added a reversed() built-in function that returns a reverse iterator
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018387 over a sequence.
18388
Georg Brandl93dc9eb2010-03-14 10:56:14 +000018389- Added a sorted() built-in function that returns a new sorted list
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018390 from any iterable.
18391
18392- CObjects are now mutable (on the C level) through PyCObject_SetVoidPtr.
18393
18394- list.sort() now supports three keyword arguments: cmp, key, and reverse.
18395 The key argument can be a function of one argument that extracts a
18396 comparison key from the original record: mylist.sort(key=str.lower).
18397 The reverse argument is a boolean value and if True will change the
18398 sort order as if the comparison arguments were reversed. In addition,
18399 the documentation has been amended to provide a guarantee that all sorts
18400 starting with Py2.3 are guaranteed to be stable (the relative order of
18401 records with equal keys is unchanged).
18402
18403- Added test whether wchar_t is signed or not. A signed wchar_t is not
18404 usable as internal unicode type base for Py_UNICODE since the
18405 unicode implementation assumes an unsigned type.
18406
18407- Fixed a bug in the cache of length-one Unicode strings that could
18408 lead to a seg fault. The specific problem occurred when an earlier,
18409 non-fatal error left an uninitialized Unicode object in the
18410 freelist.
18411
18412- The % formatting operator now supports '%F' which is equivalent to
18413 '%f'. This has always been documented but never implemented.
18414
18415- complex(obj) could leak a little memory if obj wasn't a string or
18416 number.
18417
18418- zip() with no arguments now returns an empty list instead of raising
18419 a TypeError exception.
18420
18421- obj.__contains__() now returns True/False instead of 1/0. SF patch
18422 820195.
18423
18424- Python no longer tries to be smart about recursive comparisons.
18425 When comparing containers with cyclic references to themselves it
18426 will now just hit the recursion limit. See SF patch 825639.
18427
Georg Brandl93dc9eb2010-03-14 10:56:14 +000018428- str and unicode built-in types now have an rsplit() method that is
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018429 same as split() except that it scans the string from the end
18430 working towards the beginning. See SF feature request 801847.
18431
18432- Fixed a bug in object.__reduce_ex__ when using protocol 2. Failure
18433 to clear the error when attempts to get the __getstate__ attribute
18434 fail caused intermittent errors and odd behavior.
18435
18436- buffer objects based on other objects no longer cache a pointer to
18437 the data and the data length. Instead, the appropriate tp_as_buffer
18438 method is called as necessary.
18439
18440- fixed: if a file is opened with an explicit buffer size >= 1, repeated
18441 close() calls would attempt to free() the buffer already free()ed on
18442 the first call.
18443
18444
18445Extension modules
18446-----------------
18447
18448- Added socket.getservbyport(), and make the second argument in
18449 getservbyname() and getservbyport() optional.
18450
18451- time module code that deals with input POSIX timestamps will now raise
18452 ValueError if more than a second is lost in precision when the
18453 timestamp is cast to the platform C time_t type. There's no chance
18454 that the platform will do anything sensible with the result in such
18455 cases. This includes ctime(), localtime() and gmtime(). Assorted
18456 fromtimestamp() and utcfromtimestamp() methods in the datetime module
18457 were also protected. Closes bugs #919012 and 975996.
18458
18459- fcntl.ioctl now warns if the mutate flag is not specified.
18460
Martin Panterc04fb562016-02-10 05:44:01 +000018461- nt now properly allows referring to UNC roots, e.g. in nt.stat().
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018462
18463- the weakref module now supports additional objects: array.array,
18464 sre.pattern_objects, file objects, and sockets.
18465
18466- operator.isMappingType() and operator.isSequenceType() now give
18467 fewer false positives.
18468
18469- socket.sslerror is now a subclass of socket.error . Also added
18470 socket.error to the socket module's C API.
18471
18472- Bug #920575: A problem where the _locale module segfaults on
18473 nl_langinfo(ERA) caused by GNU libc's illegal NULL return is fixed.
18474
18475- array objects now support the copy module. Also, their resizing
18476 scheme has been updated to match that used for list objects. This improves
18477 the performance (speed and memory usage) of append() operations.
18478 Also, array.array() and array.extend() now accept any iterable argument
18479 for repeated appends without needing to create another temporary array.
18480
18481- cStringIO.writelines() now accepts any iterable argument and writes
18482 the lines one at a time rather than joining them and writing once.
18483 Made a parallel change to StringIO.writelines(). Saves memory and
18484 makes suitable for use with generator expressions.
18485
18486- time.strftime() now checks that the values in its time tuple argument
18487 are within the proper boundaries to prevent possible crashes from the
18488 platform's C library implementation of strftime(). Can possibly
18489 break code that uses values outside the range that didn't cause
18490 problems previously (such as sitting day of year to 0). Fixes bug
18491 #897625.
18492
18493- The socket module now supports Bluetooth sockets, if the
18494 system has <bluetooth/bluetooth.h>
18495
18496- Added a collections module containing a new datatype, deque(),
18497 offering high-performance, thread-safe, memory friendly appends
18498 and pops on either side of the deque.
18499
18500- Several modules now take advantage of collections.deque() for
18501 improved performance: Queue, mutex, shlex, threading, and pydoc.
18502
18503- The operator module has two new functions, attrgetter() and
18504 itemgetter() which are useful for creating fast data extractor
18505 functions for map(), list.sort(), itertools.groupby(), and
18506 other functions that expect a function argument.
18507
18508- socket.SHUT_{RD,WR,RDWR} was added.
18509
18510- os.getsid was added.
18511
18512- The pwd module incorrectly advertised its struct type as
18513 struct_pwent; this has been renamed to struct_passwd. (The old name
18514 is still supported for backwards compatibility.)
18515
18516- The xml.parsers.expat module now provides Expat 1.95.7.
18517
18518- socket.IPPROTO_IPV6 was added.
18519
18520- readline.clear_history was added.
18521
18522- select.select() now accepts sequences for its first three arguments.
18523
18524- cStringIO now supports the f.closed attribute.
18525
18526- The signal module now exposes SIGRTMIN and SIGRTMAX (if available).
18527
18528- curses module now supports use_default_colors(). [patch #739124]
18529
18530- Bug #811028: ncurses.h breakage on FreeBSD/MacOS X
18531
18532- Bug #814613: INET_ADDRSTRLEN fix needed for all compilers on SGI
18533
18534- Implemented non-recursive SRE matching scheme (#757624).
18535
18536- Implemented (?(id/name)yes|no) support in SRE (#572936).
18537
18538- random.seed() with no arguments or None uses time.time() as a default
18539 seed. Modified to match Py2.2 behavior and use fractional seconds so
18540 that successive runs are more likely to produce different sequences.
18541
18542- random.Random has a new method, getrandbits(k), which returns an int
18543 with k random bits. This method is now an optional part of the API
18544 for user defined generators. Any generator that defines genrandbits()
18545 can now use randrange() for ranges with a length >= 2**53. Formerly,
18546 randrange would return only even numbers for ranges that large (see
18547 SF bug #812202). Generators that do not define genrandbits() now
18548 issue a warning when randrange() is called with a range that large.
18549
18550- itertools has a new function, groupby() for aggregating iterables
18551 into groups sharing the same key (as determined by a key function).
18552 It offers some of functionality of SQL's groupby keyword and of
18553 the Unix uniq filter.
18554
18555- itertools now has a new tee() function which produces two independent
18556 iterators from a single iterable.
18557
18558- itertools.izip() with no arguments now returns an empty iterator instead
18559 of raising a TypeError exception.
18560
18561- Fixed #853061: allow BZ2Compressor.compress() to receive an empty string
18562 as parameter.
18563
18564Library
18565-------
18566
18567- Added a new module: cProfile, a C profiler with the same interface as the
18568 profile module. cProfile avoids some of the drawbacks of the hotshot
18569 profiler and provides a bit more information than the other two profilers.
18570 Based on "lsprof" (patch #1212837).
18571
18572- Bug #1266283: The new function "lexists" is now in os.path.__all__.
18573
18574- Bug #981530: Fix UnboundLocalError in shutil.rmtree(). This affects
18575 the documented behavior: the function passed to the onerror()
18576 handler can now also be os.listdir.
18577
18578- Bug #754449: threading.Thread objects no longer mask exceptions raised during
18579 interpreter shutdown with another exception from attempting to handle the
18580 original exception.
18581
18582- Added decimal.py per PEP 327.
18583
18584- Bug #981299: rsync is now a recognized protocol in urlparse that uses a
18585 "netloc" portion of a URL.
18586
18587- Bug #919012: shutil.move() will not try to move a directory into itself.
18588 Thanks Johannes Gijsbers.
18589
18590- Bug #934282: pydoc.stripid() is now case-insensitive. Thanks Robin Becker.
18591
18592- Bug #823209: cmath.log() now takes an optional base argument so that its
18593 API matches math.log().
18594
18595- Bug #957381: distutils bdist_rpm no longer fails on recent RPM versions
18596 that generate a -debuginfo.rpm
18597
18598- os.path.devnull has been added for all supported platforms.
18599
18600- Fixed #877165: distutils now picks the right C++ compiler command
18601 on cygwin and mingw32.
18602
18603- urllib.urlopen().readline() now handles HTTP/0.9 correctly.
18604
18605- refactored site.py into functions. Also wrote regression tests for the
18606 module.
18607
18608- The distutils install command now supports the --home option and
18609 installation scheme for all platforms.
18610
18611- asyncore.loop now has a repeat count parameter that defaults to
18612 looping forever.
18613
18614- The distutils sdist command now ignores all .svn directories, in
18615 addition to CVS and RCS directories. .svn directories hold
18616 administrative files for the Subversion source control system.
18617
18618- Added a new module: cookielib. Automatic cookie handling for HTTP
18619 clients. Also, support for cookielib has been added to urllib2, so
18620 urllib2.urlopen() can transparently handle cookies.
18621
18622- stringprep.py now uses built-in set() instead of sets.Set().
18623
18624- Bug #876278: Unbounded recursion in modulefinder
18625
18626- Bug #780300: Swap public and system ID in LexicalHandler.startDTD.
18627 Applications relying on the wrong order need to be corrected.
18628
18629- Bug #926075: Fixed a bug that returns a wrong pattern object
18630 for a string or unicode object in sre.compile() when a different
18631 type pattern with the same value exists.
18632
18633- Added countcallers arg to trace.Trace class (--trackcalls command line arg
18634 when run from the command prompt).
18635
18636- Fixed a caching bug in platform.platform() where the argument of 'terse' was
18637 not taken into consideration when caching value.
18638
18639- Added two new command-line arguments for profile (output file and
18640 default sort).
18641
18642- Added global runctx function to profile module
18643
18644- Add hlist missing entryconfigure and entrycget methods.
18645
18646- The ptcp154 codec was added for Kazakh character set support.
18647
18648- Support non-anonymous ftp URLs in urllib2.
18649
18650- The encodings package will now apply codec name aliases
18651 first before starting to try the import of the codec module.
18652 This simplifies overriding built-in codecs with external
18653 packages, e.g. the included CJK codecs with the JapaneseCodecs
18654 package, by adjusting the aliases dictionary in encodings.aliases
18655 accordingly.
18656
18657- base64 now supports RFC 3548 Base16, Base32, and Base64 encoding and
18658 decoding standards.
18659
18660- urllib2 now supports processors. A processor is a handler that
18661 implements an xxx_request or xxx_response method. These methods are
18662 called for all requests.
18663
18664- distutils compilers now compile source files in the same order as
18665 they are passed to the compiler.
18666
18667- pprint.pprint() and pprint.pformat() now have additional parameters
18668 indent, width and depth.
18669
18670- Patch #750542: pprint now will pretty print subclasses of list, tuple
18671 and dict too, as long as they don't overwrite __repr__().
18672
18673- Bug #848614: distutils' msvccompiler fails to find the MSVC6
18674 compiler because of incomplete registry entries.
18675
18676- httplib.HTTP.putrequest now offers to omit the implicit Accept-Encoding.
18677
18678- Patch #841977: modulefinder didn't find extension modules in packages
18679
18680- imaplib.IMAP4.thread was added.
18681
18682- Plugged a minor hole in tempfile.mktemp() due to the use of
18683 os.path.exists(), switched to using os.lstat() directly if possible.
18684
18685- bisect.py and heapq.py now have underlying C implementations
18686 for better performance.
18687
18688- heapq.py has two new functions, nsmallest() and nlargest().
18689
18690- traceback.format_exc has been added (similar to print_exc but it returns
18691 a string).
18692
18693- xmlrpclib.MultiCall has been added.
18694
18695- poplib.POP3_SSL has been added.
18696
18697- tmpfile.mkstemp now returns an absolute path even if dir is relative.
18698
18699- urlparse is RFC 2396 compliant.
18700
18701- The fieldnames argument to the csv module's DictReader constructor is now
18702 optional. If omitted, the first row of the file will be used as the
18703 list of fieldnames.
18704
18705- encodings.bz2_codec was added for access to bz2 compression
18706 using "a long string".encode('bz2')
18707
18708- Various improvements to unittest.py, realigned with PyUnit CVS.
18709
18710- dircache now passes exceptions to the caller, instead of returning
18711 empty lists.
18712
18713- The bsddb module and dbhash module now support the iterator and
18714 mapping protocols which make them more substitutable for dictionaries
18715 and shelves.
18716
18717- The csv module's DictReader and DictWriter classes now accept keyword
18718 arguments. This was an omission in the initial implementation.
18719
18720- The email package handles some RFC 2231 parameters with missing
18721 CHARSET fields better. It also includes a patch to parameter
18722 parsing when semicolons appear inside quotes.
18723
18724- sets.py now runs under Py2.2. In addition, the argument restrictions
18725 for most set methods (but not the operators) have been relaxed to
18726 allow any iterable.
18727
18728- _strptime.py now has a behind-the-scenes caching mechanism for the most
18729 recent TimeRE instance used along with the last five unique directive
18730 patterns. The overall module was also made more thread-safe.
18731
18732- random.cunifvariate() and random.stdgamma() were deprecated in Py2.3
18733 and removed in Py2.4.
18734
18735- Bug #823328: urllib2.py's HTTP Digest Auth support works again.
18736
18737- Patch #873597: CJK codecs are imported into rank of default codecs.
18738
18739Tools/Demos
18740-----------
18741
18742- A hotshotmain script was added to the Tools/scripts directory that
18743 makes it easy to run a script under control of the hotshot profiler.
18744
18745- The db2pickle and pickle2db scripts can now dump/load gdbm files.
18746
18747- The file order on the command line of the pickle2db script was reversed.
18748 It is now [ picklefile ] dbfile. This provides better symmetry with
18749 db2pickle. The file arguments to both scripts are now source followed by
18750 destination in situations where both files are given.
18751
18752- The pydoc script will display a link to the module documentation for
18753 modules determined to be part of the core distribution. The documentation
18754 base directory defaults to http://www.python.org/doc/current/lib/ but can
18755 be changed by setting the PYTHONDOCS environment variable.
18756
18757- texcheck.py now detects double word errors.
18758
18759- md5sum.py mistakenly opened input files in text mode by default, a
18760 silent and dangerous change from previous releases. It once again
18761 opens input files in binary mode by default. The -t and -b flags
18762 remain for compatibility with the 2.3 release, but -b is the default
18763 now.
18764
18765- py-electric-colon now works when pending-delete/delete-selection mode is
18766 in effect
18767
18768- py-help-at-point is no longer bound to the F1 key - it's still bound to
18769 C-c C-h
18770
18771- Pynche was fixed to not crash when there is no ~/.pynche file and no
18772 -d option was given.
18773
18774Build
18775-----
18776
18777- Bug #978645: Modules/getpath.c now builds properly in --disable-framework
18778 build under OS X.
18779
18780- Profiling using gprof is now available if Python is configured with
18781 --enable-profiling.
18782
18783- Profiling the VM using the Pentium TSC is now possible if Python
18784 is configured --with-tsc.
18785
18786- In order to find libraries, setup.py now also looks in /lib64, for use
18787 on AMD64.
18788
18789- Bug #934635: Fixed a bug where the configure script couldn't detect
18790 getaddrinfo() properly if the KAME stack had SCTP support.
18791
18792- Support for missing ANSI C header files (limits.h, stddef.h, etc) was
18793 removed.
18794
18795- Systems requiring the D4, D6 or D7 variants of pthreads are no longer
18796 supported (see PEP 11).
18797
18798- Universal newline support can no longer be disabled (see PEP 11).
18799
18800- Support for DGUX, SunOS 4, IRIX 4 and Minix was removed (see PEP 11).
18801
18802- Support for systems requiring --with-dl-dld or --with-sgi-dl was removed
18803 (see PEP 11).
18804
18805- Tests for sizeof(char) were removed since ANSI C mandates that
18806 sizeof(char) must be 1.
18807
18808C API
18809-----
18810
18811- Thanks to Anthony Tuininga, the datetime module now supplies a C API
18812 containing type-check macros and constructors. See new docs in the
18813 Python/C API Reference Manual for details.
18814
18815- Private function _PyTime_DoubleToTimet added, to convert a Python
18816 timestamp (C double) to platform time_t with some out-of-bounds
18817 checking. Declared in new header file timefuncs.h. It would be
18818 good to expose some other internal timemodule.c functions there.
18819
18820- New public functions PyEval_EvaluateFrame and PyGen_New to expose
18821 generator objects.
18822
18823- New public functions Py_IncRef() and Py_DecRef(), exposing the
18824 functionality of the Py_XINCREF() and Py_XDECREF macros. Useful for
18825 runtime dynamic embedding of Python. See patch #938302, by Bob
18826 Ippolito.
18827
18828- Added a new macro, PySequence_Fast_ITEMS, which retrieves a fast sequence's
18829 underlying array of PyObject pointers. Useful for high speed looping.
18830
18831- Created a new method flag, METH_COEXIST, which causes a method to be loaded
18832 even if already defined by a slot wrapper. This allows a __contains__
18833 method, for example, to co-exist with a defined sq_contains slot. This
18834 is helpful because the PyCFunction can take advantage of optimized calls
18835 whenever METH_O or METH_NOARGS flags are defined.
18836
18837- Added a new function, PyDict_Contains(d, k) which is like
18838 PySequence_Contains() but is specific to dictionaries and executes
18839 about 10% faster.
18840
18841- Added three new macros: Py_RETURN_NONE, Py_RETURN_TRUE, and Py_RETURN_FALSE.
18842 Each return the singleton they mention after Py_INCREF()ing them.
18843
18844- Added a new function, PyTuple_Pack(n, ...) for constructing tuples from a
18845 variable length argument list of Python objects without having to invoke
18846 the more complex machinery of Py_BuildValue(). PyTuple_Pack(3, a, b, c)
18847 is equivalent to Py_BuildValue("(OOO)", a, b, c).
18848
18849Windows
18850-------
18851
18852- The _winreg module could segfault when reading very large registry
18853 values, due to unchecked alloca() calls (SF bug 851056). The fix is
18854 uses either PyMem_Malloc(n) or PyString_FromStringAndSize(NULL, n),
18855 as appropriate, followed by a size check.
18856
18857- file.truncate() could misbehave if the file was open for update
18858 (modes r+, rb+, w+, wb+), and the most recent file operation before
18859 the truncate() call was an input operation. SF bug 801631.
18860
18861
18862What's New in Python 2.3 final?
18863===============================
18864
18865*Release date: 29-Jul-2003*
18866
18867IDLE
18868----
18869
18870- Bug 778400: IDLE hangs when selecting "Edit with IDLE" from explorer.
18871 This was unique to Windows, and was fixed by adding an -n switch to
18872 the command the Windows installer creates to execute "Edit with IDLE"
18873 context-menu actions.
18874
18875- IDLE displays a new message upon startup: some "personal firewall"
18876 kinds of programs (for example, ZoneAlarm) open a dialog of their
18877 own when any program opens a socket. IDLE does use sockets, talking
18878 on the computer's internal loopback interface. This connection is not
18879 visible on any external interface and no data is sent to or received
18880 from the Internet. So, if you get such a dialog when opening IDLE,
18881 asking whether to let pythonw.exe talk to address 127.0.0.1, say yes,
18882 and rest assured no communication external to your machine is taking
18883 place. If you don't allow it, IDLE won't be able to start.
18884
18885
18886What's New in Python 2.3 release candidate 2?
18887=============================================
18888
18889*Release date: 24-Jul-2003*
18890
18891Core and builtins
18892-----------------
18893
18894- It is now possible to import from zipfiles containing additional
18895 data bytes before the zip compatible archive. Zipfiles containing a
18896 comment at the end are still unsupported.
18897
18898Extension modules
18899-----------------
18900
18901- A longstanding bug in the parser module's initialization could cause
18902 fatal internal refcount confusion when the module got initialized more
18903 than once. This has been fixed.
18904
18905- Fixed memory leak in pyexpat; using the parser's ParseFile() method
18906 with open files that aren't instances of the standard file type
18907 caused an instance of the bound .read() method to be leaked on every
18908 call.
18909
18910- Fixed some leaks in the locale module.
18911
18912Library
18913-------
18914
18915- Lib/encodings/rot_13.py when used as a script, now more properly
18916 uses the first Python interpreter on your path.
18917
18918- Removed caching of TimeRE (and thus LocaleTime) in _strptime.py to
18919 fix a locale related bug in the test suite. Although another patch
18920 was needed to actually fix the problem, the cache code was not
18921 restored.
18922
18923IDLE
18924----
18925
18926- Calltips patches.
18927
18928Build
18929-----
18930
18931- For MacOSX, added -mno-fused-madd to BASECFLAGS to fix test_coercion
18932 on Panther (OSX 10.3).
18933
18934C API
18935-----
18936
18937Windows
18938-------
18939
18940- The tempfile module could do insane imports on Windows if PYTHONCASEOK
18941 was set, making temp file creation impossible. Repaired.
18942
18943- Add a patch to workaround pthread_sigmask() bugs in Cygwin.
18944
18945Mac
18946---
18947
18948- Various fixes to pimp.
18949
18950- Scripts runs with pythonw no longer had full window manager access.
18951
18952- Don't force boot-disk-only install, for reasons unknown it causes
18953 more problems than it solves.
18954
18955
18956What's New in Python 2.3 release candidate 1?
18957=============================================
18958
18959*Release date: 18-Jul-2003*
18960
18961Core and builtins
18962-----------------
18963
18964- The new function sys.getcheckinterval() returns the last value set
18965 by sys.setcheckinterval().
18966
18967- Several bugs in the symbol table phase of the compiler have been
18968 fixed. Errors could be lost and compilation could fail without
18969 reporting an error. SF patch 763201.
18970
18971- The interpreter is now more robust about importing the warnings
18972 module. In an executable generated by freeze or similar programs,
18973 earlier versions of 2.3 would fail if the warnings module could
18974 not be found on the file system. Fixes SF bug 771097.
18975
18976- A warning about assignments to module attributes that shadow
18977 builtins, present in earlier releases of 2.3, has been removed.
18978
Georg Brandl93dc9eb2010-03-14 10:56:14 +000018979- It is not possible to create subclasses of built-in types like str
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000018980 and tuple that define an itemsize. Earlier releases of Python 2.3
18981 allowed this by mistake, leading to crashes and other problems.
18982
18983- The thread_id is now initialized to 0 in a non-thread build. SF bug
18984 770247.
18985
18986- SF bug 762891: "del p[key]" on proxy object no longer raises SystemError.
18987
18988Extension modules
18989-----------------
18990
18991- weakref.proxy() can now handle "del obj[i]" for proxy objects
18992 defining __delitem__. Formerly, it generated a SystemError.
18993
18994- SSL no longer crashes the interpreter when the remote side disconnects.
18995
18996- On Unix the mmap module can again be used to map device files.
18997
18998- time.strptime now exclusively uses the Python implementation
18999 contained within the _strptime module.
19000
19001- The print slot of weakref proxy objects was removed, because it was
19002 not consistent with the object's repr slot.
19003
19004- The mmap module only checks file size for regular files, not
19005 character or block devices. SF patch 708374.
19006
19007- The cPickle Pickler garbage collection support was fixed to traverse
19008 the find_class attribute, if present.
19009
19010- There are several fixes for the bsddb3 wrapper module.
19011
19012 bsddb3 no longer crashes if an environment is closed before a cursor
19013 (SF bug 763298).
19014
19015 The DB and DBEnv set_get_returns_none function was extended to take
19016 a level instead of a boolean flag. The new level 2 means that in
19017 addition, cursor.set()/.get() methods return None instead of raising
19018 an exception.
19019
19020 A typo was fixed in DBCursor.join_item(), preventing a crash.
19021
19022Library
19023-------
19024
19025- distutils now supports MSVC 7.1
19026
19027- doctest now examines all docstrings by default. Previously, it would
19028 skip over functions with private names (as indicated by the underscore
19029 naming convention). The old default created too much of a risk that
19030 user tests were being skipped inadvertently. Note, this change could
19031 break code in the unlikely case that someone had intentionally put
19032 failing tests in the docstrings of private functions. The breakage
19033 is easily fixable by specifying the old behavior when calling testmod()
19034 or Tester().
19035
19036- There were several fixes to the way dumbdbms are closed. It's vital
19037 that a dumbdbm database be closed properly, else the on-disk data
19038 and directory files can be left in mutually inconsistent states.
19039 dumbdbm.py's _Database.__del__() method attempted to close the
19040 database properly, but a shutdown race in _Database._commit() could
19041 prevent this from working, so that a program trusting __del__() to
19042 get the on-disk files in synch could be badly surprised. The race
19043 has been repaired. A sync() method was also added so that shelve
19044 can guarantee data is written to disk.
19045
19046 The close() method can now be called more than once without complaint.
19047
19048- The classes in threading.py are now new-style classes. That they
19049 weren't before was an oversight.
19050
19051- The urllib2 digest authentication handlers now define the correct
19052 auth_header. The earlier versions would fail at runtime.
19053
19054- SF bug 763023: fix uncaught ZeroDivisionError in difflib ratio methods
19055 when there are no lines.
19056
19057- SF bug 763637: fix exception in Tkinter with after_cancel
19058 which could occur with Tk 8.4
19059
19060- SF bug 770601: CGIHTTPServer.py now passes the entire environment
19061 to child processes.
19062
19063- SF bug 765238: add filter to fnmatch's __all__.
19064
19065- SF bug 748201: make time.strptime() error messages more helpful.
19066
19067- SF patch 764470: Do not dump the args attribute of a Fault object in
19068 xmlrpclib.
19069
19070- SF patch 549151: urllib and urllib2 now redirect POSTs on 301
19071 responses.
19072
19073- SF patch 766650: The whichdb module was fixed to recognize dbm files
19074 generated by gdbm on OS/2 EMX.
19075
19076- SF bugs 763047 and 763052: fixes bug of timezone value being left as
19077 -1 when ``time.tzname[0] == time.tzname[1] and not time.daylight``
19078 is true when it should only when time.daylight is true.
19079
19080- SF bug 764548: re now allows subclasses of str and unicode to be
19081 used as patterns.
19082
19083- SF bug 763637: In Tkinter, change after_cancel() to handle tuples
19084 of varying sizes. Tk 8.4 returns a different number of values
19085 than Tk 8.3.
19086
19087- SF bug 763023: difflib.ratio() did not catch zero division.
19088
19089- The Queue module now has an __all__ attribute.
19090
19091Tools/Demos
19092-----------
19093
19094- See Lib/idlelib/NEWS.txt for IDLE news.
19095
19096- SF bug 753592: webchecker/wsgui now handles user supplied directories.
19097
19098- The trace.py script has been removed. It is now in the standard library.
19099
19100Build
19101-----
19102
19103- Python now compiles with -fno-strict-aliasing if possible (SF bug 766696).
19104
19105- The socket module compiles on IRIX 6.5.10.
19106
19107- An irix64 system is treated the same way as an irix6 system (SF
19108 patch 764560).
19109
19110- Several definitions were missing on FreeBSD 5.x unless the
19111 __BSD_VISIBLE symbol was defined. configure now defines it as
19112 needed.
19113
19114C API
19115-----
19116
19117- Unicode objects now support mbcs as a built-in encoding, so the C
19118 API can use it without deferring to the encodings package.
19119
19120Windows
19121-------
19122
19123- The Windows implementation of PyThread_start_new_thread() never
19124 checked error returns from Windows functions correctly. As a result,
19125 it could claim to start a new thread even when the Microsoft
19126 _beginthread() function failed (due to "too many threads" -- this is
19127 on the order of thousands when it happens). In these cases, the
19128 Python exception ::
19129
19130 thread.error: can't start new thread
19131
19132 is raised now.
19133
19134- SF bug 766669: Prevent a GPF on interpreter exit when sockets are in
19135 use. The interpreter now calls WSACleanup() from Py_Finalize()
19136 instead of from DLL teardown.
19137
19138Mac
19139---
19140
19141- Bundlebuilder now inherits default values in the right way. It was
19142 previously possible for app bundles to get a type of "BNDL" instead
19143 of "APPL." Other improvements include, a --build-id option to
19144 specify the CFBundleIdentifier and using the --python option to set
19145 the executable in the bundle.
19146
19147- Fixed two bugs in MacOSX framework handling.
19148
19149- pythonw did not allow user interaction in 2.3rc1, this has been fixed.
19150
19151- Python is now compiled with -mno-fused-madd, making all tests pass
19152 on Panther.
19153
19154What's New in Python 2.3 beta 2?
19155================================
19156
19157*Release date: 29-Jun-2003*
19158
19159Core and builtins
19160-----------------
19161
19162- A program can now set the environment variable PYTHONINSPECT to some
19163 string value in Python, and cause the interpreter to enter the
19164 interactive prompt at program exit, as if Python had been invoked
19165 with the -i option.
19166
19167- list.index() now accepts optional start and stop arguments. Similar
19168 changes were made to UserList.index(). SF feature request 754014.
19169
19170- SF patch 751998 fixes an unwanted side effect of the previous fix
19171 for SF bug 742860 (the next item).
19172
19173- SF bug 742860: "WeakKeyDictionary __delitem__ uses iterkeys". This
19174 wasn't threadsafe, was very inefficient (expected time O(len(dict))
19175 instead of O(1)), and could raise a spurious RuntimeError if another
19176 thread mutated the dict during __delitem__, or if a comparison function
19177 mutated it. It also neglected to raise KeyError when the key wasn't
19178 present; didn't raise TypeError when the key wasn't of a weakly
19179 referencable type; and broke various more-or-less obscure dict
19180 invariants by using a sequence of equality comparisons over the whole
19181 set of dict keys instead of computing the key's hash code to narrow
19182 the search to those keys with the same hash code. All of these are
19183 considered to be bugs. A new implementation of __delitem__ repairs all
19184 that, but note that fixing these bugs may change visible behavior in
19185 code relying (whether intentionally or accidentally) on old behavior.
19186
19187- SF bug 734869: Fixed a compiler bug that caused a fatal error when
19188 compiling a list comprehension that contained another list comprehension
19189 embedded in a lambda expression.
19190
19191- SF bug 705231: builtin pow() no longer lets the platform C pow()
19192 raise -1.0 to integer powers, because (at least) glibc gets it wrong
19193 in some cases. The result should be -1.0 if the power is odd and 1.0
19194 if the power is even, and any float with a sufficiently large exponent
19195 is (mathematically) an exact even integer.
19196
19197- SF bug 759227: A new-style class that implements __nonzero__() must
19198 return a bool or int (but not an int subclass) from that method. This
19199 matches the restriction on classic classes.
19200
19201- The encoding attribute has been added for file objects, and set to
19202 the terminal encoding on Unix and Windows.
19203
19204- The softspace attribute of file objects became read-only by oversight.
19205 It's writable again.
19206
19207- Reverted a 2.3 beta 1 change to iterators for subclasses of list and
19208 tuple. By default, the iterators now access data elements directly
19209 instead of going through __getitem__. If __getitem__ access is
19210 preferred, then __iter__ can be overridden.
19211
19212- SF bug 735247: The staticmethod and super types participate in
19213 garbage collection. Before this change, it was possible for leaks to
19214 occur in functions with non-global free variables that used these types.
19215
19216Extension modules
19217-----------------
19218
19219- the socket module has a new exception, socket.timeout, to allow
19220 timeouts to be handled separately from other socket errors.
19221
19222- SF bug 751276: cPickle has fixed to propagate exceptions raised in
19223 user code. In earlier versions, cPickle caught and ignored any
19224 exception when it performed operations that it expected to raise
19225 specific exceptions like AttributeError.
19226
19227- cPickle Pickler and Unpickler objects now participate in garbage
19228 collection.
19229
19230- mimetools.choose_boundary() could return duplicate strings at times,
19231 especially likely on Windows. The strings returned are now guaranteed
19232 unique within a single program run.
19233
19234- thread.interrupt_main() raises KeyboardInterrupt in the main thread.
19235 dummy_thread has also been modified to try to simulate the behavior.
19236
19237- array.array.insert() now treats negative indices as being relative
19238 to the end of the array, just like list.insert() does. (SF bug #739313)
19239
19240- The datetime module classes datetime, time, and timedelta are now
19241 properly subclassable.
19242
19243- _tkinter.{get|set}busywaitinterval was added.
19244
19245- itertools.islice() now accepts stop=None as documented.
19246 Fixes SF bug #730685.
19247
19248- the bsddb185 module is built in one restricted instance -
19249 /usr/include/db.h exists and defines HASHVERSION to be 2. This is true
19250 for many BSD-derived systems.
19251
19252
19253Library
19254-------
19255
19256- Some happy doctest extensions from Jim Fulton have been added to
19257 doctest.py. These are already being used in Zope3. The two
19258 primary ones:
19259
19260 doctest.debug(module, name) extracts the doctests from the named object
19261 in the given module, puts them in a temp file, and starts pdb running
19262 on that file. This is great when a doctest fails.
19263
19264 doctest.DocTestSuite(module=None) returns a synthesized unittest
19265 TestSuite instance, to be run by the unittest framework, which
19266 runs all the doctests in the module. This allows writing tests in
19267 doctest style (which can be clearer and shorter than writing tests
19268 in unittest style), without losing unittest's powerful testing
19269 framework features (which doctest lacks).
19270
19271- For compatibility with doctests created before 2.3, if an expected
19272 output block consists solely of "1" and the actual output block
19273 consists solely of "True", it's accepted as a match; similarly
19274 for "0" and "False". This is quite un-doctest-like, but is practical.
19275 The behavior can be disabled by passing the new doctest module
19276 constant DONT_ACCEPT_TRUE_FOR_1 to the new optionflags optional
19277 argument.
19278
19279- ZipFile.testzip() now only traps BadZipfile exceptions. Previously,
19280 a bare except caught to much and reported all errors as a problem
19281 in the archive.
19282
19283- The logging module now has a new function, makeLogRecord() making
19284 LogHandler easier to interact with DatagramHandler and SocketHandler.
19285
19286- The cgitb module has been extended to support plain text display (SF patch
19287 569574).
19288
19289- A brand new version of IDLE (from the IDLEfork project at
19290 SourceForge) is now included as Lib/idlelib. The old Tools/idle is
19291 no more.
19292
19293- Added a new module: trace (documentation missing). This module used
19294 to be distributed in Tools/scripts. It uses sys.settrace() to trace
19295 code execution -- either function calls or individual lines. It can
19296 generate tracing output during execution or a post-mortem report of
19297 code coverage.
19298
19299- The threading module has new functions settrace() and setprofile()
19300 that cooperate with the functions of the same name in the sys
19301 module. A function registered with the threading module will
19302 be used for all threads it creates. The new trace module uses this
19303 to provide tracing for code running in threads.
19304
19305- copy.py: applied SF patch 707900, fixing bug 702858, by Steven
19306 Taschuk. Copying a new-style class that had a reference to itself
19307 didn't work. (The same thing worked fine for old-style classes.)
19308 Builtin functions are now treated as atomic, fixing bug #746304.
19309
19310- difflib.py has two new functions: context_diff() and unified_diff().
19311
19312- More fixes to urllib (SF 549151): (a) When redirecting, always use
19313 GET. This is common practice and more-or-less sanctioned by the
19314 HTTP standard. (b) Add a handler for 307 redirection, which becomes
19315 an error for POST, but a regular redirect for GET and HEAD
19316
19317- Added optional 'onerror' argument to os.walk(), to control error
19318 handling.
19319
19320- inspect.is{method|data}descriptor was added, to allow pydoc display
19321 __doc__ of data descriptors.
19322
19323- Fixed socket speed loss caused by use of the _socketobject wrapper class
19324 in socket.py.
19325
19326- timeit.py now checks the current directory for imports.
19327
19328- urllib2.py now knows how to order proxy classes, so the user doesn't
19329 have to insert it in front of other classes, nor do dirty tricks like
19330 inserting a "dummy" HTTPHandler after a ProxyHandler when building an
19331 opener with proxy support.
19332
19333- Iterators have been added for dbm keys.
19334
19335- random.Random objects can now be pickled.
19336
19337Tools/Demos
19338-----------
19339
19340- pydoc now offers help on keywords and topics.
19341
19342- Tools/idle is gone; long live Lib/idlelib.
19343
19344- diff.py prints file diffs in context, unified, or ndiff formats,
19345 providing a command line interface to difflib.py.
19346
19347- texcheck.py is a new script for making a rough validation of Python LaTeX
19348 files.
19349
19350Build
19351-----
19352
19353- Setting DESTDIR during 'make install' now allows specifying a
19354 different root directory.
19355
19356C API
19357-----
19358
19359- PyType_Ready(): If a type declares that it participates in gc
19360 (Py_TPFLAGS_HAVE_GC), and its base class does not, and its base class's
19361 tp_free slot is the default _PyObject_Del, and type does not define
19362 a tp_free slot itself, _PyObject_GC_Del is assigned to type->tp_free.
19363 Previously _PyObject_Del was inherited, which could at best lead to a
19364 segfault. In addition, if even after this magic the type's tp_free
19365 slot is _PyObject_Del or NULL, and the type is a base type
19366 (Py_TPFLAGS_BASETYPE), TypeError is raised: since the type is a base
19367 type, its dealloc function must call type->tp_free, and since the type
19368 is gc'able, tp_free must not be NULL or _PyObject_Del.
19369
19370- PyThreadState_SetAsyncExc(): A new API (deliberately accessible only
19371 from C) to interrupt a thread by sending it an exception. It is
19372 intentional that you have to write your own C extension to call it
19373 from Python.
19374
19375
19376New platforms
19377-------------
19378
19379None this time.
19380
19381Tests
19382-----
19383
19384- test_imp rewritten so that it doesn't raise RuntimeError if run as a
19385 side effect of being imported ("import test.autotest").
19386
19387Windows
19388-------
19389
19390- The Windows installer ships with Tcl/Tk 8.4.3 (upgraded from 8.4.1).
19391
19392- The installer always suggested that Python be installed on the C:
19393 drive, due to a hardcoded "C:" generated by the Wise installation
19394 wizard. People with machines where C: is not the system drive
19395 usually want Python installed on whichever drive is their system drive
19396 instead. We removed the hardcoded "C:", and two testers on machines
19397 where C: is not the system drive report that the installer now
19398 suggests their system drive. Note that you can always select the
19399 directory you want in the "Select Destination Directory" dialog --
19400 that's what it's for.
19401
19402Mac
19403---
19404
19405- There's a new module called "autoGIL", which offers a mechanism to
19406 automatically release the Global Interpreter Lock when an event loop
19407 goes to sleep, allowing other threads to run. It's currently only
19408 supported on OSX, in the Mach-O version.
19409- The OSA modules now allow direct access to properties of the
19410 toplevel application class (in AppleScript terminology).
19411- The Package Manager can now update itself.
19412
19413SourceForge Bugs and Patches Applied
19414------------------------------------
19415
19416430160, 471893, 501716, 542562, 549151, 569574, 595837, 596434,
19417598163, 604210, 604716, 610332, 612627, 614770, 620190, 621891,
19418622042, 639139, 640236, 644345, 649742, 649742, 658233, 660022,
19419661318, 661676, 662807, 662923, 666219, 672855, 678325, 682347,
19420683486, 684981, 685773, 686254, 692776, 692959, 693094, 696777,
19421697989, 700827, 703666, 708495, 708604, 708901, 710733, 711902,
19422713722, 715782, 718286, 719359, 719367, 723136, 723831, 723962,
19423724588, 724767, 724767, 725942, 726150, 726446, 726869, 727051,
19424727719, 727719, 727805, 728277, 728563, 728656, 729096, 729103,
19425729293, 729297, 729300, 729317, 729395, 729622, 729817, 730170,
19426730296, 730594, 730685, 730826, 730963, 731209, 731403, 731504,
19427731514, 731626, 731635, 731643, 731644, 731644, 731689, 732124,
19428732143, 732234, 732284, 732284, 732479, 732761, 732783, 732951,
19429733667, 733781, 734118, 734231, 734869, 735051, 735293, 735527,
19430735613, 735694, 736962, 736962, 737970, 738066, 739313, 740055,
19431740234, 740301, 741806, 742126, 742741, 742860, 742860, 742911,
19432744041, 744104, 744238, 744687, 744877, 745055, 745478, 745525,
19433745620, 746012, 746304, 746366, 746801, 746953, 747348, 747667,
19434747954, 748846, 748849, 748973, 748975, 749191, 749210, 749759,
19435749831, 749911, 750008, 750092, 750542, 750595, 751038, 751107,
19436751276, 751451, 751916, 751941, 751956, 751998, 752671, 753451,
19437753602, 753617, 753845, 753925, 754014, 754340, 754447, 755031,
19438755087, 755147, 755245, 755683, 755987, 756032, 756996, 757058,
19439757229, 757818, 757821, 757822, 758112, 758910, 759227, 759889,
19440760257, 760703, 760792, 761104, 761337, 761519, 761830, 762455
19441
19442
19443What's New in Python 2.3 beta 1?
19444================================
19445
19446*Release date: 25-Apr-2003*
19447
19448Core and builtins
19449-----------------
19450
19451- New format codes B, H, I, k and K have been implemented for
19452 PyArg_ParseTuple and PyBuild_Value.
19453
Georg Brandl93dc9eb2010-03-14 10:56:14 +000019454- New built-in function sum(seq, start=0) returns the sum of all the
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019455 items in iterable object seq, plus start (items are normally numbers,
19456 and cannot be strings).
19457
19458- bool() called without arguments now returns False rather than
19459 raising an exception. This is consistent with calling the
Georg Brandl93dc9eb2010-03-14 10:56:14 +000019460 constructors for the other built-in types -- called without argument
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019461 they all return the false value of that type. (SF patch #724135)
19462
19463- In support of PEP 269 (making the pgen parser generator accessible
19464 from Python), some changes to the pgen code structure were made; a
19465 few files that used to be linked only with pgen are now linked with
19466 Python itself.
19467
19468- The repr() of a weakref object now shows the __name__ attribute of
19469 the referenced object, if it has one.
19470
19471- super() no longer ignores data descriptors, except __class__. See
19472 the thread started at
19473 http://mail.python.org/pipermail/python-dev/2003-April/034338.html
19474
19475- list.insert(i, x) now interprets negative i as it would be
19476 interpreted by slicing, so negative values count from the end of the
19477 list. This was the only place where such an interpretation was not
19478 placed on a list index.
19479
19480- range() now works even if the arguments are longs with magnitude
19481 larger than sys.maxint, as long as the total length of the sequence
19482 fits. E.g., range(2**100, 2**101, 2**100) is the following list:
19483 [1267650600228229401496703205376L]. (SF patch #707427.)
19484
19485- Some horridly obscure problems were fixed involving interaction
19486 between garbage collection and old-style classes with "ambitious"
19487 getattr hooks. If an old-style instance didn't have a __del__ method,
19488 but did have a __getattr__ hook, and the instance became reachable
19489 only from an unreachable cycle, and the hook resurrected or deleted
19490 unreachable objects when asked to resolve "__del__", anything up to
19491 a segfault could happen. That's been repaired.
19492
19493- dict.pop now takes an optional argument specifying a default
19494 value to return if the key is not in the dict. If a default is not
19495 given and the key is not found, a KeyError will still be raised.
19496 Parallel changes were made to UserDict.UserDict and UserDict.DictMixin.
19497 [SF patch #693753] (contributed by Michael Stone.)
19498
19499- sys.getfilesystemencoding() was added to expose
19500 Py_FileSystemDefaultEncoding.
19501
19502- New function sys.exc_clear() clears the current exception. This is
19503 rarely needed, but can sometimes be useful to release objects
19504 referenced by the traceback held in sys.exc_info()[2]. (SF patch
19505 #693195.)
19506
19507- On 64-bit systems, a dictionary could contain duplicate long/int keys
19508 if the key value was larger than 2**32. See SF bug #689659.
19509
19510- Fixed SF bug #663074. The codec system was using global static
19511 variables to store internal data. As a result, any attempts to use the
19512 unicode system with multiple active interpreters, or successive
19513 interpreter executions, would fail.
19514
19515- "%c" % u"a" now returns a unicode string instead of raising a
Martin Panter7462b6492015-11-02 03:37:02 +000019516 TypeError. u"%c" % 0xffffffff now raises an OverflowError instead
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019517 of a ValueError to be consistent with "%c" % 256. See SF patch #710127.
19518
19519Extension modules
19520-----------------
19521
19522- The socket module now provides the functions inet_pton and inet_ntop
19523 for converting between string and packed representation of IP
19524 addresses. There is also a new module variable, has_ipv6, which is
19525 True iff the current Python has IPv6 support. See SF patch #658327.
19526
19527- Tkinter wrappers around Tcl variables now pass objects directly
19528 to Tcl, instead of first converting them to strings.
19529
19530- The .*? pattern in the re module is now special-cased to avoid the
19531 recursion limit. (SF patch #720991 -- many thanks to Gary Herron
19532 and Greg Chapman.)
19533
19534- New function sys.call_tracing() allows pdb to debug code
19535 recursively.
19536
19537- New function gc.get_referents(obj) returns a list of objects
19538 directly referenced by obj. In effect, it exposes what the object's
19539 tp_traverse slot does, and can be helpful when debugging memory
19540 leaks.
19541
19542- The iconv module has been removed from this release.
19543
19544- The platform-independent routines for packing floats in IEEE formats
19545 (struct.pack's <f, >f, <d, and >d codes; pickle and cPickle's protocol 1
19546 pickling of floats) ignored that rounding can cause a carry to
19547 propagate. The worst consequence was that, in rare cases, <f and >f
19548 could produce strings that, when unpacked again, were a factor of 2
19549 away from the original float. This has been fixed. See SF bug
19550 #705836.
19551
19552- New function time.tzset() provides access to the C library tzset()
19553 function, if supported. (SF patch #675422.)
19554
19555- Using createfilehandler, deletefilehandler, createtimerhandler functions
19556 on Tkinter.tkinter (_tkinter module) no longer crashes the interpreter.
19557 See SF bug #692416.
19558
19559- Modified the fcntl.ioctl() function to allow modification of a passed
19560 mutable buffer (for details see the reference documentation).
19561
19562- Made user requested changes to the itertools module.
19563 Subsumed the times() function into repeat().
19564 Added chain() and cycle().
19565
19566- The rotor module is now deprecated; the encryption algorithm it uses
19567 is not believed to be secure, and including crypto code with Python
19568 has implications for exporting and importing it in various countries.
19569
19570- The socket module now always uses the _socketobject wrapper class, even on
19571 platforms which have dup(2). The makefile() method is built directly
19572 on top of the socket without duplicating the file descriptor, allowing
19573 timeouts to work properly.
19574
19575Library
19576-------
19577
19578- New generator function os.walk() is an easy-to-use alternative to
19579 os.path.walk(). See os module docs for details. os.path.walk()
19580 isn't deprecated at this time, but may become deprecated in a
19581 future release.
19582
19583- Added new module "platform" which provides a wide range of tools
19584 for querying platform dependent features.
19585
19586- netrc now allows ASCII punctuation characters in passwords.
19587
19588- shelve now supports the optional writeback argument, and exposes
19589 pickle protocol versions.
19590
19591- Several methods of nntplib.NNTP have grown an optional file argument
19592 which specifies a file where to divert the command's output
19593 (already supported by the body() method). (SF patch #720468)
19594
19595- The self-documenting XML server library DocXMLRPCServer was added.
19596
19597- Support for internationalized domain names has been added through
19598 the 'idna' and 'punycode' encodings, the 'stringprep' module, the
19599 'mkstringprep' tool, and enhancements to the socket and httplib
19600 modules.
19601
19602- htmlentitydefs has two new dictionaries: name2codepoint maps
19603 HTML entity names to Unicode codepoints (as integers).
19604 codepoint2name is the reverse mapping. See SF patch #722017.
19605
19606- pdb has a new command, "debug", which lets you step through
19607 arbitrary code from the debugger's (pdb) prompt.
19608
19609- unittest.failUnlessEqual and its equivalent unittest.assertEqual now
19610 return 'not a == b' rather than 'a != b'. This gives the desired
19611 result for classes that define __eq__ without defining __ne__.
19612
19613- sgmllib now supports SGML marked sections, in particular the
19614 MS Office extensions.
19615
19616- The urllib module now offers support for the iterator protocol.
19617 SF patch 698520 contributed by Brett Cannon.
19618
19619- New module timeit provides a simple framework for timing the
19620 execution speed of expressions and statements.
19621
19622- sets.Set objects now support mixed-type __eq__ and __ne__, instead
19623 of raising TypeError. If x is a Set object and y is a non-Set object,
19624 x == y is False, and x != y is True. This is akin to the change made
19625 for mixed-type comparisons of datetime objects in 2.3a2; more info
19626 about the rationale is in the NEWS entry for that. See also SF bug
19627 report <http://www.python.org/sf/693121>.
19628
19629- On Unix platforms, if os.listdir() is called with a Unicode argument,
19630 it now returns Unicode strings. (This behavior was added earlier
19631 to the Windows NT/2k/XP version of os.listdir().)
19632
19633- Distutils: both 'py_modules' and 'packages' keywords can now be specified
19634 in core.setup(). Previously you could supply one or the other, but
19635 not both of them. (SF patch #695090 from Bernhard Herzog)
19636
19637- New csv package makes it easy to read/write CSV files.
19638
19639- Module shlex has been extended to allow posix-like shell parsings,
19640 including a split() function for easy spliting of quoted strings and
19641 commands. An iterator interface was also implemented.
19642
19643Tools/Demos
19644-----------
19645
19646- New script combinerefs.py helps analyze new PYTHONDUMPREFS output.
19647 See the module docstring for details.
19648
19649Build
19650-----
19651
19652- Fix problem building on OSF1 because the compiler only accepted
19653 preprocessor directives that start in column 1. (SF bug #691793.)
19654
19655C API
19656-----
19657
19658- Added PyGC_Collect(), equivalent to calling gc.collect().
19659
19660- PyThreadState_GetDict() was changed not to raise an exception or
19661 issue a fatal error when no current thread state is available. This
19662 makes it possible to print dictionaries when no thread is active.
19663
19664- LONG_LONG was renamed to PY_LONG_LONG. Extensions that use this and
19665 need compatibility with previous versions can use this:
19666
19667 #ifndef PY_LONG_LONG
19668 #define PY_LONG_LONG LONG_LONG
19669 #endif
19670
19671- Added PyObject_SelfIter() to fill the tp_iter slot for the
19672 typical case where the method returns its self argument.
19673
19674- The extended type structure used for heap types (new-style
19675 classes defined by Python code using a class statement) is now
19676 exported from object.h as PyHeapTypeObject. (SF patch #696193.)
19677
19678New platforms
19679-------------
19680
19681None this time.
19682
19683Tests
19684-----
19685
19686- test_timeout now requires -u network to be passed to regrtest to run.
19687 See SF bug #692988.
19688
19689Windows
19690-------
19691
19692- os.fsync() now exists on Windows, and calls the Microsoft _commit()
19693 function.
19694
19695- New function winsound.MessageBeep() wraps the Win32 API
19696 MessageBeep().
19697
19698Mac
19699---
19700
19701- os.listdir() now returns Unicode strings on MacOS X when called with
19702 a Unicode argument. See the general news item under "Library".
19703
19704- A new method MacOS.WMAvailable() returns true if it is safe to access
19705 the window manager, false otherwise.
19706
19707- EasyDialogs dialogs are now movable-modal, and if the application is
19708 currently in the background they will ask to be moved to the foreground
19709 before displaying.
19710
19711- OSA Scripting support has improved a lot, and gensuitemodule.py can now
19712 be used by mere mortals. The documentation is now also more or less
19713 complete.
19714
19715- The IDE (in a framework build) now includes introductory documentation
19716 in Apple Help Viewer format.
19717
19718
19719What's New in Python 2.3 alpha 2?
19720=================================
19721
19722*Release date: 19-Feb-2003*
19723
19724Core and builtins
19725-----------------
19726
19727- Negative positions returned from PEP 293 error callbacks are now
19728 treated as being relative to the end of the input string. Positions
19729 that are out of bounds raise an IndexError.
19730
19731- sys.path[0] (the directory from which the script is loaded) is now
19732 turned into an absolute pathname, unless it is the empty string.
19733 (SF patch #664376.)
19734
19735- Finally fixed the bug in compile() and exec where a string ending
19736 with an indented code block but no newline would raise SyntaxError.
19737 This would have been a four-line change in parsetok.c... Except
19738 codeop.py depends on this behavior, so a compilation flag had to be
19739 invented that causes the tokenizer to revert to the old behavior;
19740 this required extra changes to 2 .h files, 2 .c files, and 2 .py
19741 files. (Fixes SF bug #501622.)
19742
19743- If a new-style class defines neither __new__ nor __init__, its
19744 constructor would ignore all arguments. This is changed now: the
19745 constructor refuses arguments in this case. This might break code
19746 that worked under Python 2.2. The simplest fix is to add a no-op
19747 __init__: ``def __init__(self, *args, **kw): pass``.
19748
19749- Through a bytecode optimizer bug (and I bet you didn't even know
19750 Python *had* a bytecode optimizer :-), "unsigned" hex/oct constants
19751 with a leading minus sign would come out with the wrong sign.
19752 ("Unsigned" hex/oct constants are those with a face value in the
19753 range sys.maxint+1 through sys.maxint*2+1, inclusive; these have
19754 always been interpreted as negative numbers through sign folding.)
19755 E.g. 0xffffffff is -1, and -(0xffffffff) is 1, but -0xffffffff would
19756 come out as -4294967295. This was the case in Python 2.2 through
19757 2.2.2 and 2.3a1, and in Python 2.4 it will once again have that
19758 value, but according to PEP 237 it really needs to be 1 now. This
19759 will be backported to Python 2.2.3 a well. (SF #660455)
19760
19761- int(s, base) sometimes sign-folds hex and oct constants; it only
19762 does this when base is 0 and s.strip() starts with a '0'. When the
19763 sign is actually folded, as in int("0xffffffff", 0) on a 32-bit
19764 machine, which returns -1, a FutureWarning is now issued; in Python
19765 2.4, this will return 4294967295L, as do int("+0xffffffff", 0) and
19766 int("0xffffffff", 16) right now. (PEP 347)
19767
19768- super(X, x): x may now be a proxy for an X instance, i.e.
19769 issubclass(x.__class__, X) but not issubclass(type(x), X).
19770
19771- isinstance(x, X): if X is a new-style class, this is now equivalent
19772 to issubclass(type(x), X) or issubclass(x.__class__, X). Previously
19773 only type(x) was tested. (For classic classes this was already the
19774 case.)
19775
19776- compile(), eval() and the exec statement now fully support source code
19777 passed as unicode strings.
19778
19779- int subclasses can be initialized with longs if the value fits in an int.
19780 See SF bug #683467.
19781
19782- long(string, base) takes time linear in len(string) when base is a power
19783 of 2 now. It used to take time quadratic in len(string).
19784
19785- filter returns now Unicode results for Unicode arguments.
19786
19787- raw_input can now return Unicode objects.
19788
19789- List objects' sort() method now accepts None as the comparison function.
19790 Passing None is semantically identical to calling sort() with no
19791 arguments.
19792
19793- Fixed crash when printing a subclass of str and __str__ returned self.
19794 See SF bug #667147.
19795
19796- Fixed an invalid RuntimeWarning and an undetected error when trying
19797 to convert a long integer into a float which couldn't fit.
19798 See SF bug #676155.
19799
19800- Function objects now have a __module__ attribute that is bound to
19801 the name of the module in which the function was defined. This
19802 applies for C functions and methods as well as functions and methods
19803 defined in Python. This attribute is used by pickle.whichmodule(),
19804 which changes the behavior of whichmodule slightly. In Python 2.2
19805 whichmodule() returns "__main__" for functions that are not defined
19806 at the top-level of a module (examples: methods, nested functions).
19807 Now whichmodule() will return the proper module name.
19808
19809Extension modules
19810-----------------
19811
19812- operator.isNumberType() now checks that the object has a nb_int or
19813 nb_float slot, rather than simply checking whether it has a non-NULL
19814 tp_as_number pointer.
19815
19816- The imp module now has ways to acquire and release the "import
19817 lock": imp.acquire_lock() and imp.release_lock(). Note: this is a
19818 reentrant lock, so releasing the lock only truly releases it when
19819 this is the last release_lock() call. You can check with
19820 imp.lock_held(). (SF bug #580952 and patch #683257.)
19821
19822- Change to cPickle to match pickle.py (see below and PEP 307).
19823
19824- Fix some bugs in the parser module. SF bug #678518.
19825
19826- Thanks to Scott David Daniels, a subtle bug in how the zlib
19827 extension implemented flush() was fixed. Scott also rewrote the
19828 zlib test suite using the unittest module. (SF bug #640230 and
19829 patch #678531.)
19830
19831- Added an itertools module containing high speed, memory efficient
19832 looping constructs inspired by tools from Haskell and SML.
19833
19834- The SSL module now handles sockets with a timeout set correctly (SF
19835 patch #675750, fixing SF bug #675552).
19836
19837- os/posixmodule has grown the sysexits.h constants (EX_OK and friends).
19838
19839- Fixed broken threadstate swap in readline that could cause fatal
19840 errors when a readline hook was being invoked while a background
19841 thread was active. (SF bugs #660476 and #513033.)
19842
19843- fcntl now exposes the strops.h I_* constants.
19844
19845- Fix a crash on Solaris that occurred when calling close() on
19846 an mmap'ed file which was already closed. (SF patch #665913)
19847
19848- Fixed several serious bugs in the zipimport implementation.
19849
19850- datetime changes:
19851
19852 The date class is now properly subclassable. (SF bug #720908)
19853
19854 The datetime and datetimetz classes have been collapsed into a single
19855 datetime class, and likewise the time and timetz classes into a single
19856 time class. Previously, a datetimetz object with tzinfo=None acted
19857 exactly like a datetime object, and similarly for timetz. This wasn't
19858 enough of a difference to justify distinct classes, and life is simpler
19859 now.
19860
19861 today() and now() now round system timestamps to the closest
19862 microsecond <http://www.python.org/sf/661086>. This repairs an
19863 irritation most likely seen on Windows systems.
19864
19865 In dt.astimezone(tz), if tz.utcoffset(dt) returns a duration,
19866 ValueError is raised if tz.dst(dt) returns None (2.3a1 treated it
19867 as 0 instead, but a tzinfo subclass wishing to participate in
19868 time zone conversion has to take a stand on whether it supports
19869 DST; if you don't care about DST, then code dst() to return 0 minutes,
19870 meaning that DST is never in effect).
19871
19872 The tzinfo methods utcoffset() and dst() must return a timedelta object
19873 (or None) now. In 2.3a1 they could also return an int or long, but that
19874 was an unhelpfully redundant leftover from an earlier version wherein
19875 they couldn't return a timedelta. TOOWTDI.
19876
19877 The example tzinfo class for local time had a bug. It was replaced
19878 by a later example coded by Guido.
19879
19880 datetime.astimezone(tz) no longer raises an exception when the
19881 input datetime has no UTC equivalent in tz. For typical "hybrid" time
19882 zones (a single tzinfo subclass modeling both standard and daylight
19883 time), this case can arise one hour per year, at the hour daylight time
19884 ends. See new docs for details. In short, the new behavior mimics
19885 the local wall clock's behavior of repeating an hour in local time.
19886
19887 dt.astimezone() can no longer be used to convert between naive and aware
19888 datetime objects. If you merely want to attach, or remove, a tzinfo
19889 object, without any conversion of date and time members, use
19890 dt.replace(tzinfo=whatever) instead, where "whatever" is None or a
19891 tzinfo subclass instance.
19892
19893 A new method tzinfo.fromutc(dt) can be overridden in tzinfo subclasses
19894 to give complete control over how a UTC time is to be converted to
19895 a local time. The default astimezone() implementation calls fromutc()
19896 as its last step, so a tzinfo subclass can affect that too by overriding
19897 fromutc(). It's expected that the default fromutc() implementation will
19898 be suitable as-is for "almost all" time zone subclasses, but the
19899 creativity of political time zone fiddling appears unbounded -- fromutc()
19900 allows the highly motivated to emulate any scheme expressible in Python.
19901
19902 datetime.now(): The optional tzinfo argument was undocumented (that's
19903 repaired), and its name was changed to tz ("tzinfo" is overloaded enough
19904 already). With a tz argument, now(tz) used to return the local date
19905 and time, and attach tz to it, without any conversion of date and time
19906 members. This was less than useful. Now now(tz) returns the current
19907 date and time as local time in tz's time zone, akin to ::
19908
19909 tz.fromutc(datetime.utcnow().replace(tzinfo=utc))
19910
19911 where "utc" is an instance of a tzinfo subclass modeling UTC. Without
19912 a tz argument, now() continues to return the current local date and time,
19913 as a naive datetime object.
19914
19915 datetime.fromtimestamp(): Like datetime.now() above, this had less than
19916 useful behavior when the optional tinzo argument was specified. See
19917 also SF bug report <http://www.python.org/sf/660872>.
19918
19919 date and datetime comparison: In order to prevent comparison from
19920 falling back to the default compare-object-addresses strategy, these
19921 raised TypeError whenever they didn't understand the other object type.
19922 They still do, except when the other object has a "timetuple" attribute,
19923 in which case they return NotImplemented now. This gives other
19924 datetime objects (e.g., mxDateTime) a chance to intercept the
19925 comparison.
19926
19927 date, time, datetime and timedelta comparison: When the exception
19928 for mixed-type comparisons in the last paragraph doesn't apply, if
19929 the comparison is == then False is returned, and if the comparison is
19930 != then True is returned. Because dict lookup and the "in" operator
19931 only invoke __eq__, this allows, for example, ::
19932
19933 if some_datetime in some_sequence:
19934
19935 and ::
19936
19937 some_dict[some_timedelta] = whatever
19938
19939 to work as expected, without raising TypeError just because the
19940 sequence is heterogeneous, or the dict has mixed-type keys. [This
19941 seems like a good idea to implement for all mixed-type comparisons
19942 that don't want to allow falling back to address comparison.]
19943
19944 The constructors building a datetime from a timestamp could raise
19945 ValueError if the platform C localtime()/gmtime() inserted "leap
19946 seconds". Leap seconds are ignored now. On such platforms, it's
19947 possible to have timestamps that differ by a second, yet where
19948 datetimes constructed from them are equal.
19949
19950 The pickle format of date, time and datetime objects has changed
19951 completely. The undocumented pickler and unpickler functions no
19952 longer exist. The undocumented __setstate__() and __getstate__()
19953 methods no longer exist either.
19954
19955Library
19956-------
19957
19958- The logging module was updated slightly; the WARN level was renamed
19959 to WARNING, and the matching function/method warn() to warning().
19960
19961- The pickle and cPickle modules were updated with a new pickling
19962 protocol (documented by pickletools.py, see below) and several
19963 extensions to the pickle customization API (__reduce__, __setstate__
19964 etc.). The copy module now uses more of the pickle customization
19965 API to copy objects that don't implement __copy__ or __deepcopy__.
19966 See PEP 307 for details.
19967
19968- The distutils "register" command now uses http://www.python.org/pypi
19969 as the default repository. (See PEP 301.)
19970
Skip Montanaro7a98be22007-08-16 14:35:24 +000019971- the platform dependent path related variables sep, altsep,
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019972 pathsep, curdir, pardir and defpath are now defined in the platform
19973 dependent path modules (e.g. ntpath.py) rather than os.py, so these
19974 variables are now available via os.path. They continue to be
19975 available from the os module.
19976 (see <http://www.python.org/sf/680789>).
19977
19978- array.array was added to the types repr.py knows about (see
19979 <http://www.python.org/sf/680789>).
19980
19981- The new pickletools.py contains lots of documentation about pickle
19982 internals, and supplies some helpers for working with pickles, such as
19983 a symbolic pickle disassembler.
19984
Georg Brandl93dc9eb2010-03-14 10:56:14 +000019985- xmlrpclib.py now supports the built-in boolean type.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000019986
19987- py_compile has a new 'doraise' flag and a new PyCompileError
19988 exception.
19989
19990- SimpleXMLRPCServer now supports CGI through the CGIXMLRPCRequestHandler
19991 class.
19992
19993- The sets module now raises TypeError in __cmp__, to clarify that
19994 sets are not intended to be three-way-compared; the comparison
19995 operators are overloaded as subset/superset tests.
19996
19997- Bastion.py and rexec.py are disabled. These modules are not safe in
19998 Python 2.2. or 2.3.
19999
20000- realpath is now exported when doing ``from poxixpath import *``.
20001 It is also exported for ntpath, macpath, and os2emxpath.
20002 See SF bug #659228.
20003
20004- New module tarfile from Lars Gustäbel provides a comprehensive interface
20005 to tar archive files with transparent gzip and bzip2 compression.
20006 See SF patch #651082.
20007
20008- urlparse can now parse imap:// URLs. See SF feature request #618024.
20009
20010- Tkinter.Canvas.scan_dragto() provides an optional parameter to support
20011 the gain value which is passed to Tk. SF bug# 602259.
20012
20013- Fix logging.handlers.SysLogHandler protocol when using UNIX domain sockets.
20014 See SF patch #642974.
20015
20016- The dospath module was deleted. Use the ntpath module when manipulating
20017 DOS paths from other platforms.
20018
20019Tools/Demos
20020-----------
20021
20022- Two new scripts (db2pickle.py and pickle2db.py) were added to the
20023 Tools/scripts directory to facilitate conversion from the old bsddb module
20024 to the new one. While the user-visible API of the new module is
20025 compatible with the old one, it's likely that the version of the
20026 underlying database library has changed. To convert from the old library,
20027 run the db2pickle.py script using the old version of Python to convert it
20028 to a pickle file. After upgrading Python, run the pickle2db.py script
20029 using the new version of Python to reconstitute your database. For
20030 example:
20031
20032 % python2.2 db2pickle.py -h some.db > some.pickle
20033 % python2.3 pickle2db.py -h some.db.new < some.pickle
20034
20035 Run the scripts without any args to get a usage message.
20036
20037
20038Build
20039-----
20040
20041- The audio driver tests (test_ossaudiodev.py and
20042 test_linuxaudiodev.py) are no longer run by default. This is
20043 because they don't always work, depending on your hardware and
20044 software. To run these tests, you must use an invocation like ::
20045
20046 ./python Lib/test/regrtest.py -u audio test_ossaudiodev
20047
20048- On systems which build using the configure script, compiler flags which
20049 used to be lumped together using the OPT flag have been split into two
20050 groups, OPT and BASECFLAGS. OPT is meant to carry just optimization- and
20051 debug-related flags like "-g" and "-O3". BASECFLAGS is meant to carry
20052 compiler flags that are required to get a clean compile. On some
20053 platforms (many Linux flavors in particular) BASECFLAGS will be empty by
20054 default. On others, such as Mac OS X and SCO, it will contain required
20055 flags. This change allows people building Python to override OPT without
20056 fear of clobbering compiler flags which are required to get a clean build.
20057
20058- On Darwin/Mac OS X platforms, /sw/lib and /sw/include are added to the
20059 relevant search lists in setup.py. This allows users building Python to
20060 take advantage of the many packages available from the fink project
20061 <http://fink.sf.net/>.
20062
20063- A new Makefile target, scriptsinstall, installs a number of useful scripts
20064 from the Tools/scripts directory.
20065
20066C API
20067-----
20068
20069- PyEval_GetFrame() is now declared to return a ``PyFrameObject *``
20070 instead of a plain ``PyObject *``. (SF patch #686601.)
20071
20072- PyNumber_Check() now checks that the object has a nb_int or nb_float
20073 slot, rather than simply checking whether it has a non-NULL
20074 tp_as_number pointer.
20075
20076- A C type that inherits from a base type that defines tp_as_buffer
20077 will now inherit the tp_as_buffer pointer if it doesn't define one.
20078 (SF #681367)
20079
20080- The PyArg_Parse functions now issue a DeprecationWarning if a float
20081 argument is provided when an integer is specified (this affects the 'b',
20082 'B', 'h', 'H', 'i', and 'l' codes). Future versions of Python will
20083 raise a TypeError.
20084
20085Tests
20086-----
20087
20088- Several tests weren't being run from regrtest.py (test_timeout.py,
20089 test_tarfile.py, test_netrc.py, test_multifile.py,
20090 test_importhooks.py and test_imp.py). Now they are. (Note to
20091 developers: please read Lib/test/README when creating a new test, to
20092 make sure to do it right! All tests need to use either unittest or
20093 pydoc.)
20094
20095- Added test_posix.py, a test suite for the posix module.
20096
20097- Added test_hexoct.py, a test suite for hex/oct constant folding.
20098
20099Windows
20100-------
20101
20102- The timeout code for socket connect() didn't work right; this has
20103 now been fixed. test_timeout.py should pass (at least most of the
20104 time).
20105
20106- distutils' msvccompiler class now passes the preprocessor options to
20107 the resource compiler. See SF patch #669198.
20108
20109- The bsddb module now ships with Sleepycat's 4.1.25.NC, the latest
20110 release without strong cryptography.
20111
20112- sys.path[0], if it contains a directory name, is now always an
20113 absolute pathname. (SF patch #664376.)
20114
20115- The new logging package is now installed by the Windows installer. It
20116 wasn't in 2.3a1 due to oversight.
20117
20118Mac
20119---
20120
20121- There are new dialogs EasyDialogs.AskFileForOpen, AskFileForSave
20122 and AskFolder. The old macfs.StandardGetFile and friends are deprecated.
20123
20124- Most of the standard library now uses pathnames or FSRefs in preference
20125 of FSSpecs, and use the underlying Carbon.File and Carbon.Folder modules
20126 in stead of macfs. macfs will probably be deprecated in the future.
20127
20128- Type Carbon.File.FSCatalogInfo and supporting methods have been implemented.
20129 This also makes macfs.FSSpec.SetDates() work again.
20130
20131- There is a new module pimp, the package install manager for Python, and
20132 accompanying applet PackageManager. These allow you to easily download
20133 and install pretested extension packages either in source or binary
20134 form. Only in MacPython-OSX.
20135
20136- Applets are now built with bundlebuilder in MacPython-OSX, which should make
20137 them more robust and also provides a path towards BuildApplication. The
20138 downside of this change is that applets can no longer be run from the
20139 Terminal window, this will hopefully be fixed in the 2.3b1.
20140
20141
20142What's New in Python 2.3 alpha 1?
20143=================================
20144
20145*Release date: 31-Dec-2002*
20146
20147Type/class unification and new-style classes
20148--------------------------------------------
20149
20150- One can now assign to __bases__ and __name__ of new-style classes.
20151
20152- dict() now accepts keyword arguments so that dict(one=1, two=2)
20153 is the equivalent of {"one": 1, "two": 2}. Accordingly,
20154 the existing (but undocumented) 'items' keyword argument has
20155 been eliminated. This means that dict(items=someMapping) now has
20156 a different meaning than before.
20157
20158- int() now returns a long object if the argument is outside the
20159 integer range, so int("4" * 1000), int(1e200) and int(1L<<1000) will
20160 all return long objects instead of raising an OverflowError.
20161
20162- Assignment to __class__ is disallowed if either the old or the new
20163 class is a statically allocated type object (such as defined by an
20164 extension module). This prevents anomalies like 2.__class__ = bool.
20165
20166- New-style object creation and deallocation have been sped up
20167 significantly; they are now faster than classic instance creation
20168 and deallocation.
20169
20170- The __slots__ variable can now mention "private" names, and the
20171 right thing will happen (e.g. __slots__ = ["__foo"]).
20172
20173- The built-ins slice() and buffer() are now callable types. The
20174 types classobj (formerly class), code, function, instance, and
20175 instancemethod (formerly instance-method), which have no built-in
20176 names but are accessible through the types module, are now also
20177 callable. The type dict-proxy is renamed to dictproxy.
20178
20179- Cycles going through the __class__ link of a new-style instance are
20180 now detected by the garbage collector.
20181
20182- Classes using __slots__ are now properly garbage collected.
20183 [SF bug 519621]
20184
20185- Tightened the __slots__ rules: a slot name must be a valid Python
20186 identifier.
20187
20188- The constructor for the module type now requires a name argument and
20189 takes an optional docstring argument. Previously, this constructor
20190 ignored its arguments. As a consequence, deriving a class from a
20191 module (not from the module type) is now illegal; previously this
20192 created an unnamed module, just like invoking the module type did.
20193 [SF bug 563060]
20194
20195- A new type object, 'basestring', is added. This is a common base type
20196 for 'str' and 'unicode', and can be used instead of
20197 types.StringTypes, e.g. to test whether something is "a string":
20198 isinstance(x, basestring) is True for Unicode and 8-bit strings. This
20199 is an abstract base class and cannot be instantiated directly.
20200
20201- Changed new-style class instantiation so that when C's __new__
20202 method returns something that's not a C instance, its __init__ is
20203 not called. [SF bug #537450]
20204
20205- Fixed super() to work correctly with class methods. [SF bug #535444]
20206
20207- If you try to pickle an instance of a class that has __slots__ but
20208 doesn't define or override __getstate__, a TypeError is now raised.
20209 This is done by adding a bozo __getstate__ to the class that always
20210 raises TypeError. (Before, this would appear to be pickled, but the
20211 state of the slots would be lost.)
20212
20213Core and builtins
20214-----------------
20215
20216- Import from zipfiles is now supported. The name of a zipfile placed
20217 on sys.path causes the import statement to look for importable Python
20218 modules (with .py, pyc and .pyo extensions) and packages inside the
20219 zipfile. The zipfile import follows the specification (though not
20220 the sample implementation) of PEP 273. The semantics of __path__ are
20221 compatible with those that have been implemented in Jython since
20222 Jython 2.1.
20223
20224- PEP 302 has been accepted. Although it was initially developed to
20225 support zipimport, it offers a new, general import hook mechanism.
20226 Several new variables have been added to the sys module:
20227 sys.meta_path, sys.path_hooks, and sys.path_importer_cache; these
20228 make extending the import statement much more convenient than
20229 overriding the __import__ built-in function. For a description of
20230 these, see PEP 302.
20231
20232- A frame object's f_lineno attribute can now be written to from a
20233 trace function to change which line will execute next. A command to
20234 exploit this from pdb has been added. [SF patch #643835]
20235
Georg Brandl93dc9eb2010-03-14 10:56:14 +000020236- The _codecs support module for codecs.py was turned into a built-in
20237 module to assure that at least the built-in codecs are available
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020238 to the Python parser for source code decoding according to PEP 263.
20239
20240- issubclass now supports a tuple as the second argument, just like
20241 isinstance does. ``issubclass(X, (A, B))`` is equivalent to
20242 ``issubclass(X, A) or issubclass(X, B)``.
20243
20244- Thanks to Armin Rigo, the last known way to provoke a system crash
20245 by cleverly arranging for a comparison function to mutate a list
20246 during a list.sort() operation has been fixed. The effect of
20247 attempting to mutate a list, or even to inspect its contents or
20248 length, while a sort is in progress, is not defined by the language.
20249 The C implementation of Python 2.3 attempts to detect mutations,
20250 and raise ValueError if one occurs, but there's no guarantee that
20251 all mutations will be caught, or that any will be caught across
20252 releases or implementations.
20253
20254- Unicode file name processing for Windows (PEP 277) is implemented.
20255 All platforms now have an os.path.supports_unicode_filenames attribute,
20256 which is set to True on Windows NT/2000/XP, and False elsewhere.
20257
20258- Codec error handling callbacks (PEP 293) are implemented.
20259 Error handling in unicode.encode or str.decode can now be customized.
20260
20261- A subtle change to the semantics of the built-in function intern():
20262 interned strings are no longer immortal. You must keep a reference
20263 to the return value intern() around to get the benefit.
20264
20265- Use of 'None' as a variable, argument or attribute name now
20266 issues a SyntaxWarning. In the future, None may become a keyword.
20267
20268- SET_LINENO is gone. co_lnotab is now consulted to determine when to
20269 call the trace function. C code that accessed f_lineno should call
20270 PyCode_Addr2Line instead (f_lineno is still there, but only kept up
20271 to date when there is a trace function set).
20272
20273- There's a new warning category, FutureWarning. This is used to warn
20274 about a number of situations where the value or sign of an integer
20275 result will change in Python 2.4 as a result of PEP 237 (integer
20276 unification). The warnings implement stage B0 mentioned in that
20277 PEP. The warnings are about the following situations:
20278
20279 - Octal and hex literals without 'L' prefix in the inclusive range
20280 [0x80000000..0xffffffff]; these are currently negative ints, but
20281 in Python 2.4 they will be positive longs with the same bit
20282 pattern.
20283
20284 - Left shifts on integer values that cause the outcome to lose
20285 bits or have a different sign than the left operand. To be
20286 precise: x<<n where this currently doesn't yield the same value
20287 as long(x)<<n; in Python 2.4, the outcome will be long(x)<<n.
20288
20289 - Conversions from ints to string that show negative values as
20290 unsigned ints in the inclusive range [0x80000000..0xffffffff];
20291 this affects the functions hex() and oct(), and the string
20292 formatting codes %u, %o, %x, and %X. In Python 2.4, these will
20293 show signed values (e.g. hex(-1) currently returns "0xffffffff";
20294 in Python 2.4 it will return "-0x1").
20295
20296- The bits manipulated under the cover by sys.setcheckinterval() have
20297 been changed. Both the check interval and the ticker used to be
20298 per-thread values. They are now just a pair of global variables.
20299 In addition, the default check interval was boosted from 10 to 100
20300 bytecode instructions. This may have some effect on systems that
20301 relied on the old default value. In particular, in multi-threaded
20302 applications which try to be highly responsive, response time will
20303 increase by some (perhaps imperceptible) amount.
20304
20305- When multiplying very large integers, a version of the so-called
20306 Karatsuba algorithm is now used. This is most effective if the
20307 inputs have roughly the same size. If they both have about N digits,
20308 Karatsuba multiplication has O(N**1.58) runtime (the exponent is
20309 log_base_2(3)) instead of the previous O(N**2). Measured results may
20310 be better or worse than that, depending on platform quirks. Besides
20311 the O() improvement in raw instruction count, the Karatsuba algorithm
20312 appears to have much better cache behavior on extremely large integers
20313 (starting in the ballpark of a million bits). Note that this is a
20314 simple implementation, and there's no intent here to compete with,
20315 e.g., GMP. It gives a very nice speedup when it applies, but a package
20316 devoted to fast large-integer arithmetic should run circles around it.
20317
20318- u'%c' will now raise a ValueError in case the argument is an
20319 integer outside the valid range of Unicode code point ordinals.
20320
20321- The tempfile module has been overhauled for enhanced security. The
20322 mktemp() function is now deprecated; new, safe replacements are
20323 mkstemp() (for files) and mkdtemp() (for directories), and the
20324 higher-level functions NamedTemporaryFile() and TemporaryFile().
20325 Use of some global variables in this module is also deprecated; the
20326 new functions have keyword arguments to provide the same
20327 functionality. All Lib, Tools and Demo modules that used the unsafe
20328 interfaces have been updated to use the safe replacements. Thanks
20329 to Zack Weinberg!
20330
20331- When x is an object whose class implements __mul__ and __rmul__,
20332 1.0*x would correctly invoke __rmul__, but 1*x would erroneously
20333 invoke __mul__. This was due to the sequence-repeat code in the int
20334 type. This has been fixed now.
20335
20336- Previously, "str1 in str2" required str1 to be a string of length 1.
20337 This restriction has been relaxed to allow str1 to be a string of
20338 any length. Thus "'el' in 'hello world'" returns True now.
20339
20340- File objects are now their own iterators. For a file f, iter(f) now
20341 returns f (unless f is closed), and f.next() is similar to
20342 f.readline() when EOF is not reached; however, f.next() uses a
20343 readahead buffer that messes up the file position, so mixing
20344 f.next() and f.readline() (or other methods) doesn't work right.
20345 Calling f.seek() drops the readahead buffer, but other operations
20346 don't. It so happens that this gives a nice additional speed boost
20347 to "for line in file:"; the xreadlines method and corresponding
20348 module are now obsolete. Thanks to Oren Tirosh!
20349
20350- Encoding declarations (PEP 263, phase 1) have been implemented. A
20351 comment of the form "# -*- coding: <encodingname> -*-" in the first
20352 or second line of a Python source file indicates the encoding.
20353
20354- list.sort() has a new implementation. While cross-platform results
20355 may vary, and in data-dependent ways, this is much faster on many
20356 kinds of partially ordered lists than the previous implementation,
20357 and reported to be just as fast on randomly ordered lists on
20358 several major platforms. This sort is also stable (if A==B and A
20359 precedes B in the list at the start, A precedes B after the sort too),
20360 although the language definition does not guarantee stability. A
20361 potential drawback is that list.sort() may require temp space of
20362 len(list)*2 bytes (``*4`` on a 64-bit machine). It's therefore possible
20363 for list.sort() to raise MemoryError now, even if a comparison function
20364 does not. See <http://www.python.org/sf/587076> for full details.
20365
20366- All standard iterators now ensure that, once StopIteration has been
20367 raised, all future calls to next() on the same iterator will also
20368 raise StopIteration. There used to be various counterexamples to
Martin Panter8d56c022016-05-29 04:13:35 +000020369 this behavior, which could have caused confusion or subtle program
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020370 breakage, without any benefits. (Note that this is still an
20371 iterator's responsibility; the iterator framework does not enforce
20372 this.)
20373
20374- Ctrl+C handling on Windows has been made more consistent with
20375 other platforms. KeyboardInterrupt can now reliably be caught,
20376 and Ctrl+C at an interactive prompt no longer terminates the
20377 process under NT/2k/XP (it never did under Win9x). Ctrl+C will
20378 interrupt time.sleep() in the main thread, and any child processes
20379 created via the popen family (on win2k; we can't make win9x work
20380 reliably) are also interrupted (as generally happens on for Linux/Unix.)
20381 [SF bugs 231273, 439992 and 581232]
20382
20383- sys.getwindowsversion() has been added on Windows. This
20384 returns a tuple with information about the version of Windows
20385 currently running.
20386
20387- Slices and repetitions of buffer objects now consistently return
20388 a string. Formerly, strings would be returned most of the time,
20389 but a buffer object would be returned when the repetition count
20390 was one or when the slice range was all inclusive.
20391
20392- Unicode objects in sys.path are no longer ignored but treated
20393 as directory names.
20394
Georg Brandl93dc9eb2010-03-14 10:56:14 +000020395- Fixed string.startswith and string.endswith built-in methods
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020396 so they accept negative indices. [SF bug 493951]
20397
20398- Fixed a bug with a continue inside a try block and a yield in the
20399 finally clause. [SF bug 567538]
20400
Georg Brandl93dc9eb2010-03-14 10:56:14 +000020401- Most built-in sequences now support "extended slices", i.e. slices
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020402 with a third "stride" parameter. For example, "hello world"[::-1]
20403 gives "dlrow olleh".
20404
20405- A new warning PendingDeprecationWarning was added to provide
20406 direction on features which are in the process of being deprecated.
20407 The warning will not be printed by default. To see the pending
20408 deprecations, use -Walways::PendingDeprecationWarning::
20409 as a command line option or warnings.filterwarnings() in code.
20410
20411- Deprecated features of xrange objects have been removed as
20412 promised. The start, stop, and step attributes and the tolist()
20413 method no longer exist. xrange repetition and slicing have been
20414 removed.
20415
Georg Brandl93dc9eb2010-03-14 10:56:14 +000020416- New built-in function enumerate(x), from PEP 279. Example:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020417 enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c").
20418 The argument can be an arbitrary iterable object.
20419
20420- The assert statement no longer tests __debug__ at runtime. This means
20421 that assert statements cannot be disabled by assigning a false value
20422 to __debug__.
20423
20424- A method zfill() was added to str and unicode, that fills a numeric
20425 string to the left with zeros. For example,
20426 "+123".zfill(6) -> "+00123".
20427
20428- Complex numbers supported divmod() and the // and % operators, but
20429 these make no sense. Since this was documented, they're being
20430 deprecated now.
20431
20432- String and unicode methods lstrip(), rstrip() and strip() now take
20433 an optional argument that specifies the characters to strip. For
20434 example, "Foo!!!?!?!?".rstrip("?!") -> "Foo".
20435
20436- There's a new dictionary constructor (a class method of the dict
20437 class), dict.fromkeys(iterable, value=None). It constructs a
20438 dictionary with keys taken from the iterable and all values set to a
20439 single value. It can be used for building sets and for removing
20440 duplicates from sequences.
20441
20442- Added a new dict method pop(key). This removes and returns the
20443 value corresponding to key. [SF patch #539949]
20444
20445- A new built-in type, bool, has been added, as well as built-in
20446 names for its two values, True and False. Comparisons and sundry
20447 other operations that return a truth value have been changed to
20448 return a bool instead. Read PEP 285 for an explanation of why this
20449 is backward compatible.
20450
20451- Fixed two bugs reported as SF #535905: under certain conditions,
20452 deallocating a deeply nested structure could cause a segfault in the
20453 garbage collector, due to interaction with the "trashcan" code;
20454 access to the current frame during destruction of a local variable
20455 could access a pointer to freed memory.
20456
20457- The optional object allocator ("pymalloc") has been enabled by
20458 default. The recommended practice for memory allocation and
20459 deallocation has been streamlined. A header file is included,
20460 Misc/pymemcompat.h, which can be bundled with 3rd party extensions
20461 and lets them use the same API with Python versions from 1.5.2
20462 onwards.
20463
20464- PyErr_Display will provide file and line information for all exceptions
20465 that have an attribute print_file_and_line, not just SyntaxErrors.
20466
20467- The UTF-8 codec will now encode and decode Unicode surrogates
20468 correctly and without raising exceptions for unpaired ones.
20469
20470- Universal newlines (PEP 278) is implemented. Briefly, using 'U'
20471 instead of 'r' when opening a text file for reading changes the line
20472 ending convention so that any of '\r', '\r\n', and '\n' is
20473 recognized (even mixed in one file); all three are converted to
20474 '\n', the standard Python line end character.
20475
20476- file.xreadlines() now raises a ValueError if the file is closed:
20477 Previously, an xreadlines object was returned which would raise
20478 a ValueError when the xreadlines.next() method was called.
20479
20480- sys.exit() inadvertently allowed more than one argument.
20481 An exception will now be raised if more than one argument is used.
20482
20483- Changed evaluation order of dictionary literals to conform to the
20484 general left to right evaluation order rule. Now {f1(): f2()} will
20485 evaluate f1 first.
20486
20487- Fixed bug #521782: when a file was in non-blocking mode, file.read()
20488 could silently lose data or wrongly throw an unknown error.
20489
20490- The sq_repeat, sq_inplace_repeat, sq_concat and sq_inplace_concat
20491 slots are now always tried after trying the corresponding nb_* slots.
20492 This fixes a number of minor bugs (see bug #624807).
20493
20494- Fix problem with dynamic loading on 64-bit AIX (see bug #639945).
20495
20496Extension modules
20497-----------------
20498
20499- Added three operators to the operator module:
20500 operator.pow(a,b) which is equivalent to: a**b.
20501 operator.is_(a,b) which is equivalent to: a is b.
20502 operator.is_not(a,b) which is equivalent to: a is not b.
20503
20504- posix.openpty now works on all systems that have /dev/ptmx.
20505
20506- A module zipimport exists to support importing code from zip
20507 archives.
20508
20509- The new datetime module supplies classes for manipulating dates and
20510 times. The basic design came from the Zope "fishbowl process", and
20511 favors practical commercial applications over calendar esoterica. See
20512
20513 http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage
20514
20515- _tkinter now returns Tcl objects, instead of strings. Objects which
20516 have Python equivalents are converted to Python objects, other objects
20517 are wrapped. This can be configured through the wantobjects method,
20518 or Tkinter.wantobjects.
20519
20520- The PyBSDDB wrapper around the Sleepycat Berkeley DB library has
20521 been added as the package bsddb. The traditional bsddb module is
20522 still available in source code, but not built automatically anymore,
20523 and is now named bsddb185. This supports Berkeley DB versions from
20524 3.0 to 4.1. For help converting your databases from the old module (which
20525 probably used an obsolete version of Berkeley DB) to the new module, see
20526 the db2pickle.py and pickle2db.py scripts described in the Tools/Demos
20527 section above.
20528
20529- unicodedata was updated to Unicode 3.2. It supports normalization
20530 and names for Hangul syllables and CJK unified ideographs.
20531
20532- resource.getrlimit() now returns longs instead of ints.
20533
20534- readline now dynamically adjusts its input/output stream if
20535 sys.stdin/stdout changes.
20536
20537- The _tkinter module (and hence Tkinter) has dropped support for
20538 Tcl/Tk 8.0 and 8.1. Only Tcl/Tk versions 8.2, 8.3 and 8.4 are
20539 supported.
20540
20541- cPickle.BadPickleGet is now a class.
20542
20543- The time stamps in os.stat_result are floating point numbers
20544 after stat_float_times has been called.
20545
20546- If the size passed to mmap.mmap() is larger than the length of the
20547 file on non-Windows platforms, a ValueError is raised. [SF bug 585792]
20548
20549- The xreadlines module is slated for obsolescence.
20550
20551- The strptime function in the time module is now always available (a
20552 Python implementation is used when the C library doesn't define it).
20553
20554- The 'new' module is no longer an extension, but a Python module that
20555 only exists for backwards compatibility. Its contents are no longer
20556 functions but callable type objects.
20557
20558- The bsddb.*open functions can now take 'None' as a filename.
20559 This will create a temporary in-memory bsddb that won't be
20560 written to disk.
20561
20562- posix.getloadavg, posix.lchown, posix.killpg, posix.mknod, and
20563 posix.getpgid have been added where available.
20564
20565- The locale module now exposes the C library's gettext interface. It
20566 also has a new function getpreferredencoding.
20567
20568- A security hole ("double free") was found in zlib-1.1.3, a popular
20569 third party compression library used by some Python modules. The
20570 hole was quickly plugged in zlib-1.1.4, and the Windows build of
20571 Python now ships with zlib-1.1.4.
20572
20573- pwd, grp, and resource return enhanced tuples now, with symbolic
20574 field names.
20575
20576- array.array is now a type object. A new format character
20577 'u' indicates Py_UNICODE arrays. For those, .tounicode and
20578 .fromunicode methods are available. Arrays now support __iadd__
20579 and __imul__.
20580
20581- dl now builds on every system that has dlfcn.h. Failure in case
20582 of sizeof(int)!=sizeof(long)!=sizeof(void*) is delayed until dl.open
20583 is called.
20584
20585- The sys module acquired a new attribute, api_version, which evaluates
20586 to the value of the PYTHON_API_VERSION macro with which the
20587 interpreter was compiled.
20588
20589- Fixed bug #470582: sre module would return a tuple (None, 'a', 'ab')
20590 when applying the regular expression '^((a)c)?(ab)$' on 'ab'. It now
20591 returns (None, None, 'ab'), as expected. Also fixed handling of
20592 lastindex/lastgroup match attributes in similar cases. For example,
20593 when running the expression r'(a)(b)?b' over 'ab', lastindex must be
20594 1, not 2.
20595
20596- Fixed bug #581080: sre scanner was not checking the buffer limit
20597 before increasing the current pointer. This was creating an infinite
20598 loop in the search function, once the pointer exceeded the buffer
20599 limit.
20600
20601- The os.fdopen function now enforces a file mode starting with the
20602 letter 'r', 'w' or 'a', otherwise a ValueError is raised. This fixes
20603 bug #623464.
20604
20605- The linuxaudiodev module is now deprecated; it is being replaced by
20606 ossaudiodev. The interface has been extended to cover a lot more of
20607 OSS (see www.opensound.com), including most DSP ioctls and the
20608 OSS mixer API. Documentation forthcoming in 2.3a2.
20609
20610Library
20611-------
20612
20613- imaplib.py now supports SSL (Tino Lange and Piers Lauder).
20614
20615- Freeze's modulefinder.py has been moved to the standard library;
20616 slightly improved so it will issue less false missing submodule
20617 reports (see sf path #643711 for details). Documentation will follow
20618 with Python 2.3a2.
20619
20620- os.path exposes getctime.
20621
20622- unittest.py now has two additional methods called assertAlmostEqual()
20623 and failIfAlmostEqual(). They implement an approximate comparison
20624 by rounding the difference between the two arguments and comparing
20625 the result to zero. Approximate comparison is essential for
20626 unit tests of floating point results.
20627
20628- calendar.py now depends on the new datetime module rather than
20629 the time module. As a result, the range of allowable dates
20630 has been increased.
20631
20632- pdb has a new 'j(ump)' command to select the next line to be
20633 executed.
20634
20635- The distutils created windows installers now can run a
20636 postinstallation script.
20637
20638- doctest.testmod can now be called without argument, which means to
20639 test the current module.
20640
20641- When canceling a server that implemented threading with a keyboard
20642 interrupt, the server would shut down but not terminate (waiting on
20643 client threads). A new member variable, daemon_threads, was added to
20644 the ThreadingMixIn class in SocketServer.py to make it explicit that
20645 this behavior needs to be controlled.
20646
20647- A new module, optparse, provides a fancy alternative to getopt for
20648 command line parsing. It is a slightly modified version of Greg
20649 Ward's Optik package.
20650
20651- UserDict.py now defines a DictMixin class which defines all dictionary
20652 methods for classes that already have a minimum mapping interface.
20653 This greatly simplifies writing classes that need to be substitutable
20654 for dictionaries (such as the shelve module).
20655
20656- shelve.py now subclasses from UserDict.DictMixin. Now shelve supports
20657 all dictionary methods. This eases the transition to persistent
20658 storage for scripts originally written with dictionaries in mind.
20659
20660- shelve.open and the various classes in shelve.py now accept an optional
20661 binary flag, which defaults to False. If True, the values stored in the
20662 shelf are binary pickles.
20663
20664- A new package, logging, implements the logging API defined by PEP
20665 282. The code is written by Vinay Sajip.
20666
20667- StreamReader, StreamReaderWriter and StreamRecoder in the codecs
20668 modules are iterators now.
20669
20670- gzip.py now handles files exceeding 2GB. Files over 4GB also work
20671 now (provided the OS supports it, and Python is configured with large
20672 file support), but in that case the underlying gzip file format can
20673 record only the least-significant 32 bits of the file size, so that
20674 some tools working with gzipped files may report an incorrect file
20675 size.
20676
20677- xml.sax.saxutils.unescape has been added, to replace entity references
20678 with their entity value.
20679
20680- Queue.Queue.{put,get} now support an optional timeout argument.
20681
20682- Various features of Tk 8.4 are exposed in Tkinter.py. The multiple
20683 option of tkFileDialog is exposed as function askopenfile{,name}s.
20684
20685- Various configure methods of Tkinter have been stream-lined, so that
20686 tag_configure, image_configure, window_configure now return a
20687 dictionary when invoked with no argument.
20688
20689- Importing the readline module now no longer has the side effect of
20690 calling setlocale(LC_CTYPE, ""). The initial "C" locale, or
20691 whatever locale is explicitly set by the user, is preserved. If you
20692 want repr() of 8-bit strings in your preferred encoding to preserve
20693 all printable characters of that encoding, you have to add the
20694 following code to your $PYTHONSTARTUP file or to your application's
20695 main():
20696
20697 import locale
20698 locale.setlocale(locale.LC_CTYPE, "")
20699
20700- shutil.move was added. shutil.copytree now reports errors as an
20701 exception at the end, instead of printing error messages.
20702
20703- Encoding name normalization was generalized to not only
20704 replace hyphens with underscores, but also all other non-alphanumeric
20705 characters (with the exception of the dot which is used for Python
20706 package names during lookup). The aliases.py mapping was updated
20707 to the new standard.
20708
20709- mimetypes has two new functions: guess_all_extensions() which
20710 returns a list of all known extensions for a mime type, and
20711 add_type() which adds one mapping between a mime type and
20712 an extension to the database.
20713
20714- New module: sets, defines the class Set that implements a mutable
20715 set type using the keys of a dict to represent the set. There's
20716 also a class ImmutableSet which is useful when you need sets of sets
20717 or when you need to use sets as dict keys, and a class BaseSet which
20718 is the base class of the two.
20719
20720- Added random.sample(population,k) for random sampling without replacement.
20721 Returns a k length list of unique elements chosen from the population.
20722
20723- random.randrange(-sys.maxint-1, sys.maxint) no longer raises
20724 OverflowError. That is, it now accepts any combination of 'start'
20725 and 'stop' arguments so long as each is in the range of Python's
20726 bounded integers.
20727
20728- Thanks to Raymond Hettinger, random.random() now uses a new core
20729 generator. The Mersenne Twister algorithm is implemented in C,
20730 threadsafe, faster than the previous generator, has an astronomically
20731 large period (2**19937-1), creates random floats to full 53-bit
20732 precision, and may be the most widely tested random number generator
20733 in existence.
20734
20735 The random.jumpahead(n) method has different semantics for the new
20736 generator. Instead of jumping n steps ahead, it uses n and the
20737 existing state to create a new state. This means that jumpahead()
20738 continues to support multi-threaded code needing generators of
20739 non-overlapping sequences. However, it will break code which relies
20740 on jumpahead moving a specific number of steps forward.
20741
20742 The attributes random.whseed and random.__whseed have no meaning for
20743 the new generator. Code using these attributes should switch to a
20744 new class, random.WichmannHill which is provided for backward
20745 compatibility and to make an alternate generator available.
20746
20747- New "algorithms" module: heapq, implements a heap queue. Thanks to
20748 Kevin O'Connor for the code and François Pinard for an entertaining
20749 write-up explaining the theory and practical uses of heaps.
20750
20751- New encoding for the Palm OS character set: palmos.
20752
20753- binascii.crc32() and the zipfile module had problems on some 64-bit
20754 platforms. These have been fixed. On a platform with 8-byte C longs,
20755 crc32() now returns a signed-extended 4-byte result, so that its value
20756 as a Python int is equal to the value computed a 32-bit platform.
20757
20758- xml.dom.minidom.toxml and toprettyxml now take an optional encoding
20759 argument.
20760
20761- Some fixes in the copy module: when an object is copied through its
20762 __reduce__ method, there was no check for a __setstate__ method on
20763 the result [SF patch 565085]; deepcopy should treat instances of
20764 custom metaclasses the same way it treats instances of type 'type'
20765 [SF patch 560794].
20766
20767- Sockets now support timeout mode. After s.settimeout(T), where T is
20768 a float expressing seconds, subsequent operations raise an exception
20769 if they cannot be completed within T seconds. To disable timeout
20770 mode, use s.settimeout(None). There's also a module function,
20771 socket.setdefaulttimeout(T), which sets the default for all sockets
20772 created henceforth.
20773
20774- getopt.gnu_getopt was added. This supports GNU-style option
20775 processing, where options can be mixed with non-option arguments.
20776
20777- Stop using strings for exceptions. String objects used for
20778 exceptions are now classes deriving from Exception. The objects
20779 changed were: Tkinter.TclError, bdb.BdbQuit, macpath.norm_error,
20780 tabnanny.NannyNag, and xdrlib.Error.
20781
20782- Constants BOM_UTF8, BOM_UTF16, BOM_UTF16_LE, BOM_UTF16_BE,
20783 BOM_UTF32, BOM_UTF32_LE and BOM_UTF32_BE that represent the Byte
20784 Order Mark in UTF-8, UTF-16 and UTF-32 encodings for little and
20785 big endian systems were added to the codecs module. The old names
20786 BOM32_* and BOM64_* were off by a factor of 2.
20787
20788- Added conversion functions math.degrees() and math.radians().
20789
20790- math.log() now takes an optional argument: math.log(x[, base]).
20791
20792- ftplib.retrlines() now tests for callback is None rather than testing
20793 for False. Was causing an error when given a callback object which
20794 was callable but also returned len() as zero. The change may
20795 create new breakage if the caller relied on the undocumented behavior
20796 and called with callback set to [] or some other False value not
20797 identical to None.
20798
20799- random.gauss() uses a piece of hidden state used by nothing else,
20800 and the .seed() and .whseed() methods failed to reset it. In other
20801 words, setting the seed didn't completely determine the sequence of
20802 results produced by random.gauss(). It does now. Programs repeatedly
20803 mixing calls to a seed method with calls to gauss() may see different
20804 results now.
20805
20806- The pickle.Pickler class grew a clear_memo() method to mimic that
20807 provided by cPickle.Pickler.
20808
20809- difflib's SequenceMatcher class now does a dynamic analysis of
20810 which elements are so frequent as to constitute noise. For
20811 comparing files as sequences of lines, this generally works better
20812 than the IS_LINE_JUNK function, and function ndiff's linejunk
20813 argument defaults to None now as a result. A happy benefit is
20814 that SequenceMatcher may run much faster now when applied
20815 to large files with many duplicate lines (for example, C program
20816 text with lots of repeated "}" and "return NULL;" lines).
20817
20818- New Text.dump() method in Tkinter module.
20819
20820- New distutils commands for building packagers were added to
20821 support pkgtool on Solaris and swinstall on HP-UX.
20822
20823- distutils now has a new abstract binary packager base class
20824 command/bdist_packager, which simplifies writing packagers.
20825 This will hopefully provide the missing bits to encourage
20826 people to submit more packagers, e.g. for Debian, FreeBSD
20827 and other systems.
20828
20829- The UTF-16, -LE and -BE stream readers now raise a
20830 NotImplementedError for all calls to .readline(). Previously, they
20831 used to just produce garbage or fail with an encoding error --
20832 UTF-16 is a 2-byte encoding and the C lib's line reading APIs don't
20833 work well with these.
20834
20835- compileall now supports quiet operation.
20836
20837- The BaseHTTPServer now implements optional HTTP/1.1 persistent
20838 connections.
20839
20840- socket module: the SSL support was broken out of the main
20841 _socket module C helper and placed into a new _ssl helper
20842 which now gets imported by socket.py if available and working.
20843
20844- encodings package: added aliases for all supported IANA character
20845 sets
20846
20847- ftplib: to safeguard the user's privacy, anonymous login will use
20848 "anonymous@" as default password, rather than the real user and host
20849 name.
20850
20851- webbrowser: tightened up the command passed to os.system() so that
20852 arbitrary shell code can't be executed because a bogus URL was
20853 passed in.
20854
20855- gettext.translation has an optional fallback argument, and
20856 gettext.find an optional all argument. Translations will now fallback
20857 on a per-message basis. The module supports plural forms, by means
20858 of gettext.[d]ngettext and Translation.[u]ngettext.
20859
20860- distutils bdist commands now offer a --skip-build option.
20861
20862- warnings.warn now accepts a Warning instance as first argument.
20863
20864- The xml.sax.expatreader.ExpatParser class will no longer create
20865 circular references by using itself as the locator that gets passed
20866 to the content handler implementation. [SF bug #535474]
20867
20868- The email.Parser.Parser class now properly parses strings regardless
20869 of their line endings, which can be any of \r, \n, or \r\n (CR, LF,
20870 or CRLF). Also, the Header class's constructor default arguments
20871 has changed slightly so that an explicit maxlinelen value is always
20872 honored, and so unicode conversion error handling can be specified.
20873
20874- distutils' build_ext command now links C++ extensions with the C++
20875 compiler available in the Makefile or CXX environment variable, if
20876 running under \*nix.
20877
20878- New module bz2: provides a comprehensive interface for the bz2 compression
20879 library. It implements a complete file interface, one-shot (de)compression
20880 functions, and types for sequential (de)compression.
20881
20882- New pdb command 'pp' which is like 'p' except that it pretty-prints
20883 the value of its expression argument.
20884
20885- Now bdist_rpm distutils command understands a verify_script option in
20886 the config file, including the contents of the referred filename in
20887 the "%verifyscript" section of the rpm spec file.
20888
20889- Fixed bug #495695: webbrowser module would run graphic browsers in a
20890 unix environment even if DISPLAY was not set. Also, support for
20891 skipstone browser was included.
20892
20893- Fixed bug #636769: rexec would run unallowed code if subclasses of
20894 strings were used as parameters for certain functions.
20895
20896Tools/Demos
20897-----------
20898
20899- pygettext.py now supports globbing on Windows, and accepts module
20900 names in addition to accepting file names.
20901
20902- The SGI demos (Demo/sgi) have been removed. Nobody thought they
20903 were interesting any more. (The SGI library modules and extensions
20904 are still there; it is believed that at least some of these are
20905 still used and useful.)
20906
20907- IDLE supports the new encoding declarations (PEP 263); it can also
20908 deal with legacy 8-bit files if they use the locale's encoding. It
20909 allows non-ASCII strings in the interactive shell and executes them
20910 in the locale's encoding.
20911
20912- freeze.py now produces binaries which can import shared modules,
20913 unlike before when this failed due to missing symbol exports in
20914 the generated binary.
20915
20916Build
20917-----
20918
20919- On Unix, IDLE is now installed automatically.
20920
20921- The fpectl module is not built by default; it's dangerous or useless
20922 except in the hands of experts.
20923
20924- The public Python C API will generally be declared using PyAPI_FUNC
20925 and PyAPI_DATA macros, while Python extension module init functions
20926 will be declared with PyMODINIT_FUNC. DL_EXPORT/DL_IMPORT macros
20927 are deprecated.
20928
20929- A bug was fixed that could cause COUNT_ALLOCS builds to segfault, or
20930 get into infinite loops, when a new-style class got garbage-collected.
20931 Unfortunately, to avoid this, the way COUNT_ALLOCS works requires
20932 that new-style classes be immortal in COUNT_ALLOCS builds. Note that
20933 COUNT_ALLOCS is not enabled by default, in either release or debug
20934 builds, and that new-style classes are immortal only in COUNT_ALLOCS
20935 builds.
20936
20937- Compiling out the cyclic garbage collector is no longer an option.
20938 The old symbol WITH_CYCLE_GC is now ignored, and Python.h arranges
20939 that it's always defined (for the benefit of any extension modules
20940 that may be conditionalizing on it). A bonus is that any extension
20941 type participating in cyclic gc can choose to participate in the
20942 Py_TRASHCAN mechanism now too; in the absence of cyclic gc, this used
20943 to require editing the core to teach the trashcan mechanism about the
20944 new type.
20945
20946- According to Annex F of the current C standard,
20947
20948 The Standard C macro HUGE_VAL and its float and long double analogs,
20949 HUGE_VALF and HUGE_VALL, expand to expressions whose values are
20950 positive infinities.
20951
20952 Python only uses the double HUGE_VAL, and only to #define its own symbol
20953 Py_HUGE_VAL. Some platforms have incorrect definitions for HUGE_VAL.
20954 pyport.h used to try to worm around that, but the workarounds triggered
20955 other bugs on other platforms, so we gave up. If your platform defines
20956 HUGE_VAL incorrectly, you'll need to #define Py_HUGE_VAL to something
20957 that works on your platform. The only instance of this I'm sure about
20958 is on an unknown subset of Cray systems, described here:
20959
20960 http://www.cray.com/swpubs/manuals/SN-2194_2.0/html-SN-2194_2.0/x3138.htm
20961
20962 Presumably 2.3a1 breaks such systems. If anyone uses such a system, help!
20963
20964- The configure option --without-doc-strings can be used to remove the
Georg Brandl93dc9eb2010-03-14 10:56:14 +000020965 doc strings from the built-in functions and modules; this reduces the
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020966 size of the executable.
20967
20968- The universal newlines option (PEP 278) is on by default. On Unix
20969 it can be disabled by passing --without-universal-newlines to the
20970 configure script. On other platforms, remove
20971 WITH_UNIVERSAL_NEWLINES from pyconfig.h.
20972
20973- On Unix, a shared libpython2.3.so can be created with --enable-shared.
20974
20975- All uses of the CACHE_HASH, INTERN_STRINGS, and DONT_SHARE_SHORT_STRINGS
20976 preprocessor symbols were eliminated. The internal decisions they
20977 controlled stopped being experimental long ago.
20978
20979- The tools used to build the documentation now work under Cygwin as
20980 well as Unix.
20981
20982- The bsddb and dbm module builds have been changed to try and avoid version
20983 skew problems and disable linkage with Berkeley DB 1.85 unless the
20984 installer knows what s/he's doing. See the section on building these
20985 modules in the README file for details.
20986
20987C API
20988-----
20989
20990- PyNumber_Check() now returns true for string and unicode objects.
20991 This is a result of these types having a partially defined
20992 tp_as_number slot. (This is not a feature, but an indication that
20993 PyNumber_Check() is not very useful to determine numeric behavior.
20994 It may be deprecated.)
20995
20996- The string object's layout has changed: the pointer member
20997 ob_sinterned has been replaced by an int member ob_sstate. On some
20998 platforms (e.g. most 64-bit systems) this may change the offset of
20999 the ob_sval member, so as a precaution the API_VERSION has been
21000 incremented. The apparently unused feature of "indirect interned
21001 strings", supported by the ob_sinterned member, is gone. Interned
21002 strings are now usually mortal; there is a new API,
21003 PyString_InternImmortal() that creates immortal interned strings.
21004 (The ob_sstate member can only take three values; however, while
21005 making it a char saves a few bytes per string object on average, in
21006 it also slowed things down a bit because ob_sval was no longer
21007 aligned.)
21008
21009- The Py_InitModule*() functions now accept NULL for the 'methods'
21010 argument. Modules without global functions are becoming more common
21011 now that factories can be types rather than functions.
21012
21013- New C API PyUnicode_FromOrdinal() which exposes unichr() at C
21014 level.
21015
21016- New functions PyErr_SetExcFromWindowsErr() and
21017 PyErr_SetExcFromWindowsErrWithFilename(). Similar to
21018 PyErr_SetFromWindowsErrWithFilename() and
Martin Panterc04fb562016-02-10 05:44:01 +000021019 PyErr_SetFromWindowsErr(), but they allow specifying
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021020 the exception type to raise. Available on Windows.
21021
21022- Py_FatalError() is now declared as taking a const char* argument. It
21023 was previously declared without const. This should not affect working
21024 code.
21025
21026- Added new macro PySequence_ITEM(o, i) that directly calls
21027 sq_item without rechecking that o is a sequence and without
21028 adjusting for negative indices.
21029
21030- PyRange_New() now raises ValueError if the fourth argument is not 1.
21031 This is part of the removal of deprecated features of the xrange
21032 object.
21033
21034- PyNumber_Coerce() and PyNumber_CoerceEx() now also invoke the type's
21035 coercion if both arguments have the same type but this type has the
21036 CHECKTYPES flag set. This is to better support proxies.
21037
21038- The type of tp_free has been changed from "``void (*)(PyObject *)``" to
21039 "``void (*)(void *)``".
21040
21041- PyObject_Del, PyObject_GC_Del are now functions instead of macros.
21042
21043- A type can now inherit its metatype from its base type. Previously,
21044 when PyType_Ready() was called, if ob_type was found to be NULL, it
21045 was always set to &PyType_Type; now it is set to base->ob_type,
21046 where base is tp_base, defaulting to &PyObject_Type.
21047
21048- PyType_Ready() accidentally did not inherit tp_is_gc; now it does.
21049
21050- The PyCore_* family of APIs have been removed.
21051
21052- The "u#" parser marker will now pass through Unicode objects as-is
21053 without going through the buffer API.
21054
21055- The enumerators of cmp_op have been renamed to use the prefix ``PyCmp_``.
21056
21057- An old #define of ANY as void has been removed from pyport.h. This
21058 hasn't been used since Python's pre-ANSI days, and the #define has
21059 been marked as obsolete since then. SF bug 495548 says it created
21060 conflicts with other packages, so keeping it around wasn't harmless.
21061
21062- Because Python's magic number scheme broke on January 1st, we decided
21063 to stop Python development. Thanks for all the fish!
21064
21065- Some of us don't like fish, so we changed Python's magic number
21066 scheme to a new one. See Python/import.c for details.
21067
21068New platforms
21069-------------
21070
21071- OpenVMS is now supported.
21072
21073- AtheOS is now supported.
21074
21075- the EMX runtime environment on OS/2 is now supported.
21076
21077- GNU/Hurd is now supported.
21078
21079Tests
21080-----
21081
21082- The regrtest.py script's -u option now provides a way to say "allow
21083 all resources except this one." For example, to allow everything
21084 except bsddb, give the option '-uall,-bsddb'.
21085
21086Windows
21087-------
21088
21089- The Windows distribution now ships with version 4.0.14 of the
21090 Sleepycat Berkeley database library. This should be a huge
21091 improvement over the previous Berkeley DB 1.85, which had many
21092 bugs.
21093 XXX What are the licensing issues here?
21094 XXX If a user has a database created with a previous version of
21095 XXX Python, what must they do to convert it?
21096 XXX I'm still not sure how to link this thing (see PCbuild/readme.txt).
21097 XXX The version # is likely to change before 2.3a1.
21098
21099- The Windows distribution now ships with a Secure Sockets Library (SLL)
21100 module (_ssl.pyd)
21101
21102- The Windows distribution now ships with Tcl/Tk version 8.4.1 (it
21103 previously shipped with Tcl/Tk 8.3.2).
21104
21105- When Python is built under a Microsoft compiler, sys.version now
21106 includes the compiler version number (_MSC_VER). For example, under
21107 MSVC 6, sys.version contains the substring "MSC v.1200 ". 1200 is
21108 the value of _MSC_VER under MSVC 6.
21109
21110- Sometimes the uninstall executable (UNWISE.EXE) vanishes. One cause
21111 of that has been fixed in the installer (disabled Wise's "delete in-
21112 use files" uninstall option).
21113
21114- Fixed a bug in urllib's proxy handling in Windows. [SF bug #503031]
21115
21116- The installer now installs Start menu shortcuts under (the local
21117 equivalent of) "All Users" when doing an Admin install.
21118
21119- file.truncate([newsize]) now works on Windows for all newsize values.
21120 It used to fail if newsize didn't fit in 32 bits, reflecting a
21121 limitation of MS _chsize (which is no longer used).
21122
21123- os.waitpid() is now implemented for Windows, and can be used to block
21124 until a specified process exits. This is similar to, but not exactly
21125 the same as, os.waitpid() on POSIX systems. If you're waiting for
21126 a specific process whose pid was obtained from one of the spawn()
21127 functions, the same Python os.waitpid() code works across platforms.
21128 See the docs for details. The docs were changed to clarify that
21129 spawn functions return, and waitpid requires, a process handle on
21130 Windows (not the same thing as a Windows process id).
21131
21132- New tempfile.TemporaryFile implementation for Windows: this doesn't
21133 need a TemporaryFileWrapper wrapper anymore, and should be immune
21134 to a nasty problem: before 2.3, if you got a temp file on Windows, it
21135 got wrapped in an object whose close() method first closed the
21136 underlying file, then deleted the file. This usually worked fine.
21137 However, the spawn family of functions on Windows create (at a low C
21138 level) the same set of open files in the spawned process Q as were
21139 open in the spawning process P. If a temp file f was among them, then
21140 doing f.close() in P first closed P's C-level file handle on f, but Q's
21141 C-level file handle on f remained open, so the attempt in P to delete f
21142 blew up with a "Permission denied" error (Windows doesn't allow
21143 deleting open files). This was surprising, subtle, and difficult to
21144 work around.
21145
21146- The os module now exports all the symbolic constants usable with the
21147 low-level os.open() on Windows: the new constants in 2.3 are
21148 O_NOINHERIT, O_SHORT_LIVED, O_TEMPORARY, O_RANDOM and O_SEQUENTIAL.
21149 The others were also available in 2.2: O_APPEND, O_BINARY, O_CREAT,
21150 O_EXCL, O_RDONLY, O_RDWR, O_TEXT, O_TRUNC and O_WRONLY. Contrary
21151 to Microsoft docs, O_SHORT_LIVED does not seem to imply O_TEMPORARY
21152 (so specify both if you want both; note that neither is useful unless
21153 specified with O_CREAT too).
21154
21155Mac
21156----
21157
21158- Mac/Relnotes is gone, the release notes are now here.
21159
21160- Python (the OSX-only, unix-based version, not the OS9-compatible CFM
21161 version) now fully supports unicode strings as arguments to various file
21162 system calls, eg. open(), file(), os.stat() and os.listdir().
21163
21164- The current naming convention for Python on the Macintosh is that MacPython
21165 refers to the unix-based OSX-only version, and MacPython-OS9 refers to the
21166 CFM-based version that runs on both OS9 and OSX.
21167
21168- All MacPython-OS9 functionality is now available in an OSX unix build,
21169 including the Carbon modules, the IDE, OSA support, etc. A lot of this
21170 will only work correctly in a framework build, though, because you cannot
21171 talk to the window manager unless your application is run from a .app
21172 bundle. There is a command line tool "pythonw" that runs your script
21173 with an interpreter living in such a .app bundle, this interpreter should
21174 be used to run any Python script using the window manager (including
21175 Tkinter or wxPython scripts).
21176
21177- Most of Mac/Lib has moved to Lib/plat-mac, which is again used both in
21178 MacPython-OSX and MacPython-OS9. The only modules remaining in Mac/Lib
21179 are specifically for MacPython-OS9 (CFM support, preference resources, etc).
21180
21181- A new utility PythonLauncher will start a Python interpreter when a .py or
21182 .pyw script is double-clicked in the Finder. By default .py scripts are
21183 run with a normal Python interpreter in a Terminal window and .pyw
21184 files are run with a window-aware pythonw interpreter without a Terminal
21185 window, but all this can be customized.
21186
21187- MacPython-OS9 is now Carbon-only, so it runs on Mac OS 9 or Mac OS X and
21188 possibly on Mac OS 8.6 with the right CarbonLib installed, but not on earlier
21189 releases.
21190
21191- Many tools such as BuildApplet.py and gensuitemodule.py now support a command
21192 line interface too.
21193
21194- All the Carbon classes are now PEP253 compliant, meaning that you can
21195 subclass them from Python. Most of the attributes have gone, you should
21196 now use the accessor function call API, which is also what Apple's
21197 documentation uses. Some attributes such as grafport.visRgn are still
21198 available for convenience.
21199
21200- New Carbon modules File (implementing the APIs in Files.h and Aliases.h)
Georg Brandl93dc9eb2010-03-14 10:56:14 +000021201 and Folder (APIs from Folders.h). The old macfs built-in module is
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021202 gone, and replaced by a Python wrapper around the new modules.
21203
21204- Pathname handling should now be fully consistent: MacPython-OSX always uses
21205 unix pathnames and MacPython-OS9 always uses colon-separated Mac pathnames
21206 (also when running on Mac OS X).
21207
21208- New Carbon modules Help and AH give access to the Carbon Help Manager.
21209 There are hooks in the IDE to allow accessing the Python documentation
21210 (and Apple's Carbon and Cocoa documentation) through the Help Viewer.
21211 See Mac/OSX/README for converting the Python documentation to a
21212 Help Viewer compatible form and installing it.
21213
21214- OSA support has been redesigned and the generated Python classes now
21215 mirror the inheritance defined by the underlying OSA classes.
21216
21217- MacPython no longer maps both \r and \n to \n on input for any text file.
21218 This feature has been replaced by universal newline support (PEP278).
21219
21220- The default encoding for Python sourcefiles in MacPython-OS9 is no longer
21221 mac-roman (or whatever your local Mac encoding was) but "ascii", like on
21222 other platforms. If you really need sourcefiles with Mac characters in them
21223 you can change this in site.py.
21224
21225
21226What's New in Python 2.2 final?
21227===============================
21228
21229*Release date: 21-Dec-2001*
21230
21231Type/class unification and new-style classes
21232--------------------------------------------
21233
21234- pickle.py, cPickle: allow pickling instances of new-style classes
21235 with a custom metaclass.
21236
21237Core and builtins
21238-----------------
21239
21240- weakref proxy object: when comparing, unwrap both arguments if both
21241 are proxies.
21242
21243Extension modules
21244-----------------
21245
21246- binascii.b2a_base64(): fix a potential buffer overrun when encoding
21247 very short strings.
21248
21249- cPickle: the obscure "fast" mode was suspected of causing stack
21250 overflows on the Mac. Hopefully fixed this by setting the recursion
21251 limit much smaller. If the limit is too low (it only affects
21252 performance), you can change it by defining PY_CPICKLE_FAST_LIMIT
21253 when compiling cPickle.c (or in pyconfig.h).
21254
21255Library
21256-------
21257
21258- dumbdbm.py: fixed a dumb old bug (the file didn't get synched at
21259 close or delete time).
21260
21261- rfc822.py: fixed a bug where the address '<>' was converted to None
21262 instead of an empty string (also fixes the email.Utils module).
21263
21264- xmlrpclib.py: version 1.0.0; uses precision for doubles.
21265
21266- test suite: the pickle and cPickle tests were not executing any code
21267 when run from the standard regression test.
21268
21269Tools/Demos
21270-----------
21271
21272Build
21273-----
21274
21275C API
21276-----
21277
21278New platforms
21279-------------
21280
21281Tests
21282-----
21283
21284Windows
21285-------
21286
21287- distutils package: fixed broken Windows installers (bdist_wininst).
21288
21289- tempfile.py: prevent mysterious warnings when TemporaryFileWrapper
21290 instances are deleted at process exit time.
21291
21292- socket.py: prevent mysterious warnings when socket instances are
21293 deleted at process exit time.
21294
21295- posixmodule.c: fix a Windows crash with stat() of a filename ending
21296 in backslash.
21297
21298Mac
21299----
21300
21301- The Carbon toolbox modules have been upgraded to Universal Headers
21302 3.4, and experimental CoreGraphics and CarbonEvents modules have
21303 been added. All only for framework-enabled MacOSX.
21304
21305
21306What's New in Python 2.2c1?
21307===========================
21308
21309*Release date: 14-Dec-2001*
21310
21311Type/class unification and new-style classes
21312--------------------------------------------
21313
21314- Guido's tutorial introduction to the new type/class features has
21315 been extensively updated. See
21316
21317 http://www.python.org/2.2/descrintro.html
21318
21319 That remains the primary documentation in this area.
21320
21321- Fixed a leak: instance variables declared with __slots__ were never
21322 deleted!
21323
21324- The "delete attribute" method of descriptor objects is called
21325 __delete__, not __del__. In previous releases, it was mistakenly
21326 called __del__, which created an unfortunate overloading condition
21327 with finalizers. (The "get attribute" and "set attribute" methods
21328 are still called __get__ and __set__, respectively.)
21329
21330- Some subtle issues with the super built-in were fixed:
21331
21332 (a) When super itself is subclassed, its __get__ method would still
21333 return an instance of the base class (i.e., of super).
21334
21335 (b) super(C, C()).__class__ would return C rather than super. This
21336 is confusing. To fix this, I decided to change the semantics of
21337 super so that it only applies to code attributes, not to data
21338 attributes. After all, overriding data attributes is not
21339 supported anyway.
21340
21341 (c) The __get__ method didn't check whether the argument was an
21342 instance of the type used in creation of the super instance.
21343
21344- Previously, hash() of an instance of a subclass of a mutable type
21345 (list or dictionary) would return some value, rather than raising
21346 TypeError. This has been fixed. Also, directly calling
21347 dict.__hash__ and list.__hash__ now raises the same TypeError
21348 (previously, these were the same as object.__hash__).
21349
21350- New-style objects now support deleting their __dict__. This is for
21351 all intents and purposes equivalent to assigning a brand new empty
21352 dictionary, but saves space if the object is not used further.
21353
21354Core and builtins
21355-----------------
21356
21357- -Qnew now works as documented in PEP 238: when -Qnew is passed on
21358 the command line, all occurrences of "/" use true division instead
21359 of classic division. See the PEP for details. Note that "all"
21360 means all instances in library and 3rd-party modules, as well as in
21361 your own code. As the PEP says, -Qnew is intended for use only in
21362 educational environments with control over the libraries in use.
21363 Note that test_coercion.py in the standard Python test suite fails
21364 under -Qnew; this is expected, and won't be repaired until true
21365 division becomes the default (in the meantime, test_coercion is
21366 testing the current rules).
21367
21368- complex() now only allows the first argument to be a string
21369 argument, and raises TypeError if either the second arg is a string
21370 or if the second arg is specified when the first is a string.
21371
21372Extension modules
21373-----------------
21374
21375- gc.get_referents was renamed to gc.get_referrers.
21376
21377Library
21378-------
21379
21380- Functions in the os.spawn() family now release the global interpreter
21381 lock around calling the platform spawn. They should always have done
21382 this, but did not before 2.2c1. Multithreaded programs calling
21383 an os.spawn function with P_WAIT will no longer block all Python threads
21384 until the spawned program completes. It's possible that some programs
21385 relies on blocking, although more likely by accident than by design.
21386
21387- webbrowser defaults to netscape.exe on OS/2 now.
21388
21389- Tix.ResizeHandle exposes detach_widget, hide, and show.
21390
21391- The charset alias windows_1252 has been added.
21392
21393- types.StringTypes is a tuple containing the defined string types;
21394 usually this will be (str, unicode), but if Python was compiled
21395 without Unicode support it will be just (str,).
21396
21397- The pulldom and minidom modules were synchronized to PyXML.
21398
21399Tools/Demos
21400-----------
21401
21402- A new script called Tools/scripts/google.py was added, which fires
21403 off a search on Google.
21404
21405Build
21406-----
21407
21408- Note that release builds of Python should arrange to define the
21409 preprocessor symbol NDEBUG on the command line (or equivalent).
21410 In the 2.2 pre-release series we tried to define this by magic in
21411 Python.h instead, but it proved to cause problems for extension
21412 authors. The Unix, Windows and Mac builds now all define NDEBUG in
21413 release builds via cmdline (or equivalent) instead. Ports to
21414 other platforms should do likewise.
21415
21416- It is no longer necessary to use --with-suffix when building on a
21417 case-insensitive file system (such as Mac OS X HFS+). In the build
21418 directory an extension is used, but not in the installed python.
21419
21420C API
21421-----
21422
Georg Brandl93dc9eb2010-03-14 10:56:14 +000021423- New function PyDict_MergeFromSeq2() exposes the built-in dict
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021424 constructor's logic for updating a dictionary from an iterable object
21425 producing key-value pairs.
21426
21427- PyArg_ParseTupleAndKeywords() requires that the number of entries in
21428 the keyword list equal the number of argument specifiers. This
21429 wasn't checked correctly, and PyArg_ParseTupleAndKeywords could even
21430 dump core in some bad cases. This has been repaired. As a result,
21431 PyArg_ParseTupleAndKeywords may raise RuntimeError in bad cases that
21432 previously went unchallenged.
21433
21434New platforms
21435-------------
21436
21437Tests
21438-----
21439
21440Windows
21441-------
21442
21443Mac
21444----
21445
21446- In unix-Python on Mac OS X (and darwin) sys.platform is now "darwin",
21447 without any trailing digits.
21448
21449- Changed logic for finding python home in Mac OS X framework Pythons.
21450 Now sys.executable points to the executable again, in stead of to
21451 the shared library. The latter is used only for locating the python
21452 home.
21453
21454
21455What's New in Python 2.2b2?
21456===========================
21457
21458*Release date: 16-Nov-2001*
21459
21460Type/class unification and new-style classes
21461--------------------------------------------
21462
21463- Multiple inheritance mixing new-style and classic classes in the
21464 list of base classes is now allowed, so this works now:
21465
21466 class Classic: pass
21467 class Mixed(Classic, object): pass
21468
21469 The MRO (method resolution order) for each base class is respected
21470 according to its kind, but the MRO for the derived class is computed
21471 using new-style MRO rules if any base class is a new-style class.
21472 This needs to be documented.
21473
Georg Brandl93dc9eb2010-03-14 10:56:14 +000021474- The new built-in dictionary() constructor, and dictionary type, have
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021475 been renamed to dict. This reflects a decade of common usage.
21476
21477- dict() now accepts an iterable object producing 2-sequences. For
21478 example, dict(d.items()) == d for any dictionary d. The argument,
21479 and the elements of the argument, can be any iterable objects.
21480
21481- New-style classes can now have a __del__ method, which is called
21482 when the instance is deleted (just like for classic classes).
21483
21484- Assignment to object.__dict__ is now possible, for objects that are
21485 instances of new-style classes that have a __dict__ (unless the base
21486 class forbids it).
21487
21488- Methods of built-in types now properly check for keyword arguments
21489 (formerly these were silently ignored). The only built-in methods
21490 that take keyword arguments are __call__, __init__ and __new__.
21491
21492- The socket function has been converted to a type; see below.
21493
21494Core and builtins
21495-----------------
21496
21497- Assignment to __debug__ raises SyntaxError at compile-time. This
21498 was promised when 2.1c1 was released as "What's New in Python 2.1c1"
21499 (see below) says.
21500
21501- Clarified the error messages for unsupported operands to an operator
21502 (like 1 + '').
21503
21504Extension modules
21505-----------------
21506
21507- mmap has a new keyword argument, "access", allowing a uniform way for
21508 both Windows and Unix users to create read-only, write-through and
21509 copy-on-write memory mappings. This was previously possible only on
21510 Unix. A new keyword argument was required to support this in a
21511 uniform way because the mmap() signatures had diverged across
21512 platforms. Thanks to Jay T Miller for repairing this!
21513
21514- By default, the gc.garbage list now contains only those instances in
21515 unreachable cycles that have __del__ methods; in 2.1 it contained all
21516 instances in unreachable cycles. "Instances" here has been generalized
21517 to include instances of both new-style and old-style classes.
21518
21519- The socket module defines a new method for socket objects,
21520 sendall(). This is like send() but may make multiple calls to
21521 send() until all data has been sent. Also, the socket function has
21522 been converted to a subclassable type, like list and tuple (etc.)
21523 before it; socket and SocketType are now the same thing.
21524
21525- Various bugfixes to the curses module. There is now a test suite
21526 for the curses module (you have to run it manually).
21527
21528- binascii.b2a_base64 no longer places an arbitrary restriction of 57
21529 bytes on its input.
21530
21531Library
21532-------
21533
21534- tkFileDialog exposes a Directory class and askdirectory
21535 convenience function.
21536
21537- Symbolic group names in regular expressions must be unique. For
21538 example, the regexp r'(?P<abc>)(?P<abc>)' is not allowed, because a
21539 single name can't mean both "group 1" and "group 2" simultaneously.
21540 Python 2.2 detects this error at regexp compilation time;
21541 previously, the error went undetected, and results were
21542 unpredictable. Also in sre, the pattern.split(), pattern.sub(), and
21543 pattern.subn() methods have been rewritten in C. Also, an
21544 experimental function/method finditer() has been added, which works
21545 like findall() but returns an iterator.
21546
21547- Tix exposes more commands through the classes DirSelectBox,
21548 DirSelectDialog, ListNoteBook, Meter, CheckList, and the
21549 methods tix_addbitmapdir, tix_cget, tix_configure, tix_filedialog,
21550 tix_getbitmap, tix_getimage, tix_option_get, and tix_resetoptions.
21551
21552- Traceback objects are now scanned by cyclic garbage collection, so
21553 cycles created by casual use of sys.exc_info() no longer cause
21554 permanent memory leaks (provided garbage collection is enabled).
21555
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021556- mimetypes.py has optional support for non-standard, but commonly
21557 found types. guess_type() and guess_extension() now accept an
21558 optional 'strict' flag, defaulting to true, which controls whether
21559 recognize non-standard types or not. A few non-standard types we
21560 know about have been added. Also, when run as a script, there are
21561 new -l and -e options.
21562
21563- statcache is now deprecated.
21564
21565- email.Utils.formatdate() now produces the preferred RFC 2822 style
21566 dates with numeric timezones (it used to produce obsolete dates
21567 hard coded to "GMT" timezone). An optional 'localtime' flag is
21568 added to produce dates in the local timezone, with daylight savings
21569 time properly taken into account.
21570
21571- In pickle and cPickle, instead of masking errors in load() by
21572 transforming them into SystemError, we let the original exception
21573 propagate out. Also, implement support for __safe_for_unpickling__
21574 in pickle, as it already was supported in cPickle.
21575
21576Tools/Demos
21577-----------
21578
21579Build
21580-----
21581
21582- The dbm module is built using libdb1 if available. The bsddb module
21583 is built with libdb3 if available.
21584
21585- Misc/Makefile.pre.in has been removed by BDFL pronouncement.
21586
21587C API
21588-----
21589
21590- New function PySequence_Fast_GET_SIZE() returns the size of a non-
21591 NULL result from PySequence_Fast(), more quickly than calling
21592 PySequence_Size().
21593
21594- New argument unpacking function PyArg_UnpackTuple() added.
21595
21596- New functions PyObject_CallFunctionObjArgs() and
21597 PyObject_CallMethodObjArgs() have been added to make it more
21598 convenient and efficient to call functions and methods from C.
21599
21600- PyArg_ParseTupleAndKeywords() no longer masks errors, so it's
21601 possible that this will propagate errors it didn't before.
21602
21603- New function PyObject_CheckReadBuffer(), which returns true if its
21604 argument supports the single-segment readable buffer interface.
21605
21606New platforms
21607-------------
21608
21609- We've finally confirmed that this release builds on HP-UX 11.00,
21610 *with* threads, and passes the test suite.
21611
21612- Thanks to a series of patches from Michael Muller, Python may build
21613 again under OS/2 Visual Age C++.
21614
21615- Updated RISCOS port by Dietmar Schwertberger.
21616
21617Tests
21618-----
21619
21620- Added a test script for the curses module. It isn't run automatically;
21621 regrtest.py must be run with '-u curses' to enable it.
21622
21623Windows
21624-------
21625
21626Mac
21627----
21628
21629- PythonScript has been moved to unsupported and is slated to be
21630 removed completely in the next release.
21631
21632- It should now be possible to build applets that work on both OS9 and
21633 OSX.
21634
21635- The core is now linked with CoreServices not Carbon; as a side
21636 result, default 8bit encoding on OSX is now ASCII.
21637
21638- Python should now build on OSX 10.1.1
21639
21640
21641What's New in Python 2.2b1?
21642===========================
21643
21644*Release date: 19-Oct-2001*
21645
21646Type/class unification and new-style classes
21647--------------------------------------------
21648
21649- New-style classes are now always dynamic (except for built-in and
21650 extension types). There is no longer a performance penalty, and I
21651 no longer see another reason to keep this baggage around. One relic
21652 remains: the __dict__ of a new-style class is a read-only proxy; you
21653 must set the class's attribute to modify it. As a consequence, the
21654 __defined__ attribute of new-style types no longer exists, for lack
21655 of need: there is once again only one __dict__ (although in the
21656 future a __cache__ may be resurrected with a similar function, if I
21657 can prove that it actually speeds things up).
21658
21659- C.__doc__ now works as expected for new-style classes (in 2.2a4 it
21660 always returned None, even when there was a class docstring).
21661
21662- doctest now finds and runs docstrings attached to new-style classes,
21663 class methods, static methods, and properties.
21664
21665Core and builtins
21666-----------------
21667
21668- A very subtle syntactical pitfall in list comprehensions was fixed.
21669 For example: [a+b for a in 'abc', for b in 'def']. The comma in
21670 this example is a mistake. Previously, this would silently let 'a'
21671 iterate over the singleton tuple ('abc',), yielding ['abcd', 'abce',
21672 'abcf'] rather than the intended ['ad', 'ae', 'af', 'bd', 'be',
21673 'bf', 'cd', 'ce', 'cf']. Now, this is flagged as a syntax error.
21674 Note that [a for a in <singleton>] is a convoluted way to say
21675 [<singleton>] anyway, so it's not like any expressiveness is lost.
21676
21677- getattr(obj, name, default) now only catches AttributeError, as
21678 documented, rather than returning the default value for all
21679 exceptions (which could mask bugs in a __getattr__ hook, for
21680 example).
21681
21682- Weak reference objects are now part of the core and offer a C API.
21683 A bug which could allow a core dump when binary operations involved
21684 proxy reference has been fixed. weakref.ReferenceError is now a
21685 built-in exception.
21686
21687- unicode(obj) now behaves more like str(obj), accepting arbitrary
21688 objects, and calling a __unicode__ method if it exists.
21689 unicode(obj, encoding) and unicode(obj, encoding, errors) still
21690 require an 8-bit string or character buffer argument.
21691
21692- isinstance() now allows any object as the first argument and a
21693 class, a type or something with a __bases__ tuple attribute for the
21694 second argument. The second argument may also be a tuple of a
21695 class, type, or something with __bases__, in which case isinstance()
21696 will return true if the first argument is an instance of any of the
21697 things contained in the second argument tuple. E.g.
21698
21699 isinstance(x, (A, B))
21700
21701 returns true if x is an instance of A or B.
21702
21703Extension modules
21704-----------------
21705
21706- thread.start_new_thread() now returns the thread ID (previously None).
21707
21708- binascii has now two quopri support functions, a2b_qp and b2a_qp.
21709
21710- readline now supports setting the startup_hook and the
21711 pre_event_hook, and adds the add_history() function.
21712
21713- os and posix supports chroot(), setgroups() and unsetenv() where
21714 available. The stat(), fstat(), statvfs() and fstatvfs() functions
21715 now return "pseudo-sequences" -- the various fields can now be
21716 accessed as attributes (e.g. os.stat("/").st_mtime) but for
21717 backwards compatibility they also behave as a fixed-length sequence.
21718 Some platform-specific fields (e.g. st_rdev) are only accessible as
21719 attributes.
21720
21721- time: localtime(), gmtime() and strptime() now return a
21722 pseudo-sequence similar to the os.stat() return value, with
21723 attributes like tm_year etc.
21724
21725- Decompression objects in the zlib module now accept an optional
21726 second parameter to decompress() that specifies the maximum amount
21727 of memory to use for the uncompressed data.
21728
21729- optional SSL support in the socket module now exports OpenSSL
21730 functions RAND_add(), RAND_egd(), and RAND_status(). These calls
21731 are useful on platforms like Solaris where OpenSSL does not
21732 automatically seed its PRNG. Also, the keyfile and certfile
21733 arguments to socket.ssl() are now optional.
21734
21735- posixmodule (and by extension, the os module on POSIX platforms) now
21736 exports O_LARGEFILE, O_DIRECT, O_DIRECTORY, and O_NOFOLLOW.
21737
21738Library
21739-------
21740
21741- doctest now excludes functions and classes not defined by the module
21742 being tested, thanks to Tim Hochberg.
21743
21744- HotShot, a new profiler implemented using a C-based callback, has
21745 been added. This substantially reduces the overhead of profiling,
21746 but it is still quite preliminary. Support modules and
21747 documentation will be added in upcoming releases (before 2.2 final).
21748
21749- profile now produces correct output in situations where an exception
21750 raised in Python is cleared by C code (e.g. hasattr()). This used
21751 to cause wrong output, including spurious claims of recursive
21752 functions and attribution of time spent to the wrong function.
21753
21754 The code and documentation for the derived OldProfile and HotProfile
21755 profiling classes was removed. The code hasn't worked for years (if
21756 you tried to use them, they raised exceptions). OldProfile
21757 intended to reproduce the behavior of the profiler Python used more
21758 than 7 years ago, and isn't interesting anymore. HotProfile intended
21759 to provide a faster profiler (but producing less information), and
21760 that's a worthy goal we intend to meet via a different approach (but
21761 without losing information).
21762
21763- Profile.calibrate() has a new implementation that should deliver
21764 a much better system-specific calibration constant. The constant can
21765 now be specified in an instance constructor, or as a Profile class or
21766 instance variable, instead of by editing profile.py's source code.
21767 Calibration must still be done manually (see the docs for the profile
21768 module).
21769
21770 Note that Profile.calibrate() must be overridden by subclasses.
21771 Improving the accuracy required exploiting detailed knowledge of
21772 profiler internals; the earlier method abstracted away the details
21773 and measured a simplified model instead, but consequently computed
21774 a constant too small by a factor of 2 on some modern machines.
21775
21776- quopri's encode and decode methods take an optional header parameter,
21777 which indicates whether output is intended for the header 'Q'
21778 encoding.
21779
21780- The SocketServer.ThreadingMixIn class now closes the request after
21781 finish_request() returns. (Not when it errors out though.)
21782
21783- The nntplib module's NNTP.body() method has grown a 'file' argument
21784 to allow saving the message body to a file.
21785
21786- The email package has added a class email.Parser.HeaderParser which
21787 only parses headers and does not recurse into the message's body.
21788 Also, the module/class MIMEAudio has been added for representing
21789 audio data (contributed by Anthony Baxter).
21790
21791- ftplib should be able to handle files > 2GB.
21792
21793- ConfigParser.getboolean() now also interprets TRUE, FALSE, YES, NO,
21794 ON, and OFF.
21795
21796- xml.dom.minidom NodeList objects now support the length attribute
21797 and item() method as required by the DOM specifications.
21798
21799Tools/Demos
21800-----------
21801
21802- Demo/dns was removed. It no longer serves any purpose; a package
21803 derived from it is now maintained by Anthony Baxter, see
21804 http://PyDNS.SourceForge.net.
21805
21806- The freeze tool has been made more robust, and two new options have
21807 been added: -X and -E.
21808
21809Build
21810-----
21811
21812- configure will use CXX in LINKCC if CXX is used to build main() and
21813 the system requires to link a C++ main using the C++ compiler.
21814
21815C API
21816-----
21817
21818- The documentation for the tp_compare slot is updated to require that
21819 the return value must be -1, 0, 1; an arbitrary number <0 or >0 is
21820 not correct. This is not yet enforced but will be enforced in
21821 Python 2.3; even later, we may use -2 to indicate errors and +2 for
21822 "NotImplemented". Right now, -1 should be used for an error return.
21823
21824- PyLong_AsLongLong() now accepts int (as well as long) arguments.
21825 Consequently, PyArg_ParseTuple's 'L' code also accepts int (as well
21826 as long) arguments.
21827
21828- PyThread_start_new_thread() now returns a long int giving the thread
21829 ID, if one can be calculated; it returns -1 for error, 0 if no
21830 thread ID is calculated (this is an incompatible change, but only
21831 the thread module used this API). This code has only really been
21832 tested on Linux and Windows; other platforms please beware (and
21833 report any bugs or strange behavior).
21834
21835- PyUnicode_FromEncodedObject() no longer accepts Unicode objects as
21836 input.
21837
21838New platforms
21839-------------
21840
21841Tests
21842-----
21843
21844Windows
21845-------
21846
21847- Installer: If you install IDLE, and don't disable file-extension
21848 registration, a new "Edit with IDLE" context (right-click) menu entry
21849 is created for .py and .pyw files.
21850
21851- The signal module now supports SIGBREAK on Windows, thanks to Steven
21852 Scott. Note that SIGBREAK is unique to Windows. The default SIGBREAK
21853 action remains to call Win32 ExitProcess(). This can be changed via
21854 signal.signal(). For example::
21855
21856 # Make Ctrl+Break raise KeyboardInterrupt, like Python's default Ctrl+C
21857 # (SIGINT) behavior.
21858 import signal
21859 signal.signal(signal.SIGBREAK, signal.default_int_handler)
21860
21861 try:
21862 while 1:
21863 pass
21864 except KeyboardInterrupt:
21865 # We get here on Ctrl+C or Ctrl+Break now; if we had not changed
21866 # SIGBREAK, only on Ctrl+C (and Ctrl+Break would terminate the
21867 # program without the possibility for any Python-level cleanup).
21868 print "Clean exit"
21869
21870
21871What's New in Python 2.2a4?
21872===========================
21873
21874*Release date: 28-Sep-2001*
21875
21876Type/class unification and new-style classes
21877--------------------------------------------
21878
21879- pydoc and inspect are now aware of new-style classes;
21880 e.g. help(list) at the interactive prompt now shows proper
21881 documentation for all operations on list objects.
21882
21883- Applications using Jim Fulton's ExtensionClass module can now safely
21884 be used with Python 2.2. In particular, Zope 2.4.1 now works with
21885 Python 2.2 (as well as with Python 2.1.1). The Demo/metaclass
21886 examples also work again. It is hoped that Gtk and Boost also work
21887 with 2.2a4 and beyond. (If you can confirm this, please write
21888 webmaster@python.org; if there are still problems, please open a bug
21889 report on SourceForge.)
21890
21891- property() now takes 4 keyword arguments: fget, fset, fdel and doc.
21892 These map to read-only attributes 'fget', 'fset', 'fdel', and '__doc__'
21893 in the constructed property object. fget, fset and fdel weren't
Martin Panterc04fb562016-02-10 05:44:01 +000021894 discoverable from Python in 2.2a3. __doc__ is new, and allows
21895 associating a docstring with a property.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021896
21897- Comparison overloading is now more completely implemented. For
21898 example, a str subclass instance can properly be compared to a str
21899 instance, and it can properly overload comparison. Ditto for most
21900 other built-in object types.
21901
21902- The repr() of new-style classes has changed; instead of <type
21903 'M.Foo'> a new-style class is now rendered as <class 'M.Foo'>,
21904 *except* for built-in types, which are still rendered as <type
21905 'Foo'> (to avoid upsetting existing code that might parse or
21906 otherwise rely on repr() of certain type objects).
21907
21908- The repr() of new-style objects is now always <Foo object at XXX>;
21909 previously, it was sometimes <Foo instance at XXX>.
21910
21911- For new-style classes, what was previously called __getattr__ is now
21912 called __getattribute__. This method, if defined, is called for
21913 *every* attribute access. A new __getattr__ hook more similar to the
21914 one in classic classes is defined which is called only if regular
21915 attribute access raises AttributeError; to catch *all* attribute
21916 access, you can use __getattribute__ (for new-style classes). If
21917 both are defined, __getattribute__ is called first, and if it raises
21918 AttributeError, __getattr__ is called.
21919
21920- The __class__ attribute of new-style objects can be assigned to.
21921 The new class must have the same C-level object layout as the old
21922 class.
21923
Georg Brandl93dc9eb2010-03-14 10:56:14 +000021924- The built-in file type can be subclassed now. In the usual pattern,
21925 "file" is the name of the built-in type, and file() is a new built-in
21926 constructor, with the same signature as the built-in open() function.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021927 file() is now the preferred way to open a file.
21928
21929- Previously, __new__ would only see sequential arguments passed to
21930 the type in a constructor call; __init__ would see both sequential
21931 and keyword arguments. This made no sense whatsoever any more, so
21932 now both __new__ and __init__ see all arguments.
21933
21934- Previously, hash() applied to an instance of a subclass of str or
21935 unicode always returned 0. This has been repaired.
21936
21937- Previously, an operation on an instance of a subclass of an
21938 immutable type (int, long, float, complex, tuple, str, unicode),
21939 where the subtype didn't override the operation (and so the
Georg Brandl93dc9eb2010-03-14 10:56:14 +000021940 operation was handled by the built-in type), could return that
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021941 instance instead a value of the base type. For example, if s was of
21942 a str subclass type, s[:] returned s as-is. Now it returns a str
21943 with the same value as s.
21944
21945- Provisional support for pickling new-style objects has been added.
21946
21947Core
21948----
21949
21950- file.writelines() now accepts any iterable object producing strings.
21951
21952- PyUnicode_FromEncodedObject() now works very much like
21953 PyObject_Str(obj) in that it tries to use __str__/tp_str
21954 on the object if the object is not a string or buffer. This
21955 makes unicode() behave like str() when applied to non-string/buffer
21956 objects.
21957
21958- PyFile_WriteObject now passes Unicode objects to the file's write
21959 method. As a result, all file-like objects which may be the target
21960 of a print statement must support Unicode objects, i.e. they must
21961 at least convert them into ASCII strings.
21962
21963- Thread scheduling on Solaris should be improved; it is no longer
21964 necessary to insert a small sleep at the start of a thread in order
21965 to let other runnable threads be scheduled.
21966
21967Library
21968-------
21969
21970- StringIO.StringIO instances and cStringIO.StringIO instances support
21971 read character buffer compatible objects for their .write() methods.
21972 These objects are converted to strings and then handled as such
21973 by the instances.
21974
21975- The "email" package has been added. This is basically a port of the
21976 mimelib package <http://sf.net/projects/mimelib> with API changes
21977 and some implementations updated to use iterators and generators.
21978
21979- difflib.ndiff() and difflib.Differ.compare() are generators now. This
21980 restores the ability of Tools/scripts/ndiff.py to start producing output
21981 before the entire comparison is complete.
21982
21983- StringIO.StringIO instances and cStringIO.StringIO instances support
21984 iteration just like file objects (i.e. their .readline() method is
21985 called for each iteration until it returns an empty string).
21986
21987- The codecs module has grown four new helper APIs to access
Georg Brandl93dc9eb2010-03-14 10:56:14 +000021988 built-in codecs: getencoder(), getdecoder(), getreader(),
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000021989 getwriter().
21990
21991- SimpleXMLRPCServer: a new module (based upon SimpleHTMLServer)
21992 simplifies writing XML RPC servers.
21993
21994- os.path.realpath(): a new function that returns the absolute pathname
21995 after interpretation of symbolic links. On non-Unix systems, this
21996 is an alias for os.path.abspath().
21997
21998- operator.indexOf() (PySequence_Index() in the C API) now works with any
21999 iterable object.
22000
22001- smtplib now supports various authentication and security features of
22002 the SMTP protocol through the new login() and starttls() methods.
22003
22004- hmac: a new module implementing keyed hashing for message
22005 authentication.
22006
22007- mimetypes now recognizes more extensions and file types. At the
22008 same time, some mappings not sanctioned by IANA were removed.
22009
22010- The "compiler" package has been brought up to date to the state of
22011 Python 2.2 bytecode generation. It has also been promoted from a
22012 Tool to a standard library package. (Tools/compiler still exists as
22013 a sample driver.)
22014
22015Build
22016-----
22017
22018- Large file support (LFS) is now automatic when the platform supports
22019 it; no more manual configuration tweaks are needed. On Linux, at
22020 least, it's possible to have a system whose C library supports large
22021 files but whose kernel doesn't; in this case, large file support is
22022 still enabled but doesn't do you any good unless you upgrade your
22023 kernel or share your Python executable with another system whose
22024 kernel has large file support.
22025
22026- The configure script now supplies plausible defaults in a
22027 cross-compilation environment. This doesn't mean that the supplied
22028 values are always correct, or that cross-compilation now works
22029 flawlessly -- but it's a first step (and it shuts up most of
22030 autoconf's warnings about AC_TRY_RUN).
22031
22032- The Unix build is now a bit less chatty, courtesy of the parser
22033 generator. The build is completely silent (except for errors) when
22034 using "make -s", thanks to a -q option to setup.py.
22035
22036C API
22037-----
22038
22039- The "structmember" API now supports some new flag bits to deny read
22040 and/or write access to attributes in restricted execution mode.
22041
22042New platforms
22043-------------
22044
22045- Compaq's iPAQ handheld, running the "familiar" Linux distribution
22046 (http://familiar.handhelds.org).
22047
22048Tests
22049-----
22050
22051- The "classic" standard tests, which work by comparing stdout to
22052 an expected-output file under Lib/test/output/, no longer stop at
22053 the first mismatch. Instead the test is run to completion, and a
22054 variant of ndiff-style comparison is used to report all differences.
22055 This is much easier to understand than the previous style of reporting.
22056
22057- The unittest-based standard tests now use regrtest's test_main()
22058 convention, instead of running as a side-effect of merely being
22059 imported. This allows these tests to be run in more natural and
22060 flexible ways as unittests, outside the regrtest framework.
22061
22062- regrtest.py is much better integrated with unittest and doctest now,
22063 especially in regard to reporting errors.
22064
22065Windows
22066-------
22067
22068- Large file support now also works for files > 4GB, on filesystems
22069 that support it (NTFS under Windows 2000). See "What's New in
22070 Python 2.2a3" for more detail.
22071
22072
22073What's New in Python 2.2a3?
22074===========================
22075
22076*Release Date: 07-Sep-2001*
22077
22078Core
22079----
22080
22081- Conversion of long to float now raises OverflowError if the long is too
22082 big to represent as a C double.
22083
22084- The 3-argument builtin pow() no longer allows a third non-None argument
22085 if either of the first two arguments is a float, or if both are of
22086 integer types and the second argument is negative (in which latter case
22087 the arguments are converted to float, so this is really the same
22088 restriction).
22089
22090- The builtin dir() now returns more information, and sometimes much
22091 more, generally naming all attributes of an object, and all attributes
22092 reachable from the object via its class, and from its class's base
22093 classes, and so on from them too. Example: in 2.2a2, dir([]) returned
22094 an empty list. In 2.2a3,
22095
22096 >>> dir([])
22097 ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__',
22098 '__eq__', '__ge__', '__getattr__', '__getitem__', '__getslice__',
22099 '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__le__',
22100 '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__repr__',
22101 '__rmul__', '__setattr__', '__setitem__', '__setslice__', '__str__',
22102 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove',
22103 'reverse', 'sort']
22104
22105 dir(module) continues to return only the module's attributes, though.
22106
22107- Overflowing operations on plain ints now return a long int rather
22108 than raising OverflowError. This is a partial implementation of PEP
22109 237. You can use -Wdefault::OverflowWarning to enable a warning for
22110 this situation, and -Werror::OverflowWarning to revert to the old
22111 OverflowError exception.
22112
22113- A new command line option, -Q<arg>, is added to control run-time
22114 warnings for the use of classic division. (See PEP 238.) Possible
22115 values are -Qold, -Qwarn, -Qwarnall, and -Qnew. The default is
22116 -Qold, meaning the / operator has its classic meaning and no
22117 warnings are issued. Using -Qwarn issues a run-time warning about
22118 all uses of classic division for int and long arguments; -Qwarnall
22119 also warns about classic division for float and complex arguments
22120 (for use with fixdiv.py).
22121 [Note: the remainder of this item (preserved below) became
22122 obsolete in 2.2c1 -- -Qnew has global effect in 2.2] ::
22123
22124 Using -Qnew is questionable; it turns on new division by default, but
22125 only in the __main__ module. You can usefully combine -Qwarn or
22126 -Qwarnall and -Qnew: this gives the __main__ module new division, and
22127 warns about classic division everywhere else.
22128
22129- Many built-in types can now be subclassed. This applies to int,
22130 long, float, str, unicode, and tuple. (The types complex, list and
22131 dictionary can also be subclassed; this was introduced earlier.)
22132 Note that restrictions apply when subclassing immutable built-in
22133 types: you can only affect the value of the instance by overloading
22134 __new__. You can add mutable attributes, and the subclass instances
22135 will have a __dict__ attribute, but you cannot change the "value"
22136 (as implemented by the base class) of an immutable subclass instance
22137 once it is created.
22138
22139- The dictionary constructor now takes an optional argument, a
22140 mapping-like object, and initializes the dictionary from its
22141 (key, value) pairs.
22142
22143- A new built-in type, super, has been added. This facilitates making
22144 "cooperative super calls" in a multiple inheritance setting. For an
22145 explanation, see http://www.python.org/2.2/descrintro.html#cooperation
22146
22147- A new built-in type, property, has been added. This enables the
22148 creation of "properties". These are attributes implemented by
22149 getter and setter functions (or only one of these for read-only or
22150 write-only attributes), without the need to override __getattr__.
22151 See http://www.python.org/2.2/descrintro.html#property
22152
22153- The syntax of floating-point and imaginary literals has been
22154 liberalized, to allow leading zeroes. Examples of literals now
22155 legal that were SyntaxErrors before:
22156
22157 00.0 0e3 0100j 07.5 00000000000000000008.
22158
22159- An old tokenizer bug allowed floating point literals with an incomplete
22160 exponent, such as 1e and 3.1e-. Such literals now raise SyntaxError.
22161
22162Library
22163-------
22164
22165- telnetlib includes symbolic names for the options, and support for
22166 setting an option negotiation callback. It also supports processing
22167 of suboptions.
22168
22169- The new C standard no longer requires that math libraries set errno to
22170 ERANGE on overflow. For platform libraries that exploit this new
22171 freedom, Python's overflow-checking was wholly broken. A new overflow-
22172 checking scheme attempts to repair that, but may not be reliable on all
22173 platforms (C doesn't seem to provide anything both useful and portable
22174 in this area anymore).
22175
22176- Asynchronous timeout actions are available through the new class
22177 threading.Timer.
22178
22179- math.log and math.log10 now return sensible results for even huge
22180 long arguments. For example, math.log10(10 ** 10000) ~= 10000.0.
22181
22182- A new function, imp.lock_held(), returns 1 when the import lock is
22183 currently held. See the docs for the imp module.
22184
22185- pickle, cPickle and marshal on 32-bit platforms can now correctly read
22186 dumps containing ints written on platforms where Python ints are 8 bytes.
22187 When read on a box where Python ints are 4 bytes, such values are
22188 converted to Python longs.
22189
22190- In restricted execution mode (using the rexec module), unmarshalling
22191 code objects is no longer allowed. This plugs a security hole.
22192
22193- unittest.TestResult instances no longer store references to tracebacks
22194 generated by test failures. This prevents unexpected dangling references
22195 to objects that should be garbage collected between tests.
22196
22197Tools
22198-----
22199
22200- Tools/scripts/fixdiv.py has been added which can be used to fix
22201 division operators as per PEP 238.
22202
22203Build
22204-----
22205
22206- If you are an adventurous person using Mac OS X you may want to look at
22207 Mac/OSX. There is a Makefile there that will build Python as a real Mac
22208 application, which can be used for experimenting with Carbon or Cocoa.
22209 Discussion of this on pythonmac-sig, please.
22210
22211C API
22212-----
22213
22214- New function PyObject_Dir(obj), like Python __builtin__.dir(obj).
22215
22216- Note that PyLong_AsDouble can fail! This has always been true, but no
22217 callers checked for it. It's more likely to fail now, because overflow
22218 errors are properly detected now. The proper way to check::
22219
22220 double x = PyLong_AsDouble(some_long_object);
22221 if (x == -1.0 && PyErr_Occurred()) {
22222 /* The conversion failed. */
22223 }
22224
22225- The GC API has been changed. Extensions that use the old API will still
22226 compile but will not participate in GC. To upgrade an extension
22227 module:
22228
22229 - rename Py_TPFLAGS_GC to PyTPFLAGS_HAVE_GC
22230
22231 - use PyObject_GC_New or PyObject_GC_NewVar to allocate objects and
22232 PyObject_GC_Del to deallocate them
22233
22234 - rename PyObject_GC_Init to PyObject_GC_Track and PyObject_GC_Fini
22235 to PyObject_GC_UnTrack
22236
22237 - remove PyGC_HEAD_SIZE from object size calculations
22238
22239 - remove calls to PyObject_AS_GC and PyObject_FROM_GC
22240
22241- Two new functions: PyString_FromFormat() and PyString_FromFormatV().
22242 These can be used safely to construct string objects from a
22243 sprintf-style format string (similar to the format string supported
22244 by PyErr_Format()).
22245
22246New platforms
22247-------------
22248
22249- Stephen Hansen contributed patches sufficient to get a clean compile
22250 under Borland C (Windows), but he reports problems running it and ran
22251 out of time to complete the port. Volunteers? Expect a MemoryError
22252 when importing the types module; this is probably shallow, and
22253 causing later failures too.
22254
22255Tests
22256-----
22257
22258Windows
22259-------
22260
22261- Large file support is now enabled on Win32 platforms as well as on
22262 Win64. This means that, for example, you can use f.tell() and f.seek()
22263 to manipulate files larger than 2 gigabytes (provided you have enough
22264 disk space, and are using a Windows filesystem that supports large
22265 partitions). Windows filesystem limits: FAT has a 2GB (gigabyte)
22266 filesize limit, and large file support makes no difference there.
22267 FAT32's limit is 4GB, and files >= 2GB are easier to use from Python now.
22268 NTFS has no practical limit on file size, and files of any size can be
22269 used from Python now.
22270
22271- The w9xpopen hack is now used on Windows NT and 2000 too when COMPSPEC
22272 points to command.com (patch from Brian Quinlan).
22273
22274
22275What's New in Python 2.2a2?
22276===========================
22277
22278*Release Date: 22-Aug-2001*
22279
22280Build
22281-----
22282
22283- Tim Peters developed a brand new Windows installer using Wise 8.1,
22284 generously donated to us by Wise Solutions.
22285
22286- configure supports a new option --enable-unicode, with the values
22287 ucs2 and ucs4 (new in 2.2a1). With --disable-unicode, the Unicode
22288 type and supporting code is completely removed from the interpreter.
22289
22290- A new configure option --enable-framework builds a Mac OS X framework,
22291 which "make frameworkinstall" will install. This provides a starting
22292 point for more mac-like functionality, join pythonmac-sig@python.org
22293 if you are interested in helping.
22294
22295- The NeXT platform is no longer supported.
22296
22297- The 'new' module is now statically linked.
22298
22299Tools
22300-----
22301
22302- The new Tools/scripts/cleanfuture.py can be used to automatically
22303 edit out obsolete future statements from Python source code. See
22304 the module docstring for details.
22305
22306Tests
22307-----
22308
22309- regrtest.py now knows which tests are expected to be skipped on some
Martin Panterc04fb562016-02-10 05:44:01 +000022310 platforms, allowing clearer test result output to be given. regrtest
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000022311 also has optional --use/-u switch to run normally disabled tests
22312 which require network access or consume significant disk resources.
22313
22314- Several new tests in the standard test suite, with special thanks to
22315 Nick Mathewson.
22316
22317Core
22318----
22319
22320- The floor division operator // has been added as outlined in PEP
22321 238. The / operator still provides classic division (and will until
22322 Python 3.0) unless "from __future__ import division" is included, in
22323 which case the / operator will provide true division. The operator
22324 module provides truediv() and floordiv() functions. Augmented
22325 assignment variants are included, as are the equivalent overloadable
22326 methods and C API methods. See the PEP for a full discussion:
22327 <http://python.sf.net/peps/pep-0238.html>
22328
22329- Future statements are now effective in simulated interactive shells
22330 (like IDLE). This should "just work" by magic, but read Michael
22331 Hudson's "Future statements in simulated shells" PEP 264 for full
22332 details: <http://python.sf.net/peps/pep-0264.html>.
22333
22334- The type/class unification (PEP 252-253) was integrated into the
22335 trunk and is not so tentative any more (the exact specification of
22336 some features is still tentative). A lot of work has done on fixing
22337 bugs and adding robustness and features (performance still has to
22338 come a long way).
22339
22340- Warnings about a mismatch in the Python API during extension import
22341 now use the Python warning framework (which makes it possible to
22342 write filters for these warnings).
22343
22344- A function's __dict__ (aka func_dict) will now always be a
22345 dictionary. It used to be possible to delete it or set it to None,
22346 but now both actions raise TypeErrors. It is still legal to set it
22347 to a dictionary object. Getting func.__dict__ before any attributes
22348 have been assigned now returns an empty dictionary instead of None.
22349
22350- A new command line option, -E, was added which disables the use of
22351 all environment variables, or at least those that are specifically
22352 significant to Python. Usually those have a name starting with
22353 "PYTHON". This was used to fix a problem where the tests fail if
22354 the user happens to have PYTHONHOME or PYTHONPATH pointing to an
22355 older distribution.
22356
22357Library
22358-------
22359
22360- New class Differ and new functions ndiff() and restore() in difflib.py.
22361 These package the algorithms used by the popular Tools/scripts/ndiff.py,
22362 for programmatic reuse.
22363
22364- New function xml.sax.saxutils.quoteattr(): Quote an XML attribute
22365 value using the minimal quoting required for the value; more
22366 reliable than using xml.sax.saxutils.escape() for attribute values.
22367
22368- Readline completion support for cmd.Cmd was added.
22369
22370- Calling os.tempnam() or os.tmpnam() generate RuntimeWarnings.
22371
22372- Added function threading.BoundedSemaphore()
22373
22374- Added Ka-Ping Yee's cgitb.py module.
22375
22376- The 'new' module now exposes the CO_xxx flags.
22377
22378- The gc module offers the get_referents function.
22379
22380New platforms
22381-------------
22382
22383C API
22384-----
22385
22386- Two new APIs PyOS_snprintf() and PyOS_vsnprintf() were added
22387 which provide a cross-platform implementations for the
22388 relatively new snprintf()/vsnprintf() C lib APIs. In contrast to
22389 the standard sprintf() and vsprintf() C lib APIs, these versions
22390 apply bounds checking on the used buffer which enhances protection
22391 against buffer overruns.
22392
22393- Unicode APIs now use name mangling to assure that mixing interpreters
22394 and extensions using different Unicode widths is rendered next to
22395 impossible. Trying to import an incompatible Unicode-aware extension
22396 will result in an ImportError. Unicode extensions writers must make
22397 sure to check the Unicode width compatibility in their extensions by
22398 using at least one of the mangled Unicode APIs in the extension.
22399
22400- Two new flags METH_NOARGS and METH_O are available in method definition
22401 tables to simplify implementation of methods with no arguments and a
22402 single untyped argument. Calling such methods is more efficient than
22403 calling corresponding METH_VARARGS methods. METH_OLDARGS is now
22404 deprecated.
22405
22406Windows
22407-------
22408
22409- "import module" now compiles module.pyw if it exists and nothing else
22410 relevant is found.
22411
22412
22413What's New in Python 2.2a1?
22414===========================
22415
22416*Release date: 18-Jul-2001*
22417
22418Core
22419----
22420
22421- TENTATIVELY, a large amount of code implementing much of what's
22422 described in PEP 252 (Making Types Look More Like Classes) and PEP
22423 253 (Subtyping Built-in Types) was added. This will be released
22424 with Python 2.2a1. Documentation will be provided separately
22425 through http://www.python.org/2.2/. The purpose of releasing this
22426 with Python 2.2a1 is to test backwards compatibility. It is
22427 possible, though not likely, that a decision is made not to release
22428 this code as part of 2.2 final, if any serious backwards
22429 incompatibilities are found during alpha testing that cannot be
22430 repaired.
22431
22432- Generators were added; this is a new way to create an iterator (see
22433 below) using what looks like a simple function containing one or
22434 more 'yield' statements. See PEP 255. Since this adds a new
22435 keyword to the language, this feature must be enabled by including a
22436 future statement: "from __future__ import generators" (see PEP 236).
22437 Generators will become a standard feature in a future release
22438 (probably 2.3). Without this future statement, 'yield' remains an
22439 ordinary identifier, but a warning is issued each time it is used.
22440 (These warnings currently don't conform to the warnings framework of
22441 PEP 230; we intend to fix this in 2.2a2.)
22442
22443- The UTF-16 codec was modified to be more RFC compliant. It will now
22444 only remove BOM characters at the start of the string and then
22445 only if running in native mode (UTF-16-LE and -BE won't remove a
22446 leading BMO character).
22447
22448- Strings now have a new method .decode() to complement the already
22449 existing .encode() method. These two methods provide direct access
22450 to the corresponding decoders and encoders of the registered codecs.
22451
22452 To enhance the usability of the .encode() method, the special
22453 casing of Unicode object return values was dropped (Unicode objects
22454 were auto-magically converted to string using the default encoding).
22455
22456 Both methods will now return whatever the codec in charge of the
22457 requested encoding returns as object, e.g. Unicode codecs will
22458 return Unicode objects when decoding is requested ("äöü".decode("latin-1")
22459 will return u"äöü"). This enables codec writer to create codecs
22460 for various simple to use conversions.
22461
22462 New codecs were added to demonstrate these new features (the .encode()
22463 and .decode() columns indicate the type of the returned objects):
22464
22465 +---------+-----------+-----------+-----------------------------+
22466 |Name | .encode() | .decode() | Description |
22467 +=========+===========+===========+=============================+
22468 |uu | string | string | UU codec (e.g. for email) |
22469 +---------+-----------+-----------+-----------------------------+
22470 |base64 | string | string | base64 codec |
22471 +---------+-----------+-----------+-----------------------------+
22472 |quopri | string | string | quoted-printable codec |
22473 +---------+-----------+-----------+-----------------------------+
22474 |zlib | string | string | zlib compression |
22475 +---------+-----------+-----------+-----------------------------+
22476 |hex | string | string | 2-byte hex codec |
22477 +---------+-----------+-----------+-----------------------------+
22478 |rot-13 | string | Unicode | ROT-13 Unicode charmap codec|
22479 +---------+-----------+-----------+-----------------------------+
22480
22481- Some operating systems now support the concept of a default Unicode
22482 encoding for file system operations. Notably, Windows supports 'mbcs'
22483 as the default. The Macintosh will also adopt this concept in the medium
22484 term, although the default encoding for that platform will be other than
22485 'mbcs'.
22486
22487 On operating system that support non-ASCII filenames, it is common for
22488 functions that return filenames (such as os.listdir()) to return Python
22489 string objects pre-encoded using the default file system encoding for
22490 the platform. As this encoding is likely to be different from Python's
22491 default encoding, converting this name to a Unicode object before passing
22492 it back to the Operating System would result in a Unicode error, as Python
22493 would attempt to use its default encoding (generally ASCII) rather than
22494 the default encoding for the file system.
22495
22496 In general, this change simply removes surprises when working with
22497 Unicode and the file system, making these operations work as you expect,
22498 increasing the transparency of Unicode objects in this context.
22499 See [????] for more details, including examples.
22500
22501- Float (and complex) literals in source code were evaluated to full
22502 precision only when running from a .py file; the same code loaded from a
22503 .pyc (or .pyo) file could suffer numeric differences starting at about the
22504 12th significant decimal digit. For example, on a machine with IEEE-754
22505 floating arithmetic,
22506
22507 x = 9007199254740992.0
22508 print long(x)
22509
22510 printed 9007199254740992 if run directly from .py, but 9007199254740000
22511 if from a compiled (.pyc or .pyo) file. This was due to marshal using
22512 str(float) instead of repr(float) when building code objects. marshal
22513 now uses repr(float) instead, which should reproduce floats to full
22514 machine precision (assuming the platform C float<->string I/O conversion
22515 functions are of good quality).
22516
22517 This may cause floating-point results to change in some cases, and
22518 usually for the better, but may also cause numerically unstable
22519 algorithms to break.
22520
22521- The implementation of dicts suffers fewer collisions, which has speed
22522 benefits. However, the order in which dict entries appear in dict.keys(),
22523 dict.values() and dict.items() may differ from previous releases for a
22524 given dict. Nothing is defined about this order, so no program should
22525 rely on it. Nevertheless, it's easy to write test cases that rely on the
22526 order by accident, typically because of printing the str() or repr() of a
22527 dict to an "expected results" file. See Lib/test/test_support.py's new
22528 sortdict(dict) function for a simple way to display a dict in sorted
22529 order.
22530
22531- Many other small changes to dicts were made, resulting in faster
22532 operation along the most common code paths.
22533
22534- Dictionary objects now support the "in" operator: "x in dict" means
22535 the same as dict.has_key(x).
22536
22537- The update() method of dictionaries now accepts generic mapping
22538 objects. Specifically the argument object must support the .keys()
22539 and __getitem__() methods. This allows you to say, for example,
22540 {}.update(UserDict())
22541
22542- Iterators were added; this is a generalized way of providing values
22543 to a for loop. See PEP 234. There's a new built-in function iter()
22544 to return an iterator. There's a new protocol to get the next value
22545 from an iterator using the next() method (in Python) or the
22546 tp_iternext slot (in C). There's a new protocol to get iterators
22547 using the __iter__() method (in Python) or the tp_iter slot (in C).
22548 Iterating (i.e. a for loop) over a dictionary generates its keys.
22549 Iterating over a file generates its lines.
22550
22551- The following functions were generalized to work nicely with iterator
22552 arguments::
22553
22554 map(), filter(), reduce(), zip()
22555 list(), tuple() (PySequence_Tuple() and PySequence_Fast() in C API)
22556 max(), min()
22557 join() method of strings
22558 extend() method of lists
22559 'x in y' and 'x not in y' (PySequence_Contains() in C API)
22560 operator.countOf() (PySequence_Count() in C API)
22561 right-hand side of assignment statements with multiple targets, such as ::
22562 x, y, z = some_iterable_object_returning_exactly_3_values
22563
22564- Accessing module attributes is significantly faster (for example,
22565 random.random or os.path or yourPythonModule.yourAttribute).
22566
22567- Comparing dictionary objects via == and != is faster, and now works even
22568 if the keys and values don't support comparisons other than ==.
22569
22570- Comparing dictionaries in ways other than == and != is slower: there were
22571 insecurities in the dict comparison implementation that could cause Python
22572 to crash if the element comparison routines for the dict keys and/or
22573 values mutated the dicts. Making the code bulletproof slowed it down.
22574
22575- Collisions in dicts are resolved via a new approach, which can help
22576 dramatically in bad cases. For example, looking up every key in a dict
22577 d with d.keys() == [i << 16 for i in range(20000)] is approximately 500x
22578 faster now. Thanks to Christian Tismer for pointing out the cause and
22579 the nature of an effective cure (last December! better late than never).
22580
22581- repr() is much faster for large containers (dict, list, tuple).
22582
22583
22584Library
22585-------
22586
22587- The constants ascii_letters, ascii_lowercase. and ascii_uppercase
22588 were added to the string module. These a locale-independent
22589 constants, unlike letters, lowercase, and uppercase. These are now
22590 use in appropriate locations in the standard library.
22591
22592- The flags used in dlopen calls can now be configured using
22593 sys.setdlopenflags and queried using sys.getdlopenflags.
22594
22595- Fredrik Lundh's xmlrpclib is now a standard library module. This
22596 provides full client-side XML-RPC support. In addition,
22597 Demo/xmlrpc/ contains two server frameworks (one SocketServer-based,
22598 one asyncore-based). Thanks to Eric Raymond for the documentation.
22599
22600- The xrange() object is simplified: it no longer supports slicing,
22601 repetition, comparisons, efficient 'in' checking, the tolist()
22602 method, or the start, stop and step attributes. See PEP 260.
22603
22604- A new function fnmatch.filter to filter lists of file names was added.
22605
22606- calendar.py uses month and day names based on the current locale.
22607
22608- strop is now *really* obsolete (this was announced before with 1.6),
22609 and issues DeprecationWarning when used (except for the four items
22610 that are still imported into string.py).
22611
22612- Cookie.py now sorts key+value pairs by key in output strings.
22613
22614- pprint.isrecursive(object) didn't correctly identify recursive objects.
22615 Now it does.
22616
22617- pprint functions now much faster for large containers (tuple, list, dict).
22618
22619- New 'q' and 'Q' format codes in the struct module, corresponding to C
22620 types "long long" and "unsigned long long" (on Windows, __int64). In
22621 native mode, these can be used only when the platform C compiler supports
22622 these types (when HAVE_LONG_LONG is #define'd by the Python config
22623 process), and then they inherit the sizes and alignments of the C types.
22624 In standard mode, 'q' and 'Q' are supported on all platforms, and are
22625 8-byte integral types.
22626
22627- The site module installs a new built-in function 'help' that invokes
22628 pydoc.help. It must be invoked as 'help()'; when invoked as 'help',
22629 it displays a message reminding the user to use 'help()' or
22630 'help(object)'.
22631
22632Tests
22633-----
22634
22635- New test_mutants.py runs dict comparisons where the key and value
22636 comparison operators mutate the dicts randomly during comparison. This
22637 rapidly causes Python to crash under earlier releases (not for the faint
22638 of heart: it can also cause Win9x to freeze or reboot!).
22639
22640- New test_pprint.py verifies that pprint.isrecursive() and
22641 pprint.isreadable() return sensible results. Also verifies that simple
22642 cases produce correct output.
22643
22644C API
22645-----
22646
22647- Removed the unused last_is_sticky argument from the internal
22648 _PyTuple_Resize(). If this affects you, you were cheating.
22649
Skip Montanaro4cb22042002-09-17 20:55:31 +000022650What's New in Python 2.1 (final)?
22651=================================
22652
22653We only changed a few things since the last release candidate, all in
22654Python library code:
22655
22656- A bug in the locale module was fixed that affected locales which
22657 define no grouping for numeric formatting.
22658
22659- A few bugs in the weakref module's implementations of weak
22660 dictionaries (WeakValueDictionary and WeakKeyDictionary) were fixed,
22661 and the test suite was updated to check for these bugs.
22662
22663- An old bug in the os.path.walk() function (introduced in Python
22664 2.0!) was fixed: a non-existent file would cause an exception
22665 instead of being ignored.
22666
22667- Fixed a few bugs in the new symtable module found by Neil Norwitz's
22668 PyChecker.
22669
22670
22671What's New in Python 2.1c2?
22672===========================
22673
22674A flurry of small changes, and one showstopper fixed in the nick of
22675time made it necessary to release another release candidate. The list
22676here is the *complete* list of patches (except version updates):
22677
22678Core
22679
22680- Tim discovered a nasty bug in the dictionary code, caused by
22681 PyDict_Next() calling dict_resize(), and the GC code's use of
22682 PyDict_Next() violating an assumption in dict_items(). This was
22683 fixed with considerable amounts of band-aid, but the net effect is a
22684 saner and more robust implementation.
22685
22686- Made a bunch of symbols static that were accidentally global.
22687
22688Build and Ports
22689
22690- The setup.py script didn't check for a new enough version of zlib
22691 (1.1.3 is needed). Now it does.
22692
22693- Changed "make clean" target to also remove shared libraries.
22694
22695- Added a more general warning about the SGI Irix optimizer to README.
22696
22697Library
22698
22699- Fix a bug in urllib.basejoin("http://host", "../file.html") which
22700 omitted the slash between host and file.html.
22701
22702- The mailbox module's _Mailbox class contained a completely broken
22703 and undocumented seek() method. Ripped it out.
22704
22705- Fixed a bunch of typos in various library modules (urllib2, smtpd,
22706 sgmllib, netrc, chunk) found by Neil Norwitz's PyChecker.
22707
22708- Fixed a few last-minute bugs in unittest.
22709
22710Extensions
22711
22712- Reverted the patch to the OpenSSL code in socketmodule.c to support
22713 RAND_status() and the EGD, and the subsequent patch that tried to
22714 fix it for pre-0.9.5 versions; the problem with the patch is that on
22715 some systems it issues a warning whenever socket is imported, and
22716 that's unacceptable.
22717
22718Tests
22719
22720- Fixed the pickle tests to work with "import test.test_pickle".
22721
22722- Tweaked test_locale.py to actually run the test Windows.
22723
22724- In distutils/archive_util.py, call zipfile.ZipFile() with mode "w",
22725 not "wb" (which is not a valid mode at all).
22726
22727- Fix pstats browser crashes. Import readline if it exists to make
22728 the user interface nicer.
22729
22730- Add "import thread" to the top of test modules that import the
22731 threading module (test_asynchat and test_threadedtempfile). This
22732 prevents test failures caused by a broken threading module resulting
22733 from a previously caught failed import.
22734
22735- Changed test_asynchat.py to set the SO_REUSEADDR option; this was
22736 needed on some platforms (e.g. Solaris 8) when the tests are run
22737 twice in succession.
22738
22739- Skip rather than fail test_sunaudiodev if no audio device is found.
22740
22741
22742What's New in Python 2.1c1?
22743===========================
22744
22745This list was significantly updated when 2.1c2 was released; the 2.1c1
22746release didn't mention most changes that were actually part of 2.1c1:
22747
22748Legal
22749
22750- Copyright was assigned to the Python Software Foundation (PSF) and a
22751 PSF license (very similar to the CNRI license) was added.
22752
22753- The CNRI copyright notice was updated to include 2001.
22754
22755Core
22756
22757- After a public outcry, assignment to __debug__ is no longer illegal;
22758 instead, a warning is issued. It will become illegal in 2.2.
22759
22760- Fixed a core dump with "%#x" % 0, and changed the semantics so that
22761 "%#x" now always prepends "0x", even if the value is zero.
22762
22763- Fixed some nits in the bytecode compiler.
22764
22765- Fixed core dumps when calling certain kinds of non-functions.
22766
22767- Fixed various core dumps caused by reference count bugs.
22768
22769Build and Ports
22770
22771- Use INSTALL_SCRIPT to install script files.
22772
22773- New port: SCO Unixware 7, by Billy G. Allie.
22774
22775- Updated RISCOS port.
22776
22777- Updated BeOS port and notes.
22778
22779- Various other porting problems resolved.
22780
22781Library
22782
22783- The TERMIOS and SOCKET modules are now truly obsolete and
22784 unnecessary. Their symbols are incorporated in the termios and
22785 socket modules.
22786
22787- Fixed some 64-bit bugs in pickle, cPickle, and struct, and added
22788 better tests for pickling.
22789
22790- threading: make Condition.wait() robust against KeyboardInterrupt.
22791
22792- zipfile: add support to zipfile to support opening an archive
22793 represented by an open file rather than a file name. Fix bug where
22794 the archive was not properly closed. Fixed a bug in this bugfix
22795 where flush() was called for a read-only file.
22796
22797- imputil: added an uninstall() method to the ImportManager.
22798
22799- Canvas: fixed bugs in lower() and tkraise() methods.
22800
22801- SocketServer: API change (added overridable close_request() method)
22802 so that the TCP server can explicitly close the request.
22803
22804- pstats: Eric Raymond added a simple interactive statistics browser,
22805 invoked when the module is run as a script.
22806
22807- locale: fixed a problem in format().
22808
22809- webbrowser: made it work when the BROWSER environment variable has a
22810 value like "/usr/bin/netscape". Made it auto-detect Konqueror for
22811 KDE 2. Fixed some other nits.
22812
22813- unittest: changes to allow using a different exception than
22814 AssertionError, and added a few more function aliases. Some other
22815 small changes.
22816
22817- urllib, urllib2: fixed redirect problems and a coupleof other nits.
22818
22819- asynchat: fixed a critical bug in asynchat that slipped through the
22820 2.1b2 release. Fixed another rare bug.
22821
22822- Fix some unqualified except: clauses (always a bad code example).
22823
22824XML
22825
22826- pyexpat: new API get_version_string().
22827
22828- Fixed some minidom bugs.
22829
22830Extensions
22831
22832- Fixed a core dump in _weakref. Removed the weakref.mapping()
22833 function (it adds nothing to the API).
22834
22835- Rationalized the use of header files in the readline module, to make
22836 it compile (albeit with some warnings) with the very recent readline
22837 4.2, without breaking for earlier versions.
22838
22839- Hopefully fixed a buffering problem in linuxaudiodev.
22840
22841- Attempted a fix to make the OpenSSL support in the socket module
22842 work again with pre-0.9.5 versions of OpenSSL.
22843
22844Tests
22845
22846- Added a test case for asynchat and asyncore.
22847
22848- Removed coupling between tests where one test failing could break
22849 another.
22850
22851Tools
22852
22853- Ping added an interactive help browser to pydoc, fixed some nits
22854 in the rest of the pydoc code, and added some features to his
22855 inspect module.
22856
22857- An updated python-mode.el version 4.1 which integrates Ken
22858 Manheimer's pdbtrack.el. This makes debugging Python code via pdb
22859 much nicer in XEmacs and Emacs. When stepping through your program
22860 with pdb, in either the shell window or the *Python* window, the
22861 source file and line will be tracked by an arrow. Very cool!
22862
22863- IDLE: syntax warnings in interactive mode are changed into errors.
22864
22865- Some improvements to Tools/webchecker (ignore some more URL types,
22866 follow some more links).
22867
22868- Brought the Tools/compiler package up to date.
22869
22870
22871What's New in Python 2.1 beta 2?
22872================================
22873
22874(Unlisted are many fixed bugs, more documentation, etc.)
22875
22876Core language, builtins, and interpreter
22877
22878- The nested scopes work (enabled by "from __future__ import
22879 nested_scopes") is completed; in particular, the future now extends
22880 into code executed through exec, eval() and execfile(), and into the
22881 interactive interpreter.
22882
22883- When calling a base class method (e.g. BaseClass.__init__(self)),
22884 this is now allowed even if self is not strictly spoken a class
22885 instance (e.g. when using metaclasses or the Don Beaudry hook).
22886
22887- Slice objects are now comparable but not hashable; this prevents
22888 dict[:] from being accepted but meaningless.
22889
22890- Complex division is now calculated using less braindead algorithms.
22891 This doesn't change semantics except it's more likely to give useful
22892 results in extreme cases. Complex repr() now uses full precision
22893 like float repr().
22894
22895- sgmllib.py now calls handle_decl() for simple <!...> declarations.
22896
22897- It is illegal to assign to the name __debug__, which is set when the
22898 interpreter starts. It is effectively a compile-time constant.
22899
22900- A warning will be issued if a global statement for a variable
22901 follows a use or assignment of that variable.
22902
22903Standard library
22904
22905- unittest.py, a unit testing framework by Steve Purcell (PyUNIT,
22906 inspired by JUnit), is now part of the standard library. You now
22907 have a choice of two testing frameworks: unittest requires you to
22908 write testcases as separate code, doctest gathers them from
22909 docstrings. Both approaches have their advantages and
22910 disadvantages.
22911
22912- A new module Tix was added, which wraps the Tix extension library
22913 for Tk. With that module, it is not necessary to statically link
22914 Tix with _tkinter, since Tix will be loaded with Tcl's "package
22915 require" command. See Demo/tix/.
22916
22917- tzparse.py is now obsolete.
22918
22919- In gzip.py, the seek() and tell() methods are removed -- they were
22920 non-functional anyway, and it's better if callers can test for their
22921 existence with hasattr().
22922
22923Python/C API
22924
22925- PyDict_Next(): it is now safe to call PyDict_SetItem() with a key
22926 that's already in the dictionary during a PyDict_Next() iteration.
22927 This used to fail occasionally when a dictionary resize operation
22928 could be triggered that would rehash all the keys. All other
22929 modifications to the dictionary are still off-limits during a
22930 PyDict_Next() iteration!
22931
22932- New extended APIs related to passing compiler variables around.
22933
22934- New abstract APIs PyObject_IsInstance(), PyObject_IsSubclass()
22935 implement isinstance() and issubclass().
22936
22937- Py_BuildValue() now has a "D" conversion to create a Python complex
22938 number from a Py_complex C value.
22939
22940- Extensions types which support weak references must now set the
22941 field allocated for the weak reference machinery to NULL themselves;
22942 this is done to avoid the cost of checking each object for having a
22943 weakly referencable type in PyObject_INIT(), since most types are
22944 not weakly referencable.
22945
22946- PyFrame_FastToLocals() and PyFrame_LocalsToFast() copy bindings for
22947 free variables and cell variables to and from the frame's f_locals.
22948
22949- Variants of several functions defined in pythonrun.h have been added
22950 to support the nested_scopes future statement. The variants all end
22951 in Flags and take an extra argument, a PyCompilerFlags *; examples:
22952 PyRun_AnyFileExFlags(), PyRun_InteractiveLoopFlags(). These
22953 variants may be removed in Python 2.2, when nested scopes are
22954 mandatory.
22955
22956Distutils
22957
22958- the sdist command now writes a PKG-INFO file, as described in PEP 241,
22959 into the release tree.
22960
22961- several enhancements to the bdist_wininst command from Thomas Heller
22962 (an uninstaller, more customization of the installer's display)
22963
22964- from Jack Jansen: added Mac-specific code to generate a dialog for
22965 users to specify the command-line (because providing a command-line with
22966 MacPython is awkward). Jack also made various fixes for the Mac
22967 and the Metrowerks compiler.
22968
22969- added 'platforms' and 'keywords' to the set of metadata that can be
22970 specified for a distribution.
22971
22972- applied patches from Jason Tishler to make the compiler class work with
22973 Cygwin.
22974
22975
22976What's New in Python 2.1 beta 1?
22977================================
22978
22979Core language, builtins, and interpreter
22980
22981- Following an outcry from the community about the amount of code
22982 broken by the nested scopes feature introduced in 2.1a2, we decided
22983 to make this feature optional, and to wait until Python 2.2 (or at
22984 least 6 months) to make it standard. The option can be enabled on a
22985 per-module basis by adding "from __future__ import nested_scopes" at
22986 the beginning of a module (before any other statements, but after
22987 comments and an optional docstring). See PEP 236 (Back to the
22988 __future__) for a description of the __future__ statement. PEP 227
22989 (Statically Nested Scopes) has been updated to reflect this change,
22990 and to clarify the semantics in a number of endcases.
22991
22992- The nested scopes code, when enabled, has been hardened, and most
22993 bugs and memory leaks in it have been fixed.
22994
22995- Compile-time warnings are now generated for a number of conditions
22996 that will break or change in meaning when nested scopes are enabled:
22997
22998 - Using "from...import *" or "exec" without in-clause in a function
22999 scope that also defines a lambda or nested function with one or
23000 more free (non-local) variables. The presence of the import* or
23001 bare exec makes it impossible for the compiler to determine the
23002 exact set of local variables in the outer scope, which makes it
23003 impossible to determine the bindings for free variables in the
23004 inner scope. To avoid the warning about import *, change it into
23005 an import of explicitly name object, or move the import* statement
23006 to the global scope; to avoid the warning about bare exec, use
23007 exec...in... (a good idea anyway -- there's a possibility that
23008 bare exec will be deprecated in the future).
23009
23010 - Use of a global variable in a nested scope with the same name as a
23011 local variable in a surrounding scope. This will change in
23012 meaning with nested scopes: the name in the inner scope will
23013 reference the variable in the outer scope rather than the global
23014 of the same name. To avoid the warning, either rename the outer
23015 variable, or use a global statement in the inner function.
23016
23017- An optional object allocator has been included. This allocator is
23018 optimized for Python objects and should be faster and use less memory
23019 than the standard system allocator. It is not enabled by default
23020 because of possible thread safety problems. The allocator is only
23021 protected by the Python interpreter lock and it is possible that some
23022 extension modules require a thread safe allocator. The object
23023 allocator can be enabled by providing the "--with-pymalloc" option to
23024 configure.
23025
23026Standard library
23027
23028- pyexpat now detects the expat version if expat.h defines it. A
23029 number of additional handlers are provided, which are only available
23030 since expat 1.95. In addition, the methods SetParamEntityParsing and
23031 GetInputContext of Parser objects are available with 1.95.x
23032 only. Parser objects now provide the ordered_attributes and
23033 specified_attributes attributes. A new module expat.model was added,
23034 which offers a number of additional constants if 1.95.x is used.
23035
23036- xml.dom offers the new functions registerDOMImplementation and
23037 getDOMImplementation.
23038
23039- xml.dom.minidom offers a toprettyxml method. A number of DOM
23040 conformance issues have been resolved. In particular, Element now
Serhiy Storchaka6a7b3a72016-04-17 08:32:47 +030023041 has a hasAttributes method, and the handling of namespaces was
Skip Montanaro4cb22042002-09-17 20:55:31 +000023042 improved.
23043
23044- Ka-Ping Yee contributed two new modules: inspect.py, a module for
23045 getting information about live Python code, and pydoc.py, a module
23046 for interactively converting docstrings to HTML or text.
23047 Tools/scripts/pydoc, which is now automatically installed into
23048 <prefix>/bin, uses pydoc.py to display documentation; try running
23049 "pydoc -h" for instructions. "pydoc -g" pops up a small GUI that
23050 lets you browse the module docstrings using a web browser.
23051
23052- New library module difflib.py, primarily packaging the SequenceMatcher
23053 class at the heart of the popular ndiff.py file-comparison tool.
23054
23055- doctest.py (a framework for verifying Python code examples in docstrings)
23056 is now part of the std library.
23057
23058Windows changes
23059
23060- A new entry in the Start menu, "Module Docs", runs "pydoc -g" -- a
23061 small GUI that lets you browse the module docstrings using your
23062 default web browser.
23063
23064- Import is now case-sensitive. PEP 235 (Import on Case-Insensitive
23065 Platforms) is implemented. See
23066
23067 http://python.sourceforge.net/peps/pep-0235.html
23068
23069 for full details, especially the "Current Lower-Left Semantics" section.
23070 The new Windows import rules are simpler than before:
23071
23072 A. If the PYTHONCASEOK environment variable exists, same as
23073 before: silently accept the first case-insensitive match of any
23074 kind; raise ImportError if none found.
23075
23076 B. Else search sys.path for the first case-sensitive match; raise
23077 ImportError if none found.
23078
23079 The same rules have been implemented on other platforms with case-
23080 insensitive but case-preserving filesystems too (including Cygwin, and
23081 several flavors of Macintosh operating systems).
23082
23083- winsound module: Under Win9x, winsound.Beep() now attempts to simulate
23084 what it's supposed to do (and does do under NT and 2000) via direct
23085 port manipulation. It's unknown whether this will work on all systems,
23086 but it does work on my Win98SE systems now and was known to be useless on
23087 all Win9x systems before.
23088
23089- Build: Subproject _test (effectively) renamed to _testcapi.
23090
23091New platforms
23092
23093- 2.1 should compile and run out of the box under MacOS X, even using HFS+.
23094 Thanks to Steven Majewski!
23095
23096- 2.1 should compile and run out of the box on Cygwin. Thanks to Jason
23097 Tishler!
23098
23099- 2.1 contains new files and patches for RISCOS, thanks to Dietmar
23100 Schwertberger! See RISCOS/README for more information -- it seems
23101 that because of the bizarre filename conventions on RISCOS, no port
23102 to that platform is easy.
23103
23104
23105What's New in Python 2.1 alpha 2?
23106=================================
23107
23108Core language, builtins, and interpreter
23109
23110- Scopes nest. If a name is used in a function or class, but is not
23111 local, the definition in the nearest enclosing function scope will
23112 be used. One consequence of this change is that lambda statements
23113 could reference variables in the namespaces where the lambda is
23114 defined. In some unusual cases, this change will break code.
23115
23116 In all previous version of Python, names were resolved in exactly
23117 three namespaces -- the local namespace, the global namespace, and
Georg Brandl93dc9eb2010-03-14 10:56:14 +000023118 the builtins namespace. According to this old definition, if a
Skip Montanaro4cb22042002-09-17 20:55:31 +000023119 function A is defined within a function B, the names bound in B are
23120 not visible in A. The new rules make names bound in B visible in A,
23121 unless A contains a name binding that hides the binding in B.
23122
23123 Section 4.1 of the reference manual describes the new scoping rules
23124 in detail. The test script in Lib/test/test_scope.py demonstrates
23125 some of the effects of the change.
23126
23127 The new rules will cause existing code to break if it defines nested
23128 functions where an outer function has local variables with the same
23129 name as globals or builtins used by the inner function. Example:
23130
23131 def munge(str):
23132 def helper(x):
23133 return str(x)
23134 if type(str) != type(''):
23135 str = helper(str)
23136 return str.strip()
23137
23138 Under the old rules, the name str in helper() is bound to the
Georg Brandl93dc9eb2010-03-14 10:56:14 +000023139 built-in function str(). Under the new rules, it will be bound to
Skip Montanaro4cb22042002-09-17 20:55:31 +000023140 the argument named str and an error will occur when helper() is
23141 called.
23142
23143- The compiler will report a SyntaxError if "from ... import *" occurs
23144 in a function or class scope. The language reference has documented
23145 that this case is illegal, but the compiler never checked for it.
23146 The recent introduction of nested scope makes the meaning of this
23147 form of name binding ambiguous. In a future release, the compiler
23148 may allow this form when there is no possibility of ambiguity.
23149
23150- repr(string) is easier to read, now using hex escapes instead of octal,
23151 and using \t, \n and \r instead of \011, \012 and \015 (respectively):
23152
23153 >>> "\texample \r\n" + chr(0) + chr(255)
23154 '\texample \r\n\x00\xff' # in 2.1
23155 '\011example \015\012\000\377' # in 2.0
23156
23157- Functions are now compared and hashed by identity, not by value, since
23158 the func_code attribute is writable.
23159
23160- Weak references (PEP 205) have been added. This involves a few
23161 changes in the core, an extension module (_weakref), and a Python
23162 module (weakref). The weakref module is the public interface. It
23163 includes support for "explicit" weak references, proxy objects, and
23164 mappings with weakly held values.
23165
23166- A 'continue' statement can now appear in a try block within the body
23167 of a loop. It is still not possible to use continue in a finally
23168 clause.
23169
23170Standard library
23171
23172- mailbox.py now has a new class, PortableUnixMailbox which is
23173 identical to UnixMailbox but uses a more portable scheme for
23174 determining From_ separators. Also, the constructors for all the
23175 classes in this module have a new optional `factory' argument, which
23176 is a callable used when new message classes must be instantiated by
23177 the next() method.
23178
23179- random.py is now self-contained, and offers all the functionality of
23180 the now-deprecated whrandom.py. See the docs for details. random.py
23181 also supports new functions getstate() and setstate(), for saving
23182 and restoring the internal state of the generator; and jumpahead(n),
23183 for quickly forcing the internal state to be the same as if n calls to
23184 random() had been made. The latter is particularly useful for multi-
23185 threaded programs, creating one instance of the random.Random() class for
23186 each thread, then using .jumpahead() to force each instance to use a
23187 non-overlapping segment of the full period.
23188
23189- random.py's seed() function is new. For bit-for-bit compatibility with
23190 prior releases, use the whseed function instead. The new seed function
23191 addresses two problems: (1) The old function couldn't produce more than
23192 about 2**24 distinct internal states; the new one about 2**45 (the best
23193 that can be done in the Wichmann-Hill generator). (2) The old function
23194 sometimes produced identical internal states when passed distinct
23195 integers, and there was no simple way to predict when that would happen;
23196 the new one guarantees to produce distinct internal states for all
23197 arguments in [0, 27814431486576L).
23198
23199- The socket module now supports raw packets on Linux. The socket
23200 family is AF_PACKET.
23201
23202- test_capi.py is a start at running tests of the Python C API. The tests
23203 are implemented by the new Modules/_testmodule.c.
23204
23205- A new extension module, _symtable, provides provisional access to the
23206 internal symbol table used by the Python compiler. A higher-level
23207 interface will be added on top of _symtable in a future release.
23208
23209- Removed the obsolete soundex module.
23210
23211- xml.dom.minidom now uses the standard DOM exceptions. Node supports
23212 the isSameNode method; NamedNodeMap the get method.
23213
23214- xml.sax.expatreader supports the lexical handler property; it
23215 generates comment, startCDATA, and endCDATA events.
23216
23217Windows changes
23218
23219- Build procedure: the zlib project is built in a different way that
23220 ensures the zlib header files used can no longer get out of synch with
23221 the zlib binary used. See PCbuild\readme.txt for details. Your old
23222 zlib-related directories can be deleted; you'll need to download fresh
23223 source for zlib and unpack it into a new directory.
23224
23225- Build: New subproject _test for the benefit of test_capi.py (see above).
23226
23227- Build: New subproject _symtable, for new DLL _symtable.pyd (a nascent
23228 interface to some Python compiler internals).
23229
23230- Build: Subproject ucnhash is gone, since the code was folded into the
23231 unicodedata subproject.
23232
23233What's New in Python 2.1 alpha 1?
23234=================================
23235
23236Core language, builtins, and interpreter
23237
23238- There is a new Unicode companion to the PyObject_Str() API
23239 called PyObject_Unicode(). It behaves in the same way as the
Martin Panter6245cb32016-04-15 02:14:19 +000023240 former, but assures that the returned value is a Unicode object
Skip Montanaro4cb22042002-09-17 20:55:31 +000023241 (applying the usual coercion if necessary).
23242
23243- The comparison operators support "rich comparison overloading" (PEP
23244 207). C extension types can provide a rich comparison function in
23245 the new tp_richcompare slot in the type object. The cmp() function
23246 and the C function PyObject_Compare() first try the new rich
23247 comparison operators before trying the old 3-way comparison. There
23248 is also a new C API PyObject_RichCompare() (which also falls back on
23249 the old 3-way comparison, but does not constrain the outcome of the
23250 rich comparison to a Boolean result).
23251
23252 The rich comparison function takes two objects (at least one of
23253 which is guaranteed to have the type that provided the function) and
23254 an integer indicating the opcode, which can be Py_LT, Py_LE, Py_EQ,
23255 Py_NE, Py_GT, Py_GE (for <, <=, ==, !=, >, >=), and returns a Python
23256 object, which may be NotImplemented (in which case the tp_compare
23257 slot function is used as a fallback, if defined).
23258
23259 Classes can overload individual comparison operators by defining one
23260 or more of the methods__lt__, __le__, __eq__, __ne__, __gt__,
23261 __ge__. There are no explicit "reflected argument" versions of
23262 these; instead, __lt__ and __gt__ are each other's reflection,
23263 likewise for__le__ and __ge__; __eq__ and __ne__ are their own
23264 reflection (similar at the C level). No other implications are
23265 made; in particular, Python does not assume that == is the Boolean
23266 inverse of !=, or that < is the Boolean inverse of >=. This makes
23267 it possible to define types with partial orderings.
23268
23269 Classes or types that want to implement (in)equality tests but not
23270 the ordering operators (i.e. unordered types) should implement ==
23271 and !=, and raise an error for the ordering operators.
23272
23273 It is possible to define types whose rich comparison results are not
23274 Boolean; e.g. a matrix type might want to return a matrix of bits
23275 for A < B, giving elementwise comparisons. Such types should ensure
23276 that any interpretation of their value in a Boolean context raises
23277 an exception, e.g. by defining __nonzero__ (or the tp_nonzero slot
23278 at the C level) to always raise an exception.
23279
23280- Complex numbers use rich comparisons to define == and != but raise
23281 an exception for <, <=, > and >=. Unfortunately, this also means
23282 that cmp() of two complex numbers raises an exception when the two
23283 numbers differ. Since it is not mathematically meaningful to compare
23284 complex numbers except for equality, I hope that this doesn't break
23285 too much code.
23286
23287- The outcome of comparing non-numeric objects of different types is
23288 not defined by the language, other than that it's arbitrary but
23289 consistent (see the Reference Manual). An implementation detail changed
23290 in 2.1a1 such that None now compares less than any other object. Code
23291 relying on this new behavior (like code that relied on the previous
23292 behavior) does so at its own risk.
23293
23294- Functions and methods now support getting and setting arbitrarily
23295 named attributes (PEP 232). Functions have a new __dict__
23296 (a.k.a. func_dict) which hold the function attributes. Methods get
23297 and set attributes on their underlying im_func. It is a TypeError
23298 to set an attribute on a bound method.
23299
23300- The xrange() object implementation has been improved so that
23301 xrange(sys.maxint) can be used on 64-bit platforms. There's still a
23302 limitation that in this case len(xrange(sys.maxint)) can't be
23303 calculated, but the common idiom "for i in xrange(sys.maxint)" will
23304 work fine as long as the index i doesn't actually reach 2**31.
23305 (Python uses regular ints for sequence and string indices; fixing
23306 that is much more work.)
23307
23308- Two changes to from...import:
23309
23310 1) "from M import X" now works even if (after loading module M)
23311 sys.modules['M'] is not a real module; it's basically a getattr()
23312 operation with AttributeError exceptions changed into ImportError.
23313
23314 2) "from M import *" now looks for M.__all__ to decide which names to
23315 import; if M.__all__ doesn't exist, it uses M.__dict__.keys() but
23316 filters out names starting with '_' as before. Whether or not
23317 __all__ exists, there's no restriction on the type of M.
23318
23319- File objects have a new method, xreadlines(). This is the fastest
23320 way to iterate over all lines in a file:
23321
23322 for line in file.xreadlines():
23323 ...do something to line...
23324
23325 See the xreadlines module (mentioned below) for how to do this for
23326 other file-like objects.
23327
23328- Even if you don't use file.xreadlines(), you may expect a speedup on
23329 line-by-line input. The file.readline() method has been optimized
23330 quite a bit in platform-specific ways: on systems (like Linux) that
23331 support flockfile(), getc_unlocked(), and funlockfile(), those are
23332 used by default. On systems (like Windows) without getc_unlocked(),
23333 a complicated (but still thread-safe) method using fgets() is used by
23334 default.
23335
23336 You can force use of the fgets() method by #define'ing
23337 USE_FGETS_IN_GETLINE at build time (it may be faster than
23338 getc_unlocked()).
23339
23340 You can force fgets() not to be used by #define'ing
23341 DONT_USE_FGETS_IN_GETLINE (this is the first thing to try if std test
23342 test_bufio.py fails -- and let us know if it does!).
23343
23344- In addition, the fileinput module, while still slower than the other
23345 methods on most platforms, has been sped up too, by using
23346 file.readlines(sizehint).
23347
23348- Support for run-time warnings has been added, including a new
23349 command line option (-W) to specify the disposition of warnings.
23350 See the description of the warnings module below.
23351
23352- Extensive changes have been made to the coercion code. This mostly
23353 affects extension modules (which can now implement mixed-type
23354 numerical operators without having to use coercion), but
23355 occasionally, in boundary cases the coercion semantics have changed
23356 subtly. Since this was a terrible gray area of the language, this
23357 is considered an improvement. Also note that __rcmp__ is no longer
23358 supported -- instead of calling __rcmp__, __cmp__ is called with
23359 reflected arguments.
23360
23361- In connection with the coercion changes, a new built-in singleton
23362 object, NotImplemented is defined. This can be returned for
23363 operations that wish to indicate they are not implemented for a
23364 particular combination of arguments. From C, this is
23365 Py_NotImplemented.
23366
23367- The interpreter accepts now bytecode files on the command line even
23368 if they do not have a .pyc or .pyo extension. On Linux, after executing
23369
23370import imp,sys,string
23371magic = string.join(["\\x%.2x" % ord(c) for c in imp.get_magic()],"")
23372reg = ':pyc:M::%s::%s:' % (magic, sys.executable)
23373open("/proc/sys/fs/binfmt_misc/register","wb").write(reg)
23374
23375 any byte code file can be used as an executable (i.e. as an argument
23376 to execve(2)).
23377
23378- %[xXo] formats of negative Python longs now produce a sign
23379 character. In 1.6 and earlier, they never produced a sign,
23380 and raised an error if the value of the long was too large
23381 to fit in a Python int. In 2.0, they produced a sign if and
23382 only if too large to fit in an int. This was inconsistent
23383 across platforms (because the size of an int varies across
23384 platforms), and inconsistent with hex() and oct(). Example:
23385
23386 >>> "%x" % -0x42L
23387 '-42' # in 2.1
23388 'ffffffbe' # in 2.0 and before, on 32-bit machines
23389 >>> hex(-0x42L)
23390 '-0x42L' # in all versions of Python
23391
23392 The behavior of %d formats for negative Python longs remains
23393 the same as in 2.0 (although in 1.6 and before, they raised
23394 an error if the long didn't fit in a Python int).
23395
23396 %u formats don't make sense for Python longs, but are allowed
23397 and treated the same as %d in 2.1. In 2.0, a negative long
23398 formatted via %u produced a sign if and only if too large to
23399 fit in an int. In 1.6 and earlier, a negative long formatted
23400 via %u raised an error if it was too big to fit in an int.
23401
23402- Dictionary objects have an odd new method, popitem(). This removes
23403 an arbitrary item from the dictionary and returns it (in the form of
23404 a (key, value) pair). This can be useful for algorithms that use a
23405 dictionary as a bag of "to do" items and repeatedly need to pick one
23406 item. Such algorithms normally end up running in quadratic time;
23407 using popitem() they can usually be made to run in linear time.
23408
23409Standard library
23410
23411- In the time module, the time argument to the functions strftime,
23412 localtime, gmtime, asctime and ctime is now optional, defaulting to
23413 the current time (in the local timezone).
23414
23415- The ftplib module now defaults to passive mode, which is deemed a
23416 more useful default given that clients are often inside firewalls
23417 these days. Note that this could break if ftplib is used to connect
23418 to a *server* that is inside a firewall, from outside; this is
23419 expected to be a very rare situation. To fix that, you can call
23420 ftp.set_pasv(0).
23421
23422- The module site now treats .pth files not only for path configuration,
23423 but also supports extensions to the initialization code: Lines starting
23424 with import are executed.
23425
23426- There's a new module, warnings, which implements a mechanism for
23427 issuing and filtering warnings. There are some new built-in
23428 exceptions that serve as warning categories, and a new command line
23429 option, -W, to control warnings (e.g. -Wi ignores all warnings, -We
23430 turns warnings into errors). warnings.warn(message[, category])
23431 issues a warning message; this can also be called from C as
23432 PyErr_Warn(category, message).
23433
23434- A new module xreadlines was added. This exports a single factory
23435 function, xreadlines(). The intention is that this code is the
23436 absolutely fastest way to iterate over all lines in an open
23437 file(-like) object:
23438
23439 import xreadlines
23440 for line in xreadlines.xreadlines(file):
23441 ...do something to line...
23442
23443 This is equivalent to the previous the speed record holder using
23444 file.readlines(sizehint). Note that if file is a real file object
23445 (as opposed to a file-like object), this is equivalent:
23446
23447 for line in file.xreadlines():
23448 ...do something to line...
23449
23450- The bisect module has new functions bisect_left, insort_left,
23451 bisect_right and insort_right. The old names bisect and insort
23452 are now aliases for bisect_right and insort_right. XXX_right
23453 and XXX_left methods differ in what happens when the new element
23454 compares equal to one or more elements already in the list: the
23455 XXX_left methods insert to the left, the XXX_right methods to the
23456 right. Code that doesn't care where equal elements end up should
23457 continue to use the old, short names ("bisect" and "insort").
23458
23459- The new curses.panel module wraps the panel library that forms part
23460 of SYSV curses and ncurses. Contributed by Thomas Gellekum.
23461
23462- The SocketServer module now sets the allow_reuse_address flag by
23463 default in the TCPServer class.
23464
23465- A new function, sys._getframe(), returns the stack frame pointer of
23466 the caller. This is intended only as a building block for
23467 higher-level mechanisms such as string interpolation.
23468
23469- The pyexpat module supports a number of new handlers, which are
23470 available only in expat 1.2. If invocation of a callback fails, it
23471 will report an additional frame in the traceback. Parser objects
23472 participate now in garbage collection. If expat reports an unknown
23473 encoding, pyexpat will try to use a Python codec; that works only
23474 for single-byte charsets. The parser type objects is exposed as
23475 XMLParserObject.
23476
23477- xml.dom now offers standard definitions for symbolic node type and
23478 exception code constants, and a hierarchy of DOM exceptions. minidom
23479 was adjusted to use them.
23480
23481- The conformance of xml.dom.minidom to the DOM specification was
23482 improved. It detects a number of additional error cases; the
23483 previous/next relationship works even when the tree is modified;
23484 Node supports the normalize() method; NamedNodeMap, DocumentType and
23485 DOMImplementation classes were added; Element supports the
23486 hasAttribute and hasAttributeNS methods; and Text supports the splitText
23487 method.
23488
23489Build issues
23490
23491- For Unix (and Unix-compatible) builds, configuration and building of
23492 extension modules is now greatly automated. Rather than having to
23493 edit the Modules/Setup file to indicate which modules should be
23494 built and where their include files and libraries are, a
23495 distutils-based setup.py script now takes care of building most
23496 extension modules. All extension modules built this way are built
23497 as shared libraries. Only a few modules that must be linked
23498 statically are still listed in the Setup file; you won't need to
23499 edit their configuration.
23500
23501- Python should now build out of the box on Cygwin. If it doesn't,
23502 mail to Jason Tishler (jlt63 at users.sourceforge.net).
23503
23504- Python now always uses its own (renamed) implementation of getopt()
23505 -- there's too much variation among C library getopt()
23506 implementations.
23507
23508- C++ compilers are better supported; the CXX macro is always set to a
23509 C++ compiler if one is found.
23510
23511Windows changes
23512
23513- select module: By default under Windows, a select() call
23514 can specify no more than 64 sockets. Python now boosts
23515 this Microsoft default to 512. If you need even more than
23516 that, see the MS docs (you'll need to #define FD_SETSIZE
23517 and recompile Python from source).
23518
23519- Support for Windows 3.1, DOS and OS/2 is gone. The Lib/dos-8x3
23520 subdirectory is no more!
23521
23522
23523What's New in Python 2.0?
23524=========================
23525
23526Below is a list of all relevant changes since release 1.6. Older
23527changes are in the file HISTORY. If you are making the jump directly
23528from Python 1.5.2 to 2.0, make sure to read the section for 1.6 in the
23529HISTORY file! Many important changes listed there.
23530
23531Alternatively, a good overview of the changes between 1.5.2 and 2.0 is
23532the document "What's New in Python 2.0" by Kuchling and Moshe Zadka:
Andrew M. Kuchlinge240d9b2004-03-21 18:48:22 +000023533http://www.amk.ca/python/2.0/.
Skip Montanaro4cb22042002-09-17 20:55:31 +000023534
23535--Guido van Rossum (home page: http://www.pythonlabs.com/~guido/)
23536
23537======================================================================
23538
23539What's new in 2.0 (since release candidate 1)?
23540==============================================
23541
23542Standard library
23543
23544- The copy_reg module was modified to clarify its intended use: to
23545 register pickle support for extension types, not for classes.
23546 pickle() will raise a TypeError if it is passed a class.
23547
23548- Fixed a bug in gettext's "normalize and expand" code that prevented
23549 it from finding an existing .mo file.
23550
23551- Restored support for HTTP/0.9 servers in httplib.
23552
23553- The math module was changed to stop raising OverflowError in case of
23554 underflow, and return 0 instead in underflow cases. Whether Python
23555 used to raise OverflowError in case of underflow was platform-
23556 dependent (it did when the platform math library set errno to ERANGE
23557 on underflow).
23558
23559- Fixed a bug in StringIO that occurred when the file position was not
23560 at the end of the file and write() was called with enough data to
23561 extend past the end of the file.
23562
23563- Fixed a bug that caused Tkinter error messages to get lost on
23564 Windows. The bug was fixed by replacing direct use of
23565 interp->result with Tcl_GetStringResult(interp).
23566
23567- Fixed bug in urllib2 that caused it to fail when it received an HTTP
23568 redirect response.
23569
23570- Several changes were made to distutils: Some debugging code was
23571 removed from util. Fixed the installer used when an external zip
23572 program (like WinZip) is not found; the source code for this
23573 installer is in Misc/distutils. check_lib() was modified to behave
23574 more like AC_CHECK_LIB by add other_libraries() as a parameter. The
23575 test for whether installed modules are on sys.path was changed to
23576 use both normcase() and normpath().
23577
23578- Several minor bugs were fixed in the xml package (the minidom,
23579 pulldom, expatreader, and saxutils modules).
23580
23581- The regression test driver (regrtest.py) behavior when invoked with
23582 -l changed: It now reports a count of objects that are recognized as
23583 garbage but not freed by the garbage collector.
23584
23585- The regression test for the math module was changed to test
23586 exceptional behavior when the test is run in verbose mode. Python
23587 cannot yet guarantee consistent exception behavior across platforms,
23588 so the exception part of test_math is run only in verbose mode, and
23589 may fail on your platform.
23590
23591Internals
23592
23593- PyOS_CheckStack() has been disabled on Win64, where it caused
23594 test_sre to fail.
23595
23596Build issues
23597
23598- Changed compiler flags, so that gcc is always invoked with -Wall and
23599 -Wstrict-prototypes. Users compiling Python with GCC should see
23600 exactly one warning, except if they have passed configure the
23601 --with-pydebug flag. The expected warning is for getopt() in
23602 Modules/main.c. This warning will be fixed for Python 2.1.
23603
23604- Fixed configure to add -threads argument during linking on OSF1.
23605
23606Tools and other miscellany
23607
23608- The compiler in Tools/compiler was updated to support the new
23609 language features introduced in 2.0: extended print statement, list
23610 comprehensions, and augmented assignments. The new compiler should
23611 also be backwards compatible with Python 1.5.2; the compiler will
23612 always generate code for the version of the interpreter it runs
23613 under.
23614
23615What's new in 2.0 release candidate 1 (since beta 2)?
23616=====================================================
23617
23618What is release candidate 1?
23619
23620We believe that release candidate 1 will fix all known bugs that we
23621intend to fix for the 2.0 final release. This release should be a bit
23622more stable than the previous betas. We would like to see even more
23623widespread testing before the final release, so we are producing this
23624release candidate. The final release will be exactly the same unless
23625any show-stopping (or brown bag) bugs are found by testers of the
23626release candidate.
23627
23628All the changes since the last beta release are bug fixes or changes
23629to support building Python for specific platforms.
23630
23631Core language, builtins, and interpreter
23632
23633- A bug that caused crashes when __coerce__ was used with augmented
23634 assignment, e.g. +=, was fixed.
23635
23636- Raise ZeroDivisionError when raising zero to a negative number,
Georg Brandl93dc9eb2010-03-14 10:56:14 +000023637 e.g. 0.0 ** -2.0. Note that math.pow is unrelated to the built-in
Skip Montanaro4cb22042002-09-17 20:55:31 +000023638 power operator and the result of math.pow(0.0, -2.0) will vary by
23639 platform. On Linux, it raises a ValueError.
23640
23641- A bug in Unicode string interpolation was fixed that occasionally
23642 caused errors with formats including "%%". For example, the
23643 following expression "%% %s" % u"abc" no longer raises a TypeError.
23644
23645- Compilation of deeply nested expressions raises MemoryError instead
23646 of SyntaxError, e.g. eval("[" * 50 + "]" * 50).
23647
23648- In 2.0b2 on Windows, the interpreter wrote .pyc files in text mode,
23649 rendering them useless. They are now written in binary mode again.
23650
23651Standard library
23652
23653- Keyword arguments are now accepted for most pattern and match object
23654 methods in SRE, the standard regular expression engine.
23655
23656- In SRE, fixed error with negative lookahead and lookbehind that
23657 manifested itself as a runtime error in patterns like "(?<!abc)(def)".
23658
23659- Several bugs in the Unicode handling and error handling in _tkinter
23660 were fixed.
23661
23662- Fix memory management errors in Merge() and Tkapp_Call() routines.
23663
23664- Several changes were made to cStringIO to make it compatible with
23665 the file-like object interface and with StringIO. If operations are
23666 performed on a closed object, an exception is raised. The truncate
23667 method now accepts a position argument and readline accepts a size
23668 argument.
23669
23670- There were many changes made to the linuxaudiodev module and its
23671 test suite; as a result, a short, unexpected audio sample should now
23672 play when the regression test is run.
23673
23674 Note that this module is named poorly, because it should work
23675 correctly on any platform that supports the Open Sound System
23676 (OSS).
23677
23678 The module now raises exceptions when errors occur instead of
23679 crashing. It also defines the AFMT_A_LAW format (logarithmic A-law
23680 audio) and defines a getptr() method that calls the
23681 SNDCTL_DSP_GETxPTR ioctl defined in the OSS Programmer's Guide.
23682
23683- The library_version attribute, introduced in an earlier beta, was
23684 removed because it can not be supported with early versions of the C
23685 readline library, which provides no way to determine the version at
23686 compile-time.
23687
23688- The binascii module is now enabled on Win64.
23689
23690- tokenize.py no longer suffers "recursion depth" errors when parsing
23691 programs with very long string literals.
23692
23693Internals
23694
23695- Fixed several buffer overflow vulnerabilities in calculate_path(),
23696 which is called when the interpreter starts up to determine where
23697 the standard library is installed. These vulnerabilities affect all
23698 previous versions of Python and can be exploited by setting very
23699 long values for PYTHONHOME or argv[0]. The risk is greatest for a
23700 setuid Python script, although use of the wrapper in
23701 Misc/setuid-prog.c will eliminate the vulnerability.
23702
23703- Fixed garbage collection bugs in instance creation that were
23704 triggered when errors occurred during initialization. The solution,
23705 applied in cPickle and in PyInstance_New(), is to call
23706 PyObject_GC_Init() after the initialization of the object's
23707 container attributes is complete.
23708
23709- pyexpat adds definitions of PyModule_AddStringConstant and
23710 PyModule_AddObject if the Python version is less than 2.0, which
23711 provides compatibility with PyXML on Python 1.5.2.
23712
23713- If the platform has a bogus definition for LONG_BIT (the number of
23714 bits in a long), an error will be reported at compile time.
23715
23716- Fix bugs in _PyTuple_Resize() which caused hard-to-interpret garbage
23717 collection crashes and possibly other, unreported crashes.
23718
23719- Fixed a memory leak in _PyUnicode_Fini().
23720
23721Build issues
23722
23723- configure now accepts a --with-suffix option that specifies the
23724 executable suffix. This is useful for builds on Cygwin and Mac OS
23725 X, for example.
23726
23727- The mmap.PAGESIZE constant is now initialized using sysconf when
23728 possible, which eliminates a dependency on -lucb for Reliant UNIX.
23729
23730- The md5 file should now compile on all platforms.
23731
23732- The select module now compiles on platforms that do not define
23733 POLLRDNORM and related constants.
23734
23735- Darwin (Mac OS X): Initial support for static builds on this
23736 platform.
23737
23738- BeOS: A number of changes were made to the build and installation
23739 process. ar-fake now operates on a directory of object files.
23740 dl_export.h is gone, and its macros now appear on the mwcc command
23741 line during build on PPC BeOS.
23742
23743- Platform directory in lib/python2.0 is "plat-beos5" (or
23744 "plat-beos4", if building on BeOS 4.5), rather than "plat-beos".
23745
23746- Cygwin: Support for shared libraries, Tkinter, and sockets.
23747
23748- SunOS 4.1.4_JL: Fix test for directory existence in configure.
23749
23750Tools and other miscellany
23751
23752- Removed debugging prints from main used with freeze.
23753
23754- IDLE auto-indent no longer crashes when it encounters Unicode
23755 characters.
23756
23757What's new in 2.0 beta 2 (since beta 1)?
23758========================================
23759
23760Core language, builtins, and interpreter
23761
23762- Add support for unbounded ints in %d,i,u,x,X,o formats; for example
23763 "%d" % 2L**64 == "18446744073709551616".
23764
23765- Add -h and -V command line options to print the usage message and
23766 Python version number and exit immediately.
23767
23768- eval() and exec accept Unicode objects as code parameters.
23769
23770- getattr() and setattr() now also accept Unicode objects for the
23771 attribute name, which are converted to strings using the default
23772 encoding before lookup.
23773
23774- Multiplication on string and Unicode now does proper bounds
23775 checking; e.g. 'a' * 65536 * 65536 will raise ValueError, "repeated
23776 string is too long."
23777
23778- Better error message when continue is found in try statement in a
23779 loop.
23780
23781
23782Standard library and extensions
23783
23784- socket module: the OpenSSL code now adds support for RAND_status()
23785 and EGD (Entropy Gathering Device).
23786
23787- array: reverse() method of array now works. buffer_info() now does
23788 argument checking; it still takes no arguments.
23789
23790- asyncore/asynchat: Included most recent version from Sam Rushing.
23791
23792- cgi: Accept '&' or ';' as separator characters when parsing form data.
23793
23794- CGIHTTPServer: Now works on Windows (and perhaps even Mac).
23795
23796- ConfigParser: When reading the file, options spelled in upper case
23797 letters are now correctly converted to lowercase.
23798
23799- copy: Copy Unicode objects atomically.
23800
23801- cPickle: Fail gracefully when copy_reg can't be imported.
23802
23803- cStringIO: Implemented readlines() method.
23804
23805- dbm: Add get() and setdefault() methods to dbm object. Add constant
23806 `library' to module that names the library used. Added doc strings
23807 and method names to error messages. Uses configure to determine
23808 which ndbm.h file to include; Berkeley DB's nbdm and GDBM's ndbm is
23809 now available options.
23810
23811- distutils: Update to version 0.9.3.
23812
23813- dl: Add several dl.RTLD_ constants.
23814
23815- fpectl: Now supported on FreeBSD.
23816
23817- gc: Add DEBUG_SAVEALL option. When enabled all garbage objects
23818 found by the collector will be saved in gc.garbage. This is useful
23819 for debugging a program that creates reference cycles.
23820
23821- httplib: Three changes: Restore support for set_debuglevel feature
23822 of HTTP class. Do not close socket on zero-length response. Do not
23823 crash when server sends invalid content-length header.
23824
23825- mailbox: Mailbox class conforms better to qmail specifications.
23826
23827- marshal: When reading a short, sign-extend on platforms where shorts
23828 are bigger than 16 bits. When reading a long, repair the unportable
23829 sign extension that was being done for 64-bit machines. (It assumed
23830 that signed right shift sign-extends.)
23831
23832- operator: Add contains(), invert(), __invert__() as aliases for
23833 __contains__(), inv(), and __inv__() respectively.
23834
23835- os: Add support for popen2() and popen3() on all platforms where
23836 fork() exists. (popen4() is still in the works.)
23837
23838- os: (Windows only:) Add startfile() function that acts like double-
23839 clicking on a file in Explorer (or passing the file name to the
23840 DOS "start" command).
23841
23842- os.path: (Windows, DOS:) Treat trailing colon correctly in
23843 os.path.join. os.path.join("a:", "b") yields "a:b".
23844
23845- pickle: Now raises ValueError when an invalid pickle that contains
23846 a non-string repr where a string repr was expected. This behavior
23847 matches cPickle.
23848
23849- posixfile: Remove broken __del__() method.
23850
23851- py_compile: support CR+LF line terminators in source file.
23852
23853- readline: Does not immediately exit when ^C is hit when readline and
23854 threads are configured. Adds definition of rl_library_version. (The
23855 latter addition requires GNU readline 2.2 or later.)
23856
23857- rfc822: Domain literals returned by AddrlistClass method
23858 getdomainliteral() are now properly wrapped in brackets.
23859
23860- site: sys.setdefaultencoding() should only be called in case the
23861 standard default encoding ("ascii") is changed. This saves quite a
23862 few cycles during startup since the first call to
23863 setdefaultencoding() will initialize the codec registry and the
23864 encodings package.
23865
23866- socket: Support for size hint in readlines() method of object returned
23867 by makefile().
23868
23869- sre: Added experimental expand() method to match objects. Does not
23870 use buffer interface on Unicode strings. Does not hang if group id
23871 is followed by whitespace.
23872
23873- StringIO: Size hint in readlines() is now supported as documented.
23874
23875- struct: Check ranges for bytes and shorts.
23876
23877- urllib: Improved handling of win32 proxy settings. Fixed quote and
23878 quote_plus functions so that the always encode a comma.
23879
23880- Tkinter: Image objects are now guaranteed to have unique ids. Set
23881 event.delta to zero if Tk version doesn't support mousewheel.
23882 Removed some debugging prints.
23883
23884- UserList: now implements __contains__().
23885
23886- webbrowser: On Windows, use os.startfile() instead of os.popen(),
23887 which works around a bug in Norton AntiVirus 2000 that leads directly
23888 to a Blue Screen freeze.
23889
23890- xml: New version detection code allows PyXML to override standard
23891 XML package if PyXML version is greater than 0.6.1.
23892
23893- xml.dom: DOM level 1 support for basic XML. Includes xml.dom.minidom
23894 (conventional DOM), and xml.dom.pulldom, which allows building the DOM
23895 tree only for nodes which are sufficiently interesting to a specific
23896 application. Does not provide the HTML-specific extensions. Still
23897 undocumented.
23898
23899- xml.sax: SAX 2 support for Python, including all the handler
23900 interfaces needed to process XML 1.0 compliant XML. Some
23901 documentation is already available.
23902
23903- pyexpat: Renamed to xml.parsers.expat since this is part of the new,
23904 packagized XML support.
23905
23906
23907C API
23908
23909- Add three new convenience functions for module initialization --
23910 PyModule_AddObject(), PyModule_AddIntConstant(), and
23911 PyModule_AddStringConstant().
23912
23913- Cleaned up definition of NULL in C source code; all definitions were
23914 removed and add #error to Python.h if NULL isn't defined after
23915 #include of stdio.h.
23916
23917- Py_PROTO() macros that were removed in 2.0b1 have been restored for
23918 backwards compatibility (at the source level) with old extensions.
23919
23920- A wrapper API was added for signal() and sigaction(). Instead of
23921 either function, always use PyOS_getsig() to get a signal handler
23922 and PyOS_setsig() to set one. A new convenience typedef
23923 PyOS_sighandler_t is defined for the type of signal handlers.
23924
23925- Add PyString_AsStringAndSize() function that provides access to the
23926 internal data buffer and size of a string object -- or the default
23927 encoded version of a Unicode object.
23928
23929- PyString_Size() and PyString_AsString() accept Unicode objects.
23930
23931- The standard header <limits.h> is now included by Python.h (if it
23932 exists). INT_MAX and LONG_MAX will always be defined, even if
23933 <limits.h> is not available.
23934
23935- PyFloat_FromString takes a second argument, pend, that was
23936 effectively useless. It is now officially useless but preserved for
23937 backwards compatibility. If the pend argument is not NULL, *pend is
23938 set to NULL.
23939
23940- PyObject_GetAttr() and PyObject_SetAttr() now accept Unicode objects
23941 for the attribute name. See note on getattr() above.
23942
23943- A few bug fixes to argument processing for Unicode.
23944 PyArg_ParseTupleAndKeywords() now accepts "es#" and "es".
23945 PyArg_Parse() special cases "s#" for Unicode objects; it returns a
23946 pointer to the default encoded string data instead of to the raw
23947 UTF-16.
23948
23949- Py_BuildValue accepts B format (for bgen-generated code).
23950
23951
23952Internals
23953
23954- On Unix, fix code for finding Python installation directory so that
23955 it works when argv[0] is a relative path.
23956
23957- Added a true unicode_internal_encode() function and fixed the
23958 unicode_internal_decode function() to support Unicode objects directly
23959 rather than by generating a copy of the object.
23960
23961- Several of the internal Unicode tables are much smaller now, and
23962 the source code should be much friendlier to weaker compilers.
23963
23964- In the garbage collector: Fixed bug in collection of tuples. Fixed
23965 bug that caused some instances to be removed from the container set
23966 while they were still live. Fixed parsing in gc.set_debug() for
23967 platforms where sizeof(long) > sizeof(int).
23968
23969- Fixed refcount problem in instance deallocation that only occurred
23970 when Py_REF_DEBUG was defined and Py_TRACE_REFS was not.
23971
23972- On Windows, getpythonregpath is now protected against null data in
23973 registry key.
23974
23975- On Unix, create .pyc/.pyo files with O_EXCL flag to avoid a race
23976 condition.
23977
23978
23979Build and platform-specific issues
23980
23981- Better support of GNU Pth via --with-pth configure option.
23982
23983- Python/C API now properly exposed to dynamically-loaded extension
23984 modules on Reliant UNIX.
23985
23986- Changes for the benefit of SunOS 4.1.4 (really!). mmapmodule.c:
23987 Don't define MS_SYNC to be zero when it is undefined. Added missing
23988 prototypes in posixmodule.c.
23989
23990- Improved support for HP-UX build. Threads should now be correctly
23991 configured (on HP-UX 10.20 and 11.00).
23992
23993- Fix largefile support on older NetBSD systems and OpenBSD by adding
23994 define for TELL64.
23995
23996
23997Tools and other miscellany
23998
23999- ftpmirror: Call to main() is wrapped in if __name__ == "__main__".
24000
24001- freeze: The modulefinder now works with 2.0 opcodes.
24002
24003- IDLE:
24004 Move hackery of sys.argv until after the Tk instance has been
24005 created, which allows the application-specific Tkinter
24006 initialization to be executed if present; also pass an explicit
24007 className parameter to the Tk() constructor.
24008
24009
24010What's new in 2.0 beta 1?
24011=========================
24012
24013Source Incompatibilities
24014------------------------
24015
24016None. Note that 1.6 introduced several incompatibilities with 1.5.2,
24017such as single-argument append(), connect() and bind(), and changes to
24018str(long) and repr(float).
24019
24020
24021Binary Incompatibilities
24022------------------------
24023
24024- Third party extensions built for Python 1.5.x or 1.6 cannot be used
24025with Python 2.0; these extensions will have to be rebuilt for Python
240262.0.
24027
24028- On Windows, attempting to import a third party extension built for
24029Python 1.5.x or 1.6 results in an immediate crash; there's not much we
24030can do about this. Check your PYTHONPATH environment variable!
24031
24032- Python bytecode files (*.pyc and *.pyo) are not compatible between
24033releases.
24034
24035
24036Overview of Changes Since 1.6
24037-----------------------------
24038
24039There are many new modules (including brand new XML support through
24040the xml package, and i18n support through the gettext module); a list
24041of all new modules is included below. Lots of bugs have been fixed.
24042
24043The process for making major new changes to the language has changed
24044since Python 1.6. Enhancements must now be documented by a Python
24045Enhancement Proposal (PEP) before they can be accepted.
24046
24047There are several important syntax enhancements, described in more
24048detail below:
24049
24050 - Augmented assignment, e.g. x += 1
24051
24052 - List comprehensions, e.g. [x**2 for x in range(10)]
24053
24054 - Extended import statement, e.g. import Module as Name
24055
24056 - Extended print statement, e.g. print >> file, "Hello"
24057
24058Other important changes:
24059
24060 - Optional collection of cyclical garbage
24061
24062Python Enhancement Proposal (PEP)
24063---------------------------------
24064
24065PEP stands for Python Enhancement Proposal. A PEP is a design
24066document providing information to the Python community, or describing
24067a new feature for Python. The PEP should provide a concise technical
24068specification of the feature and a rationale for the feature.
24069
24070We intend PEPs to be the primary mechanisms for proposing new
24071features, for collecting community input on an issue, and for
24072documenting the design decisions that have gone into Python. The PEP
24073author is responsible for building consensus within the community and
24074documenting dissenting opinions.
24075
24076The PEPs are available at http://python.sourceforge.net/peps/.
24077
24078Augmented Assignment
24079--------------------
24080
24081This must have been the most-requested feature of the past years!
24082Eleven new assignment operators were added:
24083
24084 += -= *= /= %= **= <<= >>= &= ^= |=
24085
24086For example,
24087
24088 A += B
24089
24090is similar to
24091
24092 A = A + B
24093
24094except that A is evaluated only once (relevant when A is something
24095like dict[index].attr).
24096
24097However, if A is a mutable object, A may be modified in place. Thus,
24098if A is a number or a string, A += B has the same effect as A = A+B
24099(except A is only evaluated once); but if a is a list, A += B has the
24100same effect as A.extend(B)!
24101
24102Classes and built-in object types can override the new operators in
24103order to implement the in-place behavior; the not-in-place behavior is
24104used automatically as a fallback when an object doesn't implement the
24105in-place behavior. For classes, the method name is derived from the
24106method name for the corresponding not-in-place operator by inserting
24107an 'i' in front of the name, e.g. __iadd__ implements in-place
24108__add__.
24109
24110Augmented assignment was implemented by Thomas Wouters.
24111
24112
24113List Comprehensions
24114-------------------
24115
24116This is a flexible new notation for lists whose elements are computed
24117from another list (or lists). The simplest form is:
24118
24119 [<expression> for <variable> in <sequence>]
24120
24121For example, [i**2 for i in range(4)] yields the list [0, 1, 4, 9].
24122This is more efficient than a for loop with a list.append() call.
24123
24124You can also add a condition:
24125
24126 [<expression> for <variable> in <sequence> if <condition>]
24127
24128For example, [w for w in words if w == w.lower()] would yield the list
24129of words that contain no uppercase characters. This is more efficient
24130than a for loop with an if statement and a list.append() call.
24131
24132You can also have nested for loops and more than one 'if' clause. For
24133example, here's a function that flattens a sequence of sequences::
24134
24135 def flatten(seq):
24136 return [x for subseq in seq for x in subseq]
24137
24138 flatten([[0], [1,2,3], [4,5], [6,7,8,9], []])
24139
24140This prints
24141
24142 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
24143
24144List comprehensions originated as a patch set from Greg Ewing; Skip
24145Montanaro and Thomas Wouters also contributed. Described by PEP 202.
24146
24147
24148Extended Import Statement
24149-------------------------
24150
24151Many people have asked for a way to import a module under a different
24152name. This can be accomplished like this:
24153
24154 import foo
24155 bar = foo
24156 del foo
24157
24158but this common idiom gets old quickly. A simple extension of the
24159import statement now allows this to be written as follows:
24160
24161 import foo as bar
24162
24163There's also a variant for 'from ... import':
24164
24165 from foo import bar as spam
24166
24167This also works with packages; e.g. you can write this:
24168
24169 import test.regrtest as regrtest
24170
24171Note that 'as' is not a new keyword -- it is recognized only in this
24172context (this is only possible because the syntax for the import
24173statement doesn't involve expressions).
24174
24175Implemented by Thomas Wouters. Described by PEP 221.
24176
24177
24178Extended Print Statement
24179------------------------
24180
24181Easily the most controversial new feature, this extension to the print
24182statement adds an option to make the output go to a different file
24183than the default sys.stdout.
24184
24185For example, to write an error message to sys.stderr, you can now
24186write:
24187
24188 print >> sys.stderr, "Error: bad dog!"
24189
24190As a special feature, if the expression used to indicate the file
24191evaluates to None, the current value of sys.stdout is used. Thus:
24192
24193 print >> None, "Hello world"
24194
24195is equivalent to
24196
24197 print "Hello world"
24198
24199Design and implementation by Barry Warsaw. Described by PEP 214.
24200
24201
24202Optional Collection of Cyclical Garbage
24203---------------------------------------
24204
24205Python is now equipped with a garbage collector that can hunt down
24206cyclical references between Python objects. It's no replacement for
24207reference counting; in fact, it depends on the reference counts being
24208correct, and decides that a set of objects belong to a cycle if all
24209their reference counts can be accounted for from their references to
24210each other. This devious scheme was first proposed by Eric Tiedemann,
24211and brought to implementation by Neil Schemenauer.
24212
24213There's a module "gc" that lets you control some parameters of the
24214garbage collection. There's also an option to the configure script
24215that lets you enable or disable the garbage collection. In 2.0b1,
24216it's on by default, so that we (hopefully) can collect decent user
24217experience with this new feature. There are some questions about its
24218performance. If it proves to be too much of a problem, we'll turn it
24219off by default in the final 2.0 release.
24220
24221
24222Smaller Changes
24223---------------
24224
24225A new function zip() was added. zip(seq1, seq2, ...) is equivalent to
24226map(None, seq1, seq2, ...) when the sequences have the same length;
24227i.e. zip([1,2,3], [10,20,30]) returns [(1,10), (2,20), (3,30)]. When
24228the lists are not all the same length, the shortest list wins:
24229zip([1,2,3], [10,20]) returns [(1,10), (2,20)]. See PEP 201.
24230
24231sys.version_info is a tuple (major, minor, micro, level, serial).
24232
24233Dictionaries have an odd new method, setdefault(key, default).
24234dict.setdefault(key, default) returns dict[key] if it exists; if not,
24235it sets dict[key] to default and returns that value. Thus:
24236
24237 dict.setdefault(key, []).append(item)
24238
24239does the same work as this common idiom:
24240
24241 if not dict.has_key(key):
24242 dict[key] = []
24243 dict[key].append(item)
24244
24245There are two new variants of SyntaxError that are raised for
24246indentation-related errors: IndentationError and TabError.
24247
24248Changed \x to consume exactly two hex digits; see PEP 223. Added \U
24249escape that consumes exactly eight hex digits.
24250
24251The limits on the size of expressions and file in Python source code
24252have been raised from 2**16 to 2**32. Previous versions of Python
24253were limited because the maximum argument size the Python VM accepted
24254was 2**16. This limited the size of object constructor expressions,
24255e.g. [1,2,3] or {'a':1, 'b':2}, and the size of source files. This
24256limit was raised thanks to a patch by Charles Waldman that effectively
24257fixes the problem. It is now much more likely that you will be
24258limited by available memory than by an arbitrary limit in Python.
24259
24260The interpreter's maximum recursion depth can be modified by Python
24261programs using sys.getrecursionlimit and sys.setrecursionlimit. This
24262limit is the maximum number of recursive calls that can be made by
24263Python code. The limit exists to prevent infinite recursion from
24264overflowing the C stack and causing a core dump. The default value is
242651000. The maximum safe value for a particular platform can be found
Georg Brandl93d15cd2009-10-11 21:24:34 +000024266by running Tools/scripts/find_recursionlimit.py.
Skip Montanaro4cb22042002-09-17 20:55:31 +000024267
24268New Modules and Packages
24269------------------------
24270
24271atexit - for registering functions to be called when Python exits.
24272
24273imputil - Greg Stein's alternative API for writing custom import
24274hooks.
24275
24276pyexpat - an interface to the Expat XML parser, contributed by Paul
24277Prescod.
24278
24279xml - a new package with XML support code organized (so far) in three
24280subpackages: xml.dom, xml.sax, and xml.parsers. Describing these
24281would fill a volume. There's a special feature whereby a
24282user-installed package named _xmlplus overrides the standard
24283xmlpackage; this is intended to give the XML SIG a hook to distribute
24284backwards-compatible updates to the standard xml package.
24285
24286webbrowser - a platform-independent API to launch a web browser.
24287
24288
24289Changed Modules
24290---------------
24291
24292array -- new methods for array objects: count, extend, index, pop, and
24293remove
24294
24295binascii -- new functions b2a_hex and a2b_hex that convert between
24296binary data and its hex representation
24297
24298calendar -- Many new functions that support features including control
24299over which day of the week is the first day, returning strings instead
24300of printing them. Also new symbolic constants for days of week,
24301e.g. MONDAY, ..., SUNDAY.
24302
24303cgi -- FieldStorage objects have a getvalue method that works like a
24304dictionary's get method and returns the value attribute of the object.
24305
24306ConfigParser -- The parser object has new methods has_option,
24307remove_section, remove_option, set, and write. They allow the module
24308to be used for writing config files as well as reading them.
24309
24310ftplib -- ntransfercmd(), transfercmd(), and retrbinary() all now
24311optionally support the RFC 959 REST command.
24312
24313gzip -- readline and readlines now accept optional size arguments
24314
24315httplib -- New interfaces and support for HTTP/1.1 by Greg Stein. See
24316the module doc strings for details.
24317
24318locale -- implement getdefaultlocale for Win32 and Macintosh
24319
24320marshal -- no longer dumps core when marshaling deeply nested or
24321recursive data structures
24322
24323os -- new functions isatty, seteuid, setegid, setreuid, setregid
24324
24325os/popen2 -- popen2/popen3/popen4 support under Windows. popen2/popen3
24326support under Unix.
24327
24328os/pty -- support for openpty and forkpty
24329
24330os.path -- fix semantics of os.path.commonprefix
24331
24332smtplib -- support for sending very long messages
24333
24334socket -- new function getfqdn()
24335
24336readline -- new functions to read, write and truncate history files.
24337The readline section of the library reference manual contains an
24338example.
24339
24340select -- add interface to poll system call
24341
24342shutil -- new copyfileobj function
24343
24344SimpleHTTPServer, CGIHTTPServer -- Fix problems with buffering in the
24345HTTP server.
24346
24347Tkinter -- optimization of function flatten
24348
24349urllib -- scans environment variables for proxy configuration,
24350e.g. http_proxy.
24351
24352whichdb -- recognizes dumbdbm format
24353
24354
24355Obsolete Modules
24356----------------
24357
24358None. However note that 1.6 made a whole slew of modules obsolete:
24359stdwin, soundex, cml, cmpcache, dircache, dump, find, grep, packmail,
24360poly, zmod, strop, util, whatsound.
24361
24362
24363Changed, New, Obsolete Tools
24364----------------------------
24365
24366None.
24367
24368
24369C-level Changes
24370---------------
24371
24372Several cleanup jobs were carried out throughout the source code.
24373
24374All C code was converted to ANSI C; we got rid of all uses of the
24375Py_PROTO() macro, which makes the header files a lot more readable.
24376
24377Most of the portability hacks were moved to a new header file,
24378pyport.h; several other new header files were added and some old
24379header files were removed, in an attempt to create a more rational set
24380of header files. (Few of these ever need to be included explicitly;
24381they are all included by Python.h.)
24382
24383Trent Mick ensured portability to 64-bit platforms, under both Linux
24384and Win64, especially for the new Intel Itanium processor. Mick also
24385added large file support for Linux64 and Win64.
24386
24387The C APIs to return an object's size have been update to consistently
24388use the form PyXXX_Size, e.g. PySequence_Size and PyDict_Size. In
24389previous versions, the abstract interfaces used PyXXX_Length and the
24390concrete interfaces used PyXXX_Size. The old names,
24391e.g. PyObject_Length, are still available for backwards compatibility
24392at the API level, but are deprecated.
24393
24394The PyOS_CheckStack function has been implemented on Windows by
24395Fredrik Lundh. It prevents Python from failing with a stack overflow
24396on Windows.
24397
24398The GC changes resulted in creation of two new slots on object,
24399tp_traverse and tp_clear. The augmented assignment changes result in
24400the creation of a new slot for each in-place operator.
24401
24402The GC API creates new requirements for container types implemented in
24403C extension modules. See Include/objimpl.h for details.
24404
24405PyErr_Format has been updated to automatically calculate the size of
24406the buffer needed to hold the formatted result string. This change
24407prevents crashes caused by programmer error.
24408
24409New C API calls: PyObject_AsFileDescriptor, PyErr_WriteUnraisable.
24410
24411PyRun_AnyFileEx, PyRun_SimpleFileEx, PyRun_FileEx -- New functions
24412that are the same as their non-Ex counterparts except they take an
24413extra flag argument that tells them to close the file when done.
24414
24415XXX There were other API changes that should be fleshed out here.
24416
24417
24418Windows Changes
24419---------------
24420
24421New popen2/popen3/peopen4 in os module (see Changed Modules above).
24422
24423os.popen is much more usable on Windows 95 and 98. See Microsoft
24424Knowledge Base article Q150956. The Win9x workaround described there
24425is implemented by the new w9xpopen.exe helper in the root of your
24426Python installation. Note that Python uses this internally; it is not
24427a standalone program.
24428
24429Administrator privileges are no longer required to install Python
24430on Windows NT or Windows 2000. If you have administrator privileges,
24431Python's registry info will be written under HKEY_LOCAL_MACHINE.
24432Otherwise the installer backs off to writing Python's registry info
24433under HKEY_CURRENT_USER. The latter is sufficient for all "normal"
24434uses of Python, but will prevent some advanced uses from working
24435(for example, running a Python script as an NT service, or possibly
24436from CGI).
24437
24438[This was new in 1.6] The installer no longer runs a separate Tcl/Tk
24439installer; instead, it installs the needed Tcl/Tk files directly in the
24440Python directory. If you already have a Tcl/Tk installation, this
24441wastes some disk space (about 4 Megs) but avoids problems with
24442conflicting Tcl/Tk installations, and makes it much easier for Python
24443to ensure that Tcl/Tk can find all its files.
24444
24445[This was new in 1.6] The Windows installer now installs by default in
24446\Python20\ on the default volume, instead of \Program Files\Python-2.0\.
24447
24448
24449Updates to the changes between 1.5.2 and 1.6
24450--------------------------------------------
24451
24452The 1.6 NEWS file can't be changed after the release is done, so here
24453is some late-breaking news:
24454
24455New APIs in locale.py: normalize(), getdefaultlocale(), resetlocale(),
24456and changes to getlocale() and setlocale().
24457
24458The new module is now enabled per default.
24459
24460It is not true that the encodings codecs cannot be used for normal
24461strings: the string.encode() (which is also present on 8-bit strings
24462!) allows using them for 8-bit strings too, e.g. to convert files from
24463cp1252 (Windows) to latin-1 or vice-versa.
24464
24465Japanese codecs are available from Tamito KAJIYAMA:
24466http://pseudo.grad.sccs.chukyo-u.ac.jp/~kajiyama/python/
24467
24468
24469======================================================================
24470
24471
Guido van Rossumf2eac992000-09-04 17:24:24 +000024472=======================================
24473==> Release 1.6 (September 5, 2000) <==
24474=======================================
24475
Guido van Rossuma598c932000-09-04 16:26:03 +000024476What's new in release 1.6?
24477==========================
24478
24479Below is a list of all relevant changes since release 1.5.2.
24480
24481
24482Source Incompatibilities
24483------------------------
24484
24485Several small incompatible library changes may trip you up:
24486
24487 - The append() method for lists can no longer be invoked with more
24488 than one argument. This used to append a single tuple made out of
24489 all arguments, but was undocumented. To append a tuple, use
24490 e.g. l.append((a, b, c)).
24491
24492 - The connect(), connect_ex() and bind() methods for sockets require
24493 exactly one argument. Previously, you could call s.connect(host,
24494 port), but this was undocumented. You must now write
24495 s.connect((host, port)).
24496
24497 - The str() and repr() functions are now different more often. For
24498 long integers, str() no longer appends a 'L'. Thus, str(1L) == '1',
24499 which used to be '1L'; repr(1L) is unchanged and still returns '1L'.
24500 For floats, repr() now gives 17 digits of precision, to ensure no
24501 precision is lost (on all current hardware).
24502
24503 - The -X option is gone. Built-in exceptions are now always
24504 classes. Many more library modules also have been converted to
24505 class-based exceptions.
24506
24507
24508Binary Incompatibilities
24509------------------------
24510
24511- Third party extensions built for Python 1.5.x cannot be used with
24512Python 1.6; these extensions will have to be rebuilt for Python 1.6.
24513
24514- On Windows, attempting to import a third party extension built for
24515Python 1.5.x results in an immediate crash; there's not much we can do
24516about this. Check your PYTHONPATH environment variable!
24517
24518
24519Overview of Changes since 1.5.2
24520-------------------------------
24521
24522For this overview, I have borrowed from the document "What's New in
24523Python 2.0" by Andrew Kuchling and Moshe Zadka:
Andrew M. Kuchlinge240d9b2004-03-21 18:48:22 +000024524http://www.amk.ca/python/2.0/ .
Guido van Rossuma598c932000-09-04 16:26:03 +000024525
24526There are lots of new modules and lots of bugs have been fixed. A
24527list of all new modules is included below.
24528
24529Probably the most pervasive change is the addition of Unicode support.
24530We've added a new fundamental datatype, the Unicode string, a new
Serhiy Storchaka6a7b3a72016-04-17 08:32:47 +030024531built-in function unicode(), and numerous C APIs to deal with Unicode
Guido van Rossuma598c932000-09-04 16:26:03 +000024532and encodings. See the file Misc/unicode.txt for details, or
24533http://starship.python.net/crew/lemburg/unicode-proposal.txt.
24534
24535Two other big changes, related to the Unicode support, are the
24536addition of string methods and (yet another) new regular expression
24537engine.
24538
24539 - String methods mean that you can now say s.lower() etc. instead of
24540 importing the string module and saying string.lower(s) etc. One
24541 peculiarity is that the equivalent of string.join(sequence,
24542 delimiter) is delimiter.join(sequence). Use " ".join(sequence) for
24543 the effect of string.join(sequence); to make this more readable, try
24544 space=" " first. Note that the maxsplit argument defaults in
24545 split() and replace() have changed from 0 to -1.
24546
24547 - The new regular expression engine, SRE by Fredrik Lundh, is fully
24548 backwards compatible with the old engine, and is in fact invoked
24549 using the same interface (the "re" module). You can explicitly
24550 invoke the old engine by import pre, or the SRE engine by importing
24551 sre. SRE is faster than pre, and supports Unicode (which was the
24552 main reason to put effort in yet another new regular expression
24553 engine -- this is at least the fourth!).
24554
24555
24556Other Changes
24557-------------
24558
24559Other changes that won't break code but are nice to know about:
24560
24561Deleting objects is now safe even for deeply nested data structures.
24562
24563Long/int unifications: long integers can be used in seek() calls, as
24564slice indexes.
24565
24566String formatting (s % args) has a new formatting option, '%r', which
24567acts like '%s' but inserts repr(arg) instead of str(arg). (Not yet in
24568alpha 1.)
24569
24570Greg Ward's "distutils" package is included: this will make
24571installing, building and distributing third party packages much
24572simpler.
24573
24574There's now special syntax that you can use instead of the apply()
24575function. f(*args, **kwds) is equivalent to apply(f, args, kwds).
24576You can also use variations f(a1, a2, *args, **kwds) and you can leave
24577one or the other out: f(*args), f(**kwds).
24578
24579The built-ins int() and long() take an optional second argument to
24580indicate the conversion base -- of course only if the first argument
24581is a string. This makes string.atoi() and string.atol() obsolete.
24582(string.atof() was already obsolete).
24583
24584When a local variable is known to the compiler but undefined when
24585used, a new exception UnboundLocalError is raised. This is a class
24586derived from NameError so code catching NameError should still work.
24587The purpose is to provide better diagnostics in the following example:
24588 x = 1
24589 def f():
24590 print x
24591 x = x+1
24592This used to raise a NameError on the print statement, which confused
24593even experienced Python programmers (especially if there are several
24594hundreds of lines of code between the reference and the assignment to
24595x :-).
24596
24597You can now override the 'in' operator by defining a __contains__
24598method. Note that it has its arguments backwards: x in a causes
24599a.__contains__(x) to be called. That's why the name isn't __in__.
24600
24601The exception AttributeError will have a more friendly error message,
24602e.g.: <code>'Spam' instance has no attribute 'eggs'</code>. This may
24603<b>break code</b> that expects the message to be exactly the attribute
24604name.
24605
24606
24607New Modules in 1.6
24608------------------
24609
24610UserString - base class for deriving from the string type.
24611
24612distutils - tools for distributing Python modules.
24613
24614robotparser - parse a robots.txt file, for writing web spiders.
24615(Moved from Tools/webchecker/.)
24616
24617linuxaudiodev - audio for Linux.
24618
24619mmap - treat a file as a memory buffer. (Windows and Unix.)
24620
24621sre - regular expressions (fast, supports unicode). Currently, this
24622code is very rough. Eventually, the re module will be reimplemented
24623using sre (without changes to the re API).
24624
24625filecmp - supersedes the old cmp.py and dircmp.py modules.
24626
24627tabnanny - check Python sources for tab-width dependance. (Moved from
24628Tools/scripts/.)
24629
24630urllib2 - new and improved but incompatible version of urllib (still
24631experimental).
24632
24633zipfile - read and write zip archives.
24634
24635codecs - support for Unicode encoders/decoders.
24636
24637unicodedata - provides access to the Unicode 3.0 database.
24638
24639_winreg - Windows registry access.
24640
24641encodings - package which provides a large set of standard codecs --
24642currently only for the new Unicode support. It has a drop-in extension
24643mechanism which allows you to add new codecs by simply copying them
24644into the encodings package directory. Asian codec support will
24645probably be made available as separate distribution package built upon
24646this technique and the new distutils package.
24647
24648
24649Changed Modules
24650---------------
24651
24652readline, ConfigParser, cgi, calendar, posix, readline, xmllib, aifc,
24653chunk, wave, random, shelve, nntplib - minor enhancements.
24654
24655socket, httplib, urllib - optional OpenSSL support (Unix only).
24656
24657_tkinter - support for 8.0 up to 8.3. Support for versions older than
246588.0 has been dropped.
24659
24660string - most of this module is deprecated now that strings have
24661methods. This no longer uses the built-in strop module, but takes
24662advantage of the new string methods to provide transparent support for
24663both Unicode and ordinary strings.
24664
24665
24666Changes on Windows
24667------------------
24668
24669The installer no longer runs a separate Tcl/Tk installer; instead, it
24670installs the needed Tcl/Tk files directly in the Python directory. If
24671you already have a Tcl/Tk installation, this wastes some disk space
24672(about 4 Megs) but avoids problems with conflincting Tcl/Tk
24673installations, and makes it much easier for Python to ensure that
24674Tcl/Tk can find all its files. Note: the alpha installers don't
24675include the documentation.
24676
24677The Windows installer now installs by default in \Python16\ on the
24678default volume, instead of \Program Files\Python-1.6\.
24679
24680
24681Changed Tools
24682-------------
24683
24684IDLE - complete overhaul. See the <a href="../idle/">IDLE home
24685page</a> for more information. (Python 1.6 alpha 1 will come with
24686IDLE 0.6.)
24687
24688Tools/i18n/pygettext.py - Python equivalent of xgettext(1). A message
24689text extraction tool used for internationalizing applications written
24690in Python.
24691
24692
24693Obsolete Modules
24694----------------
24695
24696stdwin and everything that uses it. (Get Python 1.5.2 if you need
24697it. :-)
24698
24699soundex. (Skip Montanaro has a version in Python but it won't be
24700included in the Python release.)
24701
24702cmp, cmpcache, dircmp. (Replaced by filecmp.)
24703
24704dump. (Use pickle.)
24705
24706find. (Easily coded using os.walk().)
24707
24708grep. (Not very useful as a library module.)
24709
24710packmail. (No longer has any use.)
24711
24712poly, zmod. (These were poor examples at best.)
24713
24714strop. (No longer needed by the string module.)
24715
24716util. (This functionality was long ago built in elsewhere).
24717
24718whatsound. (Use sndhdr.)
24719
24720
24721Detailed Changes from 1.6b1 to 1.6
24722----------------------------------
24723
24724- Slight changes to the CNRI license. A copyright notice has been
24725added; the requirement to indicate the nature of modifications now
24726applies when making a derivative work available "to others" instead of
24727just "to the public"; the version and date are updated. The new
24728license has a new handle.
24729
24730- Added the Tools/compiler package. This is a project led by Jeremy
24731Hylton to write the Python bytecode generator in Python.
24732
24733- The function math.rint() is removed.
24734
24735- In Python.h, "#define _GNU_SOURCE 1" was added.
24736
24737- Version 0.9.1 of Greg Ward's distutils is included (instead of
24738version 0.9).
24739
24740- A new version of SRE is included. It is more stable, and more
24741compatible with the old RE module. Non-matching ranges are indicated
24742by -1, not None. (The documentation said None, but the PRE
24743implementation used -1; changing to None would break existing code.)
24744
24745- The winreg module has been renamed to _winreg. (There are plans for
24746a higher-level API called winreg, but this has not yet materialized in
24747a form that is acceptable to the experts.)
24748
24749- The _locale module is enabled by default.
24750
24751- Fixed the configuration line for the _curses module.
24752
24753- A few crashes have been fixed, notably <file>.writelines() with a
24754list containing non-string objects would crash, and there were
24755situations where a lost SyntaxError could dump core.
24756
24757- The <list>.extend() method now accepts an arbitrary sequence
24758argument.
24759
24760- If __str__() or __repr__() returns a Unicode object, this is
24761converted to an 8-bit string.
24762
24763- Unicode string comparisons is no longer aware of UTF-16
24764encoding peculiarities; it's a straight 16-bit compare.
24765
24766- The Windows installer now installs the LICENSE file and no longer
24767registers the Python DLL version in the registry (this is no longer
24768needed). It now uses Tcl/Tk 8.3.2.
24769
24770- A few portability problems have been fixed, in particular a
24771compilation error involving socklen_t.
24772
24773- The PC configuration is slightly friendlier to non-Microsoft
24774compilers.
24775
24776
24777======================================================================
24778
24779
Guido van Rossumf2eac992000-09-04 17:24:24 +000024780======================================
24781==> Release 1.5.2 (April 13, 1999) <==
24782======================================
24783
Guido van Rossum2001da42000-09-01 22:26:44 +000024784From 1.5.2c1 to 1.5.2 (final)
24785=============================
24786
24787Tue Apr 13 15:44:49 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
24788
24789 * PCbuild/python15.wse: Bump version to 1.5.2 (final)
24790
24791 * PCbuild/python15.dsp: Added shamodule.c
24792
24793 * PC/config.c: Added sha module!
24794
24795 * README, Include/patchlevel.h: Prepare for final release.
24796
24797 * Misc/ACKS:
24798 More (Cameron Laird is honorary; the others are 1.5.2c1 testers).
24799
24800 * Python/thread_solaris.h:
24801 While I can't really test this thoroughly, Pat Knight and the Solaris
24802 man pages suggest that the proper thing to do is to add THR_NEW_LWP to
24803 the flags on thr_create(), and that there really isn't a downside, so
24804 I'll do that.
24805
24806 * Misc/ACKS:
24807 Bunch of new names who helped iron out the last wrinkles of 1.5.2.
24808
24809 * PC/python_nt.rc:
24810 Bump the myusterious M$ version number from 1,5,2,1 to 1,5,2,3.
24811 (I can't even display this on NT, maybe Win/98 can?)
24812
24813 * Lib/pstats.py:
24814 Fix mysterious references to jprofile that were in the source since
24815 its creation. I'm assuming these were once valid references to "Jim
24816 Roskind's profile"...
24817
24818 * Lib/Attic/threading_api.py:
24819 Removed; since long subsumed in Doc/lib/libthreading.tex
24820
24821 * Modules/socketmodule.c:
24822 Put back __osf__ support for gethostbyname_r(); the real bug was that
24823 it was being used even without threads. This of course might be an
24824 all-platform problem so now we only use the _r variant when we are
24825 using threads.
24826
24827Mon Apr 12 22:51:20 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
24828
24829 * Modules/cPickle.c:
24830 Fix accidentally reversed NULL test in load_mark(). Suggested by
24831 Tamito Kajiyama. (This caused a bug only on platforms where malloc(0)
24832 returns NULL.)
24833
24834 * README:
24835 Add note about popen2 problem on Linux noticed by Pablo Bleyer.
24836
24837 * README: Add note about -D_REENTRANT for HP-UX 10.20.
24838
24839 * Modules/Makefile.pre.in: 'clean' target should remove hassignal.
24840
24841 * PC/Attic/vc40.mak, PC/readme.txt:
24842 Remove all VC++ info (except VC 1.5) from readme.txt;
24843 remove the VC++ 4.0 project file; remove the unused _tkinter extern defs.
24844
24845 * README: Clarify PC build instructions (point to PCbuild).
24846
24847 * Modules/zlibmodule.c: Cast added by Jack Jansen (for Mac port).
24848
24849 * Lib/plat-sunos5/CDIO.py, Lib/plat-linux2/CDROM.py:
24850 Forgot to add this file. CDROM device parameters.
24851
24852 * Lib/gzip.py: Two different changes.
24853
24854 1. Jack Jansen reports that on the Mac, the time may be negative, and
24855 solves this by adding a write32u() function that writes an unsigned
24856 long.
24857
24858 2. On 64-bit platforms the CRC comparison fails; I've fixed this by
24859 casting both values to be compared to "unsigned long" i.e. modulo
24860 0x100000000L.
24861
24862Sat Apr 10 18:42:02 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
24863
24864 * PC/Attic/_tkinter.def: No longer needed.
24865
24866 * Misc/ACKS: Correct missed character in Andrew Dalke's name.
24867
24868 * README: Add DEC Ultrix notes (from Donn Cave's email).
24869
24870 * configure: The usual
24871
24872 * configure.in:
24873 Quote a bunch of shell variables used in test, related to long-long.
24874
24875 * Objects/fileobject.c, Modules/shamodule.c, Modules/regexpr.c:
24876 casts for picky compilers.
24877
24878 * Modules/socketmodule.c:
24879 3-arg gethostbyname_r doesn't really work on OSF/1.
24880
24881 * PC/vc15_w31/_.c, PC/vc15_lib/_.c, Tools/pynche/__init__.py:
24882 Avoid totally empty files.
24883
24884Fri Apr 9 14:56:35 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
24885
24886 * Tools/scripts/fixps.py: Use re instead of regex.
24887 Don't rewrite the file in place.
24888 (Reported by Andy Dustman.)
24889
24890 * Lib/netrc.py, Lib/shlex.py: Get rid of #! line
24891
24892Thu Apr 8 23:13:37 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
24893
24894 * PCbuild/python15.wse: Use the Tcl 8.0.5 installer.
24895 Add a variable %_TCL_% that makes it easier to switch to a different version.
24896
24897
24898======================================================================
24899
24900
24901From 1.5.2b2 to 1.5.2c1
24902=======================
24903
24904Thu Apr 8 23:13:37 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
24905
24906 * PCbuild/python15.wse:
24907 Release 1.5.2c1. Add IDLE and Uninstall to program group.
24908 Don't distribute zlib.dll. Tweak some comments.
24909
24910 * PCbuild/zlib.dsp: Now using static zlib 1.1.3
24911
24912 * 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:
24913 The usual
24914
24915 * Include/patchlevel.h: Release 1.5.2c1
24916
24917 * README: Release 1.5.2c1.
24918
24919 * Misc/NEWS: News for the 1.5.2c1 release.
24920
24921 * Lib/test/test_strftime.py:
24922 On Windows, we suddenly find, strftime() may return "" for an
24923 unsupported format string. (I guess this is because the logic for
24924 deciding whether to reallocate the buffer or not has been improved.)
24925 This caused the test code to crash on result[0]. Fix this by assuming
24926 an empty result also means the format is not supported.
24927
24928 * Demo/tkinter/matt/window-creation-w-location.py:
24929 This demo imported some private code from Matt. Make it cripple along.
24930
24931 * Lib/lib-tk/Tkinter.py:
24932 Delete an accidentally checked-in feature that actually broke more
24933 than was worth it: when deleting a canvas item, it would try to
24934 automatically delete the bindings for that item. Since there's
24935 nothing that says you can't reuse the tag and still have the bindings,
24936 this is not correct. Also, it broke at least one demo
24937 (Demo/tkinter/matt/rubber-band-box-demo-1.py).
24938
24939 * Python/thread_wince.h: Win/CE thread support by Mark Hammond.
24940
24941Wed Apr 7 20:23:17 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
24942
24943 * Modules/zlibmodule.c:
24944 Patch by Andrew Kuchling to unflush() (flush() for deflating).
24945 Without this, if inflate() returned Z_BUF_ERROR asking for more output
24946 space, we would report the error; now, we increase the buffer size and
24947 try again, just as for Z_OK.
24948
24949 * Lib/test/test_gzip.py: Use binary mode for all gzip files we open.
24950
24951 * Tools/idle/ChangeLog: New change log.
24952
24953 * Tools/idle/README.txt, Tools/idle/NEWS.txt: New version.
24954
24955 * Python/pythonrun.c:
24956 Alas, get rid of the Win specific hack to ask the user to press Return
24957 before exiting when an error happened. This didn't work right when
24958 Python is invoked from a daemon.
24959
24960 * Tools/idle/idlever.py: Version bump awaiting impending new release.
24961 (Not much has changed :-( )
24962
24963 * Lib/lib-tk/Tkinter.py:
24964 lower, tkraise/lift hide Misc.lower, Misc.tkraise/lift,
24965 so the preferred name for them is tag_lower, tag_raise
24966 (similar to tag_bind, and similar to the Text widget);
24967 unfortunately can't delete the old ones yet (maybe in 1.6)
24968
24969 * Python/thread.c, Python/strtod.c, Python/mystrtoul.c, Python/import.c, Python/ceval.c:
24970 Changes by Mark Hammond for Windows CE. Mostly of the form
24971 #ifdef DONT_HAVE_header_H ... #endif around #include <header.h>.
24972
24973 * Python/bltinmodule.c:
24974 Remove unused variable from complex_from_string() code.
24975
24976 * Include/patchlevel.h:
24977 Add the possibility of a gamma release (release candidate).
24978 Add '+' to string version number to indicate we're beyond b2 now.
24979
24980 * Modules/posixmodule.c: Add extern decl for fsync() for SunOS 4.x.
24981
24982 * Lib/smtplib.py: Changes by Per Cederquist and The Dragon.
24983
24984 Per writes:
24985
24986 """
24987 The application where Signum Support uses smtplib needs to be able to
24988 report good error messages to the user when sending email fails. To
24989 help in diagnosing problems it is useful to be able to report the
24990 entire message sent by the server, not only the SMTP error code of the
24991 offending command.
24992
24993 A lot of the functions in sendmail.py unfortunately discards the
24994 message, leaving only the code. The enclosed patch fixes that
24995 problem.
24996
24997 The enclosed patch also introduces a base class for exceptions that
24998 include an SMTP error code and error message, and make the code and
24999 message available on separate attributes, so that surrounding code can
25000 deal with them in whatever way it sees fit. I've also added some
25001 documentation to the exception classes.
25002
25003 The constructor will now raise an exception if it cannot connect to
25004 the SMTP server.
25005
25006 The data() method will raise an SMTPDataError if it doesn't receive
25007 the expected 354 code in the middle of the exchange.
25008
25009 According to section 5.2.10 of RFC 1123 a smtp client must accept "any
25010 text, including no text at all" after the error code. If the response
25011 of a HELO command contains no text self.helo_resp will be set to the
25012 empty string (""). The patch fixes the test in the sendmail() method
25013 so that helo_resp is tested against None; if it has the empty string
25014 as value the sendmail() method would invoke the helo() method again.
25015
25016 The code no longer accepts a -1 reply from the ehlo() method in
25017 sendmail().
25018
25019 [Text about removing SMTPRecipientsRefused deleted --GvR]
25020 """
25021
25022 and also:
25023
25024 """
25025 smtplib.py appends an extra blank line to the outgoing mail if the
25026 `msg' argument to the sendmail method already contains a trailing
25027 newline. This patch should fix the problem.
25028 """
25029
25030 The Dragon writes:
25031
25032 """
25033 Mostly I just re-added the SMTPRecipientsRefused exception
25034 (the exeption object now has the appropriate info in it ) [Per had
25035 removed this in his patch --GvR] and tweaked the behavior of the
25036 sendmail method whence it throws the newly added SMTPHeloException (it
25037 was closing the connection, which it shouldn't. whatever catches the
25038 exception should do that. )
25039
25040 I pondered the change of the return values to tuples all around,
25041 and after some thinking I decided that regularizing the return values was
25042 too much of the Right Thing (tm) to not do.
25043
25044 My one concern is that code expecting an integer & getting a tuple
25045 may fail silently.
25046
25047 (i.e. if it's doing :
25048
25049 x.somemethod() >= 400:
25050 expecting an integer, the expression will always be true if it gets a
25051 tuple instead. )
25052
25053 However, most smtplib code I've seen only really uses the
25054 sendmail() method, so this wouldn't bother it. Usually code I've seen
25055 that calls the other methods usually only calls helo() and ehlo() for
25056 doing ESMTP, a feature which was not in the smtplib included with 1.5.1,
25057 and thus I would think not much code uses it yet.
25058 """
25059
25060Tue Apr 6 19:38:18 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25061
25062 * Lib/test/test_ntpath.py:
25063 Fix the tests now that splitdrive() no longer treats UNC paths special.
25064 (Some tests converted to splitunc() tests.)
25065
25066 * Lib/ntpath.py:
25067 Withdraw the UNC support from splitdrive(). Instead, a new function
25068 splitunc() parses UNC paths. The contributor of the UNC parsing in
25069 splitdrive() doesn't like it, but I haven't heard a good reason to
25070 keep it, and it causes some problems. (I think there's a
25071 philosophical problem -- to me, the split*() functions are purely
25072 syntactical, and the fact that \\foo is not a valid path doesn't mean
25073 that it shouldn't be considered an absolute path.)
25074
25075 Also (quite separately, but strangely related to the philosophical
25076 issue above) fix abspath() so that if win32api exists, it doesn't fail
25077 when the path doesn't actually exist -- if GetFullPathName() fails,
Mark Dickinson934896d2009-02-21 20:59:32 +000025078 fall back on the old strategy (join with getcwd() if necessary, and
Guido van Rossum2001da42000-09-01 22:26:44 +000025079 then use normpath()).
25080
25081 * configure.in, configure, config.h.in, acconfig.h:
25082 For BeOS PowerPC. Chris Herborth.
25083
25084Mon Apr 5 21:54:14 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25085
25086 * Modules/timemodule.c:
25087 Jonathan Giddy notes, and Chris Lawrence agrees, that some comments on
25088 #else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
25089
25090 * Misc/ACKS:
25091 Bunch of new contributors, including 9 who contributed to the Docs,
25092 reported by Fred.
25093
25094Mon Apr 5 18:37:59 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
25095
25096 * Lib/gzip.py:
25097 Oops, missed mode parameter to open().
25098
25099 * Lib/gzip.py:
25100 Made the default mode 'rb' instead of 'r', for better cross-platform
25101 support. (Based on comment on the documentation by Bernhard Reiter
25102 <bernhard@csd.uwm.edu>).
25103
25104Fri Apr 2 22:18:25 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25105
25106 * Tools/scripts/dutree.py:
25107 For reasons I dare not explain, this script should always execute
25108 main() when imported (in other words, it is not usable as a module).
25109
25110Thu Apr 1 15:32:30 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25111
25112 * Lib/test/test_cpickle.py: Jonathan Giddy write:
25113
25114 In test_cpickle.py, the module os got imported, but the line to remove
25115 the temp file has gone missing.
25116
25117Tue Mar 30 20:17:31 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25118
25119 * Lib/BaseHTTPServer.py: Per Cederqvist writes:
25120
25121 If you send something like "PUT / HTTP/1.0" to something derived from
25122 BaseHTTPServer that doesn't define do_PUT, you will get a response
25123 that begins like this:
25124
25125 HTTP/1.0 501 Unsupported method ('do_PUT')
25126 Server: SimpleHTTP/0.3 Python/1.5
25127 Date: Tue, 30 Mar 1999 18:53:53 GMT
25128
25129 The server should complain about 'PUT' instead of 'do_PUT'. This
25130 patch should fix the problem.
25131
25132Mon Mar 29 20:33:21 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25133
25134 * Lib/smtplib.py: Patch by Per Cederqvist, who writes:
25135
25136 """
25137 - It needlessly used the makefile() method for each response that is
25138 read from the SMTP server.
25139
25140 - If the remote SMTP server closes the connection unexpectedly the
25141 code raised an IndexError. It now raises an SMTPServerDisconnected
25142 exception instead.
25143
25144 - The code now checks that all lines in a multiline response actually
25145 contains an error code.
25146 """
25147
25148 The Dragon approves.
25149
25150Mon Mar 29 20:25:40 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
25151
25152 * Lib/compileall.py:
25153 When run as a script, report failures in the exit code as well.
25154 Patch largely based on changes by Andrew Dalke, as discussed in the
25155 distutils-sig.
25156
25157Mon Mar 29 20:23:41 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25158
25159 * Lib/urllib.py:
25160 Hack so that if a 302 or 301 redirect contains a relative URL, the
25161 right thing "just happens" (basejoin() with old URL).
25162
25163 * Modules/cPickle.c:
25164 Protection against picling to/from closed (real) file.
25165 The problem was reported by Moshe Zadka.
25166
25167 * Lib/test/test_cpickle.py:
25168 Test protection against picling to/from closed (real) file.
25169
25170 * Modules/timemodule.c: Chris Lawrence writes:
25171
25172 """
25173 The GNU folks, in their infinite wisdom, have decided not to implement
25174 altzone in libc6; this would not be horrible, except that timezone
25175 (which is implemented) includes the current DST setting (i.e. timezone
25176 for Central is 18000 in summer and 21600 in winter). So Python's
25177 timezone and altzone variables aren't set correctly during DST.
25178
25179 Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone
25180 show the "right" thing on Linux (by using the tm_gmtoff stuff
25181 available in BSD, which is how the GLIBC manual claims things should
25182 be done) and (b) should cope with the southern hemisphere. In pursuit
25183 of (b), I also took the liberty of renaming the "summer" and "winter"
25184 variables to "july" and "jan". This patch should also make certain
25185 time calculations on Linux actually work right (like the tz-aware
25186 functions in the rfc822 module).
25187
25188 (It's hard to find DST that's currently being used in the southern
25189 hemisphere; I tested using Africa/Windhoek.)
25190 """
25191
25192 * Lib/test/output/test_gzip:
25193 Jonathan Giddy discovered this file was missing.
25194
25195 * Modules/shamodule.c:
25196 Avoid warnings from AIX compiler. Reported by Vladimir (AIX is my
25197 middlename) Marangozov, patch coded by Greg Stein.
25198
25199 * Tools/idle/ScriptBinding.py, Tools/idle/PyShell.py:
25200 At Tim Peters' recommendation, add a dummy flush() method to PseudoFile.
25201
25202Sun Mar 28 17:55:32 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25203
25204 * Tools/scripts/ndiff.py: Tim Peters writes:
25205
25206 I should have waited overnight <wink/sigh>. Nothing wrong with the one I
25207 sent, but I couldn't resist going on to add new -r1 / -r2 cmdline options
25208 for recreating the original files from ndiff's output. That's attached, if
25209 you're game! Us Windows guys don't usually have a sed sitting around
25210 <wink>.
25211
25212Sat Mar 27 13:34:01 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25213
25214 * Tools/scripts/ndiff.py: Tim Peters writes:
25215
25216 Attached is a cleaned-up version of ndiff (added useful module
25217 docstring, now echo'ed in case of cmd line mistake); added -q option
25218 to suppress initial file identification lines; + other minor cleanups,
25219 & a slightly faster match engine.
25220
25221Fri Mar 26 22:36:00 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
25222
25223 * Tools/scripts/dutree.py:
25224 During display, if EPIPE is raised, it's probably because a pager was
Martin Pantere26da7c2016-06-02 10:07:09 +000025225 killed. Discard the error in that case, but propagate it otherwise.
Guido van Rossum2001da42000-09-01 22:26:44 +000025226
25227Fri Mar 26 16:20:45 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25228
25229 * Lib/test/output/test_userlist, Lib/test/test_userlist.py:
25230 Test suite for UserList.
25231
25232 * Lib/UserList.py: Use isinstance() where appropriate.
25233 Reformatted with 4-space indent.
25234
25235Fri Mar 26 16:11:40 1999 Barry Warsaw <bwarsaw@eric.cnri.reston.va.us>
25236
25237 * Tools/pynche/PyncheWidget.py:
25238 Helpwin.__init__(): The text widget should get focus.
25239
25240 * Tools/pynche/pyColorChooser.py:
25241 Removed unnecessary import `from PyncheWidget import PyncheWidget'
25242
25243Fri Mar 26 15:32:05 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25244
25245 * Lib/test/output/test_userdict, Lib/test/test_userdict.py:
25246 Test suite for UserDict
25247
25248 * Lib/UserDict.py: Improved a bunch of things.
25249 The constructor now takes an optional dictionary.
25250 Use isinstance() where appropriate.
25251
25252Thu Mar 25 22:38:49 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25253
25254 * Lib/test/output/test_pickle, Lib/test/output/test_cpickle, Lib/test/test_pickle.py, Lib/test/test_cpickle.py:
25255 Basic regr tests for pickle/cPickle
25256
25257 * Lib/pickle.py:
25258 Don't use "exec" in find_class(). It's slow, unnecessary, and (as AMK
25259 points out) it doesn't work in JPython Applets.
25260
25261Thu Mar 25 21:50:27 1999 Andrew Kuchling <akuchlin@eric.cnri.reston.va.us>
25262
25263 * Lib/test/test_gzip.py:
25264 Added a simple test suite for gzip. It simply opens a temp file,
25265 writes a chunk of compressed data, closes it, writes another chunk, and
25266 reads the contents back to verify that they are the same.
25267
25268 * Lib/gzip.py:
25269 Based on a suggestion from bruce@hams.com, make a trivial change to
25270 allow using the 'a' flag as a mode for opening a GzipFile. gzip
25271 files, surprisingly enough, can be concatenated and then decompressed;
25272 the effect is to concatenate the two chunks of data.
25273
25274 If we support it on writing, it should also be supported on reading.
25275 This *wasn't* trivial, and required rearranging the code in the
25276 reading path, particularly the _read() method.
25277
25278 Raise IOError instead of RuntimeError in two cases, 'Not a gzipped file'
25279 and 'Unknown compression method'
25280
25281Thu Mar 25 21:25:01 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25282
25283 * Lib/test/test_b1.py:
25284 Add tests for float() and complex() with string args (Nick/Stephanie
25285 Lockwood).
25286
25287Thu Mar 25 21:21:08 1999 Andrew Kuchling <akuchlin@eric.cnri.reston.va.us>
25288
25289 * Modules/zlibmodule.c:
25290 Add an .unused_data attribute to decompressor objects. If .unused_data
25291 is not an empty string, this means that you have arrived at the
25292 end of the stream of compressed data, and the contents of .unused_data are
25293 whatever follows the compressed stream.
25294
25295Thu Mar 25 21:16:07 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25296
25297 * Python/bltinmodule.c:
25298 Patch by Nick and Stephanie Lockwood to implement complex() with a string
25299 argument. This closes TODO item 2.19.
25300
25301Wed Mar 24 19:09:00 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25302
25303 * Tools/webchecker/wcnew.py: Added Samuel Bayer's new webchecker.
25304 Unfortunately his code breaks wcgui.py in a way that's not easy
25305 to fix. I expect that this is a temporary situation --
25306 eventually Sam's changes will be merged back in.
25307 (The changes add a -t option to specify exceptions to the -x
25308 option, and explicit checking for #foo style fragment ids.)
25309
25310 * Objects/dictobject.c:
25311 Vladimir Marangozov contributed updated comments.
25312
25313 * Objects/bufferobject.c: Folded long lines.
25314
25315 * Lib/test/output/test_sha, Lib/test/test_sha.py:
25316 Added Jeremy's test code for the sha module.
25317
25318 * Modules/shamodule.c, Modules/Setup.in:
25319 Added Greg Stein and Andrew Kuchling's sha module.
25320 Fix comments about zlib version and URL.
25321
25322 * Lib/test/test_bsddb.py: Remove the temp file when we're done.
25323
25324 * Include/pythread.h: Conform to standard boilerplate.
25325
25326 * configure.in, configure, BeOS/linkmodule, BeOS/ar-fake:
25327 Chris Herborth: the new compiler in R4.1 needs some new options to work...
25328
25329 * Modules/socketmodule.c:
25330 Implement two suggestions by Jonathan Giddy: (1) in AIX, clear the
25331 data struct before calling gethostby{name,addr}_r(); (2) ignore the
25332 3/5/6 args determinations made by the configure script and switch on
25333 platform identifiers instead:
25334
25335 AIX, OSF have 3 args
25336 Sun, SGI have 5 args
25337 Linux has 6 args
25338
25339 On all other platforms, undef HAVE_GETHOSTBYNAME_R altogether.
25340
25341 * Modules/socketmodule.c:
25342 Vladimir Marangozov implements the AIX 3-arg gethostbyname_r code.
25343
25344 * Lib/mailbox.py:
25345 Add readlines() to _Subfile class. Not clear who would need it, but
25346 Chris Lawrence sent me a broken version; this one is a tad simpler and
25347 more conforming to the standard.
25348
25349Tue Mar 23 23:05:34 1999 Jeremy Hylton <jhylton@eric.cnri.reston.va.us>
25350
25351 * Lib/gzip.py: use struct instead of bit-manipulate in Python
25352
25353Tue Mar 23 19:00:55 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25354
25355 * Modules/Makefile.pre.in:
25356 Add $(EXE) to various occurrences of python so it will work on Cygwin
25357 with egcs (after setting EXE=.exe). Patch by Norman Vine.
25358
25359 * configure, configure.in:
25360 Ack! It never defined HAVE_GETHOSTBYNAME_R so that code was never tested!
25361
25362Mon Mar 22 22:25:39 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25363
25364 * Include/thread.h:
25365 Adding thread.h -- unused but for b/w compatibility.
25366 As requested by Bill Janssen.
25367
25368 * configure.in, configure:
25369 Add code to test for all sorts of gethostbyname_r variants,
25370 donated by David Arnold.
25371
25372 * config.h.in, acconfig.h:
25373 Add symbols for gethostbyname_r variants (sigh).
25374
25375 * Modules/socketmodule.c: Clean up pass for the previous patches.
25376
25377 - Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and
25378 glibc2.
25379
25380 - If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R --
25381 don't know what code should be used.
25382
25383 - New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used.
25384
25385 - Modify the gethostbyaddr() code to also hold on to the lock until
25386 after it is safe to release, overlapping with the Python lock.
25387
25388 (Note: I think that it could in theory be possible that Python code
25389 executed while gethostbyname_lock is held could attempt to reacquire
25390 the lock -- e.g. in a signal handler or destructor. I will simply say
25391 "don't do that then.")
25392
25393 * Modules/socketmodule.c: Jonathan Giddy writes:
25394
25395 Here's a patch to fix the race condition, which wasn't fixed by Rob's
25396 patch. It holds the gethostbyname lock until the results are copied out,
25397 which means that this lock and the Python global lock are held at the same
25398 time. This shouldn't be a problem as long as the gethostbyname lock is
25399 always acquired when the global lock is not held.
25400
25401Mon Mar 22 19:25:30 1999 Andrew Kuchling <akuchlin@eric.cnri.reston.va.us>
25402
25403 * Modules/zlibmodule.c:
25404 Fixed the flush() method of compression objects; the test for
25405 the end of loop was incorrect, and failed when the flushmode != Z_FINISH.
25406 Logic cleaned up and commented.
25407
25408 * Lib/test/test_zlib.py:
25409 Added simple test for the flush() method of compression objects, trying the
25410 different flush values Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH.
25411
25412Mon Mar 22 15:28:08 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25413
25414 * Lib/shlex.py:
25415 Bug reported by Tobias Thelen: missing "self." in assignment target.
25416
25417Fri Mar 19 21:50:11 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25418
25419 * Modules/arraymodule.c:
25420 Use an unsigned cast to avoid a warning in VC++.
25421
25422 * Lib/dospath.py, Lib/ntpath.py:
25423 New code for split() by Tim Peters, behaves more like posixpath.split().
25424
25425 * Objects/floatobject.c:
25426 Fix a problem with Vladimir's PyFloat_Fini code: clear the free list; if
25427 a block cannot be freed, add its free items back to the free list.
25428 This is necessary to avoid leaking when Python is reinitialized later.
25429
25430 * Objects/intobject.c:
25431 Fix a problem with Vladimir's PyInt_Fini code: clear the free list; if
25432 a block cannot be freed, add its free items back to the free list, and
25433 add its valid ints back to the small_ints array if they are in range.
25434 This is necessary to avoid leaking when Python is reinitialized later.
25435
25436 * Lib/types.py:
25437 Added BufferType, the type returned by the new builtin buffer(). Greg Stein.
25438
25439 * Python/bltinmodule.c:
25440 New builtin buffer() creates a derived read-only buffer from any
25441 object that supports the buffer interface (e.g. strings, arrays).
25442
25443 * Objects/bufferobject.c:
25444 Added check for negative offset for PyBuffer_FromObject and check for
25445 negative size for PyBuffer_FromMemory. Greg Stein.
25446
25447Thu Mar 18 15:10:44 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25448
25449 * Lib/urlparse.py: Sjoerd Mullender writes:
25450
25451 If a filename on Windows starts with \\, it is converted to a URL
25452 which starts with ////. If this URL is passed to urlparse.urlparse
25453 you get a path that starts with // (and an empty netloc). If you pass
25454 the result back to urlparse.urlunparse, you get a URL that starts with
25455 //, which is parsed differently by urlparse.urlparse. The fix is to
25456 add the (empty) netloc with accompanying slashes if the path in
25457 urlunparse starts with //. Do this for all schemes that use a netloc.
25458
25459 * Lib/nturl2path.py: Sjoerd Mullender writes:
25460
25461 Pathnames of files on other hosts in the same domain
25462 (\\host\path\to\file) are not translated correctly to URLs and back.
25463 The URL should be something like file:////host/path/to/file.
25464 Note that a combination of drive letter and remote host is not
25465 possible.
25466
25467Wed Mar 17 22:30:10 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25468
25469 * Lib/urlparse.py:
25470 Delete non-standard-conforming code in urljoin() that would use the
25471 netloc from the base url as the default netloc for the resulting url
25472 even if the schemes differ.
25473
25474 Once upon a time, when the web was wild, this was a valuable hack
25475 because some people had a URL referencing an ftp server colocated with
25476 an http server without having the host in the ftp URL (so they could
25477 replicate it or change the hostname easily).
25478
25479 More recently, after the file: scheme got added back to the list of
25480 schemes that accept a netloc, it turns out that this caused weirdness
25481 when joining an http: URL with a file: URL -- the resulting file: URL
25482 would always inherit the host from the http: URL because the file:
25483 scheme supports a netloc but in practice never has one.
25484
25485 There are two reasons to get rid of the old, once-valuable hack,
25486 instead of removing the file: scheme from the uses_netloc list. One,
25487 the RFC says that file: uses the netloc syntax, and does not endorse
25488 the old hack. Two, neither netscape 4.5 nor IE 4.0 support the old
25489 hack.
25490
25491 * Include/ceval.h, Include/abstract.h:
25492 Add DLL level b/w compat for PySequence_In and PyEval_CallObject
25493
25494Tue Mar 16 21:54:50 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25495
25496 * Lib/lib-tk/Tkinter.py: Bug reported by Jim Robinson:
25497
25498 An attempt to execute grid_slaves with arguments (0,0) results in
25499 *all* of the slaves being returned, not just the slave associated with
25500 row 0, column 0. This is because the test for arguments in the method
25501 does not test to see if row (and column) does not equal None, but
25502 rather just whether is evaluates to non-false. A value of 0 fails
25503 this test.
25504
25505Tue Mar 16 14:17:48 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
25506
25507 * Modules/cmathmodule.c:
25508 Docstring fix: acosh() returns the hyperbolic arccosine, not the
25509 hyperbolic cosine. Problem report via David Ascher by one of his
25510 students.
25511
25512Mon Mar 15 21:40:59 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25513
25514 * configure.in:
25515 Should test for gethost*by*name_r, not for gethostname_r (which
25516 doesn't exist and doesn't make sense).
25517
25518 * Modules/socketmodule.c:
25519 Patch by Rob Riggs for Linux -- glibc2 has a different argument
25520 converntion for gethostbyname_r() etc. than Solaris!
25521
25522 * Python/thread_pthread.h: Rob Riggs wrote:
25523
25524 """
25525 Spec says that on success pthread_create returns 0. It does not say
25526 that an error code will be < 0. Linux glibc2 pthread_create() returns
25527 ENOMEM (12) when one exceed process limits. (It looks like it should
25528 return EAGAIN, but that's another story.)
25529
25530 For reference, see:
25531 http://www.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html
25532 """
25533
25534 [I have a feeling that similar bugs were fixed before; perhaps someone
25535 could check that all error checks no check for != 0?]
25536
25537 * Tools/bgen/bgen/bgenObjectDefinition.py:
25538 New mixin class that defines cmp and hash that use
25539 the ob_itself pointer. This allows (when using the mixin)
25540 different Python objects pointing to the same C object and
25541 behaving well as dictionary keys.
25542
25543 Or so sez Jack Jansen...
25544
25545 * Lib/urllib.py: Yet another patch by Sjoerd Mullender:
25546
25547 Don't convert URLs to URLs using pathname2url.
25548
25549Fri Mar 12 22:15:43 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25550
25551 * Lib/cmd.py: Patch by Michael Scharf. He writes:
25552
25553 The module cmd requires for each do_xxx command a help_xxx
25554 function. I think this is a little old fashioned.
25555
25556 Here is a patch: use the docstring as help if no help_xxx
25557 function can be found.
25558
25559 [I'm tempted to rip out all the help_* functions from pdb, but I'll
25560 resist it. Any takers? --Guido]
25561
25562 * Tools/freeze/freeze.py: Bug submitted by Wayne Knowles, who writes:
25563
25564 Under Windows, python freeze.py -o hello hello.py
25565 creates all the correct files in the hello subdirectory, but the
25566 Makefile has the directory prefix in it for frozen_extensions.c
25567 nmake fails because it tries to locate hello/frozen_extensions.c
25568
25569 (His fix adds a call to os.path.basename() in the appropriate place.)
25570
25571 * Objects/floatobject.c, Objects/intobject.c:
25572 Vladimir has restructured his code somewhat so that the blocks are now
25573 represented by an explicit structure. (There are still too many casts
25574 in the code, but that may be unavoidable.)
25575
25576 Also added code so that with -vv it is very chatty about what it does.
25577
25578 * Demo/zlib/zlibdemo.py, Demo/zlib/minigzip.py:
25579 Change #! line to modern usage; also chmod +x
25580
25581 * Demo/pdist/rrcs, Demo/pdist/rcvs, Demo/pdist/rcsbump:
25582 Change #! line to modern usage
25583
25584 * Lib/nturl2path.py, Lib/urllib.py: From: Sjoerd Mullender
25585
25586 The filename to URL conversion didn't properly quote special
25587 characters.
25588 The URL to filename didn't properly unquote special chatacters.
25589
25590 * Objects/floatobject.c:
25591 OK, try again. Vladimir gave me a fix for the alignment bus error,
25592 so here's his patch again. This time it works (at least on Solaris,
25593 Linux and Irix).
25594
25595Thu Mar 11 23:21:23 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25596
25597 * Tools/idle/PathBrowser.py:
25598 Don't crash when sys.path contains an empty string.
25599
25600 * Tools/idle/PathBrowser.py:
25601 - Don't crash in the case where a superclass is a string instead of a
25602 pyclbr.Class object; this can happen when the superclass is
25603 unrecognizable (to pyclbr), e.g. when module renaming is used.
25604
25605 - Show a watch cursor when calling pyclbr (since it may take a while
25606 recursively parsing imported modules!).
25607
25608Thu Mar 11 16:04:04 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
25609
25610 * Lib/mimetypes.py:
25611 Added .rdf and .xsl as application/xml types. (.rdf is for the
25612 Resource Description Framework, a metadata encoding, and .xsl is for
25613 the Extensible Stylesheet Language.)
25614
25615Thu Mar 11 13:26:23 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25616
25617 * Lib/test/output/test_popen2, Lib/test/test_popen2.py:
25618 Test for popen2 module, by Chris Tismer.
25619
25620 * Objects/floatobject.c:
25621 Alas, Vladimir's patch caused a bus error (probably double
25622 alignment?), and I didn't test it. Withdrawing it for now.
25623
25624Wed Mar 10 22:55:47 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25625
25626 * Objects/floatobject.c:
25627 Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
25628 floats on finalization.
25629
25630 * Objects/intobject.c:
25631 Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
25632 integers on finalization.
25633
25634 * Tools/idle/EditorWindow.py, Tools/idle/Bindings.py:
25635 Add PathBrowser to File module
25636
25637 * Tools/idle/PathBrowser.py:
25638 "Path browser" - 4 scrolled lists displaying:
25639 directories on sys.path
25640 modules in selected directory
25641 classes in selected module
25642 methods of selected class
25643
25644 Sinlge clicking in a directory, module or class item updates the next
25645 column with info about the selected item. Double clicking in a
25646 module, class or method item opens the file (and selects the clicked
25647 item if it is a class or method).
25648
25649 I guess eventually I should be using a tree widget for this, but the
25650 ones I've seen don't work well enough, so for now I use the old
25651 Smalltalk or NeXT style multi-column hierarchical browser.
25652
25653 * Tools/idle/MultiScrolledLists.py:
25654 New utility: multiple scrolled lists in parallel
25655
25656 * Tools/idle/ScrolledList.py: - White background.
25657 - Display "(None)" (or text of your choosing) when empty.
25658 - Don't set the focus.
25659
25660Tue Mar 9 19:31:21 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25661
25662 * Lib/urllib.py:
25663 open_http also had the 'data is None' test backwards. don't call with the
25664 extra argument if data is None.
25665
25666 * Demo/embed/demo.c:
25667 Call Py_SetProgramName() instead of redefining getprogramname(),
25668 reflecting changes in the runtime around 1.5 or earlier.
25669
25670 * Python/ceval.c:
25671 Always test for an error return (usually NULL or -1) without setting
25672 an exception.
25673
25674 * Modules/timemodule.c: Patch by Chris Herborth for BeOS code.
25675 He writes:
25676
25677 I had an off-by-1000 error in floatsleep(),
25678 and the problem with time.clock() is that it's not implemented properly
25679 on QNX... ANSI says it's supposed to return _CPU_ time used by the
25680 process, but on QNX it returns the amount of real time used... so I was
25681 confused.
25682
25683 * Tools/bgen/bgen/macsupport.py: Small change by Jack Jansen.
25684 Test for self.returntype behaving like OSErr rather than being it.
25685
25686Thu Feb 25 16:14:58 1999 Jeremy Hylton <jhylton@eric.cnri.reston.va.us>
25687
25688 * Lib/urllib.py:
25689 http_error had the 'data is None' test backwards. don't call with the
25690 extra argument if data is None.
25691
25692 * Lib/urllib.py: change indentation from 8 spaces to 4 spaces
25693
25694 * Lib/urllib.py: pleasing the tabnanny
25695
25696Thu Feb 25 14:26:02 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
25697
25698 * Lib/colorsys.py:
25699 Oops, one more "x, y, z" to convert...
25700
25701 * Lib/colorsys.py:
25702 Adjusted comment at the top to be less confusing, following Fredrik
25703 Lundh's example.
25704
25705 Converted comment to docstring.
25706
25707Wed Feb 24 18:49:15 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
25708
25709 * Lib/toaiff.py:
25710 Use sndhdr instead of the obsolete whatsound module.
25711
25712Wed Feb 24 18:42:38 1999 Jeremy Hylton <jhylton@eric.cnri.reston.va.us>
25713
25714 * Lib/urllib.py:
25715 When performing a POST request, i.e. when the second argument to
25716 urlopen is used to specify form data, make sure the second argument is
25717 threaded through all of the http_error_NNN calls. This allows error
25718 handlers like the redirect and authorization handlers to properly
25719 re-start the connection.
25720
25721Wed Feb 24 16:25:17 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25722
25723 * Lib/mhlib.py: Patch by Lars Wirzenius:
25724
25725 o the initial comment is wrong: creating messages is already
25726 implemented
25727
25728 o Message.getbodytext: if the mail or it's part contains an
25729 empty content-transfer-encoding header, the code used to
25730 break; the change below treats an empty encoding value the same
25731 as the other types that do not need decoding
25732
25733 o SubMessage.getbodytext was missing the decode argument; the
25734 change below adds it; I also made it unconditionally return
25735 the raw text if decoding was not desired, because my own
25736 routines needed that (and it was easier than rewriting my
25737 own routines ;-)
25738
25739Wed Feb 24 00:35:43 1999 Barry Warsaw <bwarsaw@eric.cnri.reston.va.us>
25740
25741 * Python/bltinmodule.c (initerrors):
25742 Make sure that the exception tuples ("base-classes" when
25743 string-based exceptions are used) reflect the real class hierarchy,
25744 i.e. that SystemExit derives from Exception not StandardError.
25745
25746 * Lib/exceptions.py:
25747 Document the correct class hierarchy for SystemExit. It is not an
25748 error and so it derives from Exception and not SystemError. The
25749 docstring was incorrect but the implementation was fine.
25750
25751Tue Feb 23 23:07:51 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25752
25753 * Lib/shutil.py:
25754 Add import sys, needed by reference to sys.exc_info() in rmtree().
25755 Discovered by Mitch Chapman.
25756
25757 * config.h.in:
25758 Now that we don't have AC_CHECK_LIB(m, pow), the HAVE_LIBM symbol
25759 disappears. It wasn't used anywhere anyway...
25760
25761 * Modules/arraymodule.c:
25762 Carefully check for overflow when allocating the memory for fromfile
25763 -- someone tried to pass in sys.maxint and got bitten by the bogus
25764 calculations.
25765
25766 * configure.in:
25767 Get rid of AC_CHECK_LIB(m, pow) since this is taken care of later with
25768 LIBM (from --with-libm=...); this actually broke the customizability
25769 offered by the latter option. Thanks go to Clay Spence for reporting
25770 this.
25771
25772 * Lib/test/test_dl.py:
25773 1. Print the error message (carefully) when a dl.open() fails in verbose mode.
25774 2. When no test case worked, raise ImportError instead of failing.
25775
25776 * Python/bltinmodule.c:
25777 Patch by Tim Peters to improve the range checks for range() and
25778 xrange(), especially for platforms where int and long are different
25779 sizes (so sys.maxint isn't actually the theoretical limit for the
25780 length of a list, but the largest C int is -- sys.maxint is the
25781 largest Python int, which is actually a C long).
25782
25783 * Makefile.in:
25784 1. Augment the DG/UX rule so it doesn't break the BeOS build.
25785 2. Add $(EXE) to various occurrences of python so it will work on
25786 Cygwin with egcs (after setting EXE=.exe). These patches by
25787 Norman Vine.
25788
25789 * Lib/posixfile.py:
25790 According to Jeffrey Honig, bsd/os 2.0 - 4.0 should be added to the
25791 list (of bsd variants that have a different lock structure).
25792
25793 * Lib/test/test_fcntl.py:
25794 According to Jeffrey Honig, bsd/os 4.0 should be added to the list.
25795
25796 * Modules/timemodule.c:
25797 Patch by Tadayoshi Funaba (with some changes) to be smarter about
25798 guessing what happened when strftime() returns 0. Is it buffer
25799 overflow or was the result simply 0 bytes long? (This happens for an
25800 empty format string, or when the format string is a single %Z and the
25801 timezone is unknown.) if the buffer is at least 256 times as long as
25802 the format, assume the latter.
25803
25804Mon Feb 22 19:01:42 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25805
25806 * Lib/urllib.py:
25807 As Des Barry points out, we need to call pathname2url(file) in two
25808 calls to addinfourl() in open_file().
25809
25810 * Modules/Setup.in: Document *static* -- in two places!
25811
25812 * Modules/timemodule.c:
25813 We don't support leap seconds, so the seconds field of a time 9-tuple
25814 should be in the range [0-59]. Noted by Tadayoshi Funaba.
25815
25816 * Modules/stropmodule.c:
25817 In atoi(), don't use isxdigit() to test whether the last character
25818 converted was a "digit" -- use isalnum(). This test is there only to
25819 guard against "+" or "-" being interpreted as a valid int literal.
25820 Reported by Takahiro Nakayama.
25821
25822 * Lib/os.py:
25823 As Finn Bock points out, _P_WAIT etc. don't have a leading underscore
25824 so they don't need to be treated specially here.
25825
25826Mon Feb 22 15:38:58 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
25827
25828 * Misc/NEWS:
25829 Typo: "apparentlt" --> "apparently"
25830
25831Mon Feb 22 15:38:46 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
25832
25833 * Lib/urlparse.py: Steve Clift pointed out that 'file' allows a netloc.
25834
25835 * Modules/posixmodule.c:
25836 The docstring for ttyname(..) claims a second "mode" argument. The
25837 actual code does not allow such an argument. (Finn Bock.)
25838
25839 * Lib/lib-old/poly.py:
25840 Dang. Even though this is obsolete code, somebody found a bug, and I
25841 fix it. Oh well.
25842
25843Thu Feb 18 20:51:50 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
25844
25845 * Lib/pyclbr.py:
25846 Bow to font-lock at the end of the docstring, since it throws stuff
25847 off.
25848
Martin Panter3e5b1d32016-07-28 03:48:29 +000025849 Make sure the path parameter to readmodule() is a list before adding it
Guido van Rossum2001da42000-09-01 22:26:44 +000025850 with sys.path, or the addition could fail.
25851
25852
25853======================================================================
25854
25855
25856From 1.5.2b1 to 1.5.2b2
25857=======================
25858
25859General
25860-------
25861
25862- Many memory leaks fixed.
25863
25864- Many small bugs fixed.
25865
25866- Command line option -OO (or -O -O) suppresses inclusion of doc
25867strings in resulting bytecode.
25868
25869Windows-specific changes
25870------------------------
25871
25872- New built-in module winsound provides an interface to the Win32
25873PlaySound() call.
25874
25875- Re-enable the audioop module in the config.c file.
25876
25877- On Windows, support spawnv() and associated P_* symbols.
25878
25879- Fixed the conversion of times() return values on Windows.
25880
25881- Removed freeze from the installer -- it doesn't work without the
25882source tree. (See FAQ 8.11.)
25883
25884- On Windows 95/98, the Tkinter module now is smart enough to find
25885Tcl/Tk even when the PATH environment variable hasn't been set -- when
25886the import of _tkinter fails, it searches in a standard locations,
25887patches os.environ["PATH"], and tries again. When it still fails, a
25888clearer error message is produced. This should avoid most
25889installation problems with Tkinter use (e.g. in IDLE).
25890
25891- The -i option doesn't make any calls to set[v]buf() for stdin --
25892this apparently screwed up _kbhit() and the _tkinter main loop.
25893
25894- The ntpath module (and hence, os.path on Windows) now parses out UNC
25895paths (e.g. \\host\mountpoint\dir\file) as "drive letters", so that
25896splitdrive() will \\host\mountpoint as the drive and \dir\file as the
25897path. ** EXPERIMENTAL **
25898
25899- Added a hack to the exit code so that if (1) the exit status is
25900nonzero and (2) we think we have our own DOS box (i.e. we're not
25901started from a command line shell), we print a message and wait for
25902the user to hit a key before the DOS box is closed.
25903
25904- Updated the installer to WISE 5.0g. Added a dialog warning about
25905the imminent Tcl installation. Added a dialog to specify the program
25906group name in the start menu. Upgraded the Tcl installer to Tcl
259078.0.4.
25908
25909Changes to intrinsics
25910---------------------
25911
25912- The repr() or str() of a module object now shows the __file__
25913attribute (i.e., the file which it was loaded), or the string
25914"(built-in)" if there is no __file__ attribute.
25915
25916- The range() function now avoids overflow during its calculations (if
25917at all possible).
25918
25919- New info string sys.hexversion, which is an integer encoding the
25920version in hexadecimal. In other words, hex(sys.hexversion) ==
259210x010502b2 for Python 1.5.2b2.
25922
25923New or improved ports
25924---------------------
25925
25926- Support for Nextstep descendants (future Mac systems).
25927
25928- Improved BeOS support.
25929
Victor Stinner554fd082014-03-17 22:33:49 +010025930- Support dynamic loading of shared libraries on NetBSD platforms that
Guido van Rossum2001da42000-09-01 22:26:44 +000025931use ELF (i.e., MIPS and Alpha systems).
25932
25933Configuration/build changes
25934---------------------------
25935
25936- The Lib/test directory is no longer included in the default module
25937search path (sys.path) -- "test" has been a package ever since 1.5.
25938
25939- Now using autoconf 2.13.
25940
25941New library modules
25942-------------------
25943
25944- New library modules asyncore and asynchat: these form Sam Rushing's
25945famous asynchronous socket library. Sam has gracefully allowed me to
25946incorporate these in the standard Python library.
25947
25948- New module statvfs contains indexing constants for [f]statvfs()
25949return tuple.
25950
25951Changes to the library
25952----------------------
25953
25954- The wave module (platform-independent support for Windows sound
25955files) has been fixed to actually make it work.
25956
25957- The sunau module (platform-independent support for Sun/NeXT sound
25958files) has been fixed to work across platforms. Also, a weird
25959encoding bug in the header of the audio test data file has been
25960corrected.
25961
25962- Fix a bug in the urllib module that occasionally tripped up
25963webchecker and other ftp retrieves.
25964
25965- ConfigParser's get() method now accepts an optional keyword argument
25966(vars) that is substituted on top of the defaults that were setup in
25967__init__. You can now also have recusive references in your
25968configuration file.
25969
25970- Some improvements to the Queue module, including a put_nowait()
25971module and an optional "block" second argument, to get() and put(),
25972defaulting to 1.
25973
25974- The updated xmllib module is once again compatible with the version
25975present in Python 1.5.1 (this was accidentally broken in 1.5.2b1).
25976
25977- The bdb module (base class for the debugger) now supports
25978canonicalizing pathnames used in breakpoints. The derived class must
25979override the new canonical() method for this to work. Also changed
25980clear_break() to the backwards compatible old signature, and added
25981clear_bpbynumber() for the new functionality.
25982
25983- In sgmllib (and hence htmllib), recognize attributes even if they
25984don't have space in front of them. I.e. '<a
25985name="foo"href="bar.html">' will now have two attributes recognized.
25986
25987- In the debugger (pdb), change clear syntax to support three
25988alternatives: clear; clear file:line; clear bpno bpno ...
25989
25990- The os.path module now pretends to be a submodule within the os
25991"package", so you can do things like "from os.path import exists".
25992
25993- The standard exceptions now have doc strings.
25994
25995- In the smtplib module, exceptions are now classes. Also avoid
25996inserting a non-standard space after "TO" in rcpt() command.
25997
25998- The rfc822 module's getaddrlist() method now uses all occurrences of
25999the specified header instead of just the first. Some other bugfixes
26000too (to handle more weird addresses found in a very large test set,
26001and to avoid crashes on certain invalid dates), and a small test
26002module has been added.
26003
26004- Fixed bug in urlparse in the common-case code for HTTP URLs; it
26005would lose the query, fragment, and/or parameter information.
26006
26007- The sndhdr module no longer supports whatraw() -- it depended on a
26008rare extenral program.
26009
26010- The UserList module/class now supports the extend() method, like
26011real list objects.
26012
26013- The uu module now deals better with trailing garbage generated by
26014some broke uuencoders.
26015
Serhiy Storchaka6a7b3a72016-04-17 08:32:47 +030026016- The telnet module now has a my_interact() method which uses threads
Guido van Rossum2001da42000-09-01 22:26:44 +000026017instead of select. The interact() method uses this by default on
26018Windows (where the single-threaded version doesn't work).
26019
26020- Add a class to mailbox.py for dealing with qmail directory
26021mailboxes. The test code was extended to notice these being used as
26022well.
26023
26024Changes to extension modules
26025----------------------------
26026
26027- Support for the [f]statvfs() system call, where it exists.
26028
26029- Fixed some bugs in cPickle where bad input could cause it to dump
26030core.
26031
26032- Fixed cStringIO to make the writelines() function actually work.
26033
26034- Added strop.expandtabs() so string.expandtabs() is now much faster.
26035
26036- Added fsync() and fdatasync(), if they appear to exist.
26037
26038- Support for "long files" (64-bit seek pointers).
26039
26040- Fixed a bug in the zlib module's flush() function.
26041
26042- Added access() system call. It returns 1 if access granted, 0 if
26043not.
26044
26045- The curses module implements an optional nlines argument to
26046w.scroll(). (It then calls wscrl(win, nlines) instead of scoll(win).)
26047
26048Changes to tools
26049----------------
26050
26051- Some changes to IDLE; see Tools/idle/NEWS.txt.
26052
26053- Latest version of Misc/python-mode.el included.
26054
26055Changes to Tkinter
26056------------------
26057
26058- Avoid tracebacks when an image is deleted after its root has been
26059destroyed.
26060
26061Changes to the Python/C API
26062---------------------------
26063
26064- When parentheses are used in a PyArg_Parse[Tuple]() call, any
26065sequence is now accepted, instead of requiring a tuple. This is in
26066line with the general trend towards accepting arbitrary sequences.
26067
26068- Added PyModule_GetFilename().
26069
26070- In PyNumber_Power(), remove unneeded and even harmful test for float
26071to the negative power (which is already and better done in
26072floatobject.c).
26073
26074- New version identification symbols; read patchlevel.h for info. The
26075version numbers are now exported by Python.h.
26076
26077- Rolled back the API version change -- it's back to 1007!
26078
26079- The frozenmain.c function calls PyInitFrozenExtensions().
26080
26081- Added 'N' format character to Py_BuildValue -- like 'O' but doesn't
26082INCREF.
26083
26084
26085======================================================================
26086
26087
26088From 1.5.2a2 to 1.5.2b1
26089=======================
26090
26091Changes to intrinsics
26092---------------------
26093
26094- New extension NotImplementedError, derived from RuntimeError. Not
26095used, but recommended use is for "abstract" methods to raise this.
26096
26097- The parser will now spit out a warning or error when -t or -tt is
26098used for parser input coming from a string, too.
26099
26100- The code generator now inserts extra SET_LINENO opcodes when
26101compiling multi-line argument lists.
26102
26103- When comparing bound methods, use identity test on the objects, not
26104equality test.
26105
26106New or improved ports
26107---------------------
26108
26109- Chris Herborth has redone his BeOS port; it now works on PowerPC
26110(R3/R4) and x86 (R4 only). Threads work too in this port.
26111
26112Renaming
26113--------
26114
26115- Thanks to Chris Herborth, the thread primitives now have proper Py*
26116names in the source code (they already had those for the linker,
26117through some smart macros; but the source still had the old, un-Py
26118names).
26119
26120Configuration/build changes
26121---------------------------
26122
26123- Improved support for FreeBSD/3.
26124
26125- Check for pthread_detach instead of pthread_create in libc.
26126
26127- The makesetup script now searches EXECINCLUDEPY before INCLUDEPY.
26128
26129- Misc/Makefile.pre.in now also looks at Setup.thread and Setup.local.
26130Otherwise modules such as thread didn't get incorporated in extensions.
26131
26132New library modules
26133-------------------
26134
26135- shlex.py by Eric Raymond provides a lexical analyzer class for
26136simple shell-like syntaxes.
26137
26138- netrc.py by Eric Raymond provides a parser for .netrc files. (The
26139undocumented Netrc class in ftplib.py is now obsolete.)
26140
26141- codeop.py is a new module that contains the compile_command()
26142function that was previously in code.py. This is so that JPython can
26143provide its own version of this function, while still sharing the
26144higher-level classes in code.py.
26145
26146- turtle.py is a new module for simple turtle graphics. I'm still
Victor Stinner554fd082014-03-17 22:33:49 +010026147working on it; let me know if you use this to teach Python to children
Guido van Rossum2001da42000-09-01 22:26:44 +000026148or other novices without prior programming experience.
26149
26150Obsoleted library modules
26151-------------------------
26152
26153- poly.py and zmod.py have been moved to Lib/lib-old to emphasize
26154their status of obsoleteness. They don't do a particularly good job
26155and don't seem particularly relevant to the Python core.
26156
26157New tools
26158---------
26159
26160- I've added IDLE: my Integrated DeveLopment Environment for Python.
26161Requires Tcl/Tk (and Tkinter). Works on Windows and Unix (and should
26162work on Macintosh, but I haven't been able to test it there; it does
26163depend on new features in 1.5.2 and perhaps even new features in
261641.5.2b1, especially the new code module). This is very much a work in
26165progress. I'd like to hear how people like it compared to PTUI (or
26166any other IDE they are familiar with).
26167
26168- New tools by Barry Warsaw:
26169
26170 = audiopy: controls the Solaris Audio device
26171 = pynche: The PYthonically Natural Color and Hue Editor
26172 = world: Print mappings between country names and DNS country codes
26173
26174New demos
26175---------
26176
26177- Demo/scripts/beer.py prints the lyrics to an arithmetic drinking
26178song.
26179
26180- Demo/tkinter/guido/optionmenu.py shows how to do an option menu in
26181Tkinter. (By Fredrik Lundh -- not by me!)
26182
26183Changes to the library
26184----------------------
26185
26186- compileall.py now avoids recompiling .py files that haven't changed;
26187it adds a -f option to force recompilation.
26188
26189- New version of xmllib.py by Sjoerd Mullender (0.2 with latest
26190patches).
26191
26192- nntplib.py: statparse() no longer lowercases the message-id.
26193
26194- types.py: use type(__stdin__) for FileType.
26195
26196- urllib.py: fix translations for filenames with "funny" characters.
26197Patch by Sjoerd Mullender. Note that if you subclass one of the
26198URLopener classes, and you have copied code from the old urllib.py,
26199your subclass may stop working. A long-term solution is to provide
26200more methods so that you don't have to copy code.
26201
26202- cgi.py: In read_multi, allow a subclass to override the class we
26203instantiate when we create a recursive instance, by setting the class
26204variable 'FieldStorageClass' to the desired class. By default, this
26205is set to None, in which case we use self.__class__ (as before).
26206Also, a patch by Jim Fulton to pass additional arguments to recursive
26207calls to the FieldStorage constructor from its read_multi method.
26208
26209- UserList.py: In __getslice__, use self.__class__ instead of
26210UserList.
26211
26212- In SimpleHTTPServer.py, the server specified in test() should be
26213BaseHTTPServer.HTTPServer, in case the request handler should want to
26214reference the two attributes added by BaseHTTPServer.server_bind. (By
26215Jeff Rush, for Bobo). Also open the file in binary mode, so serving
26216images from a Windows box might actually work.
26217
26218- In CGIHTTPServer.py, the list of acceptable formats is -split-
26219on spaces but -joined- on commas, resulting in double commas
26220in the joined text. (By Jeff Rush.)
26221
26222- SocketServer.py, patch by Jeff Bauer: a minor change to declare two
26223new threaded versions of Unix Server classes, using the ThreadingMixIn
26224class: ThreadingUnixStreamServer, ThreadingUnixDatagramServer.
26225
26226- bdb.py: fix bomb on deleting a temporary breakpoint: there's no
26227method do_delete(); do_clear() was meant. By Greg Ward.
26228
26229- getopt.py: accept a non-list sequence for the long options (request
26230by Jack Jansen). Because it might be a common mistake to pass a
26231single string, this situation is treated separately. Also added
26232docstrings (copied from the library manual) and removed the (now
26233redundant) module comments.
26234
26235- tempfile.py: improvements to avoid security leaks.
26236
26237- code.py: moved compile_command() to new module codeop.py.
26238
26239- pickle.py: support pickle format 1.3 (binary float added). By Jim
26240Fulton. Also get rid of the undocumented obsolete Pickler dump_special
26241method.
26242
26243- uu.py: Move 'import sys' to top of module, as noted by Tim Peters.
26244
26245- imaplib.py: fix problem with some versions of IMAP4 servers that
26246choose to mix the case in their CAPABILITIES response.
26247
26248- cmp.py: use (f1, f2) as cache key instead of f1 + ' ' + f2. Noted
26249by Fredrik Lundh.
26250
26251Changes to extension modules
26252----------------------------
26253
26254- More doc strings for several modules were contributed by Chris
26255Petrilli: math, cmath, fcntl.
26256
26257- Fixed a bug in zlibmodule.c that could cause core dumps on
26258decompression of rarely occurring input.
26259
26260- cPickle.c: new version from Jim Fulton, with Open Source copyright
26261notice. Also, initialize self->safe_constructors early on to prevent
26262crash in early dealloc.
26263
26264- cStringIO.c: new version from Jim Fulton, with Open Source copyright
26265notice. Also fixed a core dump in cStringIO.c when doing seeks.
26266
26267- mpzmodule.c: fix signed character usage in mpz.mpz(stringobjecty).
26268
26269- readline.c: Bernard Herzog pointed out that rl_parse_and_bind
26270modifies its argument string (bad function!), so we make a temporary
26271copy.
26272
26273- sunaudiodev.c: Barry Warsaw added more smarts to get the device and
26274control pseudo-device, per audio(7I).
26275
26276Changes to tools
26277----------------
26278
Victor Stinner554fd082014-03-17 22:33:49 +010026279- New, improved version of Barry Warsaw's Misc/python-mode.el (editing
Guido van Rossum2001da42000-09-01 22:26:44 +000026280support for Emacs).
26281
26282- tabnanny.py: added a -q ('quiet') option to tabnanny, which causes
26283only the names of offending files to be printed.
26284
26285- freeze: when printing missing modules, also print the module they
26286were imported from.
26287
26288- untabify.py: patch by Detlef Lannert to implement -t option
26289(set tab size).
26290
26291Changes to Tkinter
26292------------------
26293
26294- grid_bbox(): support new Tk API: grid bbox ?column row? ?column2
26295row2?
26296
26297- _tkinter.c: RajGopal Srinivasan noted that the latest code (1.5.2a2)
26298doesn't work when running in a non-threaded environment. He added
26299some #ifdefs that fix this.
26300
26301Changes to the Python/C API
26302---------------------------
26303
26304- Bumped API version number to 1008 -- enough things have changed!
26305
26306- There's a new macro, PyThreadState_GET(), which does the same work
26307as PyThreadState_Get() without the overhead of a function call (it
26308also avoids the error check). The two top calling locations of
26309PyThreadState_Get() have been changed to use this macro.
26310
26311- All symbols intended for export from a DLL or shared library are now
26312marked as such (with the DL_IMPORT() macro) in the header file that
26313declares them. This was needed for the BeOS port, and should also
26314make some other ports easier. The PC port no longer needs the file
26315with exported symbols (PC/python_nt.def). There's also a DL_EXPORT
26316macro which is only used for init methods in extension modules, and
26317for Py_Main().
26318
26319Invisible changes to internals
26320------------------------------
26321
26322- Fixed a bug in new_buffersize() in fileobject.c which could
26323return a buffer size that was way too large.
26324
26325- Use PySys_WriteStderr instead of fprintf in most places.
26326
26327- dictobject.c: remove dead code discovered by Vladimir Marangozov.
26328
26329- tupleobject.c: make tuples less hungry -- an extra item was
26330allocated but never used. Tip by Vladimir Marangozov.
26331
26332- mymath.h: Metrowerks PRO4 finally fixes the hypot snafu. (Jack
26333Jansen)
26334
26335- import.c: Jim Fulton fixes a reference count bug in
26336PyEval_GetGlobals.
26337
26338- glmodule.c: check in the changed version after running the stubber
26339again -- this solves the conflict with curses over the 'clear' entry
26340point much nicer. (Jack Jansen had checked in the changes to cstubs
26341eons ago, but I never regenrated glmodule.c :-( )
26342
26343- frameobject.c: fix reference count bug in PyFrame_New. Vladimir
26344Marangozov.
26345
26346- stropmodule.c: add a missing DECREF in an error exit. Submitted by
26347Jonathan Giddy.
26348
26349
26350======================================================================
26351
26352
26353From 1.5.2a1 to 1.5.2a2
26354=======================
26355
26356General
26357-------
26358
26359- It is now a syntax error to have a function argument without a
26360default following one with a default.
26361
26362- __file__ is now set to the .py file if it was parsed (it used to
26363always be the .pyc/.pyo file).
26364
26365- Don't exit with a fatal error during initialization when there's a
26366problem with the exceptions.py module.
26367
26368- New environment variable PYTHONOPTIMIZE can be used to set -O.
26369
26370- New version of python-mode.el for Emacs.
26371
26372Miscellaneous fixed bugs
26373------------------------
26374
26375- No longer print the (confusing) error message about stack underflow
26376while compiling.
26377
26378- Some threading and locking bugs fixed.
26379
26380- When errno is zero, report "Error", not "Success".
26381
26382Documentation
26383-------------
26384
26385- Documentation will be released separately.
26386
26387- Doc strings added to array and md5 modules by Chris Petrilli.
26388
26389Ports and build procedure
26390-------------------------
26391
26392- Stop installing when a move or copy fails.
26393
26394- New version of the OS/2 port code by Jeff Rush.
26395
26396- The makesetup script handles absolute filenames better.
26397
26398- The 'new' module is now enabled by default in the Setup file.
26399
26400- I *think* I've solved the problem with the Linux build blowing up
26401sometimes due to a conflict between sigcheck/intrcheck and
26402signalmodule.
26403
26404Built-in functions
26405------------------
26406
26407- The second argument to apply() can now be any sequence, not just a
26408tuple.
26409
26410Built-in types
26411--------------
26412
26413- Lists have a new method: L1.extend(L2) is equivalent to the common
26414idiom L1[len(L1):] = L2.
26415
26416- Better error messages when a sequence is indexed with a non-integer.
26417
26418- Bettter error message when calling a non-callable object (include
26419the type in the message).
26420
26421Python services
26422---------------
26423
26424- New version of cPickle.c fixes some bugs.
26425
26426- pickle.py: improved instantiation error handling.
26427
26428- code.py: reworked quite a bit. New base class
26429InteractiveInterpreter and derived class InteractiveConsole. Fixed
26430several problems in compile_command().
26431
26432- py_compile.py: print error message and continue on syntax errors.
26433Also fixed an old bug with the fstat code (it was never used).
26434
26435- pyclbr.py: support submodules of packages.
26436
26437String Services
26438---------------
26439
26440- StringIO.py: raise the right exception (ValueError) for attempted
26441I/O on closed StringIO objects.
26442
26443- re.py: fixed a bug in subn(), which caused .groups() to fail inside
26444the replacement function called by sub().
26445
26446- The struct module has a new format 'P': void * in native mode.
26447
26448Generic OS Services
26449-------------------
26450
26451- Module time: Y2K robustness. 2-digit year acceptance depends on
26452value of time.accept2dyear, initialized from env var PYTHONY2K,
26453default 0. Years 00-68 mean 2000-2068, while 69-99 mean 1969-1999
26454(POSIX or X/Open recommendation).
26455
26456- os.path: normpath(".//x") should return "x", not "/x".
26457
26458- getpass.py: fall back on default_getpass() when sys.stdin.fileno()
26459doesn't work.
26460
26461- tempfile.py: regenerate the template after a fork() call.
26462
26463Optional OS Services
26464--------------------
26465
26466- In the signal module, disable restarting interrupted system calls
26467when we have siginterrupt().
26468
26469Debugger
26470--------
26471
26472- No longer set __args__; this feature is no longer supported and can
26473affect the debugged code.
26474
26475- cmd.py, pdb.py and bdb.py have been overhauled by Richard Wolff, who
26476added aliases and some other useful new features, e.g. much better
26477breakpoint support: temporary breakpoint, disabled breakpoints,
26478breakpoints with ignore counts, and conditions; breakpoints can be set
26479on a file before it is loaded.
26480
26481Profiler
26482--------
26483
26484- Changes so that JPython can use it. Also fix the calibration code
26485so it actually works again
26486.
26487Internet Protocols and Support
26488------------------------------
26489
26490- imaplib.py: new version from Piers Lauder.
26491
26492- smtplib.py: change sendmail() method to accept a single string or a
26493list or strings as the destination (commom newbie mistake).
26494
26495- poplib.py: LIST with a msg argument fixed.
26496
26497- urlparse.py: some optimizations for common case (http).
26498
26499- urllib.py: support content-length in info() for ftp protocol;
26500support for a progress meter through a third argument to
26501urlretrieve(); commented out gopher test (the test site is dead).
26502
26503Internet Data handling
26504----------------------
26505
26506- sgmllib.py: support tags with - or . in their name.
26507
26508- mimetypes.py: guess_type() understands 'data' URLs.
26509
26510Restricted Execution
26511--------------------
26512
26513- The classes rexec.RModuleLoader and rexec.RModuleImporter no
26514longer exist.
26515
26516Tkinter
26517-------
26518
26519- When reporting an exception, store its info in sys.last_*. Also,
26520write all of it to stderr.
26521
26522- Added NS, EW, and NSEW constants, for grid's sticky option.
26523
26524- Fixed last-minute bug in 1.5.2a1 release: need to include "mytime.h".
26525
26526- Make bind variants without a sequence return a tuple of sequences
26527(formerly it returned a string, which wasn't very convenient).
26528
26529- Add image commands to the Text widget (these are new in Tk 8.0).
26530
26531- Added new listbox and canvas methods: {xview,yview}_{scroll,moveto}.)
26532
26533- Improved the thread code (but you still can't call update() from
26534another thread on Windows).
26535
26536- Fixed unnecessary references to _default_root in the new dialog
26537modules.
26538
26539- Miscellaneous problems fixed.
26540
26541
26542Windows General
26543---------------
26544
26545- Call LoadLibraryEx(..., ..., LOAD_WITH_ALTERED_SEARCH_PATH) to
26546search for dependent dlls in the directory containing the .pyd.
26547
26548- In debugging mode, call DebugBreak() in Py_FatalError().
26549
26550Windows Installer
26551-----------------
26552
26553- Install zlib.dll in the DLLs directory instead of in the win32
Victor Stinner554fd082014-03-17 22:33:49 +010026554system directory, to avoid conflicts with other applications that have
Guido van Rossum2001da42000-09-01 22:26:44 +000026555their own zlib.dll.
26556
26557Test Suite
26558----------
26559
26560- test_long.py: new test for long integers, by Tim Peters.
26561
26562- regrtest.py: improved so it can be used for other test suites as
26563well.
26564
26565- test_strftime.py: use re to compare test results, to support legal
26566variants (e.g. on Linux).
26567
26568Tools and Demos
26569---------------
26570
26571- Four new scripts in Tools/scripts: crlf.py and lfcr.py (to
26572remove/add Windows style '\r\n' line endings), untabify.py (to remove
26573tabs), and rgrep.yp (reverse grep).
26574
26575- Improvements to Tools/freeze/. Each Python module is now written to
26576its own C file. This prevents some compilers or assemblers from
26577blowing up on large frozen programs, and saves recompilation time if
26578only a few modules are changed. Other changes too, e.g. new command
26579line options -x and -i.
26580
26581- Much improved (and smaller!) version of Tools/scripts/mailerdaemon.py.
26582
26583Python/C API
26584------------
26585
26586- New mechanism to support extensions of the type object while
26587remaining backward compatible with extensions compiled for previous
26588versions of Python 1.5. A flags field indicates presence of certain
26589fields.
26590
26591- Addition to the buffer API to differentiate access to bytes and
265928-bit characters (in anticipation of Unicode characters).
26593
26594- New argument parsing format t# ("text") to indicate 8-bit
26595characters; s# simply means 8-bit bytes, for backwards compatibility.
26596
26597- New object type, bufferobject.c is an example and can be used to
26598create buffers from memory.
26599
26600- Some support for 64-bit longs, including some MS platforms.
26601
26602- Many calls to fprintf(stderr, ...) have been replaced with calls to
26603PySys_WriteStderr(...).
26604
26605- The calling context for PyOS_Readline() has changed: it must now be
26606called with the interpreter lock held! It releases the lock around
26607the call to the function pointed to by PyOS_ReadlineFunctionPointer
26608(default PyOS_StdioReadline()).
26609
26610- New APIs PyLong_FromVoidPtr() and PyLong_AsVoidPtr().
26611
26612- Renamed header file "thread.h" to "pythread.h".
26613
26614- The code string of code objects may now be anything that supports the
26615buffer API.
26616
26617
26618======================================================================
26619
26620
26621From 1.5.1 to 1.5.2a1
26622=====================
26623
26624General
26625-------
26626
26627- When searching for the library, a landmark that is a compiled module
26628(string.pyc or string.pyo) is also accepted.
26629
26630- When following symbolic links to the python executable, use a loop
26631so that a symlink to a symlink can work.
26632
26633- Added a hack so that when you type 'quit' or 'exit' at the
Victor Stinner554fd082014-03-17 22:33:49 +010026634interpreter, you get a friendly explanation of how to press Ctrl-D (or
Guido van Rossum2001da42000-09-01 22:26:44 +000026635Ctrl-Z) to exit.
26636
26637- New and improved Misc/python-mode.el (Python mode for Emacs).
26638
26639- Revert a new feature in Unix dynamic loading: for one or two
26640revisions, modules were loaded using the RTLD_GLOBAL flag. It turned
26641out to be a bad idea.
26642
26643Miscellaneous fixed bugs
26644------------------------
26645
26646- All patches on the patch page have been integrated. (But much more
26647has been done!)
26648
26649- Several memory leaks plugged (e.g. the one for classes with a
26650__getattr__ method).
26651
26652- Removed the only use of calloc(). This triggered an obscure bug on
26653multiprocessor Sparc Solaris 2.6.
26654
26655- Fix a peculiar bug that would allow "import sys.time" to succeed
26656(believing the built-in time module to be a part of the sys package).
26657
26658- Fix a bug in the overflow checking when converting a Python long to
26659a C long (failed to convert -2147483648L, and some other cases).
26660
26661Documentation
26662-------------
26663
26664- Doc strings have been added to many extension modules: __builtin__,
26665errno, select, signal, socket, sys, thread, time. Also to methods of
26666list objects (try [].append.__doc__). A doc string on a type will now
26667automatically be propagated to an instance if the instance has methods
26668that are accessed in the usual way.
26669
26670- The documentation has been expanded and the formatting improved.
26671(Remember that the documentation is now unbundled and has its own
26672release cycle though; see http://www.python.org/doc/.)
26673
26674- Added Misc/Porting -- a mini-FAQ on porting to a new platform.
26675
26676Ports and build procedure
26677-------------------------
26678
26679- The BeOS port is now integrated. Courtesy Chris Herborth.
26680
26681- Symbol files for FreeBSD 2.x and 3.x have been contributed
26682(Lib/plat-freebsd[23]/*).
26683
26684- Support HPUX 10.20 DCE threads.
26685
26686- Finally fixed the configure script so that (on SGI) if -OPT:Olimit=0
26687works, it won't also use -Olimit 1500 (which gives a warning for every
26688file). Also support the SGI_ABI environment variable better.
26689
26690- The makesetup script now understands absolute pathnames ending in .o
26691in the module -- it assumes it's a file for which we have no source.
26692
26693- Other miscellaneous improvements to the configure script and
26694Makefiles.
26695
26696- The test suite now uses a different sound sample.
26697
26698Built-in functions
26699------------------
26700
26701- Better checks for invalid input to int(), long(), string.atoi(),
26702string.atol(). (Formerly, a sign without digits would be accepted as
26703a legal ways to spell zero.)
26704
26705- Changes to map() and filter() to use the length of a sequence only
26706as a hint -- if an IndexError happens earlier, take that. (Formerly,
26707this was considered an error.)
26708
26709- Experimental feature in getattr(): a third argument can specify a
26710default (instead of raising AttributeError).
26711
26712- Implement round() slightly different, so that for negative ndigits
26713no additional errors happen in the last step.
26714
26715- The open() function now adds the filename to the exception when it
26716fails.
26717
26718Built-in exceptions
26719-------------------
26720
26721- New standard exceptions EnvironmentError and PosixError.
26722EnvironmentError is the base class for IOError and PosixError;
26723PosixError is the same as os.error. All this so that either exception
26724class can be instantiated with a third argument indicating a filename.
26725The built-in function open() and most os/posix functions that take a
26726filename argument now use this.
26727
26728Built-in types
26729--------------
26730
26731- List objects now have an experimental pop() method; l.pop() returns
26732and removes the last item; l.pop(i) returns and removes the item at
26733i. Also, the sort() method is faster again. Sorting is now also
26734safer: it is impossible for the sorting function to modify the list
26735while the sort is going on (which could cause core dumps).
26736
26737- Changes to comparisons: numbers are now smaller than any other type.
26738This is done to prevent the circularity where [] < 0L < 1 < [] is
26739true. As a side effect, cmp(None, 0) is now positive instead of
26740negative. This *shouldn't* affect any working code, but I've found
26741that the change caused several "sleeping" bugs to become active, so
26742beware!
26743
26744- Instance methods may now have other callable objects than just
26745Python functions as their im_func. Use new.instancemethod() or write
26746your own C code to create them; new.instancemethod() may be called
26747with None for the instance to create an unbound method.
26748
26749- Assignment to __name__, __dict__ or __bases__ of a class object is
26750now allowed (with stringent type checks); also allow assignment to
26751__getattr__ etc. The cached values for __getattr__ etc. are
26752recomputed after such assignments (but not for derived classes :-( ).
26753
26754- Allow assignment to some attributes of function objects: func_code,
26755func_defaults and func_doc / __doc__. (With type checks except for
26756__doc__ / func_doc .)
26757
26758Python services
26759---------------
26760
26761- New tests (in Lib/test): reperf.py (regular expression benchmark),
26762sortperf.py (list sorting benchmark), test_MimeWriter.py (test case
26763for the MimeWriter module).
26764
26765- Generalized test/regrtest.py so that it is useful for testing other
26766packages.
26767
26768- The ihooks.py module now understands package imports.
26769
26770- In code.py, add a class that subsumes Fredrik Lundh's
26771PythonInterpreter class. The interact() function now uses this.
26772
26773- In rlcompleter.py, in completer(), return None instead of raising an
26774IndexError when there are no more completions left.
26775
26776- Fixed the marshal module to test for certain common kinds of invalid
26777input. (It's still not foolproof!)
26778
26779- In the operator module, add an alias (now the preferred name)
26780"contains" for "sequenceincludes".
26781
26782String Services
26783---------------
26784
26785- In the string and strop modules, in the replace() function, treat an
26786empty pattern as an error (since it's not clear what was meant!).
26787
26788- Some speedups to re.py, especially the string substitution and split
26789functions. Also added new function/method findall(), to find all
26790occurrences of a given substring.
26791
26792- In cStringIO, add better argument type checking and support the
26793readonly 'closed' attribute (like regular files).
26794
26795- In the struct module, unsigned 1-2 byte sized formats no longer
26796result in long integer values.
26797
26798Miscellaneous services
26799----------------------
26800
26801- In whrandom.py, added new method and function randrange(), same as
26802choice(range(start, stop, step)) but faster. This addresses the
26803problem that randint() was accidentally defined as taking an inclusive
26804range. Also, randint(a, b) is now redefined as randrange(a, b+1),
26805adding extra range and type checking to its arguments!
26806
Victor Stinner554fd082014-03-17 22:33:49 +010026807- Add some semi-thread-safety to random.gauss() (it used to be able to
Guido van Rossum2001da42000-09-01 22:26:44 +000026808crash when invoked from separate threads; now the worst it can do is
26809give a duplicate result occasionally).
26810
26811- Some restructuring and generalization done to cmd.py.
26812
Victor Stinner554fd082014-03-17 22:33:49 +010026813- Major upgrade to ConfigParser.py; converted to using 're', added new
Guido van Rossum2001da42000-09-01 22:26:44 +000026814exceptions, support underscore in section header and option name. No
26815longer add 'name' option to every section; instead, add '__name__'.
26816
26817- In getpass.py, don't use raw_input() to ask for the password -- we
26818don't want it to show up in the readline history! Also don't catch
26819interrupts (the try-finally already does all necessary cleanup).
26820
26821Generic OS Services
26822-------------------
26823
26824- New functions in os.py: makedirs(), removedirs(), renames(). New
26825variable: linesep (the line separator as found in binary files,
26826i.e. '\n' on Unix, '\r\n' on DOS/Windows, '\r' on Mac. Do *not* use
26827this with files opened in (default) text mode; the line separator used
26828will always be '\n'!
26829
26830- Changes to the 'os.path' submodule of os.py: added getsize(),
26831getmtime(), getatime() -- these fetch the most popular items from the
26832stat return tuple.
26833
26834- In the time module, add strptime(), if it exists. (This parses a
26835time according to a format -- the inverse of strftime().) Also,
26836remove the call to mktime() from strftime() -- it messed up the
26837formatting of some non-local times.
26838
26839- In the socket module, added a new function gethostbyname_ex().
26840Also, don't use #ifdef to test for some symbols that are enums on some
26841platforms (and should exist everywhere).
26842
26843Optional OS Services
26844--------------------
26845
26846- Some fixes to gzip.py. In particular, the readlines() method now
26847returns the lines *with* trailing newline characters, like readlines()
26848of regular file objects. Also, it didn't work together with cPickle;
26849fixed that.
26850
26851- In whichdb.py, support byte-swapped dbhash (bsddb) files.
26852
26853- In anydbm.py, look at the type of an existing database to determine
26854which module to use to open it. (The anydbm.error exception is now a
26855tuple.)
26856
26857Unix Services
26858-------------
26859
26860- In the termios module, in tcsetattr(), initialize the structure vy
26861calling tcgetattr().
26862
26863- Added some of the "wait status inspection" macros as functions to
26864the posix module (and thus to the os module): WEXITSTATUS(),
26865WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG().
26866
26867- In the syslog module, make the default facility more intuitive
26868(matching the docs).
26869
26870Debugger
26871--------
26872
26873- In pdb.py, support for setting breaks on files/modules that haven't
26874been loaded yet.
26875
26876Internet Protocols and Support
26877------------------------------
26878
26879- Changes in urllib.py; sped up unquote() and quote(). Fixed an
26880obscure bug in quote_plus(). Added urlencode(dict) -- convenience
26881function for sending a POST request with urlopen(). Use the getpass
26882module to ask for a password. Rewrote the (test) main program so that
26883when used as a script, it can retrieve one or more URLs to stdout.
26884Use -t to run the self-test. Made the proxy code work again.
26885
26886- In cgi.py, treat "HEAD" the same as "GET", so that CGI scripts don't
26887fail when someone asks for their HEAD. Also, for POST, set the
26888default content-type to application/x-www-form-urlencoded. Also, in
26889FieldStorage.__init__(), when method='GET', always get the query
26890string from environ['QUERY_STRING'] or sys.argv[1] -- ignore an
26891explicitly passed in fp.
26892
26893- The smtplib.py module now supports ESMTP and has improved standard
26894compliance, for picky servers.
26895
26896- Improved imaplib.py.
26897
26898- Fixed UDP support in SocketServer.py (it never worked).
26899
26900- Fixed a small bug in CGIHTTPServer.py.
26901
26902Internet Data handling
26903----------------------
26904
26905- In rfc822.py, add a new class AddressList. Also support a new
26906overridable method, isheader(). Also add a get() method similar to
26907dictionaries (and make getheader() an alias for it). Also, be smarter
26908about seekable (test whether fp.tell() works) and test for presence of
26909unread() method before trying seeks.
26910
26911- In sgmllib.py, restore the call to report_unbalanced() that was lost
26912long ago. Also some other improvements: handle <? processing
26913instructions >, allow . and - in entity names, and allow \r\n as line
26914separator.
26915
26916- Some restructuring and generalization done to multifile.py; support
26917a 'seekable' flag.
26918
26919Restricted Execution
26920--------------------
26921
26922- Improvements to rexec.py: package support; support a (minimal)
26923sys.exc_info(). Also made the (test) main program a bit fancier (you
26924can now use it to run arbitrary Python scripts in restricted mode).
26925
26926Tkinter
26927-------
26928
26929- On Unix, Tkinter can now safely be used from a multi-threaded
26930application. (Formerly, no threads would make progress while
26931Tkinter's mainloop() was active, because it didn't release the Python
26932interpreter lock.) Unfortunately, on Windows, threads other than the
26933main thread should not call update() or update_idletasks() because
26934this will deadlock the application.
26935
26936- An interactive interpreter that uses readline and Tkinter no longer
26937uses up all available CPU time.
26938
26939- Even if readline is not used, Tk windows created in an interactive
26940interpreter now get continuously updated. (This even works in Windows
26941as long as you don't hit a key.)
26942
26943- New demos in Demo/tkinter/guido/: brownian.py, redemo.py, switch.py.
26944
26945- No longer register Tcl_finalize() as a low-level exit handler. It
26946may call back into Python, and that's a bad idea.
26947
26948- Allow binding of Tcl commands (given as a string).
26949
26950- Some minor speedups; replace explicitly coded getint() with int() in
26951most places.
26952
26953- In FileDialog.py, remember the directory of the selected file, if
26954given.
26955
26956- Change the names of all methods in the Wm class: they are now
26957wm_title(), etc. The old names (title() etc.) are still defined as
26958aliases.
26959
26960- Add a new method of interpreter objects, interpaddr(). This returns
26961the address of the Tcl interpreter object, as an integer. Not very
26962useful for the Python programmer, but this can be called by another C
26963extension that needs to make calls into the Tcl/Tk C API and needs to
26964get the address of the Tcl interpreter object. A simple cast of the
26965return value to (Tcl_Interp *) will do the trick.
26966
26967Windows General
26968---------------
26969
26970- Don't insist on proper case for module source files if the filename
26971is all uppercase (e.g. FOO.PY now matches foo; but FOO.py still
26972doesn't). This should address problems with this feature on
26973oldfashioned filesystems (Novell servers?).
26974
26975Windows Library
26976---------------
26977
26978- os.environ is now all uppercase, but accesses are case insensitive,
26979and the putenv() calls made as a side effect of changing os.environ
26980are case preserving.
26981
26982- Removed samefile(), sameopenfile(), samestat() from os.path (aka
26983ntpath.py) -- these cannot be made to work reliably (at least I
26984wouldn't know how).
26985
26986- Fixed os.pipe() so that it returns file descriptors acceptable to
26987os.read() and os.write() (like it does on Unix), rather than Windows
26988file handles.
26989
26990- Added a table of WSA error codes to socket.py.
26991
26992- In the select module, put the (huge) file descriptor arrays on the
26993heap.
26994
26995- The getpass module now raises KeyboardInterrupt when it sees ^C.
26996
26997- In mailbox.py, fix tell/seek when using files opened in text mode.
26998
26999- In rfc822.py, fix tell/seek when using files opened in text mode.
27000
27001- In the msvcrt extension module, release the interpreter lock for
27002calls that may block: _locking(), _getch(), _getche(). Also fix a
27003bogus error return when open_osfhandle() doesn't have the right
27004argument list.
27005
27006Windows Installer
27007-----------------
27008
27009- The registry key used is now "1.5" instead of "1.5.x" -- so future
Victor Stinner554fd082014-03-17 22:33:49 +010027010versions of 1.5 and Mark Hammond's win32all installer don't need to be
Guido van Rossum2001da42000-09-01 22:26:44 +000027011resynchronized.
27012
27013Windows Tools
27014-------------
27015
27016- Several improvements to freeze specifically for Windows.
27017
27018Windows Build Procedure
27019-----------------------
27020
27021- The VC++ project files and the WISE installer have been moved to the
27022PCbuild subdirectory, so they are distributed in the same subdirectory
27023where they must be used. This avoids confusion.
27024
27025- New project files for Windows 3.1 port by Jim Ahlstrom.
27026
27027- Got rid of the obsolete subdirectory PC/setup_nt/.
27028
27029- The projects now use distinct filenames for the .exe, .dll, .lib and
27030.pyd files built in debug mode (by appending "_d" to the base name,
27031before the extension). This makes it easier to switch between the two
27032and get the right versions. There's a pragma in config.h that directs
27033the linker to include the appropriate .lib file (so python15.lib no
27034longer needs to be explicit in your project).
27035
27036- The installer now installs more files (e.g. config.h). The idea is
27037that you shouldn't need the source distribution if you want build your
27038own extensions in C or C++.
27039
27040Tools and Demos
27041---------------
27042
27043- New script nm2def.py by Marc-Andre Lemburg, to construct
27044PC/python_nt.def automatically (some hand editing still required).
27045
27046- New tool ndiff.py: Tim Peters' text diffing tool.
27047
27048- Various and sundry improvements to the freeze script.
27049
27050- The script texi2html.py (which was part of the Doc tree but is no
27051longer used there) has been moved to the Tools/scripts subdirectory.
27052
27053- Some generalizations in the webchecker code. There's now a
27054primnitive gui for websucker.py: wsgui.py. (In Tools/webchecker/.)
27055
27056- The ftpmirror.py script now handles symbolic links properly, and
27057also files with multiple spaces in their names.
27058
27059- The 1.5.1 tabnanny.py suffers an assert error if fed a script whose
27060last line is both indented and lacks a newline. This is now fixed.
27061
27062Python/C API
27063------------
27064
27065- Added missing prototypes for PyEval_CallFunction() and
27066PyEval_CallMethod().
27067
27068- New macro PyList_SET_ITEM().
27069
27070- New macros to access object members for PyFunction, PyCFunction
27071objects.
27072
Serhiy Storchaka6a7b3a72016-04-17 08:32:47 +030027073- New APIs PyImport_AppendInittab() and PyImport_ExtendInittab() to
Guido van Rossum2001da42000-09-01 22:26:44 +000027074dynamically add one or many entries to the table of built-in modules.
27075
27076- New macro Py_InitModule3(name, methods, doc) which calls
Victor Stinner554fd082014-03-17 22:33:49 +010027077Py_InitModule4() with appropriate arguments. (The -4 variant requires
Guido van Rossum2001da42000-09-01 22:26:44 +000027078you to pass an obscure version number constant which is always the same.)
27079
27080- New APIs PySys_WriteStdout() and PySys_WriteStderr() to write to
27081sys.stdout or sys.stderr using a printf-like interface. (Used in
27082_tkinter.c, for example.)
27083
27084- New APIs for conversion between Python longs and C 'long long' if
27085your compiler supports it.
27086
27087- PySequence_In() is now called PySequence_Contains().
27088(PySequence_In() is still supported for b/w compatibility; it is
27089declared obsolete because its argument order is confusing.)
27090
27091- PyDict_GetItem() and PyDict_GetItemString() are changed so that they
27092*never* raise an exception -- (even if the hash() fails, simply clear
27093the error). This was necessary because there is lots of code out
27094there that already assumes this.
27095
27096- Changes to PySequence_Tuple() and PySequence_List() to use the
27097length of a sequence only as a hint -- if an IndexError happens
27098earlier, take that. (Formerly, this was considered an error.)
27099
27100- Reformatted abstract.c to give it a more familiar "look" and fixed
27101many error checking bugs.
27102
27103- Add NULL pointer checks to all calls of a C function through a type
27104object and extensions (e.g. nb_add).
27105
27106- The code that initializes sys.path now calls Py_GetPythonHome()
27107instead of getenv("PYTHONHOME"). This, together with the new API
27108Py_SetPythonHome(), makes it easier for embedding applications to
27109change the notion of Python's "home" directory (where the libraries
27110etc. are sought).
27111
27112- Fixed a very old bug in the parsing of "O?" format specifiers.
27113
27114
27115======================================================================
27116
27117
Guido van Rossumf2eac992000-09-04 17:24:24 +000027118========================================
27119==> Release 1.5.1 (October 31, 1998) <==
27120========================================
27121
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027122From 1.5 to 1.5.1
27123=================
27124
27125General
27126-------
27127
27128- The documentation is now unbundled. It has also been extensively
27129modified (mostly to implement a new and more uniform formatting
27130style). We figure that most people will prefer to download one of the
27131preformatted documentation sets (HTML, PostScript or PDF) and that
27132only a minority have a need for the LaTeX or FrameMaker sources. Of
27133course, the unbundled documentation sources still released -- just not
27134in the same archive file, and perhaps not on the same date.
27135
27136- All bugs noted on the errors page (and many unnoted) are fixed. All
27137new bugs take their places.
27138
27139- No longer a core dump when attempting to print (or repr(), or str())
27140a list or dictionary that contains an instance of itself; instead, the
27141recursive entry is printed as [...] or {...}. See Py_ReprEnter() and
27142Py_ReprLeave() below. Comparisons of such objects still go beserk,
27143since this requires a different kind of fix; fortunately, this is a
27144less common scenario in practice.
27145
27146Syntax change
27147-------------
27148
Victor Stinner554fd082014-03-17 22:33:49 +010027149- The raise statement can now be used without arguments, to re-raise
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027150a previously set exception. This should be used after catching an
27151exception with an except clause only, either in the except clause or
27152later in the same function.
27153
27154Import and module handling
27155--------------------------
27156
27157- The implementation of import has changed to use a mutex (when
27158threading is supported). This means that when two threads
27159simultaneously import the same module, the import statements are
27160serialized. Recursive imports are not affected.
27161
27162- Rewrote the finalization code almost completely, to be much more
27163careful with the order in which modules are destroyed. Destructors
27164will now generally be able to reference built-in names such as None
27165without trouble.
27166
27167- Case-insensitive platforms such as Mac and Windows require the case
27168of a module's filename to match the case of the module name as
27169specified in the import statement (see below).
27170
27171- The code for figuring out the default path now distinguishes between
27172files, modules, executable files, and directories. When expecting a
27173module, we also look for the .pyc or .pyo file.
27174
27175Parser/tokenizer changes
27176------------------------
27177
27178- The tokenizer can now warn you when your source code mixes tabs and
27179spaces for indentation in a manner that depends on how much a tab is
27180worth in spaces. Use "python -t" or "python -v" to enable this
27181option. Use "python -tt" to turn the warnings into errors. (See also
27182tabnanny.py and tabpolice.py below.)
27183
27184- Return unsigned characters from tok_nextc(), so '\377' isn't
27185mistaken for an EOF character.
27186
27187- Fixed two pernicious bugs in the tokenizer that only affected AIX.
27188One was actually a general bug that was triggered by AIX's smaller I/O
27189buffer size. The other was a bug in the AIX optimizer's loop
27190unrolling code; swapping two statements made the problem go away.
27191
27192Tools, demos and miscellaneous files
27193------------------------------------
27194
27195- There's a new version of Misc/python-mode.el (the Emacs mode for
27196Python) which is much smarter about guessing the indentation style
27197used in a particular file. Lots of other cool features too!
27198
27199- There are two new tools in Tools/scripts: tabnanny.py and
27200tabpolice.py, implementing two different ways of checking whether a
27201file uses indentation in a way that is sensitive to the interpretation
27202of a tab. The preferred module is tabnanny.py (by Tim Peters).
27203
27204- Some new demo programs:
27205
27206 Demo/tkinter/guido/paint.py -- Dave Mitchell
27207 Demo/sockets/unixserver.py -- Piet van Oostrum
Victor Stinner554fd082014-03-17 22:33:49 +010027208
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027209
27210- Much better freeze support. The freeze script can now freeze
27211hierarchical module names (with a corresponding change to import.c),
27212and has a few extra options (e.g. to suppress freezing specific
27213modules). It also does much more on Windows NT.
27214
27215- Version 1.0 of the faq wizard is included (only very small changes
27216since version 0.9.0).
27217
27218- New feature for the ftpmirror script: when removing local files
27219(i.e., only when -r is used), do a recursive delete.
27220
27221Configuring and building Python
27222-------------------------------
27223
27224- Get rid of the check for -linet -- recent Sequent Dynix systems don't
27225need this any more and apparently it screws up their configuration.
27226
27227- Some changes because gcc on SGI doesn't support '-all'.
27228
27229- Changed the build rules to use $(LIBRARY) instead of
27230 -L.. -lpython$(VERSION)
27231since the latter trips up the SunOS 4.1.x linker (sigh).
27232
27233- Fix the bug where the '# dgux is broken' comment in the Makefile
27234tripped over Make on some platforms.
27235
27236- Changes for AIX: install the python.exp file; properly use
27237$(srcdir); the makexp_aix script now removes C++ entries of the form
27238Class::method.
27239
27240- Deleted some Makefile targets only used by the (long obsolete)
27241gMakefile hacks.
27242
27243Extension modules
27244-----------------
27245
27246- Performance and threading improvements to the socket and bsddb
27247modules, by Christopher Lindblad of Infoseek.
27248
27249- Added operator.__not__ and operator.not_.
27250
27251- In the thread module, when a thread exits due to an unhandled
27252exception, don't store the exception information in sys.last_*; it
27253prevents proper calling of destructors of local variables.
27254
27255- Fixed a number of small bugs in the cPickle module.
27256
27257- Changed find() and rfind() in the strop module so that
27258find("x","",2) returns -1, matching the implementation in string.py.
27259
27260- In the time module, be more careful with the result of ctime(), and
27261test for HAVE_MKTIME before usinmg mktime().
27262
27263- Doc strings contributed by Mitch Chapman to the termios, pwd, gdbm
27264modules.
27265
27266- Added the LOG_SYSLOG constant to the syslog module, if defined.
27267
27268Standard library modules
27269------------------------
27270
27271- All standard library modules have been converted to an indentation
27272style using either only tabs or only spaces -- never a mixture -- if
27273they weren't already consistent according to tabnanny. This means
27274that the new -t option (see above) won't complain about standard
27275library modules.
27276
27277- New standard library modules:
27278
27279 threading -- GvR and the thread-sig
27280 Java style thread objects -- USE THIS!!!
27281
27282 getpass -- Piers Lauder
27283 simple utilities to prompt for a password and to
27284 retrieve the current username
27285
27286 imaplib -- Piers Lauder
27287 interface for the IMAP4 protocol
27288
27289 poplib -- David Ascher, Piers Lauder
27290 interface for the POP3 protocol
27291
27292 smtplib -- Dragon De Monsyne
27293 interface for the SMTP protocol
27294
27295- Some obsolete modules moved to a separate directory (Lib/lib-old)
27296which is *not* in the default module search path:
27297
27298 Para
27299 addpack
27300 codehack
27301 fmt
27302 lockfile
27303 newdir
27304 ni
27305 rand
27306 tb
27307
27308- New version of the PCRE code (Perl Compatible Regular Expressions --
27309the re module and the supporting pcre extension) by Andrew Kuchling.
27310Incompatible new feature in re.sub(): the handling of escapes in the
27311replacement string has changed.
27312
27313- Interface change in the copy module: a __deepcopy__ method is now
27314called with the memo dictionary as an argument.
27315
27316- Feature change in the tokenize module: differentiate between NEWLINE
27317token (an official newline) and NL token (a newline that the grammar
27318ignores).
27319
27320- Several bugfixes to the urllib module. It is now truly thread-safe,
27321and several bugs and a portability problem have been fixed. New
27322features, all due to Sjoerd Mullender: When creating a temporary file,
27323it gives it an appropriate suffix. Support the "data:" URL scheme.
27324The open() method uses the tempcache.
27325
27326- New version of the xmllib module (this time with a test suite!) by
27327Sjoerd Mullender.
27328
27329- Added debugging code to the telnetlib module, to be able to trace
27330the actual traffic.
27331
27332- In the rfc822 module, added support for deleting a header (still no
27333support for adding headers, though). Also fixed a bug where an
27334illegal address would cause a crash in getrouteaddr(), fixed a
27335sign reversal in mktime_tz(), and use the local timezone by default
27336(the latter two due to Bill van Melle).
27337
27338- The normpath() function in the dospath and ntpath modules no longer
27339does case normalization -- for that, use the separate function
27340normcase() (which always existed); normcase() has been sped up and
27341fixed (it was the cause of a crash in Mark Hammond's installer in
27342certain locales).
27343
27344- New command supported by the ftplib module: rmd(); also fixed some
27345minor bugs.
27346
Victor Stinner554fd082014-03-17 22:33:49 +010027347- The profile module now uses a different timer function by default --
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027348time.clock() is generally better than os.times(). This makes it work
27349better on Windows NT, too.
27350
27351- The tempfile module now recovers when os.getcwd() raises an
27352exception.
27353
27354- Fixed some bugs in the random module; gauss() was subtly wrong, and
27355vonmisesvariate() should return a full circle. Courtesy Mike Miller,
27356Lambert Meertens (gauss()), and Magnus Kessler (vonmisesvariate()).
27357
27358- Better default seed in the whrandom module, courtesy Andrew Kuchling.
27359
27360- Fix slow close() in shelve module.
27361
27362- The Unix mailbox class in the mailbox module is now more robust when
27363a line begins with the string "From " but is definitely not the start
27364of a new message. The pattern used can be changed by overriding a
27365method or class variable.
27366
27367- Added a rmtree() function to the copy module.
27368
27369- Fixed several typos in the pickle module. Also fixed problems when
27370unpickling in restricted execution environments.
27371
27372- Added docstrings and fixed a typo in the py_compile and compileall
27373modules. At Mark Hammond's repeated request, py_compile now append a
27374newline to the source if it needs one. Both modules support an extra
27375parameter to specify the purported source filename (to be used in
27376error messages).
27377
27378- Some performance tweaks by Jeremy Hylton to the gzip module.
27379
27380- Fixed a bug in the merge order of dictionaries in the ConfigParser
27381module. Courtesy Barry Warsaw.
27382
27383- In the multifile module, support the optional second parameter to
27384seek() when possible.
27385
Victor Stinner554fd082014-03-17 22:33:49 +010027386- Several fixes to the gopherlib module by Lars Marius Garshol. Also,
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027387urlparse now correctly handles Gopher URLs with query strings.
27388
27389- Fixed a tiny bug in format_exception() in the traceback module.
27390Also rewrite tb_lineno() to be compatible with JPython (and not
27391disturb the current exception!); by Jim Hugunin.
27392
Victor Stinner554fd082014-03-17 22:33:49 +010027393- The httplib module is more robust when servers send a short response
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027394-- courtesy Tim O'Malley.
27395
27396Tkinter and friends
27397-------------------
27398
27399- Various typos and bugs fixed.
27400
27401- New module Tkdnd implements a drag-and-drop protocol (within one
27402application only).
27403
27404- The event_*() widget methods have been restructured slightly -- they
27405no longer use the default root.
27406
27407- The interfaces for the bind*() and unbind() widget methods have been
Victor Stinner554fd082014-03-17 22:33:49 +010027408redesigned; the bind*() methods now return the name of the Tcl command
Martin Panter7462b6492015-11-02 03:37:02 +000027409created for the callback, and this can be passed as an optional
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027410argument to unbind() in order to delete the command (normally, such
27411commands are automatically unbound when the widget is destroyed, but
27412for some applications this isn't enough).
27413
27414- Variable objects now have trace methods to interface to Tcl's
27415variable tracing facilities.
27416
27417- Image objects now have an optional keyword argument, 'master', to
27418specify a widget (tree) to which they belong. The image_names() and
27419image_types() calls are now also widget methods.
27420
27421- There's a new global call, Tkinter.NoDefaultRoot(), which disables
27422all use of the default root by the Tkinter library. This is useful to
27423debug applications that are in the process of being converted from
27424relying on the default root to explicit specification of the root
27425widget.
27426
27427- The 'exit' command is deleted from the Tcl interpreter, since it
27428provided a loophole by which one could (accidentally) exit the Python
27429interpreter without invoking any cleanup code.
27430
27431- Tcl_Finalize() is now registered as a Python low-level exit handle,
27432so Tcl will be finalized when Python exits.
27433
27434The Python/C API
27435----------------
27436
27437- New function PyThreadState_GetDict() returns a per-thread dictionary
27438intended for storing thread-local global variables.
27439
27440- New functions Py_ReprEnter() and Py_ReprLeave() use the per-thread
27441dictionary to allow recursive container types to detect recursion in
27442their repr(), str() and print implementations.
27443
Victor Stinner554fd082014-03-17 22:33:49 +010027444- New function PyObject_Not(x) calculates (not x) according to Python's
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027445standard rules (basically, it negates the outcome PyObject_IsTrue(x).
27446
27447- New function _PyModule_Clear(), which clears a module's dictionary
27448carefully without removing the __builtins__ entry. This is implied
27449when a module object is deallocated (this used to clear the dictionary
27450completely).
27451
27452- New function PyImport_ExecCodeModuleEx(), which extends
27453PyImport_ExecCodeModule() by adding an extra parameter to pass it the
27454true file.
27455
27456- New functions Py_GetPythonHome() and Py_SetPythonHome(), intended to
27457allow embedded applications to force a different value for PYTHONHOME.
27458
27459- New global flag Py_FrozenFlag is set when this is a "frozen" Python
27460binary; it suppresses warnings about not being able to find the
27461standard library directories.
27462
27463- New global flag Py_TabcheckFlag is incremented by the -t option and
27464causes the tokenizer to issue warnings or errors about inconsistent
27465mixing of tabs and spaces for indentation.
27466
27467Miscellaneous minor changes and bug fixes
27468-----------------------------------------
27469
27470- Improved the error message when an attribute of an attribute-less
27471object is requested -- include the name of the attribute and the type
27472of the object in the message.
27473
27474- Sped up int(), long(), float() a bit.
27475
27476- Fixed a bug in list.sort() that would occasionally dump core.
27477
27478- Fixed a bug in PyNumber_Power() that caused numeric arrays to fail
27479when taken tothe real power.
27480
27481- Fixed a number of bugs in the file reading code, at least one of
27482which could cause a core dump on NT, and one of which would
27483occasionally cause file.read() to return less than the full contents
27484of the file.
27485
27486- Performance hack by Vladimir Marangozov for stack frame creation.
27487
27488- Make sure setvbuf() isn't used unless HAVE_SETVBUF is defined.
27489
27490Windows 95/NT
27491-------------
27492
27493- The .lib files are now part of the distribution; they are collected
27494in the subdirectory "libs" of the installation directory.
27495
27496- The extension modules (.pyd files) are now collected in a separate
27497subdirectory of the installation directory named "DLLs".
27498
27499- The case of a module's filename must now match the case of the
27500module name as specified in the import statement. This is an
27501experimental feature -- if it turns out to break in too many
27502situations, it will be removed (or disabled by default) in the future.
27503It can be disabled on a per-case basis by setting the environment
27504variable PYTHONCASEOK (to any value).
27505
27506
27507======================================================================
27508
27509
Guido van Rossumf2eac992000-09-04 17:24:24 +000027510=====================================
27511==> Release 1.5 (January 3, 1998) <==
27512=====================================
27513
27514
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027515From 1.5b2 to 1.5
27516=================
27517
27518- Newly documentated module: BaseHTTPServer.py, thanks to Greg Stein.
27519
27520- Added doc strings to string.py, stropmodule.c, structmodule.c,
27521thanks to Charles Waldman.
27522
27523- Many nits fixed in the manuals, thanks to Fred Drake and many others
27524(especially Rob Hooft and Andrew Kuchling). The HTML version now uses
27525HTML markup instead of inline GIF images for tables; only two images
27526are left (for obsure bits of math). The index of the HTML version has
27527also been much improved. Finally, it is once again possible to
27528generate an Emacs info file from the library manual (but I don't
27529commit to supporting this in future versions).
27530
27531- New module: telnetlib.py (a simple telnet client library).
27532
27533- New tool: Tools/versioncheck/, by Jack Jansen.
27534
27535- Ported zlibmodule.c and bsddbmodule.c to NT; The project file for MS
27536DevStudio 5.0 now includes new subprojects to build the zlib and bsddb
27537extension modules.
27538
27539- Many small changes again to Tkinter.py -- mostly bugfixes and adding
27540missing routines. Thanks to Greg McFarlane for reporting a bunch of
27541problems and proofreading my fixes.
27542
27543- The re module and its documentation are up to date with the latest
27544version released to the string-sig (Dec. 22).
27545
27546- Stop test_grp.py from failing when the /etc/group file is empty
27547(yes, this happens!).
27548
27549- Fix bug in integer conversion (mystrtoul.c) that caused
275504294967296==0 to be true!
27551
27552- The VC++ 4.2 project file should be complete again.
27553
27554- In tempfile.py, use a better template on NT, and add a new optional
27555argument "suffix" with default "" to specify a specific extension for
27556the temporary filename (needed sometimes on NT but perhaps also handy
27557elsewhere).
27558
27559- Fixed some bugs in the FAQ wizard, and converted it to use re
27560instead of regex.
27561
27562- Fixed a mysteriously undetected error in dlmodule.c (it was using a
27563totally bogus routine name to raise an exception).
27564
27565- Fixed bug in import.c which wasn't using the new "dos-8x3" name yet.
27566
27567- Hopefully harmless changes to the build process to support shared
27568libraries on DG/UX. This adds a target to create
27569libpython$(VERSION).so; however this target is *only* for DG/UX.
27570
27571- Fixed a bug in the new format string error checking in getargs.c.
27572
27573- A simple fix for infinite recursion when printing __builtins__:
27574reset '_' to None before printing and set it to the printed variable
27575*after* printing (and only when printing is successful).
27576
27577- Fixed lib-tk/SimpleDialog.py to keep the dialog visible even if the
27578parent window is not (Skip Montanaro).
27579
27580- Fixed the two most annoying problems with ftp URLs in
27581urllib.urlopen(); an empty file now correctly raises an error, and it
27582is no longer required to explicitly close the returned "file" object
27583before opening another ftp URL to the same host and directory.
27584
27585
27586======================================================================
27587
27588
27589From 1.5b1 to 1.5b2
27590===================
27591
27592- Fixed a bug in cPickle.c that caused it to crash right away because
27593the version string had a different format.
27594
27595- Changes in pickle.py and cPickle.c: when unpickling an instance of a
27596class that doesn't define the __getinitargs__() method, the __init__()
27597constructor is no longer called. This makes a much larger group of
27598classes picklable by default, but may occasionally change semantics.
27599To force calling __init__() on unpickling, define a __getinitargs__()
27600method. Other changes too, in particular cPickle now handles classes
27601defined in packages correctly. The same change applies to copying
27602instances with copy.py. The cPickle.c changes and some pickle.py
27603changes are courtesy Jim Fulton.
27604
Victor Stinner554fd082014-03-17 22:33:49 +010027605- Locale support in he "re" (Perl regular expressions) module. Use
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027606the flag re.L (or re.LOCALE) to enable locale-specific matching
27607rules for \w and \b. The in-line syntax for this flag is (?L).
27608
27609- The built-in function isinstance(x, y) now also succeeds when y is
27610a type object and type(x) is y.
27611
27612- repr() and str() of class and instance objects now reflect the
27613package/module in which the class is defined.
27614
27615- Module "ni" has been removed. (If you really need it, it's been
27616renamed to "ni1". Let me know if this causes any problems for you.
27617Package authors are encouraged to write __init__.py files that
27618support both ni and 1.5 package support, so the same version can be
27619used with Python 1.4 as well as 1.5.)
27620
27621- The thread module is now automatically included when threads are
27622configured. (You must remove it from your existing Setup file,
27623since it is now in its own Setup.thread file.)
27624
27625- New command line option "-x" to skip the first line of the script;
27626handy to make executable scripts on non-Unix platforms.
27627
27628- In importdl.c, add the RTLD_GLOBAL to the dlopen() flags. I
27629haven't checked how this affects things, but it should make symbols
27630in one shared library available to the next one.
27631
27632- The Windows installer now installs in the "Program Files" folder on
27633the proper volume by default.
27634
27635- The Windows configuration adds a new main program, "pythonw", and
27636registers a new extension, ".pyw" that invokes this. This is a
27637pstandard Python interpreter that does not pop up a console window;
27638handy for pure Tkinter applications. All output to the original
27639stdout and stderr is lost; reading from the original stdin yields
27640EOF. Also, both python.exe and pythonw.exe now have a pretty icon
27641(a green snake in a box, courtesy Mark Hammond).
27642
27643- Lots of improvements to emacs-mode.el again. See Barry's web page:
27644http://www.python.org/ftp/emacs/pmdetails.html.
27645
27646- Lots of improvements and additions to the library reference manual;
27647many by Fred Drake.
27648
27649- Doc strings for the following modules: rfc822.py, posixpath.py,
27650ntpath.py, httplib.py. Thanks to Mitch Chapman and Charles Waldman.
27651
27652- Some more regression testing.
27653
27654- An optional 4th (maxsplit) argument to strop.replace().
27655
27656- Fixed handling of maxsplit in string.splitfields().
27657
27658- Tweaked os.environ so it can be pickled and copied.
27659
27660- The portability problems caused by indented preprocessor commands
27661and C++ style comments should be gone now.
27662
27663- In random.py, added Pareto and Weibull distributions.
27664
27665- The crypt module is now disabled in Modules/Setup.in by default; it
27666is rarely needed and causes errors on some systems where users often
27667don't know how to deal with those.
27668
27669- Some improvements to the _tkinter build line suggested by Case Roole.
27670
Victor Stinner554fd082014-03-17 22:33:49 +010027671- A full suite of platform specific files for NetBSD 1.x, submitted by
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027672Anders Andersen.
27673
27674- New Solaris specific header STROPTS.py.
27675
27676- Moved a confusing occurrence of *shared* from the comments in
27677Modules/Setup.in (people would enable this one instead of the real
27678one, and get disappointing results).
27679
27680- Changed the default mode for directories to be group-writable when
27681the installation process creates them.
27682
27683- Check for pthread support in "-l_r" for FreeBSD/NetBSD, and support
27684shared libraries for both.
27685
27686- Support FreeBSD and NetBSD in posixfile.py.
27687
27688- Support for the "event" command, new in Tk 4.2. By Case Roole.
27689
27690- Add Tix_SafeInit() support to tkappinit.c.
27691
27692- Various bugs fixed in "re.py" and "pcre.c".
27693
27694- Fixed a bug (broken use of the syntax table) in the old "regexpr.c".
27695
27696- In frozenmain.c, stdin is made unbuffered too when PYTHONUNBUFFERED
27697is set.
27698
27699- Provide default blocksize for retrbinary in ftplib.py (Skip
27700Montanaro).
27701
27702- In NT, pick the username up from different places in user.py (Jeff
27703Bauer).
27704
27705- Patch to urlparse.urljoin() for ".." and "..#1", Marc Lemburg.
27706
27707- Many small improvements to Jeff Rush' OS/2 support.
27708
27709- ospath.py is gone; it's been obsolete for so many years now...
27710
27711- The reference manual is now set up to prepare better HTML (still
27712using webmaker, alas).
27713
27714- Add special handling to /Tools/freeze for Python modules that are
27715imported implicitly by the Python runtime: 'site' and 'exceptions'.
27716
27717- Tools/faqwiz 0.8.3 -- add an option to suppress URL processing
27718inside <PRE>, by "Scott".
27719
27720- Added ConfigParser.py, a generic parser for sectioned configuration
27721files.
27722
27723- In _localemodule.c, LC_MESSAGES is not always defined; put it
27724between #ifdefs.
27725
27726- Typo in resource.c: RUSAGE_CHILDERN -> RUSAGE_CHILDREN.
27727
27728- Demo/scripts/newslist.py: Fix the way the version number is gotten
27729out of the RCS revision.
27730
27731- PyArg_Parse[Tuple] now explicitly check for bad characters at the
27732end of the format string.
27733
27734- Revamped PC/example_nt to support VC++ 5.x.
27735
27736- <listobject>.sort() now uses a modified quicksort by Raymund Galvin,
27737after studying the GNU libg++ quicksort. This should be much faster
27738if there are lots of duplicates, and otherwise at least as good.
27739
27740- Added "uue" as an alias for "uuencode" to mimetools.py. (Hm, the
Victor Stinner554fd082014-03-17 22:33:49 +010027741uudecode bug where it complaints about trailing garbage is still there
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027742:-( ).
27743
27744- pickle.py requires integers in text mode to be in decimal notation
27745(it used to accept octal and hex, even though it would only generate
27746decimal numbers).
27747
27748- In string.atof(), don't fail when the "re" module is unavailable.
Martin Panter2dc77f02016-09-16 00:46:05 +000027749Plug the ensuing security leak by supplying an empty __builtins__
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027750directory to eval().
27751
27752- A bunch of small fixes and improvements to Tkinter.py.
27753
27754- Fixed a buffer overrun in PC/getpathp.c.
27755
27756
27757======================================================================
27758
27759
27760From 1.5a4 to 1.5b1
27761===================
27762
27763- The Windows NT/95 installer now includes full HTML of all manuals.
27764It also has a checkbox that lets you decide whether to install the
27765interpreter and library. The WISE installer script for the installer
27766is included in the source tree as PC/python15.wse, and so are the
27767icons used for Python files. The config.c file for the Windows build
27768is now complete with the pcre module.
27769
27770- sys.ps1 and sys.ps2 can now arbitrary objects; their str() is
27771evaluated for the prompt.
27772
27773- The reference manual is brought up to date (more or less -- it still
27774needs work, e.g. in the area of package import).
27775
27776- The icons used by latex2html are now included in the Doc
27777subdirectory (mostly so that tarring up the HTML files can be fully
27778automated). A simple index.html is also added to Doc (it only works
27779after you have successfully run latex2html).
27780
27781- For all you would-be proselytizers out there: a new version of
27782Misc/BLURB describes Python more concisely, and Misc/comparisons
27783compares Python to several other languages. Misc/BLURB.WINDOWS
27784contains a blurb specifically aimed at Windows programmers (by Mark
27785Hammond).
27786
27787- A new version of the Python mode for Emacs is included as
27788Misc/python-mode.el. There are too many new features to list here.
27789See http://www.python.org/ftp/emacs/pmdetails.html for more info.
27790
27791- New module fileinput makes iterating over the lines of a list of
27792files easier. (This still needs some more thinking to make it more
27793extensible.)
27794
27795- There's full OS/2 support, courtesy Jeff Rush. To build the OS/2
27796version, see PC/readme.txt and PC/os2vacpp. This is for IBM's Visual
27797Age C++ compiler. I expect that Jeff will also provide a binary
27798release for this platform.
27799
27800- On Linux, the configure script now uses '-Xlinker -export-dynamic'
27801instead of '-rdynamic' to link the main program so that it exports its
27802symbols to shared libraries it loads dynamically. I hope this doesn't
27803break on older Linux versions; it is needed for mklinux and appears to
27804work on Linux 2.0.30.
27805
27806- Some Tkinter resstructuring: the geometry methods that apply to a
27807master are now properly usable on toplevel master widgets. There's a
27808new (internal) widget class, BaseWidget. New, longer "official" names
27809for the geometry manager methods have been added,
27810e.g. "grid_columnconfigure()" instead of "columnconfigure()". The old
27811shorter names still work, and where there's ambiguity, pack wins over
27812place wins over grid. Also, the bind_class method now returns its
27813value.
27814
27815- New, RFC-822 conformant parsing of email addresses and address lists
27816in the rfc822 module, courtesy Ben Escoto.
27817
27818- New, revamped tkappinit.c with support for popular packages (PIL,
27819TIX, BLT, TOGL). For the last three, you need to execute the Tcl
27820command "load {} Tix" (or Blt, or Togl) to gain access to them.
27821The Modules/Setup line for the _tkinter module has been rewritten
27822using the cool line-breaking feature of most Bourne shells.
27823
27824- New socket method connect_ex() returns the error code from connect()
27825instead of raising an exception on errors; this makes the logic
27826required for asynchronous connects simpler and more efficient.
27827
27828- New "locale" module with (still experimental) interface to the
Antoine Pitroufbd4f802012-08-11 16:51:50 +020027829standard C library locale interface, courtesy Martin von Löwis. This
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027830does not repeat my mistake in 1.5a4 of always calling
27831setlocale(LC_ALL, ""). In fact, we've pretty much decided that
27832Python's standard numerical formatting operations should always use
27833the conventions for the C locale; the locale module contains utility
27834functions to format numbers according to the user specified locale.
27835(All this is accomplished by an explicit call to setlocale(LC_NUMERIC,
27836"C") after locale-changing calls.) See the library manual. (Alas, the
27837promised changes to the "re" module for locale support have not been
27838materialized yet. If you care, volunteer!)
27839
27840- Memory leak plugged in Py_BuildValue when building a dictionary.
27841
27842- Shared modules can now live inside packages (hierarchical module
27843namespaces). No changes to the shared module itself are needed.
27844
27845- Improved policy for __builtins__: this is a module in __main__ and a
27846dictionary everywhere else.
27847
27848- Python no longer catches SIGHUP and SIGTERM by default. This was
27849impossible to get right in the light of thread contexts. If you want
27850your program to clean up when a signal happens, use the signal module
27851to set up your own signal handler.
27852
27853- New Python/C API PyNumber_CoerceEx() does not return an exception
27854when no coercion is possible. This is used to fix a problem where
27855comparing incompatible numbers for equality would raise an exception
27856rather than return false as in Python 1.4 -- it once again will return
27857false.
27858
27859- The errno module is changed again -- the table of error messages
27860(errorstr) is removed. Instead, you can use os.strerror(). This
27861removes redundance and a potential locale dependency.
27862
27863- New module xmllib, to parse XML files. By Sjoerd Mullender.
27864
27865- New C API PyOS_AfterFork() is called after fork() in posixmodule.c.
27866It resets the signal module's notion of what the current process ID
27867and thread are, so that signal handlers will work after (and across)
27868calls to os.fork().
27869
27870- Fixed most occurrences of fatal errors due to missing thread state.
27871
27872- For vgrind (a flexible source pretty printer) fans, there's a simple
27873Python definition in Misc/vgrindefs, courtesy Neale Pickett.
27874
27875- Fixed memory leak in exec statement.
27876
27877- The test.pystone module has a new function, pystones(loops=LOOPS),
27878which returns a (benchtime, stones) tuple. The main() function now
27879calls this and prints the report.
27880
27881- Package directories now *require* the presence of an __init__.py (or
27882__init__.pyc) file before they are considered as packages. This is
27883done to prevent accidental subdirectories with common names from
27884overriding modules with the same name.
27885
27886- Fixed some strange exceptions in __del__ methods in library modules
Georg Brandl93dc9eb2010-03-14 10:56:14 +000027887(e.g. urllib). This happens because the built-in names are already
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027888deleted by the time __del__ is called. The solution (a hack, but it
27889works) is to set some instance variables to 0 instead of None.
27890
27891- The table of built-in module initializers is replaced by a pointer
27892variable. This makes it possible to switch to a different table at
27893run time, e.g. when a collection of modules is loaded from a shared
27894library. (No example code of how to do this is given, but it is
27895possible.) The table is still there of course, its name prefixed with
27896an underscore and used to initialize the pointer.
27897
27898- The warning about a thread still having a frame now only happens in
27899verbose mode.
27900
Martin Panter3e5b1d32016-07-28 03:48:29 +000027901- Change the signal finalization so that it also resets the signal
Guido van Rossum439d1fa1998-12-21 21:41:14 +000027902handlers. After this has been called, our signal handlers are no
27903longer active!
27904
27905- New version of tokenize.py (by Ka-Ping Yee) recognizes raw string
27906literals. There's now also a test fort this module.
27907
27908- The copy module now also uses __dict__.update(state) instead of
27909going through individual attribute assignments, for class instances
27910without a __setstate__ method.
27911
27912- New module reconvert translates old-style (regex module) regular
27913expressions to new-style (re module, Perl-style) regular expressions.
27914
27915- Most modules that used to use the regex module now use the re
27916module. The grep module has a new pgrep() function which uses
27917Perl-style regular expressions.
27918
27919- The (very old, backwards compatibility) regexp.py module has been
27920deleted.
27921
27922- Restricted execution (rexec): added the pcre module (support for the
27923re module) to the list of trusted extension modules.
27924
27925- New version of Jim Fulton's CObject object type, adds
27926PyCObject_FromVoidPtrAndDesc() and PyCObject_GetDesc() APIs.
27927
27928- Some patches to Lee Busby's fpectl mods that accidentally didn't
27929make it into 1.5a4.
27930
27931- In the string module, add an optional 4th argument to count(),
27932matching find() etc.
27933
27934- Patch for the nntplib module by Charles Waldman to add optional user
27935and password arguments to NNTP.__init__(), for nntp servers that need
27936them.
27937
27938- The str() function for class objects now returns
27939"modulename.classname" instead of returning the same as repr().
27940
27941- The parsing of \xXX escapes no longer relies on sscanf().
27942
27943- The "sharedmodules" subdirectory of the installation is renamed to
27944"lib-dynload". (You may have to edit your Modules/Setup file to fix
27945this in an existing installation!)
27946
27947- Fixed Don Beaudry's mess-up with the OPT test in the configure
27948script. Certain SGI platforms will still issue a warning for each
27949compile; there's not much I can do about this since the compiler's
27950exit status doesn't indicate that I was using an obsolete option.
27951
27952- Fixed Barry's mess-up with {}.get(), and added test cases for it.
27953
27954- Shared libraries didn't quite work under AIX because of the change
27955in status of the GNU readline interface. Fix due to by Vladimir
27956Marangozov.
27957
27958
27959======================================================================
27960
27961
27962From 1.5a3 to 1.5a4
27963===================
27964
27965- faqwiz.py: version 0.8; Recognize https:// as URL; <html>...</html>
27966feature; better install instructions; removed faqmain.py (which was an
27967older version).
27968
27969- nntplib.py: Fixed some bugs reported by Lars Wirzenius (to Debian)
27970about the treatment of lines starting with '.'. Added a minimal test
27971function.
27972
27973- struct module: ignore most whitespace in format strings.
27974
27975- urllib.py: close the socket and temp file in URLopener.retrieve() so
27976that multiple retrievals using the same connection work.
27977
27978- All standard exceptions are now classes by default; use -X to make
27979them strings (for backward compatibility only).
27980
27981- There's a new standard exception hierarchy, defined in the standard
27982library module exceptions.py (which you never need to import
27983explicitly). See
27984http://grail.cnri.reston.va.us/python/essays/stdexceptions.html for
27985more info.
27986
27987- Three new C API functions:
27988
27989 - int PyErr_GivenExceptionMatches(obj1, obj2)
27990
27991 Returns 1 if obj1 and obj2 are the same object, or if obj1 is an
27992 instance of type obj2, or of a class derived from obj2
27993
27994 - int PyErr_ExceptionMatches(obj)
27995
27996 Higher level wrapper around PyErr_GivenExceptionMatches() which uses
27997 PyErr_Occurred() as obj1. This will be the more commonly called
27998 function.
27999
28000 - void PyErr_NormalizeException(typeptr, valptr, tbptr)
28001
28002 Normalizes exceptions, and places the normalized values in the
28003 arguments. If type is not a class, this does nothing. If type is a
28004 class, then it makes sure that value is an instance of the class by:
28005
28006 1. if instance is of the type, or a class derived from type, it does
28007 nothing.
28008
28009 2. otherwise it instantiates the class, using the value as an
28010 argument. If value is None, it uses an empty arg tuple, and if
28011 the value is a tuple, it uses just that.
28012
28013- Another new C API function: PyErr_NewException() creates a new
28014exception class derived from Exception; when -X is given, it creates a
28015new string exception.
28016
28017- core interpreter: remove the distinction between tuple and list
28018unpacking; allow an arbitrary sequence on the right hand side of any
28019unpack instruction. (UNPACK_LIST and UNPACK_TUPLE now do the same
28020thing, which should really be called UNPACK_SEQUENCE.)
28021
28022- classes: Allow assignments to an instance's __dict__ or __class__,
28023so you can change ivars (including shared ivars -- shock horror) and
28024change classes dynamically. Also make the check on read-only
28025attributes of classes less draconic -- only the specials names
28026__dict__, __bases__, __name__ and __{get,set,del}attr__ can't be
28027assigned.
28028
28029- Two new built-in functions: issubclass() and isinstance(). Both
28030take classes as their second arguments. The former takes a class as
28031the first argument and returns true iff first is second, or is a
28032subclass of second. The latter takes any object as the first argument
28033and returns true iff first is an instance of the second, or any
28034subclass of second.
28035
28036- configure: Added configuration tests for presence of alarm(),
28037pause(), and getpwent().
28038
28039- Doc/Makefile: changed latex2html targets.
28040
28041- classes: Reverse the search order for the Don Beaudry hook so that
28042the first class with an applicable hook wins. Makes more sense.
28043
28044- Changed the checks made in Py_Initialize() and Py_Finalize(). It is
28045now legal to call these more than once. The first call to
28046Py_Initialize() initializes, the first call to Py_Finalize()
Martin Panter8f265652016-04-19 04:03:41 +000028047finalizes. There's also a new API, Py_IsInitialized() which checks
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028048whether we are already initialized (in case you want to leave things
28049as they were).
28050
28051- Completely disable the declarations for malloc(), realloc() and
28052free(). Any 90's C compiler has these in header files, and the tests
28053to decide whether to suppress the declarations kept failing on some
28054platforms.
28055
28056- *Before* (instead of after) signalmodule.o is added, remove both
28057intrcheck.o and sigcheck.o. This should get rid of warnings in ar or
28058ld on various systems.
28059
28060- Added reop to PC/config.c
28061
28062- configure: Decided to use -Aa -D_HPUX_SOURCE on HP-UX platforms.
28063Removed outdated HP-UX comments from README. Added Cray T3E comments.
28064
28065- Various renames of statically defined functions that had name
28066conflicts on some systems, e.g. strndup (GNU libc), join (Cray),
28067roundup (sys/types.h).
28068
28069- urllib.py: Interpret three slashes in file: URL as local file (for
28070Netscape on Windows/Mac).
28071
28072- copy.py: Make sure the objects returned by __getinitargs__() are
28073kept alive (in the memo) to avoid a certain kind of nasty crash. (Not
Martin Panter0be894b2016-09-07 12:03:06 +000028074easily reproducible because it requires a later call to
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028075__getinitargs__() to return a tuple that happens to be allocated at
28076the same address.)
28077
28078- Added definition of AR to toplevel Makefile. Renamed @buildno temp
28079file to buildno1.
28080
28081- Moved Include/assert.h to Parser/assert.h, which seems to be the
28082only place where it's needed.
28083
28084- Tweaked the dictionary lookup code again for some more speed
28085(Vladimir Marangozov).
28086
28087- NT build: Changed the way python15.lib is included in the other
28088projects. Per Mark Hammond's suggestion, add it to the extra libs in
28089Settings instead of to the project's source files.
28090
28091- regrtest.py: Change default verbosity so that there are only three
28092levels left: -q, default and -v. In default mode, the name of each
28093test is now printed. -v is the same as the old -vv. -q is more quiet
28094than the old default mode.
28095
28096- Removed the old FAQ from the distribution. You now have to get it
28097from the web!
28098
28099- Removed the PC/make_nt.in file from the distribution; it is no
28100longer needed.
28101
28102- Changed the build sequence so that shared modules are built last.
28103This fixes things for AIX and doesn't hurt elsewhere.
28104
28105- Improved test for GNU MP v1 in mpzmodule.c
28106
28107- fileobject.c: ftell() on Linux discards all buffered data; changed
28108read() code to use lseek() instead to get the same effect
28109
28110- configure.in, configure, importdl.c: NeXT sharedlib fixes
28111
28112- tupleobject.c: PyTuple_SetItem asserts refcnt==1
28113
28114- resource.c: Different strategy regarding whether to declare
28115getrusage() and getpagesize() -- #ifdef doesn't work, Linux has
28116conflicting decls in its headers. Choice: only declare the return
28117type, not the argument prototype, and not on Linux.
28118
28119- importdl.c, configure*: set sharedlib extensions properly for NeXT
28120
28121- configure*, Makefile.in, Modules/Makefile.pre.in: AIX shared libraries
28122fixed; moved addition of PURIFY to LINKCC to configure
28123
28124- reopmodule.c, regexmodule.c, regexpr.c, zlibmodule.c: needed casts
28125added to shup up various compilers.
28126
28127- _tkinter.c: removed buggy mac #ifndef
28128
28129- Doc: various Mac documentation changes, added docs for 'ic' module
28130
28131- PC/make_nt.in: deleted
28132
28133- test_time.py, test_strftime.py: tweaks to catch %Z (which may return
28134"")
28135
28136- test_rotor.py: print b -> print `b`
28137
28138- Tkinter.py: (tagOrId) -> (tagOrId,)
28139
28140- Tkinter.py: the Tk class now also has a configure() method and
28141friends (they have been moved to the Misc class to accomplish this).
28142
28143- dict.get(key[, default]) returns dict[key] if it exists, or default
28144if it doesn't. The default defaults to None. This is quicker for
28145some applications than using either has_key() or try:...except
28146KeyError:....
28147
28148- Tools/webchecker/: some small changes to webchecker.py; added
28149websucker.py (a simple web site mirroring script).
28150
28151- Dictionary objects now have a get() method (also in UserDict.py).
28152dict.get(key, default) returns dict[key] if it exists and default
28153otherwise; default defaults to None.
28154
28155- Tools/scripts/logmerge.py: print the author, too.
28156
28157- Changes to import: support for "import a.b.c" is now built in. See
28158http://grail.cnri.reston.va.us/python/essays/packages.html
28159for more info. Most important deviations from "ni.py": __init__.py is
28160executed in the package's namespace instead of as a submodule; and
28161there's no support for "__" or "__domain__". Note that "ni.py" is not
28162changed to match this -- it is simply declared obsolete (while at the
28163same time, it is documented...:-( ).
28164Unfortunately, "ihooks.py" has not been upgraded (but see "knee.py"
28165for an example implementation of hierarchical module import written in
28166Python).
28167
28168- More changes to import: the site.py module is now imported by
28169default when Python is initialized; use -S to disable it. The site.py
28170module extends the path with several more directories: site-packages
28171inside the lib/python1.5/ directory, site-python in the lib/
28172directory, and pathnames mentioned in *.pth files found in either of
28173those directories. See
28174http://grail.cnri.reston.va.us/python/essays/packages.html
28175for more info.
28176
28177- Changes to standard library subdirectory names: those subdirectories
28178that are not packages have been renamed with a hypen in their name,
28179e.g. lib-tk, lib-stdwin, plat-win, plat-linux2, plat-sunos5, dos-8x3.
28180The test suite is now a package -- to run a test, you must now use
28181"import test.test_foo".
28182
28183- A completely new re.py module is provided (thanks to Andrew
28184Kuchling, Tim Peters and Jeffrey Ollie) which uses Philip Hazel's
28185"pcre" re compiler and engine. For a while, the "old" re.py (which
28186was new in 1.5a3!) will be kept around as re1.py. The "old" regex
28187module and underlying parser and engine are still present -- while
28188regex is now officially obsolete, it will probably take several major
28189release cycles before it can be removed.
28190
28191- The posix module now has a strerror() function which translates an
28192error code to a string.
28193
28194- The emacs.py module (which was long obsolete) has been removed.
28195
28196- The universal makefile Misc/Makefile.pre.in now features an
28197"install" target. By default, installed shared libraries go into
28198$exec_prefix/lib/python$VERSION/site-packages/.
28199
28200- The install-sh script is installed with the other configuration
28201specific files (in the config/ subdirectory).
28202
28203- It turns out whatsound.py and sndhdr.py were identical modules.
28204Since there's also an imghdr.py file, I propose to make sndhdr.py the
28205official one. For compatibility, whatsound.py imports * from
28206sndhdr.py.
28207
28208- Class objects have a new attribute, __module__, giving the name of
28209the module in which they were declared. This is useful for pickle and
28210for printing the full name of a class exception.
28211
28212- Many extension modules no longer issue a fatal error when their
28213initialization fails; the importing code now checks whether an error
28214occurred during module initialization, and correctly propagates the
28215exception to the import statement.
28216
28217- Most extension modules now raise class-based exceptions (except when
28218-X is used).
28219
28220- Subtle changes to PyEval_{Save,Restore}Thread(): always swap the
28221thread state -- just don't manipulate the lock if it isn't there.
28222
28223- Fixed a bug in Python/getopt.c that made it do the wrong thing when
28224an option was a single '-'. Thanks to Andrew Kuchling.
28225
28226- New module mimetypes.py will guess a MIME type from a filename's
28227extension.
28228
28229- Windows: the DLL version is now settable via a resource rather than
28230being hardcoded. This can be used for "branding" a binary Python
28231distribution.
28232
28233- urllib.py is now threadsafe -- it now uses re instead of regex, and
28234sys.exc_info() instead of sys.exc_{type,value}.
28235
28236- Many other library modules that used to use
28237sys.exc_{type,value,traceback} are now more thread-safe by virtue of
28238using sys.exc_info().
28239
28240- The functions in popen2 have an optional buffer size parameter.
28241Also, the command argument can now be either a string (passed to the
28242shell) or a list of arguments (passed directly to execv).
28243
28244- Alas, the thread support for _tkinter released with 1.5a3 didn't
28245work. It's been rewritten. The bad news is that it now requires a
28246modified version of a file in the standard Tcl distribution, which you
28247must compile with a -I option pointing to the standard Tcl source
28248tree. For this reason, the thread support is disabled by default.
28249
28250- The errno extension module adds two tables: errorcode maps errno
28251numbers to errno names (e.g. EINTR), and errorstr maps them to
28252message strings. (The latter is redundant because the new call
28253posix.strerror() now does the same, but alla...) (Marc-Andre Lemburg)
28254
28255- The readline extension module now provides some interfaces to
28256internal readline routines that make it possible to write a completer
28257in Python. An example completer, rlcompleter.py, is provided.
28258
28259 When completing a simple identifier, it completes keywords,
28260 built-ins and globals in __main__; when completing
28261 NAME.NAME..., it evaluates (!) the expression up to the last
28262 dot and completes its attributes.
28263
28264 It's very cool to do "import string" type "string.", hit the
28265 completion key (twice), and see the list of names defined by
28266 the string module!
28267
28268 Tip: to use the tab key as the completion key, call
28269
28270 readline.parse_and_bind("tab: complete")
28271
28272- The traceback.py module has a new function tb_lineno() by Marc-Andre
28273Lemburg which extracts the line number from the linenumber table in
Martin Panter69332c12016-08-04 13:07:31 +000028274the code object. Apparently the traceback object doesn't contain the
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028275right linenumber when -O is used. Rather than guessing whether -O is
28276on or off, the module itself uses tb_lineno() unconditionally.
28277
28278- Fixed Demo/tkinter/matt/canvas-moving-or-creating.py: change bind()
28279to tag_bind() so it works again.
28280
28281- The pystone script is now a standard library module. Example use:
28282"import test.pystone; test.pystone.main()".
28283
28284- The import of the readline module in interactive mode is now also
28285attempted when -i is specified. (Yes, I know, giving in to Marc-Andre
28286Lemburg, who asked for this. :-)
28287
28288- rfc822.py: Entirely rewritten parseaddr() function by Sjoerd
28289Mullender, to be closer to the standard. This fixes the getaddr()
28290method. Unfortunately, getaddrlist() is as broken as ever, since it
28291splits on commas without regard for RFC 822 quoting conventions.
28292
28293- pprint.py: correctly emit trailing "," in singleton tuples.
28294
28295- _tkinter.c: export names for its type objects, TkappType and
28296TkttType.
28297
28298- pickle.py: use __module__ when defined; fix a particularly hard to
28299reproduce bug that confuses the memo when temporary objects are
28300returned by custom pickling interfaces; and a semantic change: when
28301unpickling the instance variables of an instance, use
28302inst.__dict__.update(value) instead of a for loop with setattr() over
28303the value.keys(). This is more consistent (the pickling doesn't use
28304getattr() either but pickles inst.__dict__) and avoids problems with
28305instances that have a __setattr__ hook. But it *is* a semantic change
28306(because the setattr hook is no longer used). So beware!
28307
28308- config.h is now installed (at last) in
28309$exec_prefix/include/python1.5/. For most sites, this means that it
28310is actually in $prefix/include/python1.5/, with all the other Python
28311include files, since $prefix and $exec_prefix are the same by
28312default.
28313
28314- The imp module now supports parts of the functionality to implement
28315import of hierarchical module names. It now supports find_module()
28316and load_module() for all types of modules. Docstrings have been
28317added for those functions in the built-in imp module that are still
28318relevant (some old interfaces are obsolete). For a sample
28319implementation of hierarchical module import in Python, see the new
28320library module knee.py.
28321
28322- The % operator on string objects now allows arbitrary nested parens
28323in a %(...)X style format. (Brad Howes)
28324
28325- Reverse the order in which Setup and Setup.local are passed to the
28326makesetup script. This allows variable definitions in Setup.local to
28327override definitions in Setup. (But you'll still have to edit Setup
28328if you want to disable modules that are enabled by default, or if such
28329modules need non-standard options.)
28330
28331- Added PyImport_ImportModuleEx(name, globals, locals, fromlist); this
28332is like PyImport_ImporModule(name) but receives the globals and locals
28333dict and the fromlist arguments as well. (The name is a char*; the
28334others are PyObject*s).
28335
28336- The 'p' format in the struct extension module alloded to above is
28337new in 1.5a4.
28338
28339- The types.py module now uses try-except in a few places to make it
28340more likely that it can be imported in restricted mode. Some type
28341names are undefined in that case, e.g. CodeType (inaccessible),
28342FileType (not always accessible), and TracebackType and FrameType
28343(inaccessible).
28344
28345- In urllib.py: added separate administration of temporary files
28346created y URLopener.retrieve() so cleanup() can properly remove them.
28347The old code removed everything in tempcache which was a bad idea if
28348the user had passed a non-temp file into it. Also, in basejoin(),
28349interpret relative paths starting in "../". This is necessary if the
28350server uses symbolic links.
28351
28352- The Windows build procedure and project files are now based on
28353Microsoft Visual C++ 5.x. The build now takes place in the PCbuild
28354directory. It is much more robust, and properly builds separate Debug
28355and Release versions. (The installer will be added shortly.)
28356
28357- Added casts and changed some return types in regexpr.c to avoid
28358compiler warnings or errors on some platforms.
28359
28360- The AIX build tools for shared libraries now supports VPATH. (Donn
28361Cave)
28362
28363- By default, disable the "portable" multimedia modules audioop,
28364imageop, and rgbimg, since they don't work on 64-bit platforms.
28365
28366- Fixed a nasty bug in cStringIO.c when code was actually using the
28367close() method (the destructors would try to free certain fields a
28368second time).
28369
28370- For those who think they need it, there's a "user.py" module. This
28371is *not* imported by default, but can be imported to run user-specific
28372setup commands, ~/.pythonrc.py.
28373
28374- Various speedups suggested by Fredrik Lundh, Marc-Andre Lemburg,
28375Vladimir Marangozov, and others.
28376
28377- Added os.altsep; this is '/' on DOS/Windows, and None on systems
28378with a sane filename syntax.
28379
28380- os.py: Write out the dynamic OS choice, to avoid exec statements.
28381Adding support for a new OS is now a bit more work, but I bet that
28382'dos' or 'nt' will cover most situations...
28383
28384- The obsolete exception AccessError is now really gone.
28385
28386- Tools/faqwiz/: New installation instructions show how to maintain
28387multiple FAQs. Removed bootstrap script from end of faqwiz.py module.
28388Added instructions to bootstrap script, too. Version bumped to 0.8.1.
28389Added <html>...</html> feature suggested by Skip Montanaro. Added
28390leading text for Roulette, default to 'Hit Reload ...'. Fix typo in
28391default SRCDIR.
28392
28393- Documentation for the relatively new modules "keyword" and "symbol"
28394has been added (to the end of the section on the parser extension
28395module).
28396
28397- In module bisect.py, but functions have two optional argument 'lo'
28398and 'hi' which allow you to specify a subsequence of the array to
28399operate on.
28400
28401- In ftplib.py, changed most methods to return their status (even when
28402it is always "200 OK") rather than swallowing it.
28403
28404- main() now calls setlocale(LC_ALL, ""), if setlocale() and
28405<locale.h> are defined.
28406
28407- Changes to configure.in, the configure script, and both
28408Makefile.pre.in files, to support SGI's SGI_ABI platform selection
28409environment variable.
28410
28411
28412======================================================================
28413
28414
28415From 1.4 to 1.5a3
28416=================
28417
28418Security
28419--------
28420
28421- If you are using the setuid script C wrapper (Misc/setuid-prog.c),
28422please use the new version. The old version has a huge security leak.
28423
28424Miscellaneous
28425-------------
28426
28427- Because of various (small) incompatible changes in the Python
28428bytecode interpreter, the magic number for .pyc files has changed
28429again.
28430
28431- The default module search path is now much saner. Both on Unix and
28432Windows, it is essentially derived from the path to the executable
28433(which can be overridden by setting the environment variable
28434$PYTHONHOME). The value of $PYTHONPATH on Windows is now inserted in
28435front of the default path, like in Unix (instead of overriding the
28436default path). On Windows, the directory containing the executable is
28437added to the end of the path.
28438
28439- A new version of python-mode.el for Emacs has been included. Also,
28440a new file ccpy-style.el has been added to configure Emacs cc-mode for
28441the preferred style in Python C sources.
28442
28443- On Unix, when using sys.argv[0] to insert the script directory in
28444front of sys.path, expand a symbolic link. You can now install a
28445program in a private directory and have a symbolic link to it in a
28446public bin directory, and it will put the private directory in the
28447module search path. Note that the symlink is expanded in sys.path[0]
28448but not in sys.argv[0], so you can still tell the name by which you
28449were invoked.
28450
28451- It is now recommended to use ``#!/usr/bin/env python'' instead of
28452``#!/usr/local/bin/python'' at the start of executable scripts, except
28453for CGI scripts. It has been determined that the use of /usr/bin/env
28454is more portable than that of /usr/local/bin/python -- scripts almost
28455never have to be edited when the Python interpreter lives in a
28456non-standard place. Note that this doesn't work for CGI scripts since
28457the python executable often doesn't live in the HTTP server's default
28458search path.
28459
28460- The silly -s command line option and the corresponding
28461PYTHONSUPPRESS environment variable (and the Py_SuppressPrint global
28462flag in the Python/C API) are gone.
28463
28464- Most problems on 64-bit platforms should now be fixed. Andrew
28465Kuchling helped. Some uncommon extension modules are still not
28466clean (image and audio ops?).
28467
28468- Fixed a bug where multiple anonymous tuple arguments would be mixed up
28469when using the debugger or profiler (reported by Just van Rossum).
28470The simplest example is ``def f((a,b),(c,d)): print a,b,c,d''; this
28471would print the wrong value when run under the debugger or profiler.
28472
28473- The hacks that the dictionary implementation used to speed up
28474repeated lookups of the same C string were removed; these were a
28475source of subtle problems and don't seem to serve much of a purpose
28476any longer.
28477
28478- All traces of support for the long dead access statement have been
28479removed from the sources.
28480
28481- Plugged the two-byte memory leak in the tokenizer when reading an
28482interactive EOF.
28483
28484- There's a -O option to the interpreter that removes SET_LINENO
28485instructions and assert statements (see below); it uses and produces
28486.pyo files instead of .pyc files. The speedup is only a few percent
28487in most cases. The line numbers are still available in the .pyo file,
28488as a separate table (which is also available in .pyc files). However,
28489the removal of the SET_LINENO instructions means that the debugger
28490(pdb) can't set breakpoints on lines in -O mode. The traceback module
28491contains a function to extract a line number from the code object
28492referenced in a traceback object. In the future it should be possible
28493to write external bytecode optimizers that create better optimized
28494.pyo files, and there should be more control over optimization;
28495consider the -O option a "teaser". Without -O, the assert statement
28496actually generates code that first checks __debug__; if this variable
28497is false, the assertion is not checked. __debug__ is a built-in
28498variable whose value is initialized to track the -O flag (it's true
28499iff -O is not specified). With -O, no code is generated for assert
28500statements, nor for code of the form ``if __debug__: <something>''.
28501Sorry, no further constant folding happens.
28502
28503
28504Performance
28505-----------
28506
28507- It's much faster (almost twice for pystone.py -- see
28508Tools/scripts). See the entry on string interning below.
28509
28510- Some speedup by using separate free lists for method objects (both
28511the C and the Python variety) and for floating point numbers.
28512
28513- Big speedup by allocating frame objects with a single malloc() call.
28514The Python/C API for frames is changed (you shouldn't be using this
28515anyway).
28516
Victor Stinner554fd082014-03-17 22:33:49 +010028517- Significant speedup by inlining some common opcodes for common operand
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028518types (e.g. i+i, i-i, and list[i]). Fredrik Lundh.
28519
28520- Small speedup by reordering the method tables of some common
28521objects (e.g. list.append is now first).
28522
28523- Big optimization to the read() method of file objects. A read()
28524without arguments now attempts to use fstat to allocate a buffer of
28525the right size; for pipes and sockets, it will fall back to doubling
28526the buffer size. While that the improvement is real on all systems,
28527it is most dramatic on Windows.
28528
28529
28530Documentation
28531-------------
28532
28533- Many new pieces of library documentation were contributed, mostly by
28534Andrew Kuchling. Even cmath is now documented! There's also a
28535chapter of the library manual, "libundoc.tex", which provides a
28536listing of all undocumented modules, plus their status (e.g. internal,
28537obsolete, or in need of documentation). Also contributions by Sue
28538Williams, Skip Montanaro, and some module authors who succumbed to
28539pressure to document their own contributed modules :-). Note that
28540printing the documentation now kills fewer trees -- the margins have
28541been reduced.
28542
Victor Stinner554fd082014-03-17 22:33:49 +010028543- I have started documenting the Python/C API. Unfortunately this project
28544hasn't been completed yet. It will be complete before the final release of
28545Python 1.5, though. At the moment, it's better to read the LaTeX source
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028546than to attempt to run it through LaTeX and print the resulting dvi file.
28547
Victor Stinner554fd082014-03-17 22:33:49 +010028548- The posix module (and hence os.py) now has doc strings! Thanks to Neil
28549Schemenauer. I received a few other contributions of doc strings. In most
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028550other places, doc strings are still wishful thinking...
28551
28552
28553Language changes
28554----------------
28555
Victor Stinner554fd082014-03-17 22:33:49 +010028556- Private variables with leading double underscore are now a permanent
28557feature of the language. (These were experimental in release 1.4. I have
28558favorable experience using them; I can't label them "experimental"
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028559forever.)
28560
Victor Stinner554fd082014-03-17 22:33:49 +010028561- There's new string literal syntax for "raw strings". Prefixing a string
28562literal with the letter r (or R) disables all escape processing in the
28563string; for example, r'\n' is a two-character string consisting of a
28564backslash followed by the letter n. This combines with all forms of string
28565quotes; it is actually useful for triple quoted doc strings which might
28566contain references to \n or \t. An embedded quote prefixed with a
28567backslash does not terminate the string, but the backslash is still
28568included in the string; for example, r'\'' is a two-character string
28569consisting of a backslash and a quote. (Raw strings are also
28570affectionately known as Robin strings, after their inventor, Robin
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028571Friedrich.)
28572
28573- There's a simple assert statement, and a new exception
28574AssertionError. For example, ``assert foo > 0'' is equivalent to ``if
28575not foo > 0: raise AssertionError''. Sorry, the text of the asserted
28576condition is not available; it would be too complicated to generate
28577code for this (since the code is generated from a parse tree).
28578However, the text is displayed as part of the traceback!
28579
28580- The raise statement has a new feature: when using "raise SomeClass,
28581somevalue" where somevalue is not an instance of SomeClass, it
28582instantiates SomeClass(somevalue). In 1.5a4, if somevalue is an
28583instance of a *derived* class of SomeClass, the exception class raised
28584is set to somevalue.__class__, and SomeClass is ignored after that.
28585
28586- Duplicate keyword arguments are now detected at compile time;
28587f(a=1,a=2) is now a syntax error.
28588
28589
Georg Brandl93dc9eb2010-03-14 10:56:14 +000028590Changes to built-in features
28591----------------------------
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028592
28593- There's a new exception FloatingPointError (used only by Lee Busby's
28594patches to catch floating point exceptions, at the moment).
28595
28596- The obsolete exception ConflictError (presumably used by the long
28597obsolete access statement) has been deleted.
28598
Victor Stinner554fd082014-03-17 22:33:49 +010028599- There's a new function sys.exc_info() which returns the tuple
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028600(sys.exc_type, sys.exc_value, sys.exc_traceback) in a thread-safe way.
28601
Victor Stinner554fd082014-03-17 22:33:49 +010028602- There's a new variable sys.executable, pointing to the executable file
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028603for the Python interpreter.
28604
28605- The sort() methods for lists no longer uses the C library qsort(); I
28606wrote my own quicksort implementation, with lots of help (in the form
28607of a kind of competition) from Tim Peters. This solves a bug in
28608dictionary comparisons on some Solaris versions when Python is built
28609with threads, and makes sorting lists even faster.
28610
28611- The semantics of comparing two dictionaries have changed, to make
28612comparison of unequal dictionaries faster. A shorter dictionary is
28613always considered smaller than a larger dictionary. For dictionaries
28614of the same size, the smallest differing element determines the
28615outcome (which yields the same results as before in this case, without
28616explicit sorting). Thanks to Aaron Watters for suggesting something
28617like this.
28618
28619- The semantics of try-except have changed subtly so that calling a
28620function in an exception handler that itself raises and catches an
28621exception no longer overwrites the sys.exc_* variables. This also
28622alleviates the problem that objects referenced in a stack frame that
28623caught an exception are kept alive until another exception is caught
28624-- the sys.exc_* variables are restored to their previous value when
28625returning from a function that caught an exception.
28626
28627- There's a new "buffer" interface. Certain objects (e.g. strings and
Victor Stinner554fd082014-03-17 22:33:49 +010028628arrays) now support the "buffer" protocol. Buffer objects are acceptable
28629whenever formerly a string was required for a write operation; mutable
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028630buffer objects can be the target of a read operation using the call
Victor Stinner554fd082014-03-17 22:33:49 +010028631f.readinto(buffer). A cool feature is that regular expression matching now
28632also work on array objects. Contribution by Jack Jansen. (Needs
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028633documentation.)
28634
28635- String interning: dictionary lookups are faster when the lookup
28636string object is the same object as the key in the dictionary, not
28637just a string with the same value. This is done by having a pool of
28638"interned" strings. Most names generated by the interpreter are now
28639automatically interned, and there's a new built-in function intern(s)
28640that returns the interned version of a string. Interned strings are
28641not a different object type, and interning is totally optional, but by
28642interning most keys a speedup of about 15% was obtained for the
28643pystone benchmark.
28644
28645- Dictionary objects have several new methods; clear() and copy() have
28646the obvious semantics, while update(d) merges the contents of another
28647dictionary d into this one, overriding existing keys. The dictionary
28648implementation file is now called dictobject.c rather than the
28649confusing mappingobject.c.
28650
28651- The intrinsic function dir() is much smarter; it looks in __dict__,
28652__members__ and __methods__.
28653
28654- The intrinsic functions int(), long() and float() can now take a
28655string argument and then do the same thing as string.atoi(),
28656string.atol(), and string.atof(). No second 'base' argument is
28657allowed, and complex() does not take a string (nobody cared enough).
28658
28659- When a module is deleted, its globals are now deleted in two phases.
28660In the first phase, all variables whose name begins with exactly one
28661underscore are replaced by None; in the second phase, all variables
28662are deleted. This makes it possible to have global objects whose
28663destructors depend on other globals. The deletion order within each
28664phase is still random.
28665
28666- It is no longer an error for a function to be called without a
28667global variable __builtins__ -- an empty directory will be provided
28668by default.
28669
28670- Guido's corollary to the "Don Beaudry hook": it is now possible to
28671do metaprogramming by using an instance as a base class. Not for the
28672faint of heart; and undocumented as yet, but basically if a base class
28673is an instance, its class will be instantiated to create the new
28674class. Jim Fulton will love it -- it also works with instances of his
28675"extension classes", since it is triggered by the presence of a
28676__class__ attribute on the purported base class. See
28677Demo/metaclasses/index.html for an explanation and see that directory
28678for examples.
28679
28680- Another change is that the Don Beaudry hook is now invoked when
28681*any* base class is special. (Up to 1.5a3, the *last* special base
28682class is used; in 1.5a4, the more rational choice of the *first*
28683special base class is used.)
28684
28685- New optional parameter to the readlines() method of file objects.
28686This indicates the number of bytes to read (the actual number of bytes
28687read will be somewhat larger due to buffering reading until the end of
28688the line). Some optimizations have also been made to speed it up (but
28689not as much as read()).
28690
28691- Complex numbers no longer have the ".conj" pseudo attribute; use
28692z.conjugate() instead, or complex(z.real, -z.imag). Complex numbers
28693now *do* support the __members__ and __methods__ special attributes.
28694
28695- The complex() function now looks for a __complex__() method on class
28696instances before giving up.
28697
28698- Long integers now support arbitrary shift counts, so you can now
28699write 1L<<1000000, memory permitting. (Python 1.4 reports "outrageous
28700shift count for this.)
28701
28702- The hex() and oct() functions have been changed so that for regular
28703integers, they never emit a minus sign. For example, on a 32-bit
28704machine, oct(-1) now returns '037777777777' and hex(-1) returns
28705'0xffffffff'. While this may seem inconsistent, it is much more
28706useful. (For long integers, a minus sign is used as before, to fit
28707the result in memory :-)
28708
28709- The hash() function computes better hashes for several data types,
28710including strings, floating point numbers, and complex numbers.
28711
28712
28713New extension modules
28714---------------------
28715
28716- New extension modules cStringIO.c and cPickle.c, written by Jim
28717Fulton and other folks at Digital Creations. These are much more
28718efficient than their Python counterparts StringIO.py and pickle.py,
28719but don't support subclassing. cPickle.c clocks up to 1000 times
28720faster than pickle.py; cStringIO.c's improvement is less dramatic but
28721still significant.
28722
28723- New extension module zlibmodule.c, interfacing to the free zlib
28724library (gzip compatible compression). There's also a module gzip.py
28725which provides a higher level interface. Written by Andrew Kuchling
28726and Jeremy Hylton.
28727
28728- New module readline; see the "miscellaneous" section above.
28729
28730- New Unix extension module resource.c, by Jeremy Hylton, provides
28731access to getrlimit(), getrusage(), setrusage(), getpagesize(), and
28732related symbolic constants.
28733
28734- New extension puremodule.c, by Barry Warsaw, which interfaces to the
28735Purify(TM) C API. See also the file Misc/PURIFY.README. It is also
28736possible to enable Purify by simply setting the PURIFY Makefile
28737variable in the Modules/Setup file.
28738
28739
28740Changes in extension modules
28741----------------------------
28742
28743- The struct extension module has several new features to control byte
28744order and word size. It supports reading and writing IEEE floats even
28745on platforms where this is not the native format. It uses uppercase
28746format codes for unsigned integers of various sizes (always using
28747Python long ints for 'I' and 'L'), 's' with a size prefix for strings,
28748and 'p' for "Pascal strings" (with a leading length byte, included in
28749the size; blame Hannu Krosing; new in 1.5a4). A prefix '>' forces
28750big-endian data and '<' forces little-endian data; these also select
28751standard data sizes and disable automatic alignment (use pad bytes as
28752needed).
28753
28754- The array module supports uppercase format codes for unsigned data
28755formats (like the struct module).
28756
28757- The fcntl extension module now exports the needed symbolic
28758constants. (Formerly these were in FCNTL.py which was not available
28759or correct for all platforms.)
28760
28761- The extension modules dbm, gdbm and bsddb now check that the
28762database is still open before making any new calls.
28763
28764- The dbhash module is no more. Use bsddb instead. (There's a third
28765party interface for the BSD 2.x code somewhere on the web; support for
28766bsddb will be deprecated.)
28767
28768- The gdbm module now supports a sync() method.
28769
28770- The socket module now has some new functions: getprotobyname(), and
28771the set {ntoh,hton}{s,l}().
28772
28773- Various modules now export their type object: socket.SocketType,
28774array.ArrayType.
28775
28776- The socket module's accept() method now returns unknown addresses as
28777a tuple rather than raising an exception. (This can happen in
28778promiscuous mode.) Theres' also a new function getprotobyname().
28779
28780- The pthread support for the thread module now works on most platforms.
28781
28782- STDWIN is now officially obsolete. Support for it will eventually
28783be removed from the distribution.
28784
28785- The binascii extension module is now hopefully fully debugged.
28786(XXX Oops -- Fredrik Lundh promised me a uuencode fix that I never
28787received.)
28788
28789- audioop.c: added a ratecv() function; better handling of overflow in
28790add().
28791
28792- posixmodule.c: now exports the O_* flags (O_APPEND etc.). On
28793Windows, also O_TEXT and O_BINARY. The 'error' variable (the
28794exception is raises) is renamed -- its string value is now "os.error",
28795so newbies don't believe they have to import posix (or nt) to catch
28796it when they see os.error reported as posix.error. The execve()
28797function now accepts any mapping object for the environment.
28798
28799- A new version of the al (audio library) module for SGI was
28800contributed by Sjoerd Mullender.
28801
28802- The regex module has a new function get_syntax() which retrieves the
28803syntax setting set by set_syntax(). The code was also sanitized,
28804removing worries about unclean error handling. See also below for its
28805successor, re.py.
28806
28807- The "new" module (which creates new objects of various types) once
28808again has a fully functioning new.function() method. Dangerous as
28809ever! Also, new.code() has several new arguments.
28810
28811- A problem has been fixed in the rotor module: on systems with signed
28812characters, rotor-encoded data was not portable when the key contained
288138-bit characters. Also, setkey() now requires its argument rather
28814than having broken code to default it.
28815
28816- The sys.builtin_module_names variable is now a tuple. Another new
28817variables in sys is sys.executable (the full path to the Python
28818binary, if known).
28819
28820- The specs for time.strftime() have undergone some revisions. It
28821appears that not all format characters are supported in the same way
28822on all platforms. Rather than reimplement it, we note these
28823differences in the documentation, and emphasize the shared set of
28824features. There's also a thorough test set (that occasionally finds
28825problems in the C library implementation, e.g. on some Linuxes),
28826thanks to Skip Montanaro.
28827
28828- The nis module seems broken when used with NIS+; unfortunately
28829nobody knows how to fix it. It should still work with old NIS.
28830
28831
28832New library modules
28833-------------------
28834
28835- New (still experimental) Perl-style regular expression module,
28836re.py, which uses a new interface for matching as well as a new
28837syntax; the new interface avoids the thread-unsafety of the regex
28838interface. This comes with a helper extension reopmodule.c and vastly
28839rewritten regexpr.c. Most work on this was done by Jeffrey Ollie, Tim
28840Peters, and Andrew Kuchling. See the documentation libre.tex. In
288411.5, the old regex module is still fully supported; in the future, it
28842will become obsolete.
28843
28844- New module gzip.py; see zlib above.
28845
28846- New module keyword.py exports knowledge about Python's built-in
28847keywords. (New version by Ka-Ping Yee.)
28848
28849- New module pprint.py (with documentation) which supports
28850pretty-printing of lists, tuples, & dictionaries recursively. By Fred
28851Drake.
28852
28853- New module code.py. The function code.compile_command() can
28854determine whether an interactively entered command is complete or not,
28855distinguishing incomplete from invalid input. (XXX Unfortunately,
28856this seems broken at this moment, and I don't have the time to fix
28857it. It's probably better to add an explicit interface to the parser
28858for this.)
28859
28860- There is now a library module xdrlib.py which can read and write the
28861XDR data format as used by Sun RPC, for example. It uses the struct
28862module.
28863
28864
28865Changes in library modules
28866--------------------------
28867
28868- Module codehack.py is now completely obsolete.
28869
28870- The pickle.py module has been updated to make it compatible with the
28871new binary format that cPickle.c produces. By default it produces the
28872old all-ASCII format compatible with the old pickle.py, still much
28873faster than pickle.py; it will read both formats automatically. A few
28874other updates have been made.
28875
28876- A new helper module, copy_reg.py, is provided to register extensions
28877to the pickling code.
28878
28879- Revamped module tokenize.py is much more accurate and has an
28880interface that makes it a breeze to write code to colorize Python
28881source code. Contributed by Ka-Ping Yee.
28882
28883- In ihooks.py, ModuleLoader.load_module() now closes the file under
28884all circumstances.
28885
28886- The tempfile.py module has a new class, TemporaryFile, which creates
28887an open temporary file that will be deleted automatically when
28888closed. This works on Windows and MacOS as well as on Unix. (Jim
28889Fulton.)
28890
28891- Changes to the cgi.py module: Most imports are now done at the
28892top of the module, which provides a speedup when using ni (Jim
28893Fulton). The problem with file upload to a Windows platform is solved
28894by using the new tempfile.TemporaryFile class; temporary files are now
28895always opened in binary mode (Jim Fulton). The cgi.escape() function
28896now takes an optional flag argument that quotes '"' to '&quot;'. It
28897is now possible to invoke cgi.py from a command line script, to test
28898cgi scripts more easily outside an http server. There's an optional
28899limit to the size of uploads to POST (Skip Montanaro). Added a
28900'strict_parsing' option to all parsing functions (Jim Fulton). The
28901function parse_qs() now uses urllib.unquote() on the name as well as
28902the value of fields (Clarence Gardner). The FieldStorage class now
28903has a __len__() method.
28904
28905- httplib.py: the socket object is no longer closed; all HTTP/1.*
28906responses are now accepted; and it is now thread-safe (by not using
28907the regex module).
28908
28909- BaseHTTPModule.py: treat all HTTP/1.* versions the same.
28910
28911- The popen2.py module is now rewritten using a class, which makes
28912access to the standard error stream and the process id of the
28913subprocess possible.
28914
28915- Added timezone support to the rfc822.py module, in the form of a
28916getdate_tz() method and a parsedate_tz() function; also a mktime_tz().
28917Also added recognition of some non-standard date formats, by Lars
28918Wirzenius, and RFC 850 dates (Chris Lawrence).
28919
28920- mhlib.py: various enhancements, including almost compatible parsing
28921of message sequence specifiers without invoking a subprocess. Also
28922added a createmessage() method by Lars Wirzenius.
28923
Victor Stinner554fd082014-03-17 22:33:49 +010028924- The StringIO.StringIO class now supports readline(nbytes). (Lars
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028925Wirzenius.) (Of course, you should be using cStringIO for performance.)
28926
28927- UserDict.py supports the new dictionary methods as well.
28928
28929- Improvements for whrandom.py by Tim Peters: use 32-bit arithmetic to
28930speed it up, and replace 0 seed values by 1 to avoid degeneration.
28931A bug was fixed in the test for invalid arguments.
28932
28933- Module ftplib.py: added support for parsing a .netrc file (Fred
28934Drake). Also added an ntransfercmd() method to the FTP class, which
28935allows access to the expected size of a transfer when available, and a
28936parse150() function to the module which parses the corresponding 150
28937response.
28938
28939- urllib.py: the ftp cache is now limited to 10 entries. Added
28940quote_plus() and unquote_plus() functions which are like quote() and
28941unquote() but also replace spaces with '+' or vice versa, for
28942encoding/decoding CGI form arguments. Catch all errors from the ftp
28943module. HTTP requests now add the Host: header line. The proxy
28944variable names are now mapped to lower case, for Windows. The
28945spliturl() function no longer erroneously throws away all data past
28946the first newline. The basejoin() function now intereprets "../"
28947correctly. I *believe* that the problems with "exception raised in
28948__del__" under certain circumstances have been fixed (mostly by
28949changes elsewher in the interpreter).
28950
28951- In urlparse.py, there is a cache for results in urlparse.urlparse();
28952its size limit is set to 20. Also, new URL schemes shttp, https, and
28953snews are "supported".
28954
28955- shelve.py: use cPickle and cStringIO when available. Also added
28956a sync() method, which calls the database's sync() method if there is
28957one.
28958
28959- The mimetools.py module now uses the available Python modules for
28960decoding quoted-printable, uuencode and base64 formats, rather than
28961creating a subprocess.
28962
28963- The python debugger (pdb.py, and its base class bdb.py) now support
28964conditional breakpoints. See the docs.
28965
28966- The modules base64.py, uu.py and quopri.py can now be used as simple
28967command line utilities.
28968
28969- Various small fixes to the nntplib.py module that I can't bother to
28970document in detail.
28971
Victor Stinner554fd082014-03-17 22:33:49 +010028972- Sjoerd Mullender's mimify.py module now supports base64 encoding and
28973includes functions to handle the funny encoding you sometimes see in mail
Guido van Rossum439d1fa1998-12-21 21:41:14 +000028974headers. It is now documented.
28975
28976- mailbox.py: Added BabylMailbox. Improved the way the mailbox is
28977gotten from the environment.
28978
28979- Many more modules now correctly open files in binary mode when this
28980is necessary on non-Unix platforms.
28981
28982- The copying functions in the undocumented module shutil.py are
28983smarter.
28984
28985- The Writer classes in the formatter.py module now have a flush()
28986method.
28987
28988- The sgmllib.py module accepts hyphens and periods in the middle of
28989attribute names. While this is against the SGML standard, there is
28990some HTML out there that uses this...
28991
28992- The interface for the Python bytecode disassembler module, dis.py,
28993has been enhanced quite a bit. There's now one main function,
28994dis.dis(), which takes almost any kind of object (function, module,
28995class, instance, method, code object) and disassembles it; without
28996arguments it disassembles the last frame of the last traceback. The
28997other functions have changed slightly, too.
28998
28999- The imghdr.py module recognizes new image types: BMP, PNG.
29000
29001- The string.py module has a new function replace(str, old, new,
29002[maxsplit]) which does substring replacements. It is actually
29003implemented in C in the strop module. The functions [r]find() an
29004[r]index() have an optional 4th argument indicating the end of the
29005substring to search, alsoo implemented by their strop counterparts.
29006(Remember, never import strop -- import string uses strop when
29007available with zero overhead.)
29008
29009- The string.join() function now accepts any sequence argument, not
29010just lists and tuples.
29011
29012- The string.maketrans() requires its first two arguments to be
29013present. The old version didn't require them, but there's not much
29014point without them, and the documentation suggests that they are
29015required, so we fixed the code to match the documentation.
29016
29017- The regsub.py module has a function clear_cache(), which clears its
29018internal cache of compiled regular expressions. Also, the cache now
29019takes the current syntax setting into account. (However, this module
29020is now obsolete -- use the sub() or subn() functions or methods in the
29021re module.)
29022
29023- The undocumented module Complex.py has been removed, now that Python
29024has built-in complex numbers. A similar module remains as
29025Demo/classes/Complex.py, as an example.
29026
29027
29028Changes to the build process
29029----------------------------
29030
29031- The way GNU readline is configured is totally different. The
29032--with-readline configure option is gone. It is now an extension
29033module, which may be loaded dynamically. You must enable it (and
Thomas Wouters89f507f2006-12-13 04:49:30 +000029034specify the correct libraries to link with) in the Modules/Setup file.
Guido van Rossum439d1fa1998-12-21 21:41:14 +000029035Importing the module installs some hooks which enable command line
29036editing. When the interpreter shell is invoked interactively, it
29037attempts to import the readline module; when this fails, the default
29038input mechanism is used. The hook variables are PyOS_InputHook and
29039PyOS_ReadlineFunctionPointer. (Code contributed by Lee Busby, with
29040ideas from William Magro.)
29041
29042- New build procedure: a single library, libpython1.5.a, is now built,
29043which contains absolutely everything except for a one-line main()
29044program (which calls Py_Main(argc, argv) to start the interpreter
29045shell). This makes life much simpler for applications that need to
29046embed Python. The serial number of the build is now included in the
29047version string (sys.version).
29048
29049- As far as I can tell, neither gcc -Wall nor the Microsoft compiler
29050emits a single warning any more when compiling Python.
29051
29052- A number of new Makefile variables have been added for special
29053situations, e.g. LDLAST is appended to the link command. These are
29054used by editing the Makefile or passing them on the make command
29055line.
29056
29057- A set of patches from Lee Busby has been integrated that make it
29058possible to catch floating point exceptions. Use the configure option
29059--with-fpectl to enable the patches; the extension modules fpectl and
29060fpetest provide control to enable/disable and test the feature,
29061respectively.
29062
29063- The support for shared libraries under AIX is now simpler and more
29064robust. Thanks to Vladimir Marangozov for revamping his own patches!
29065
29066- The Modules/makesetup script now reads a file Setup.local as well as
29067a file Setup. Most changes to the Setup script can be done by editing
29068Setup.local instead, which makes it easier to carry a particular setup
29069over from one release to the next.
29070
29071- The Modules/makesetup script now copies any "include" lines it
29072encounters verbatim into the output Makefile. It also recognizes .cxx
29073and .cpp as C++ source files.
29074
29075- The configure script is smarter about C compiler options; e.g. with
29076gcc it uses -O2 and -g when possible, and on some other platforms it
29077uses -Olimit 1500 to avoid a warning from the optimizer about the main
29078loop in ceval.c (which has more than 1000 basic blocks).
29079
29080- The configure script now detects whether malloc(0) returns a NULL
29081pointer or a valid block (of length zero). This avoids the nonsense
29082of always adding one byte to all malloc() arguments on most platforms.
29083
29084- The configure script has a new option, --with-dec-threads, to enable
29085DEC threads on DEC Alpha platforms. Also, --with-threads is now an
29086alias for --with-thread (this was the Most Common Typo in configure
29087arguments).
29088
29089- Many changes in Doc/Makefile; amongst others, latex2html is now used
29090to generate HTML from all latex documents.
29091
29092
29093Change to the Python/C API
29094--------------------------
29095
29096- Because some interfaces have changed, the PYTHON_API macro has been
29097bumped. Most extensions built for the old API version will still run,
29098but I can't guarantee this. Python prints a warning message on
29099version mismatches; it dumps core when the version mismatch causes a
29100serious problem :-)
29101
29102- I've completed the Grand Renaming, with the help of Roger Masse and
29103Barry Warsaw. This makes reading or debugging the code much easier.
29104Many other unrelated code reorganizations have also been carried out.
29105The allobjects.h header file is gone; instead, you would have to
29106include Python.h followed by rename2.h. But you're better off running
29107Tools/scripts/fixcid.py -s Misc/RENAME on your source, so you can omit
29108the rename2.h; it will disappear in the next release.
29109
29110- Various and sundry small bugs in the "abstract" interfaces have been
29111fixed. Thanks to all the (involuntary) testers of the Python 1.4
29112version! Some new functions have been added, e.g. PySequence_List(o),
29113equivalent to list(o) in Python.
29114
29115- New API functions PyLong_FromUnsignedLong() and
29116PyLong_AsUnsignedLong().
29117
29118- The API functions in the file cgensupport.c are no longer
29119supported. This file has been moved to Modules and is only ever
29120compiled when the SGI specific 'gl' module is built.
29121
29122- PyObject_Compare() can now raise an exception. Check with
29123PyErr_Occurred(). The comparison function in an object type may also
29124raise an exception.
29125
29126- The slice interface uses an upper bound of INT_MAX when no explicit
29127upper bound is given (e.x. for a[1:]). It used to ask the object for
29128its length and do the calculations.
29129
29130- Support for multiple independent interpreters. See Doc/api.tex,
29131functions Py_NewInterpreter() and Py_EndInterpreter(). Since the
29132documentation is incomplete, also see the new Demo/pysvr example
29133(which shows how to use these in a threaded application) and the
29134source code.
29135
29136- There is now a Py_Finalize() function which "de-initializes"
29137Python. It is possible to completely restart the interpreter
29138repeatedly by calling Py_Finalize() followed by Py_Initialize(). A
29139change of functionality in Py_Initialize() means that it is now a
29140fatal error to call it while the interpreter is already initialized.
29141The old, half-hearted Py_Cleanup() routine is gone. Use of Py_Exit()
29142is deprecated (it is nothing more than Py_Finalize() followed by
29143exit()).
29144
29145- There are no known memory leaks left. While Py_Finalize() doesn't
29146free *all* allocated memory (some of it is hard to track down),
29147repeated calls to Py_Finalize() and Py_Initialize() do not create
29148unaccessible heap blocks.
29149
29150- There is now explicit per-thread state. (Inspired by, but not the
29151same as, Greg Stein's free threading patches.)
29152
29153- There is now better support for threading C applications. There are
29154now explicit APIs to manipulate the interpreter lock. Read the source
29155or the Demo/pysvr example; the new functions are
29156PyEval_{Acquire,Release}{Lock,Thread}().
29157
29158- The test macro DEBUG has changed to Py_DEBUG, to avoid interference
29159with other libraries' DEBUG macros. Likewise for any other test
29160macros that didn't yet start with Py_.
29161
29162- New wrappers around malloc() and friends: Py_Malloc() etc. call
29163malloc() and call PyErr_NoMemory() when it fails; PyMem_Malloc() call
29164just malloc(). Use of these wrappers could be essential if multiple
29165memory allocators exist (e.g. when using certain DLL setups under
29166Windows). (Idea by Jim Fulton.)
29167
29168- New C API PyImport_Import() which uses whatever __import__() hook
29169that is installed for the current execution environment. By Jim
29170Fulton.
29171
29172- It is now possible for an extension module's init function to fail
29173non-fatally, by calling one of the PyErr_* functions and returning.
29174
29175- The PyInt_AS_LONG() and PyFloat_AS_DOUBLE() macros now cast their
29176argument to the proper type, like the similar PyString macros already
29177did. (Suggestion by Marc-Andre Lemburg.) Similar for PyList_GET_SIZE
29178and PyList_GET_ITEM.
29179
29180- Some of the Py_Get* function, like Py_GetVersion() (but not yet
29181Py_GetPath()) are now declared as returning a const char *. (More
29182should follow.)
29183
29184- Changed the run-time library to check for exceptions after object
29185comparisons. PyObject_Compare() can now return an exception; use
29186PyErr_Occurred() to check (there is *no* special return value).
29187
29188- PyFile_WriteString() and Py_Flushline() now return error indicators
29189instead of clearing exceptions. This fixes an obscure bug where using
29190these would clear a pending exception, discovered by Just van Rossum.
29191
29192- There's a new function, PyArg_ParseTupleAndKeywords(), which parses
29193an argument list including keyword arguments. Contributed by Geoff
29194Philbrick.
29195
29196- PyArg_GetInt() is gone.
29197
29198- It's no longer necessary to include graminit.h when calling one of
29199the extended parser API functions. The three public grammar start
29200symbols are now in Python.h as Py_single_input, Py_file_input, and
29201Py_eval_input.
29202
29203- The CObject interface has a new function,
29204PyCObject_Import(module, name). It calls PyCObject_AsVoidPtr()
29205on the object referenced by "module.name".
29206
29207
29208Tkinter
29209-------
29210
29211- On popular demand, _tkinter once again installs a hook for readline
29212that processes certain Tk events while waiting for the user to type
29213(using PyOS_InputHook).
29214
29215- A patch by Craig McPheeters plugs the most obnoxious memory leaks,
29216caused by command definitions referencing widget objects beyond their
29217lifetime.
29218
29219- New standard dialog modules: tkColorChooser.py, tkCommonDialog.py,
29220tkMessageBox.py, tkFileDialog.py, tkSimpleDialog.py These interface
29221with the new Tk dialog scripts, and provide more "native platform"
29222style file selection dialog boxes on some platforms. Contributed by
29223Fredrik Lundh.
29224
29225- Tkinter.py: when the first Tk object is destroyed, it sets the
29226hiddel global _default_root to None, so that when another Tk object is
29227created it becomes the new default root. Other miscellaneous
29228changes and fixes.
29229
29230- The Image class now has a configure method.
29231
29232- Added a bunch of new winfo options to Tkinter.py; we should now be
29233up to date with Tk 4.2. The new winfo options supported are:
29234mananger, pointerx, pointerxy, pointery, server, viewable, visualid,
29235visualsavailable.
29236
29237- The broken bind() method on Canvas objects defined in the Canvas.py
29238module has been fixed. The CanvasItem and Group classes now also have
29239an unbind() method.
29240
29241- The problem with Tkinter.py falling back to trying to import
29242"tkinter" when "_tkinter" is not found has been fixed -- it no longer
29243tries "tkinter", ever. This makes diagnosing the problem "_tkinter
29244not configured" much easier and will hopefully reduce the newsgroup
29245traffic on this topic.
29246
29247- The ScrolledText module once again supports the 'cnf' parameter, to
29248be compatible with the examples in Mark Lutz' book (I know, I know,
29249too late...)
29250
29251- The _tkinter.c extension module has been revamped. It now support
29252Tk versions 4.1 through 8.0; support for 4.0 has been dropped. It
29253works well under Windows and Mac (with the latest Tk ports to those
29254platforms). It also supports threading -- it is safe for one
29255(Python-created) thread to be blocked in _tkinter.mainloop() while
29256other threads modify widgets. To make the changes visible, those
29257threads must use update_idletasks()method. (The patch for threading
29258in 1.5a3 was broken; in 1.5a4, it is back in a different version,
29259which requires access to the Tcl sources to get it to work -- hence it
29260is disabled by default.)
29261
29262- A bug in _tkinter.c has been fixed, where Split() with a string
29263containing an unmatched '"' could cause an exception or core dump.
29264
29265- Unfortunately, on Windows and Mac, Tk 8.0 no longer supports
29266CreateFileHandler, so _tkinter.createfilehandler is not available on
29267those platforms when using Tk 8.0 or later. I will have to rethink
29268how to interface with Tcl's lower-level event mechanism, or with its
29269channels (which are like Python's file-like objects). Jack Jansen has
29270provided a fix for the Mac, so createfilehandler *is* actually
29271supported there; maybe I can adapt his fix for Windows.
29272
29273
29274Tools and Demos
29275---------------
29276
29277- A new regression test suite is provided, which tests most of the
29278standard and built-in modules. The regression test is run by invoking
29279the script Lib/test/regrtest.py. Barry Warsaw wrote the test harnass;
29280he and Roger Masse contributed most of the new tests.
29281
29282- New tool: faqwiz -- the CGI script that is used to maintain the
29283Python FAQ (http://grail.cnri.reston.va.us/cgi-bin/faqw.py). In
29284Tools/faqwiz.
29285
29286- New tool: webchecker -- a simple extensible web robot that, when
29287aimed at a web server, checks that server for dead links. Available
29288are a command line utility as well as a Tkinter based GUI version. In
29289Tools/webchecker. A simplified version of this program is dissected
29290in my article in O'Reilly's WWW Journal, the issue on Scripting
29291Languages (Vol 2, No 2); Scripting the Web with Python (pp 97-120).
29292Includes a parser for robots.txt files by Skip Montanaro.
29293
29294- New small tools: cvsfiles.py (prints a list of all files under CVS
29295n a particular directory tree), treesync.py (a rather Guido-specific
29296script to synchronize two source trees, one on Windows NT, the other
29297one on Unix under CVS but accessible from the NT box), and logmerge.py
29298(sort a collection of RCS or CVS logs by date). In Tools/scripts.
29299
29300- The freeze script now also works under Windows (NT). Another
29301feature allows the -p option to be pointed at the Python source tree
29302instead of the installation prefix. This was loosely based on part of
29303xfreeze by Sam Rushing and Bill Tutt.
29304
29305- New examples (Demo/extend) that show how to use the generic
29306extension makefile (Misc/Makefile.pre.in).
29307
29308- Tools/scripts/h2py.py now supports C++ comments.
29309
29310- Tools/scripts/pystone.py script is upgraded to version 1.1; there
29311was a bug in version 1.0 (distributed with Python 1.4) that leaked
29312memory. Also, in 1.1, the LOOPS variable is incremented to 10000.
29313
29314- Demo/classes/Rat.py completely rewritten by Sjoerd Mullender.
29315
29316
29317Windows (NT and 95)
29318-------------------
29319
29320- New project files for Developer Studio (Visual C++) 5.0 for Windows
29321NT (the old VC++ 4.2 Makefile is also still supported, but will
29322eventually be withdrawn due to its bulkiness).
29323
Victor Stinner554fd082014-03-17 22:33:49 +010029324- See the note on the new module search path in the "Miscellaneous" section
Guido van Rossum439d1fa1998-12-21 21:41:14 +000029325above.
29326
29327- Support for Win32s (the 32-bit Windows API under Windows 3.1) is
29328basically withdrawn. If it still works for you, you're lucky.
29329
Victor Stinner554fd082014-03-17 22:33:49 +010029330- There's a new extension module, msvcrt.c, which provides various
29331low-level operations defined in the Microsoft Visual C++ Runtime Library.
29332These include locking(), setmode(), get_osfhandle(), set_osfhandle(), and
Guido van Rossum439d1fa1998-12-21 21:41:14 +000029333console I/O functions like kbhit(), getch() and putch().
29334
29335- The -u option not only sets the standard I/O streams to unbuffered
29336status, but also sets them in binary mode. (This can also be done
29337using msvcrt.setmode(), by the way.)
29338
Victor Stinner554fd082014-03-17 22:33:49 +010029339- The, sys.prefix and sys.exec_prefix variables point to the directory
29340where Python is installed, or to the top of the source tree, if it was run
Guido van Rossum439d1fa1998-12-21 21:41:14 +000029341from there.
29342
29343- The various os.path modules (posixpath, ntpath, macpath) now support
29344passing more than two arguments to the join() function, so
29345os.path.join(a, b, c) is the same as os.path.join(a, os.path.join(b,
29346c)).
29347
Victor Stinner554fd082014-03-17 22:33:49 +010029348- The ntpath module (normally used as os.path) supports ~ to $HOME
Guido van Rossum439d1fa1998-12-21 21:41:14 +000029349expansion in expanduser().
29350
29351- The freeze tool now works on Windows.
29352
29353- See also the Tkinter category for a sad note on
29354_tkinter.createfilehandler().
29355
29356- The truncate() method for file objects now works on Windows.
29357
29358- Py_Initialize() is no longer called when the DLL is loaded. You
29359must call it yourself.
29360
29361- The time module's clock() function now has good precision through
29362the use of the Win32 API QueryPerformanceCounter().
29363
29364- Mark Hammond will release Python 1.5 versions of PythonWin and his
29365other Windows specific code: the win32api extensions, COM/ActiveX
29366support, and the MFC interface.
29367
29368
29369Mac
29370---
29371
29372- As always, the Macintosh port will be done by Jack Jansen. He will
29373make a separate announcement for the Mac specific source code and the
29374binary distribution(s) when these are ready.
29375
29376
29377======================================================================
Guido van Rossuma7925f11994-01-26 10:20:16 +000029378
Guido van Rossumaa253861994-10-06 17:18:57 +000029379
Guido van Rossumc30e95f1996-07-30 18:53:51 +000029380=====================================
Guido van Rossum821a5581997-05-23 04:05:31 +000029381==> Release 1.4 (October 25 1996) <==
29382=====================================
29383
29384(Starting in reverse chronological order:)
29385
29386- Changed disclaimer notice.
29387
29388- Added SHELL=/bin/sh to Misc/Makefile.pre.in -- some Make versions
29389default to the user's login shell.
29390
29391- In Lib/tkinter/Tkinter.py, removed bogus binding of <Delete> in Text
29392widget, and bogus bspace() function.
29393
29394- In Lib/cgi.py, bumped __version__ to 2.0 and restored a truncated
29395paragraph.
29396
29397- Fixed the NT Makefile (PC/vc40.mak) for VC 4.0 to set /MD for all
29398subprojects, and to remove the (broken) experimental NumPy
29399subprojects.
29400
29401- In Lib/py_compile.py, cast mtime to long() so it will work on Mac
29402(where os.stat() returns mtimes as floats.)
29403- Set self.rfile unbuffered (like self.wfile) in SocketServer.py, to
29404fix POST in CGIHTTPServer.py.
29405
29406- Version 2.83 of Misc/python-mode.el for Emacs is included.
29407
29408- In Modules/regexmodule.c, fixed symcomp() to correctly handle a new
29409group starting immediately after a group tag.
29410
29411- In Lib/SocketServer.py, changed the mode for rfile to unbuffered.
29412
29413- In Objects/stringobject.c, fixed the compare function to do the
29414first char comparison in unsigned mode, for consistency with the way
29415other characters are compared by memcmp().
29416
29417- In Lib/tkinter/Tkinter.py, fixed Scale.get() to support floats.
29418
29419- In Lib/urllib.py, fix another case where openedurl wasn't set.
29420
29421(XXX Sorry, the rest is in totally random order. No time to fix it.)
29422
29423- SyntaxError exceptions detected during code generation
29424(e.g. assignment to an expression) now include a line number.
29425
29426- Don't leave trailing / or \ in script directory inserted in front of
29427sys.path.
29428
29429- Added a note to Tools/scripts/classfix.py abouts its historical
29430importance.
29431
29432- Added Misc/Makefile.pre.in, a universal Makefile for extensions
29433built outside the distribution.
29434
29435- Rewritten Misc/faq2html.py, by Ka-Ping Yee.
29436
29437- Install shared modules with mode 555 (needed for performance on some
29438platforms).
29439
29440- Some changes to standard library modules to avoid calling append()
29441with more than one argument -- while supported, this should be
29442outlawed, and I don't want to set a bad example.
29443
29444- bdb.py (and hence pdb.py) supports calling run() with a code object
29445instead of a code string.
29446
29447- Fixed an embarrassing bug cgi.py which prevented correct uploading
29448of binary files from Netscape (which doesn't distinguish between
29449binary and text files). Also added dormant logging support, which
29450makes it easier to debug the cgi module itself.
29451
29452- Added default writer to constructor of NullFormatter class.
29453
29454- Use binary mode for socket.makefile() calls in ftplib.py.
29455
29456- The ihooks module no longer "installs" itself upon import -- this
29457was an experimental feature that helped ironing out some bugs but that
29458slowed down code that imported it without the need to install it
29459(e.g. the rexec module). Also close the file in some cases and add
29460the __file__ attribute to loaded modules.
29461
29462- The test program for mailbox.py is now more useful.
29463
29464- Added getparamnames() to Message class in mimetools.py -- it returns
29465the names of parameters to the content-type header.
29466
29467- Fixed a typo in ni that broke the loop stripping "__." from names.
29468
29469- Fix sys.path[0] for scripts run via pdb.py's new main program.
29470
29471- profile.py can now also run a script, like pdb.
29472
29473- Fix a small bug in pyclbr -- don't add names starting with _ when
29474emulating from ... import *.
29475
29476- Fixed a series of embarrassing typos in rexec's handling of standard
29477I/O redirection. Added some more "safe" built-in modules: cmath,
29478errno, operator.
29479
29480- Fixed embarrassing typo in shelve.py.
29481
29482- Added SliceType and EllipsisType to types.py.
29483
29484- In urllib.py, added handling for error 301 (same as 302); added
29485geturl() method to get the URL after redirection.
29486
29487- Fixed embarrassing typo in xdrlib.py. Also fixed typo in Setup.in
29488for _xdrmodule.c and removed redundant #include from _xdrmodule.c.
29489
29490- Fixed bsddbmodule.c to add binary mode indicator on platforms that
29491have it. This should make it working on Windows NT.
29492
29493- Changed last uses of #ifdef NT to #ifdef MS_WINDOWS or MS_WIN32,
29494whatever applies. Also rationalized some other tests for various MS
29495platforms.
29496
29497- Added the sources for the NT installer script used for Python
294981.4beta3. Not tested with this release, but better than nothing.
29499
29500- A compromise in pickle's defenses against Trojan horses: a
29501user-defined function is now okay where a class is expected. A
29502built-in function is not okay, to prevent pickling something that
29503will execute os.system("rm -f *") when unpickling.
29504
29505- dis.py will print the name of local variables referenced by local
29506load/store/delete instructions.
29507
29508- Improved portability of SimpleHTTPServer module to non-Unix
29509platform.
29510
29511- The thread.h interface adds an extra argument to down_sema(). This
29512only affects other C code that uses thread.c; the Python thread module
29513doesn't use semaphores (which aren't provided on all platforms where
29514Python threads are supported). Note: on NT, this change is not
29515implemented.
29516
29517- Fixed some typos in abstract.h; corrected signature of
29518PyNumber_Coerce, added PyMapping_DelItem. Also fixed a bug in
29519abstract.c's PyObject_CallMethod().
29520
29521- apply(classname, (), {}) now works even if the class has no
29522__init__() method.
29523
29524- Implemented complex remainder and divmod() (these would dump core!).
29525Conversion of complex numbers to int, long int or float now raises an
29526exception, since there is no meaningful way to do it without losing
29527information.
29528
29529- Fixed bug in built-in complex() function which gave the wrong result
29530for two real arguments.
29531
29532- Change the hash algorithm for strings -- the multiplier is now
295331000003 instead of 3, which gives better spread for short strings.
29534
29535- New default path for Windows NT, the registry structure now supports
29536default paths for different install packages. (Mark Hammond -- the
29537next PythonWin release will use this.)
29538
29539- Added more symbols to the python_nt.def file.
29540
29541- When using GNU readline, set rl_readline_name to "python".
29542
29543- The Ellipses built-in name has been renamed to Ellipsis -- this is
29544the correct singular form. Thanks to Ka-Ping Yee, who saved us from
29545eternal embarrassment.
29546
29547- Bumped the PYTHON_API_VERSION to 1006, due to the Ellipses ->
29548Ellipsis name change.
29549
29550- Updated the library reference manual. Added documentation of
29551restricted mode (rexec, Bastion) and the formatter module (for use
29552with the htmllib module). Fixed the documentation of htmllib
29553(finally).
29554
29555- The reference manual is now maintained in FrameMaker.
29556
29557- Upgraded scripts Doc/partparse.py and Doc/texi2html.py.
29558
29559- Slight improvements to Doc/Makefile.
29560
29561- Added fcntl.lockf(). This should be used for Unix file locking
29562instead of the posixfile module; lockf() is more portable.
29563
29564- The getopt module now supports long option names, thanks to Lars
29565Wizenius.
29566
29567- Plenty of changes to Tkinter and Canvas, mostly due to Fred Drake
29568and Nils Fischbeck.
29569
29570- Use more bits of time.time() in whrandom's default seed().
29571
29572- Performance hack for regex module's regs attribute.
29573
29574- Don't close already closed socket in socket module.
29575
29576- Correctly handle separators containing embedded nulls in
29577strop.split, strop.find and strop.rfind. Also added more detail to
29578error message for strop.atoi and friends.
29579
29580- Moved fallback definition for hypot() to Python/hypot.c.
29581
29582- Added fallback definition for strdup, in Python/strdup.c.
29583
29584- Fixed some bugs where a function would return 0 to indicate an error
29585where it should return -1.
29586
29587- Test for error returned by time.localtime(), and rationalized its MS
29588tests.
29589
29590- Added Modules/Setup.local file, which is processed after Setup.
29591
29592- Corrected bug in toplevel Makefile.in -- execution of regen script
29593would not use the right PATH and PYTHONPATH.
29594
29595- Various and sundry NeXT configuration changes (sigh).
29596
29597- Support systems where libreadline needs neither termcap nor curses.
29598
29599- Improved ld_so_aix script and python.exp file (for AIX).
29600
29601- More stringent test for working <stdarg.h> in configure script.
29602
29603- Removed Demo/www subdirectory -- it was totally out of date.
29604
29605- Improved demos and docs for Fred Drake's parser module; fixed one
29606typo in the module itself.
29607
29608
29609=========================================
29610==> Release 1.4beta3 (August 26 1996) <==
29611=========================================
29612
29613
29614(XXX This is less readable that it should. I promise to restructure
29615it for the final 1.4 release.)
29616
29617
29618What's new in 1.4beta3 (since beta2)?
29619-------------------------------------
29620
29621- Name mangling to implement a simple form of class-private variables.
29622A name of the form "__spam" can't easily be used outside the class.
29623(This was added in 1.4beta3, but left out of the 1.4beta3 release
29624message.)
29625
29626- In urllib.urlopen(): HTTP URLs containing user:passwd@host are now
29627handled correctly when using a proxy server.
29628
29629- In ntpath.normpath(): don't truncate to 8+3 format.
29630
29631- In mimetools.choose_boundary(): don't die when getuid() or getpid()
29632aren't defined.
29633
29634- Module urllib: some optimizations to (un)quoting.
29635
29636- New module MimeWriter for writing MIME documents.
29637
29638- More changes to formatter module.
29639
29640- The freeze script works once again and is much more robust (using
29641sys.prefix etc.). It also supports a -o option to specify an
29642output directory.
29643
29644- New module whichdb recognizes dbm, gdbm and bsddb/dbhash files.
29645
Victor Stinner554fd082014-03-17 22:33:49 +010029646- The Doc/Makefile targets have been reorganized somewhat to remove the
Guido van Rossum821a5581997-05-23 04:05:31 +000029647insistence on always generating PostScript.
29648
29649- The texinfo to html filter (Doc/texi2html.py) has been improved somewhat.
29650
Victor Stinner554fd082014-03-17 22:33:49 +010029651- "errors.h" has been renamed to "pyerrors.h" to resolve a long-standing
Guido van Rossum821a5581997-05-23 04:05:31 +000029652name conflict on the Mac.
29653
Victor Stinner554fd082014-03-17 22:33:49 +010029654- Linking a module compiled with a different setting for Py_TRACE_REFS now
Guido van Rossum821a5581997-05-23 04:05:31 +000029655generates a linker error rather than a core dump.
29656
Victor Stinner554fd082014-03-17 22:33:49 +010029657- The cgi module has a new convenience function print_exception(), which
29658formats a python exception using HTML. It also fixes a bug in the
29659compatibility code and adds a dubious feature which makes it possible to
Guido van Rossum821a5581997-05-23 04:05:31 +000029660have two query strings, one in the URL and one in the POST data.
29661
Victor Stinner554fd082014-03-17 22:33:49 +010029662- A subtle change in the unpickling of class instances makes it possible
29663to unpickle in restricted execution mode, where the __dict__ attribute is
Guido van Rossum821a5581997-05-23 04:05:31 +000029664not available (but setattr() is).
29665
Victor Stinner554fd082014-03-17 22:33:49 +010029666- Documentation for os.path.splitext() (== posixpath.splitext()) has been
Guido van Rossum821a5581997-05-23 04:05:31 +000029667cleared up. It splits at the *last* dot.
29668
29669- posixfile locking is now also correctly supported on AIX.
29670
Victor Stinner554fd082014-03-17 22:33:49 +010029671- The tempfile module once again honors an initial setting of tmpdir. It
Guido van Rossum821a5581997-05-23 04:05:31 +000029672now works on Windows, too.
29673
Victor Stinner554fd082014-03-17 22:33:49 +010029674- The traceback module has some new functions to extract, format and print
Guido van Rossum821a5581997-05-23 04:05:31 +000029675the active stack.
29676
Victor Stinner554fd082014-03-17 22:33:49 +010029677- Some translation functions in the urllib module have been made a little
Guido van Rossum821a5581997-05-23 04:05:31 +000029678less sluggish.
29679
Victor Stinner554fd082014-03-17 22:33:49 +010029680- The addtag_* methods for Canvas widgets in Tkinter as well as in the
29681separate Canvas class have been fixed so they actually do something
Guido van Rossum821a5581997-05-23 04:05:31 +000029682meaningful.
29683
29684- A tiny _test() function has been added to Tkinter.py.
29685
Victor Stinner554fd082014-03-17 22:33:49 +010029686- A generic Makefile for dynamically loaded modules is provided in the Misc
Guido van Rossum821a5581997-05-23 04:05:31 +000029687subdirectory (Misc/gMakefile).
29688
29689- A new version of python-mode.el for Emacs is provided. See
29690http://www.python.org/ftp/emacs/pmdetails.html for details. The
29691separate file pyimenu.el is no longer needed, imenu support is folded
29692into python-mode.el.
29693
Victor Stinner554fd082014-03-17 22:33:49 +010029694- The configure script can finally correctly find the readline library in a
29695non-standard location. The LDFLAGS variable is passed on the Makefiles
Guido van Rossum821a5581997-05-23 04:05:31 +000029696from the configure script.
29697
Victor Stinner554fd082014-03-17 22:33:49 +010029698- Shared libraries are now installed as programs (i.e. with executable
Guido van Rossum821a5581997-05-23 04:05:31 +000029699permission). This is required on HP-UX and won't hurt on other systems.
29700
Victor Stinner554fd082014-03-17 22:33:49 +010029701- The objc.c module is no longer part of the distribution. Objective-C
Guido van Rossum821a5581997-05-23 04:05:31 +000029702support may become available as contributed software on the ftp site.
29703
29704- The sybase module is no longer part of the distribution. A much
29705improved sybase module is available as contributed software from the
29706ftp site.
29707
Victor Stinner554fd082014-03-17 22:33:49 +010029708- _tkinter is now compatible with Tcl 7.5 / Tk 4.1 patch1 on Windows and
29709Mac (don't use unpatched Tcl/Tk!). The default line in the Setup.in file
Guido van Rossum821a5581997-05-23 04:05:31 +000029710now links with Tcl 7.5 / Tk 4.1 rather than 7.4/4.0.
29711
Victor Stinner554fd082014-03-17 22:33:49 +010029712- In Setup, you can now write "*shared*" instead of "*noconfig*", and you
Guido van Rossum821a5581997-05-23 04:05:31 +000029713can use *.so and *.sl as shared libraries.
29714
29715- Some more fidgeting for AIX shared libraries.
29716
29717- The mpz module is now compatible with GMP 2.x. (Not tested by me.)
29718(Note -- a complete replacement by Niels Mo"ller, called gpmodule, is
29719available from the contrib directory on the ftp site.)
29720
Victor Stinner554fd082014-03-17 22:33:49 +010029721- A warning is written to sys.stderr when a __del__ method raises an
Guido van Rossum821a5581997-05-23 04:05:31 +000029722exception (formerly, such exceptions were completely ignored).
29723
Victor Stinner554fd082014-03-17 22:33:49 +010029724- The configure script now defines HAVE_OLD_CPP if the C preprocessor is
Guido van Rossum821a5581997-05-23 04:05:31 +000029725incapable of ANSI style token concatenation and stringification.
29726
Victor Stinner554fd082014-03-17 22:33:49 +010029727- All source files (except a few platform specific modules) are once again
Guido van Rossum821a5581997-05-23 04:05:31 +000029728compatible with K&R C compilers as well as ANSI compilers. In particular,
Victor Stinner554fd082014-03-17 22:33:49 +010029729ANSI-isms have been removed or made conditional in complexobject.c,
Guido van Rossum821a5581997-05-23 04:05:31 +000029730getargs.c and operator.c.
29731
Victor Stinner554fd082014-03-17 22:33:49 +010029732- The abstract object API has three new functions, PyObject_DelItem,
Guido van Rossum821a5581997-05-23 04:05:31 +000029733PySequence_DelItem, and PySequence_DelSlice.
29734
Victor Stinner554fd082014-03-17 22:33:49 +010029735- The operator module has new functions delitem and delslice, and the
29736functions "or" and "and" are renamed to "or_" and "and_" (since "or" and
Guido van Rossum821a5581997-05-23 04:05:31 +000029737"and" are reserved words). ("__or__" and "__and__" are unchanged.)
29738
Victor Stinner554fd082014-03-17 22:33:49 +010029739- The environment module is no longer supported; putenv() is now a function
Guido van Rossum821a5581997-05-23 04:05:31 +000029740in posixmodule (also under NT).
29741
29742- Error in filter(<function>, "") has been fixed.
29743
29744- Unrecognized keyword arguments raise TypeError, not KeyError.
29745
Victor Stinner554fd082014-03-17 22:33:49 +010029746- Better portability, fewer bugs and memory leaks, fewer compiler warnings,
Guido van Rossum821a5581997-05-23 04:05:31 +000029747some more documentation.
29748
Victor Stinner554fd082014-03-17 22:33:49 +010029749- Bug in float power boundary case (0.0 to the negative integer power)
Guido van Rossum821a5581997-05-23 04:05:31 +000029750fixed.
29751
Victor Stinner554fd082014-03-17 22:33:49 +010029752- The test of negative number to the float power has been moved from the
Berker Peksag4882cac2015-04-14 09:30:01 +030029753built-in pow() function to floatobject.c (so complex numbers can yield the
Guido van Rossum821a5581997-05-23 04:05:31 +000029754correct result).
29755
Victor Stinner554fd082014-03-17 22:33:49 +010029756- The bug introduced in beta2 where shared libraries loaded (using
Guido van Rossum821a5581997-05-23 04:05:31 +000029757dlopen()) from the current directory would fail, has been fixed.
29758
Victor Stinner554fd082014-03-17 22:33:49 +010029759- Modules imported as shared libraries now also have a __file__ attribute,
29760giving the filename from which they were loaded. The only modules without
Guido van Rossum821a5581997-05-23 04:05:31 +000029761a __file__ attribute now are built-in modules.
29762
Victor Stinner554fd082014-03-17 22:33:49 +010029763- On the Mac, dynamically loaded modules can end in either ".slb" or
29764".<platform>.slb" where <platform> is either "CFM68K" or "ppc". The ".slb"
Guido van Rossum821a5581997-05-23 04:05:31 +000029765extension should only be used for "fat" binaries.
29766
Victor Stinner554fd082014-03-17 22:33:49 +010029767- C API addition: marshal.c now supports
Guido van Rossum821a5581997-05-23 04:05:31 +000029768PyMarshal_WriteObjectToString(object).
29769
29770- C API addition: getargs.c now supports
29771PyArg_ParseTupleAndKeywords(args, kwdict, format, kwnames, ...)
29772to parse keyword arguments.
29773
Victor Stinner554fd082014-03-17 22:33:49 +010029774- The PC versioning scheme (sys.winver) has changed once again. the
29775version number is now "<digit>.<digit>.<digit>.<apiversion>", where the
29776first three <digit>s are the Python version (e.g. "1.4.0" for Python 1.4,
29777"1.4.1" for Python 1.4.1 -- the beta level is not included) and
Guido van Rossum821a5581997-05-23 04:05:31 +000029778<apiversion> is the four-digit PYTHON_API_VERSION (currently 1005).
29779
29780- h2py.py accepts whitespace before the # in CPP directives
29781
Victor Stinner554fd082014-03-17 22:33:49 +010029782- On Solaris 2.5, it should now be possible to use either Posix threads or
29783Solaris threads (XXX: how do you select which is used???). (Note: the
29784Python pthreads interface doesn't fully support semaphores yet -- anyone
Guido van Rossum821a5581997-05-23 04:05:31 +000029785care to fix this?)
29786
Victor Stinner554fd082014-03-17 22:33:49 +010029787- Thread support should now work on AIX, using either DCE threads or
Guido van Rossum821a5581997-05-23 04:05:31 +000029788pthreads.
29789
29790- New file Demo/sockets/unicast.py
29791
Victor Stinner554fd082014-03-17 22:33:49 +010029792- Working Mac port, with CFM68K support, with Tk 4.1 support (though not
Guido van Rossum821a5581997-05-23 04:05:31 +000029793both) (XXX)
29794
Victor Stinner554fd082014-03-17 22:33:49 +010029795- New project setup for PC port, now compatible with PythonWin, with
Guido van Rossum821a5581997-05-23 04:05:31 +000029796_tkinter and NumPy support (XXX)
29797
29798- New module site.py (XXX)
29799
29800- New module xdrlib.py and optional support module _xdrmodule.c (XXX)
29801
29802- parser module adapted to new grammar, complete w/ Doc & Demo (XXX)
29803
29804- regen script fixed (XXX)
29805
29806- new machdep subdirectories Lib/{aix3,aix4,next3_3,freebsd2,linux2} (XXX)
29807
29808- testall now also tests math module (XXX)
29809
29810- string.atoi c.s. now raise an exception for an empty input string.
29811
Victor Stinner554fd082014-03-17 22:33:49 +010029812- At last, it is no longer necessary to define HAVE_CONFIG_H in order to
Guido van Rossum821a5581997-05-23 04:05:31 +000029813have config.h included at various places.
29814
29815- Unrecognized keyword arguments now raise TypeError rather than KeyError.
29816
29817- The makesetup script recognizes files with extension .so or .sl as
29818(shared) libraries.
29819
Victor Stinner554fd082014-03-17 22:33:49 +010029820- 'access' is no longer a reserved word, and all code related to its
29821implementation is gone (or at least #ifdef'ed out). This should make
Guido van Rossum821a5581997-05-23 04:05:31 +000029822Python a little speedier too!
29823
Victor Stinner554fd082014-03-17 22:33:49 +010029824- Performance enhancements suggested by Sjoerd Mullender. This includes
29825the introduction of two new optional function pointers in type object,
29826getattro and setattro, which are like getattr and setattr but take a
Guido van Rossum821a5581997-05-23 04:05:31 +000029827string object instead of a C string pointer.
29828
Victor Stinner554fd082014-03-17 22:33:49 +010029829- New operations in string module: lstrip(s) and rstrip(s) strip whitespace
29830only on the left or only on the right, A new optional third argument to
29831split() specifies the maximum number of separators honored (so
29832splitfields(s, sep, n) returns a list of at most n+1 elements). (Since
Guido van Rossum821a5581997-05-23 04:05:31 +0000298331.3, splitfields(s, None) is totally equivalent to split(s).)
Victor Stinner554fd082014-03-17 22:33:49 +010029834string.capwords() has an optional second argument specifying the
Guido van Rossum821a5581997-05-23 04:05:31 +000029835separator (which is passed to split()).
29836
Victor Stinner554fd082014-03-17 22:33:49 +010029837- regsub.split() has the same addition as string.split(). regsub.splitx(s,
29838sep, maxsep) implements the functionality that was regsub.split(s, 1) in
Guido van Rossum821a5581997-05-23 04:05:31 +0000298391.4beta2 (return a list containing the delimiters as well as the words).
29840
29841- Final touch for AIX loading, rewritten Misc/AIX-NOTES.
29842
29843- In Modules/_tkinter.c, when using Tk 4.1 or higher, use className
29844argument to _tkinter.create() to set Tcl's argv0 variable, so X
29845resources use the right resource class again.
29846
29847- Add #undef fabs to Modules/mathmodule.c for macintosh.
29848
29849- Added some macro renames for AIX in Modules/operator.c.
29850
29851- Removed spurious 'E' from Doc/liberrno.tex.
29852
29853- Got rid of some cruft in Misc/ (dlMakefile, pyimenu.el); added new
29854Misc/gMakefile and new version of Misc/python-mode.el.
29855
29856- Fixed typo in Lib/ntpath.py (islink has "return false" which gives a
29857NameError).
29858
29859- Added missing "from types import *" to Lib/tkinter/Canvas.py.
29860
29861- Added hint about using default args for __init__ to pickle docs.
29862
29863- Corrected typo in Inclide/abstract.h: PySequence_Lenth ->
29864PySequence_Length.
29865
29866- Some improvements to Doc/texi2html.py.
29867
29868- In Python/import.c, Cast unsigned char * in struct _frozen to char *
29869in calls to rds_object().
29870
29871- In doc/ref4.tex, added note about scope of lambda bodies.
29872
29873What's new in 1.4beta2 (since beta1)?
29874-------------------------------------
29875
29876- Portability bug in the md5.h header solved.
29877
29878- The PC build procedure now really works, and sets sys.platform to a
29879meaningful value (a few things were botched in beta 1). Lib/dos_8x3
29880is now a standard part of the distribution (alas).
29881
Victor Stinner554fd082014-03-17 22:33:49 +010029882- More improvements to the installation procedure. Typing "make install"
29883now inserts the version number in the pathnames of almost everything
29884installed, and creates the machine dependent modules (FCNTL.py etc.) if not
29885supplied by the distribution. (XXX There's still a problem with the latter
29886because the "regen" script requires that Python is installed. Some manual
Guido van Rossum821a5581997-05-23 04:05:31 +000029887intervention may still be required.) (This has been fixed in 1.4beta3.)
29888
29889- New modules: errno, operator (XXX).
29890
Georg Brandl93dc9eb2010-03-14 10:56:14 +000029891- Changes for use with Numerical Python: built-in function slice() and
Guido van Rossum821a5581997-05-23 04:05:31 +000029892Ellipses object, and corresponding syntax:
29893
29894 x[lo:hi:stride] == x[slice(lo, hi, stride)]
29895 x[a, ..., z] == x[(a, Ellipses, z)]
29896
Raymond Hettinger565ea5a2004-10-02 11:02:59 +000029897- New documentation for errno and cgi modules.
Guido van Rossum821a5581997-05-23 04:05:31 +000029898
29899- The directory containing the script passed to the interpreter is
29900inserted in from of sys.path; "." is no longer a default path
29901component.
29902
29903- Optional third string argument to string.translate() specifies
29904characters to delete. New function string.maketrans() creates a
29905translation table for translate() or for regex.compile().
29906
29907- Module posix (and hence module os under Unix) now supports putenv().
29908Moreover, module os is enhanced so that if putenv() is supported,
29909assignments to os.environ entries make the appropriate putenv() call.
29910(XXX the putenv() implementation can leak a small amount of memory per
29911call.)
29912
29913- pdb.py can now be invoked from the command line to debug a script:
29914python pdb.py <script> <arg> ...
29915
29916- Much improved parseaddr() in rfc822.
29917
29918- In cgi.py, you can now pass an alternative value for environ to
29919nearly all functions.
29920
29921- You can now assign to instance variables whose name begins and ends
29922with '__'.
29923
29924- New version of Fred Drake's parser module and associates (token,
29925symbol, AST).
29926
29927- New PYTHON_API_VERSION value and .pyc file magic number (again!).
29928
29929- The "complex" internal structure type is now called "Py_complex" to
29930avoid name conflicts.
29931
29932- Numerous small bugs fixed.
29933
29934- Slight pickle speedups.
29935
29936- Some slight speedups suggested by Sjoerd (more coming in 1.4 final).
29937
29938- NeXT portability mods by Bill Bumgarner integrated.
29939
29940- Modules regexmodule.c, bsddbmodule.c and xxmodule.c have been
29941converted to new naming style.
29942
29943
29944What's new in 1.4beta1 (since 1.3)?
29945-----------------------------------
29946
29947- Added sys.platform and sys.exec_platform for Bill Janssen.
29948
Victor Stinner554fd082014-03-17 22:33:49 +010029949- Installation has been completely overhauled. "make install" now installs
29950everything, not just the python binary. Installation uses the install-sh
Guido van Rossum821a5581997-05-23 04:05:31 +000029951script (borrowed from X11) to install each file.
29952
29953- New functions in the posix module: mkfifo, plock, remove (== unlink),
29954and ftruncate. More functions are also available under NT.
29955
29956- New function in the fcntl module: flock.
29957
29958- Shared library support for FreeBSD.
29959
Victor Stinner554fd082014-03-17 22:33:49 +010029960- The --with-readline option can now be used without a DIRECTORY argument,
29961for systems where libreadline.* is in one of the standard places. It is
Guido van Rossum821a5581997-05-23 04:05:31 +000029962also possible for it to be a shared library.
29963
Victor Stinner554fd082014-03-17 22:33:49 +010029964- The extension tkinter has been renamed to _tkinter, to avoid confusion
29965with Tkinter.py oncase insensitive file systems. It now supports Tk 4.1 as
Guido van Rossum821a5581997-05-23 04:05:31 +000029966well as 4.0.
29967
Victor Stinner554fd082014-03-17 22:33:49 +010029968- Author's change of address from CWI in Amsterdam, The Netherlands, to
Guido van Rossum821a5581997-05-23 04:05:31 +000029969CNRI in Reston, VA, USA.
29970
Victor Stinner554fd082014-03-17 22:33:49 +010029971- The math.hypot() function is now always available (if it isn't found in
Guido van Rossum821a5581997-05-23 04:05:31 +000029972the C math library, Python provides its own implementation).
29973
Victor Stinner554fd082014-03-17 22:33:49 +010029974- The latex documentation is now compatible with latex2e, thanks to David
Guido van Rossum821a5581997-05-23 04:05:31 +000029975Ascher.
29976
29977- The expression x**y is now equivalent to pow(x, y).
29978
29979- The indexing expression x[a, b, c] is now equivalent to x[(a, b, c)].
29980
Victor Stinner554fd082014-03-17 22:33:49 +010029981- Complex numbers are now supported. Imaginary constants are written with
29982a 'j' or 'J' prefix, general complex numbers can be formed by adding a real
29983part to an imaginary part, like 3+4j. Complex numbers are always stored in
29984floating point form, so this is equivalent to 3.0+4.0j. It is also
29985possible to create complex numbers with the new built-in function
29986complex(re, [im]). For the footprint-conscious, complex number support can
Guido van Rossum821a5581997-05-23 04:05:31 +000029987be disabled by defining the symbol WITHOUT_COMPLEX.
29988
29989- New built-in function list() is the long-awaited counterpart of tuple().
29990
Victor Stinner554fd082014-03-17 22:33:49 +010029991- There's a new "cmath" module which provides the same functions as the
29992"math" library but with complex arguments and results. (There are very
29993good reasons why math.sqrt(-1) still raises an exception -- you have to use
Guido van Rossum821a5581997-05-23 04:05:31 +000029994cmath.sqrt(-1) to get 1j for an answer.)
29995
Victor Stinner554fd082014-03-17 22:33:49 +010029996- The Python.h header file (which is really the same as allobjects.h except
29997it disables support for old style names) now includes several more files,
Guido van Rossum821a5581997-05-23 04:05:31 +000029998so you have to have fewer #include statements in the average extension.
29999
Victor Stinner554fd082014-03-17 22:33:49 +010030000- The NDEBUG symbol is no longer used. Code that used to be dependent on
30001the presence of NDEBUG is now present on the absence of DEBUG. TRACE_REFS
30002and REF_DEBUG have been renamed to Py_TRACE_REFS and Py_REF_DEBUG,
30003respectively. At long last, the source actually compiles and links without
Guido van Rossum821a5581997-05-23 04:05:31 +000030004errors when this symbol is defined.
30005
Victor Stinner554fd082014-03-17 22:33:49 +010030006- Several symbols that didn't follow the new naming scheme have been
30007renamed (usually by adding to rename2.h) to use a Py or _Py prefix. There
30008are no external symbols left without a Py or _Py prefix, not even those
30009defined by sources that were incorporated from elsewhere (regexpr.c,
Guido van Rossum821a5581997-05-23 04:05:31 +000030010md5c.c). (Macros are a different story...)
30011
Victor Stinner554fd082014-03-17 22:33:49 +010030012- There are now typedefs for the structures defined in config.c and
Guido van Rossum821a5581997-05-23 04:05:31 +000030013frozen.c.
30014
30015- New PYTHON_API_VERSION value and .pyc file magic number.
30016
30017- New module Bastion. (XXX)
30018
30019- Improved performance of StringIO module.
30020
30021- UserList module now supports + and * operators.
30022
30023- The binhex and binascii modules now actually work.
30024
30025- The cgi module has been almost totally rewritten and documented.
Victor Stinner554fd082014-03-17 22:33:49 +010030026It now supports file upload and a new data type to handle forms more
Guido van Rossum821a5581997-05-23 04:05:31 +000030027flexibly.
30028
30029- The formatter module (for use with htmllib) has been overhauled (again).
30030
30031- The ftplib module now supports passive mode and has doc strings.
30032
Victor Stinner554fd082014-03-17 22:33:49 +010030033- In (ideally) all places where binary files are read or written, the file
30034is now correctly opened in binary mode ('rb' or 'wb') so the code will work
Guido van Rossum821a5581997-05-23 04:05:31 +000030035on Mac or PC.
30036
Victor Stinner554fd082014-03-17 22:33:49 +010030037- Dummy versions of os.path.expandvars() and expanduser() are now provided
Guido van Rossum821a5581997-05-23 04:05:31 +000030038on non-Unix platforms.
30039
Victor Stinner554fd082014-03-17 22:33:49 +010030040- Module urllib now has two new functions url2pathname and pathname2url
30041which turn local filenames into "file:..." URLs using the same rules as
30042Netscape (why be different). it also supports urlretrieve() with a
30043pathname parameter, and honors the proxy environment variables (http_proxy
Guido van Rossum821a5581997-05-23 04:05:31 +000030044etc.). The URL parsing has been improved somewhat, too.
30045
Victor Stinner554fd082014-03-17 22:33:49 +010030046- Micro improvements to urlparse. Added urlparse.urldefrag() which
Guido van Rossum821a5581997-05-23 04:05:31 +000030047removes a trailing ``#fragment'' if any.
30048
30049- The mailbox module now supports MH style message delimiters as well.
30050
Victor Stinner554fd082014-03-17 22:33:49 +010030051- The mhlib module contains some new functionality: setcontext() to set the
30052current folder and parsesequence() to parse a sequence as commonly passed
Guido van Rossum821a5581997-05-23 04:05:31 +000030053to MH commands (e.g. 1-10 or last:5).
30054
Victor Stinner554fd082014-03-17 22:33:49 +010030055- New module mimify for conversion to and from MIME format of email
Guido van Rossum821a5581997-05-23 04:05:31 +000030056messages.
30057
Victor Stinner554fd082014-03-17 22:33:49 +010030058- Module ni now automatically installs itself when first imported -- this
30059is against the normal rule that modules should define classes and functions
30060but not invoke them, but appears more useful in the case that two
Guido van Rossum821a5581997-05-23 04:05:31 +000030061different, independent modules want to use ni's features.
30062
30063- Some small performance enhancements in module pickle.
30064
Victor Stinner554fd082014-03-17 22:33:49 +010030065- Small interface change to the profile.run*() family of functions -- more
Guido van Rossum821a5581997-05-23 04:05:31 +000030066sensible handling of return values.
30067
Victor Stinner554fd082014-03-17 22:33:49 +010030068- The officially registered Mac creator for Python files is 'Pyth'. This
Guido van Rossum821a5581997-05-23 04:05:31 +000030069replaces 'PYTH' which was used before but never registered.
30070
30071- Added regsub.capwords(). (XXX)
30072
Victor Stinner554fd082014-03-17 22:33:49 +010030073- Added string.capwords(), string.capitalize() and string.translate().
Guido van Rossum821a5581997-05-23 04:05:31 +000030074(XXX)
30075
Victor Stinner554fd082014-03-17 22:33:49 +010030076- Fixed an interface bug in the rexec module: it was impossible to pass a
30077hooks instance to the RExec class. rexec now also supports the dynamic
30078loading of modules from shared libraries. Some other interfaces have been
Guido van Rossum821a5581997-05-23 04:05:31 +000030079added too.
30080
Victor Stinner554fd082014-03-17 22:33:49 +010030081- Module rfc822 now caches the headers in a dictionary for more efficient
Guido van Rossum821a5581997-05-23 04:05:31 +000030082lookup.
30083
Victor Stinner554fd082014-03-17 22:33:49 +010030084- The sgmllib module now understands a limited number of SGML "shorthands"
Guido van Rossum821a5581997-05-23 04:05:31 +000030085like <A/.../ for <A>...</A>. (It's not clear that this was a good idea...)
30086
Victor Stinner554fd082014-03-17 22:33:49 +010030087- The tempfile module actually tries a number of different places to find a
30088usable temporary directory. (This was prompted by certain Linux
30089installations that appear to be missing a /usr/tmp directory.) [A bug in
30090the implementation that would ignore a pre-existing tmpdir global has been
Guido van Rossum821a5581997-05-23 04:05:31 +000030091fixed in beta3.]
30092
30093- Much improved and enhanved FileDialog module for Tkinter.
30094
Victor Stinner554fd082014-03-17 22:33:49 +010030095- Many small changes to Tkinter, to bring it more in line with Tk 4.0 (as
Guido van Rossum821a5581997-05-23 04:05:31 +000030096well as Tk 4.1).
30097
Victor Stinner554fd082014-03-17 22:33:49 +010030098- New socket interfaces include ntohs(), ntohl(), htons(), htonl(), and
30099s.dup(). Sockets now work correctly on Windows. On Windows, the built-in
30100extension is called _socket and a wrapper module win/socket.py provides
30101"makefile()" and "dup()" functionality. On Windows, the select module
Guido van Rossum821a5581997-05-23 04:05:31 +000030102works only with socket objects.
30103
30104- Bugs in bsddb module fixed (e.g. missing default argument values).
30105
30106- The curses extension now includes <ncurses.h> when available.
30107
Victor Stinner554fd082014-03-17 22:33:49 +010030108- The gdbm module now supports opening databases in "fast" mode by
Guido van Rossum821a5581997-05-23 04:05:31 +000030109specifying 'f' as the second character or the mode string.
30110
Victor Stinner554fd082014-03-17 22:33:49 +010030111- new variables sys.prefix and sys.exec_prefix pass corresponding
Guido van Rossum821a5581997-05-23 04:05:31 +000030112configuration options / Makefile variables to the Python programmer.
30113
Victor Stinner554fd082014-03-17 22:33:49 +010030114- The ``new'' module now supports creating new user-defined classes as well
Guido van Rossum821a5581997-05-23 04:05:31 +000030115as instances thereof.
30116
Victor Stinner554fd082014-03-17 22:33:49 +010030117- The soundex module now sports get_soundex() to get the soundex value for an
30118arbitrary string (formerly it would only do soundex-based string
Guido van Rossum821a5581997-05-23 04:05:31 +000030119comparison) as well as doc strings.
30120
Victor Stinner554fd082014-03-17 22:33:49 +010030121- New object type "cobject" to safely wrap void pointers for passing them
Guido van Rossum821a5581997-05-23 04:05:31 +000030122between various extension modules.
30123
30124- More efficient computation of float**smallint.
30125
Victor Stinner554fd082014-03-17 22:33:49 +010030126- The mysterious bug whereby "x.x" (two occurrences of the same
30127one-character name) typed from the commandline would sometimes fail
Guido van Rossum821a5581997-05-23 04:05:31 +000030128mysteriously.
30129
Victor Stinner554fd082014-03-17 22:33:49 +010030130- The initialization of the readline function can now be invoked by a C
Guido van Rossum821a5581997-05-23 04:05:31 +000030131extension through PyOS_ReadlineInit().
30132
Victor Stinner554fd082014-03-17 22:33:49 +010030133- There's now an externally visible pointer PyImport_FrozenModules which
Guido van Rossum821a5581997-05-23 04:05:31 +000030134can be changed by an embedding application.
30135
Victor Stinner554fd082014-03-17 22:33:49 +010030136- The argument parsing functions now support a new format character 'D' to
Guido van Rossum821a5581997-05-23 04:05:31 +000030137specify complex numbers.
30138
30139- Various memory leaks plugged and bugs fixed.
30140
Victor Stinner554fd082014-03-17 22:33:49 +010030141- Improved support for posix threads (now that real implementations are
Guido van Rossum821a5581997-05-23 04:05:31 +000030142beginning to apepar). Still no fully functioning semaphores.
30143
Victor Stinner554fd082014-03-17 22:33:49 +010030144- Some various and sundry improvements and new entries in the Tools
Guido van Rossum821a5581997-05-23 04:05:31 +000030145directory.
30146
30147
30148=====================================
Guido van Rossumc30e95f1996-07-30 18:53:51 +000030149==> Release 1.3 (13 October 1995) <==
30150=====================================
30151
30152Major change
30153============
30154
30155Two words: Keyword Arguments. See the first section of Chapter 12 of
30156the Tutorial.
30157
30158(The rest of this file is textually the same as the remaining sections
30159of that chapter.)
30160
30161
30162Changes to the WWW and Internet tools
30163=====================================
30164
30165The "htmllib" module has been rewritten in an incompatible fashion.
30166The new version is considerably more complete (HTML 2.0 except forms,
30167but including all ISO-8859-1 entity definitions), and easy to use.
30168Small changes to "sgmllib" have also been made, to better match the
30169tokenization of HTML as recognized by other web tools.
30170
30171A new module "formatter" has been added, for use with the new
30172"htmllib" module.
30173
30174The "urllib"and "httplib" modules have been changed somewhat to allow
30175overriding unknown URL types and to support authentication. They now
30176use "mimetools.Message" instead of "rfc822.Message" to parse headers.
30177The "endrequest()" method has been removed from the HTTP class since
30178it breaks the interaction with some servers.
30179
30180The "rfc822.Message" class has been changed to allow a flag to be
30181passed in that says that the file is unseekable.
30182
30183The "ftplib" module has been fixed to be (hopefully) more robust on
30184Linux.
30185
30186Several new operations that are optionally supported by servers have
30187been added to "nntplib": "xover", "xgtitle", "xpath" and "date".
30188
30189Other Language Changes
30190======================
30191
30192The "raise" statement now takes an optional argument which specifies
30193the traceback to be used when printing the exception's stack trace.
30194This must be a traceback object, such as found in "sys.exc_traceback".
30195When omitted or given as "None", the old behavior (to generate a stack
30196trace entry for the current stack frame) is used.
30197
30198The tokenizer is now more tolerant of alien whitespace. Control-L in
30199the leading whitespace of a line resets the column number to zero,
30200while Control-R just before the end of the line is ignored.
30201
30202Changes to Built-in Operations
30203==============================
30204
30205For file objects, "f.read(0)" and "f.readline(0)" now return an empty
30206string rather than reading an unlimited number of bytes. For the
30207latter, omit the argument altogether or pass a negative value.
30208
30209A new system variable, "sys.platform", has been added. It specifies
30210the current platform, e.g. "sunos5" or "linux1".
30211
30212The built-in functions "input()" and "raw_input()" now use the GNU
30213readline library when it has been configured (formerly, only
30214interactive input to the interpreter itself was read using GNU
30215readline). The GNU readline library provides elaborate line editing
30216and history. The Python debugger ("pdb") is the first beneficiary of
30217this change.
30218
30219Two new built-in functions, "globals()" and "locals()", provide access
30220to dictionaries containming current global and local variables,
30221respectively. (These augment rather than replace "vars()", which
30222returns the current local variables when called without an argument,
30223and a module's global variables when called with an argument of type
30224module.)
30225
30226The built-in function "compile()" now takes a third possible value for
30227the kind of code to be compiled: specifying "'single'" generates code
30228for a single interactive statement, which prints the output of
30229expression statements that evaluate to something else than "None".
30230
30231Library Changes
30232===============
30233
30234There are new module "ni" and "ihooks" that support importing modules
30235with hierarchical names such as "A.B.C". This is enabled by writing
30236"import ni; ni.ni()" at the very top of the main program. These
30237modules are amply documented in the Python source.
30238
30239The module "rexec" has been rewritten (incompatibly) to define a class
30240and to use "ihooks".
30241
30242The "string.split()" and "string.splitfields()" functions are now the
30243same function (the presence or absence of the second argument
30244determines which operation is invoked); similar for "string.join()"
30245and "string.joinfields()".
30246
30247The "Tkinter" module and its helper "Dialog" have been revamped to use
30248keyword arguments. Tk 4.0 is now the standard. A new module
30249"FileDialog" has been added which implements standard file selection
30250dialogs.
30251
30252The optional built-in modules "dbm" and "gdbm" are more coordinated
30253--- their "open()" functions now take the same values for their "flag"
30254argument, and the "flag" and "mode" argument have default values (to
30255open the database for reading only, and to create the database with
30256mode "0666" minuse the umask, respectively). The memory leaks have
30257finally been fixed.
30258
30259A new dbm-like module, "bsddb", has been added, which uses the BSD DB
30260package's hash method.
30261
30262A portable (though slow) dbm-clone, implemented in Python, has been
30263added for systems where none of the above is provided. It is aptly
30264dubbed "dumbdbm".
30265
30266The module "anydbm" provides a unified interface to "bsddb", "gdbm",
30267"dbm", and "dumbdbm", choosing the first one available.
30268
30269A new extension module, "binascii", provides a variety of operations
30270for conversion of text-encoded binary data.
30271
30272There are three new or rewritten companion modules implemented in
30273Python that can encode and decode the most common such formats: "uu"
30274(uuencode), "base64" and "binhex".
30275
30276A module to handle the MIME encoding quoted-printable has also been
30277added: "quopri".
30278
30279The parser module (which provides an interface to the Python parser's
30280abstract syntax trees) has been rewritten (incompatibly) by Fred
30281Drake. It now lets you change the parse tree and compile the result!
30282
30283The \code{syslog} module has been upgraded and documented.
30284
30285Other Changes
30286=============
30287
30288The dynamic module loader recognizes the fact that different filenames
30289point to the same shared library and loads the library only once, so
30290you can have a single shared library that defines multiple modules.
30291(SunOS / SVR4 style shared libraries only.)
30292
30293Jim Fulton's ``abstract object interface'' has been incorporated into
30294the run-time API. For more detailes, read the files
30295"Include/abstract.h" and "Objects/abstract.c".
30296
30297The Macintosh version is much more robust now.
30298
30299Numerous things I have forgotten or that are so obscure no-one will
30300notice them anyway :-)
30301
30302
Guido van Rossumf456b6d1995-01-04 19:20:37 +000030303===================================
Guido van Rossumd462f3d1995-10-09 21:30:37 +000030304==> Release 1.2 (13 April 1995) <==
30305===================================
30306
30307- Changes to Misc/python-mode.el:
30308 - Wrapping and indentation within triple quote strings should work
30309 properly now.
30310 - `Standard' bug reporting mechanism (use C-c C-b)
30311 - py-mark-block was moved to C-c C-m
30312 - C-c C-v shows you the python-mode version
30313 - a basic python-font-lock-keywords has been added for Emacs 19
30314 font-lock colorizations.
30315 - proper interaction with pending-del and del-sel modes.
30316 - New py-electric-colon (:) command for improved outdenting. Also
30317 py-indent-line (TAB) should handle outdented lines better.
30318 - New commands py-outdent-left (C-c C-l) and py-indent-right (C-c C-r)
30319
30320- The Library Reference has been restructured, and many new and
30321existing modules are now documented, in particular the debugger and
30322the profiler, as well as the persistency and the WWW/Internet support
30323modules.
30324
30325- All known bugs have been fixed. For example the pow(2,2,3L) bug on
30326Linux has been fixed. Also the re-entrancy problems with __del__ have
30327been fixed.
30328
30329- All known memory leaks have been fixed.
30330
30331- Phase 2 of the Great Renaming has been executed. The header files
30332now use the new names (PyObject instead of object, etc.). The linker
30333also sees the new names. Most source files still use the old names,
30334by virtue of the rename2.h header file. If you include Python.h, you
30335only see the new names. Dynamically linked modules have to be
30336recompiled. (Phase 3, fixing the rest of the sources, will be
30337executed gradually with the release later versions.)
30338
30339- The hooks for implementing "safe-python" (better called "restricted
30340execution") are in place. Specifically, the import statement is
30341implemented by calling the built-in function __import__, and the
30342built-in names used in a particular scope are taken from the
30343dictionary __builtins__ in that scope's global dictionary. See also
30344the new (unsupported, undocumented) module rexec.py.
30345
30346- The import statement now supports the syntax "import a.b.c" and
30347"from a.b.c import name". No officially supported implementation
30348exists, but one can be prototyped by replacing the built-in __import__
30349function. A proposal by Ken Manheimer is provided as newimp.py.
30350
30351- All machinery used by the import statement (or the built-in
30352__import__ function) is now exposed through the new built-in module
30353"imp" (see the library reference manual). All dynamic loading
30354machinery is moved to the new file importdl.c.
30355
30356- Persistent storage is supported through the use of the modules
30357"pickle" and "shelve" (implemented in Python). There's also a "copy"
30358module implementing deepcopy and normal (shallow) copy operations.
30359See the library reference manual.
30360
Martin Panter0f0eac42016-09-07 11:04:41 +000030361- Documentation strings for many object types are accessible through
Guido van Rossumd462f3d1995-10-09 21:30:37 +000030362the __doc__ attribute. Modules, classes and functions support special
30363syntax to initialize the __doc__ attribute: if the first statement
30364consists of just a string literal, that string literal becomes the
30365value of the __doc__ attribute. The default __doc__ attribute is
30366None. Documentation strings are also supported for built-in
30367functions, types and modules; however this feature hasn't been widely
30368used yet. See the 'new' module for an example. (Basically, the type
30369object's tp_doc field contains the doc string for the type, and the
303704th member of the methodlist structure contains the doc string for the
30371method.)
30372
30373- The __coerce__ and __cmp__ methods for user-defined classes once
30374again work as expected. As an example, there's a new standard class
30375Complex in the library.
30376
30377- The functions posix.popen() and posix.fdopen() now have an optional
30378third argument to specify the buffer size, and default their second
Georg Brandl93dc9eb2010-03-14 10:56:14 +000030379(mode) argument to 'r' -- in analogy to the built-in open() function.
Guido van Rossumd462f3d1995-10-09 21:30:37 +000030380The same applies to posixfile.open() and the socket method makefile().
30381
30382- The thread.exit_thread() function now raises SystemExit so that
30383'finally' clauses are honored and a memory leak is plugged.
30384
30385- Improved X11 and Motif support, by Sjoerd Mullender. This extension
30386is being maintained and distributed separately.
30387
30388- Improved support for the Apple Macintosh, in part by Jack Jansen,
30389e.g. interfaces to (a few) resource mananger functions, get/set file
30390type and creator, gestalt, sound manager, speech manager, MacTCP, comm
30391toolbox, and the think C console library. This is being maintained
30392and distributed separately.
30393
30394- Improved version for Windows NT, by Mark Hammond. This is being
30395maintained and distributed separately.
30396
30397- Used autoconf 2.0 to generate the configure script. Adapted
30398configure.in to use the new features in autoconf 2.0.
30399
30400- It now builds on the NeXT without intervention, even on the 3.3
30401Sparc pre-release.
30402
30403- Characters passed to isspace() and friends are masked to nonnegative
30404values.
30405
30406- Correctly compute pow(-3.0, 3).
30407
30408- Fix portability problems with getopt (configure now checks for a
30409non-GNU getopt).
30410
30411- Don't add frozenmain.o to libPython.a.
30412
30413- Exceptions can now be classes. ALl built-in exceptions are still
30414string objects, but this will change in the future.
30415
30416- The socket module exports a long list of socket related symbols.
30417(More built-in modules will export their symbolic constants instead of
30418relying on a separately generated Python module.)
30419
30420- When a module object is deleted, it clears out its own dictionary.
30421This fixes a circularity in the references between functions and
30422their global dictionary.
30423
30424- Changed the error handling by [new]getargs() e.g. for "O&".
30425
30426- Dynamic loading of modules using shared libraries is supported for
30427several new platforms.
30428
30429- Support "O&", "[...]" and "{...}" in mkvalue().
30430
30431- Extension to findmethod(): findmethodinchain() (where a chain is a
30432linked list of methodlist arrays). The calling interface for
30433findmethod() has changed: it now gets a pointer to the (static!)
30434methodlist structure rather than just to the function name -- this
30435saves copying flags etc. into the (short-lived) method object.
30436
30437- The callable() function is now public.
30438
30439- Object types can define a few new operations by setting function
30440pointers in the type object structure: tp_call defines how an object
30441is called, and tp_str defines how an object's str() is computed.
30442
30443
30444===================================
Guido van Rossumf456b6d1995-01-04 19:20:37 +000030445==> Release 1.1.1 (10 Nov 1994) <==
30446===================================
30447
30448This is a pure bugfix release again. See the ChangeLog file for details.
30449
30450One exception: a few new features were added to tkinter.
30451
30452
30453=================================
30454==> Release 1.1 (11 Oct 1994) <==
30455=================================
30456
30457This release adds several new features, improved configuration and
30458portability, and fixes more bugs than I can list here (including some
30459memory leaks).
30460
30461The source compiles and runs out of the box on more platforms than
30462ever -- including Windows NT. Makefiles or projects for a variety of
30463non-UNIX platforms are provided.
30464
30465APOLOGY: some new features are badly documented or not at all. I had
30466the choice -- postpone the new release indefinitely, or release it
30467now, with working code but some undocumented areas. The problem with
30468postponing the release is that people continue to suffer from existing
30469bugs, and send me patches based on the previous release -- which I
30470can't apply directly because my own source has changed. Also, some
30471new modules (like signal) have been ready for release for quite some
30472time, and people are anxiously waiting for them. In the case of
30473signal, the interface is simple enough to figure out without
30474documentation (if you're anxious enough :-). In this case it was not
30475simple to release the module on its own, since it relies on many small
30476patches elsewhere in the source.
30477
30478For most new Python modules, the source code contains comments that
30479explain how to use them. Documentation for the Tk interface, written
30480by Matt Conway, is available as tkinter-doc.tar.gz from the Python
30481home and mirror ftp sites (see Misc/FAQ for ftp addresses). For the
30482new operator overloading facilities, have a look at Demo/classes:
30483Complex.py and Rat.py show how to implement a numeric type without and
30484with __coerce__ method. Also have a look at the end of the Tutorial
30485document (Doc/tut.tex). If you're still confused: use the newsgroup
30486or mailing list.
30487
30488
30489New language features:
30490
30491 - More flexible operator overloading for user-defined classes
30492 (INCOMPATIBLE WITH PREVIOUS VERSIONS!) See end of tutorial.
30493
30494 - Classes can define methods named __getattr__, __setattr__ and
30495 __delattr__ to trap attribute accesses. See end of tutorial.
30496
30497 - Classes can define method __call__ so instances can be called
30498 directly. See end of tutorial.
30499
30500
30501New support facilities:
30502
30503 - The Makefiles (for the base interpreter as well as for extensions)
30504 now support creating dynamically loadable modules if the platform
30505 supports shared libraries.
30506
30507 - Passing the interpreter a .pyc file as script argument will execute
30508 the code in that file. (On the Mac such files can be double-clicked!)
30509
30510 - New Freeze script, to create independently distributable "binaries"
30511 of Python programs -- look in Demo/freeze
30512
30513 - Improved h2py script (in Demo/scripts) follows #includes and
30514 supports macros with one argument
30515
30516 - New module compileall generates .pyc files for all modules in a
30517 directory (tree) without also executing them
30518
30519 - Threads should work on more platforms
30520
30521
30522New built-in modules:
30523
30524 - tkinter (support for Tcl's Tk widget set) is now part of the base
30525 distribution
30526
30527 - signal allows catching or ignoring UNIX signals (unfortunately still
30528 undocumented -- any taker?)
30529
30530 - termios provides portable access to POSIX tty settings
30531
30532 - curses provides an interface to the System V curses library
30533
30534 - syslog provides an interface to the (BSD?) syslog daemon
30535
30536 - 'new' provides interfaces to create new built-in object types
30537 (e.g. modules and functions)
30538
30539 - sybase provides an interface to SYBASE database
30540
30541
30542New/obsolete built-in methods:
30543
30544 - callable(x) tests whether x can be called
30545
30546 - sockets now have a setblocking() method
30547
30548 - sockets no longer have an allowbroadcast() method
30549
30550 - socket methods send() and sendto() return byte count
30551
30552
30553New standard library modules:
30554
30555 - types.py defines standard names for built-in types, e.g. StringType
30556
30557 - urlparse.py parses URLs according to the latest Internet draft
30558
30559 - uu.py does uuencode/uudecode (not the fastest in the world, but
30560 quicker than installing uuencode on a non-UNIX machine :-)
30561
30562 - New, faster and more powerful profile module.py
30563
30564 - mhlib.py provides interface to MH folders and messages
30565
30566
30567New facilities for extension writers (unfortunately still
30568undocumented):
30569
30570 - newgetargs() supports optional arguments and improved error messages
30571
30572 - O!, O& O? formats for getargs allow more versatile type checking of
30573 non-standard types
30574
30575 - can register pending asynchronous callback, to be called the next
30576 time the Python VM begins a new instruction (Py_AddPendingCall)
30577
30578 - can register cleanup routines to be called when Python exits
30579 (Py_AtExit)
30580
30581 - makesetup script understands C++ files in Setup file (use file.C
30582 or file.cc)
30583
30584 - Make variable OPT is passed on to sub-Makefiles
30585
30586 - An init<module>() routine may signal an error by not entering
30587 the module in the module table and raising an exception instead
30588
30589 - For long module names, instead of foobarbletchmodule.c you can
30590 use foobarbletch.c
30591
30592 - getintvalue() and getfloatvalue() try to convert any object
30593 instead of requiring an "intobject" or "floatobject"
30594
30595 - All the [new]getargs() formats that retrieve an integer value
30596 will now also work if a float is passed
30597
30598 - C function listtuple() converts list to tuple, fast
30599
30600 - You should now call sigcheck() instead of intrcheck();
30601 sigcheck() also sets an exception when it returns nonzero
30602
30603
Guido van Rossumaa253861994-10-06 17:18:57 +000030604====================================
30605==> Release 1.0.3 (14 July 1994) <==
30606====================================
30607
30608This release consists entirely of bug fixes to the C sources; see the
30609head of ../ChangeLog for a complete list. Most important bugs fixed:
30610
30611- Sometimes the format operator (string%expr) would drop the last
30612character of the format string
30613
30614- Tokenizer looped when last line did not end in \n
30615
30616- Bug when triple-quoted string ended in quote plus newline
30617
30618- Typo in socketmodule (listen) (== instead of =)
30619
30620- typing vars() at the >>> prompt would cause recursive output
30621
30622
30623==================================
30624==> Release 1.0.2 (4 May 1994) <==
30625==================================
30626
30627Overview of the most visible changes. Bug fixes are not listed. See
30628also ChangeLog.
30629
30630Tokens
30631------
30632
30633* String literals follow Standard C rules: they may be continued on
30634the next line using a backslash; adjacent literals are concatenated
30635at compile time.
30636
30637* A new kind of string literals, surrounded by triple quotes (""" or
30638'''), can be continued on the next line without a backslash.
30639
30640Syntax
30641------
30642
30643* Function arguments may have a default value, e.g. def f(a, b=1);
30644defaults are evaluated at function definition time. This also applies
30645to lambda.
30646
30647* The try-except statement has an optional else clause, which is
30648executed when no exception occurs in the try clause.
30649
30650Interpreter
30651-----------
30652
30653* The result of a statement-level expression is no longer printed,
30654except_ for expressions entered interactively. Consequently, the -k
30655command line option is gone.
30656
30657* The result of the last printed interactive expression is assigned to
30658the variable '_'.
30659
30660* Access to implicit global variables has been speeded up by removing
30661an always-failing dictionary lookup in the dictionary of local
30662variables (mod suggested by Steve Makewski and Tim Peters).
30663
30664* There is a new command line option, -u, to force stdout and stderr
30665to be unbuffered.
30666
30667* Incorporated Steve Majewski's mods to import.c for dynamic loading
30668under AIX.
30669
30670* Fewer chances of dumping core when trying to reload or re-import
30671static built-in, dynamically loaded built-in, or frozen modules.
30672
30673* Loops over sequences now don't ask for the sequence's length when
30674they start, but try to access items 0, 1, 2, and so on until they hit
30675an IndexError. This makes it possible to create classes that generate
30676infinite or indefinite sequences a la Steve Majewski. This affects
30677for loops, the (not) in operator, and the built-in functions filter(),
30678map(), max(), min(), reduce().
30679
30680Changed Built-in operations
30681---------------------------
30682
30683* The '%' operator on strings (printf-style formatting) supports a new
30684feature (adapted from a patch by Donald Beaudry) to allow
30685'%(<key>)<format>' % {...} to take values from a dictionary by name
30686instead of from a tuple by position (see also the new function
30687vars()).
30688
30689* The '%s' formatting operator is changed to accept any type and
30690convert it to a string using str().
30691
30692* Dictionaries with more than 20,000 entries can now be created
30693(thanks to Steve Kirsch).
30694
30695New Built-in Functions
30696----------------------
30697
30698* vars() returns a dictionary containing the local variables; vars(m)
30699returns a dictionary containing the variables of module m. Note:
30700dir(x) is now equivalent to vars(x).keys().
30701
30702Changed Built-in Functions
30703--------------------------
30704
30705* open() has an optional third argument to specify the buffer size: 0
30706for unbuffered, 1 for line buffered, >1 for explicit buffer size, <0
30707for default.
30708
30709* open()'s second argument is now optional; it defaults to "r".
30710
30711* apply() now checks that its second argument is indeed a tuple.
30712
30713New Built-in Modules
30714--------------------
30715
30716Changed Built-in Modules
30717------------------------
30718
30719The thread module no longer supports exit_prog().
30720
30721New Python Modules
30722------------------
30723
30724* Module addpack contains a standard interface to modify sys.path to
30725find optional packages (groups of related modules).
30726
30727* Module urllib contains a number of functions to access
30728World-Wide-Web files specified by their URL.
30729
30730* Module httplib implements the client side of the HTTP protocol used
30731by World-Wide-Web servers.
30732
30733* Module gopherlib implements the client side of the Gopher protocol.
30734
30735* Module mailbox (by Jack Jansen) contains a parser for UNIX and MMDF
30736style mailbox files.
30737
30738* Module random contains various random distributions, e.g. gauss().
30739
30740* Module lockfile locks and unlocks open files using fcntl (inspired
30741by a similar module by Andy Bensky).
30742
30743* Module ntpath (by Jaap Vermeulen) implements path operations for
30744Windows/NT.
30745
30746* Module test_thread (in Lib/test) contains a small test set for the
30747thread module.
30748
30749Changed Python Modules
30750----------------------
30751
30752* The string module's expandvars() function is now documented and is
30753implemented in Python (using regular expressions) instead of forking
30754off a shell process.
30755
30756* Module rfc822 now supports accessing the header fields using the
30757mapping/dictionary interface, e.g. h['subject'].
30758
30759* Module pdb now makes it possible to set a break on a function
30760(syntax: break <expression>, where <expression> yields a function
30761object).
30762
30763Changed Demos
30764-------------
30765
30766* The Demo/scripts/freeze.py script is working again (thanks to Jaap
30767Vermeulen).
30768
30769New Demos
30770---------
30771
30772* Demo/threads/Generator.py is a proposed interface for restartable
30773functions a la Tim Peters.
30774
30775* Demo/scripts/newslist.py, by Quentin Stafford-Fraser, generates a
30776directory full of HTML pages which between them contain links to all
30777the newsgroups available on your server.
30778
30779* Demo/dns contains a DNS (Domain Name Server) client.
30780
30781* Demo/lutz contains miscellaneous demos by Mark Lutz (e.g. psh.py, a
30782nice enhanced Python shell!!!).
30783
30784* Demo/turing contains a Turing machine by Amrit Prem.
30785
30786Documentation
30787-------------
30788
30789* Documented new language features mentioned above (but not all new
30790modules).
30791
30792* Added a chapter to the Tutorial describing recent additions to
30793Python.
30794
30795* Clarified some sentences in the reference manual,
30796e.g. break/continue, local/global scope, slice assignment.
30797
30798Source Structure
30799----------------
30800
30801* Moved Include/tokenizer.h to Parser/tokenizer.h.
30802
30803* Added Python/getopt.c for systems that don't have it.
30804
30805Emacs mode
30806----------
30807
30808* Indentation of continuated lines is done more intelligently;
30809consequently the variable py-continuation-offset is gone.
30810
Guido van Rossumf2eac992000-09-04 17:24:24 +000030811
Guido van Rossumaa253861994-10-06 17:18:57 +000030812========================================
30813==> Release 1.0.1 (15 February 1994) <==
30814========================================
30815
30816* Many portability fixes should make it painless to build Python on
30817several new platforms, e.g. NeXT, SEQUENT, WATCOM, DOS, and Windows.
30818
30819* Fixed test for <stdarg.h> -- this broke on some platforms.
30820
30821* Fixed test for shared library dynalic loading -- this broke on SunOS
308224.x using the GNU loader.
30823
30824* Changed order and number of SVR4 networking libraries (it is now
30825-lsocket -linet -lnsl, if these libraries exist).
30826
30827* Installing the build intermediate stages with "make libainstall" now
30828also installs config.c.in, Setup and makesetup, which are used by the
30829new Extensions mechanism.
30830
30831* Improved README file contains more hints and new troubleshooting
30832section.
30833
30834* The built-in module strop now defines fast versions of three more
30835functions of the standard string module: atoi(), atol() and atof().
30836The strop versions of atoi() and atol() support an optional second
30837argument to specify the base (default 10). NOTE: you don't have to
30838explicitly import strop to use the faster versions -- the string
30839module contains code to let versions from stop override the default
30840versions.
30841
30842* There is now a working Lib/dospath.py for those who use Python under
30843DOS (or Windows). Thanks, Jaap!
30844
30845* There is now a working Modules/dosmodule.c for DOS (or Windows)
30846system calls.
30847
30848* Lib.os.py has been reorganized (making it ready for more operating
30849systems).
30850
30851* Lib/ospath.py is now obsolete (use os.path instead).
30852
30853* Many fixes to the tutorial to make it match Python 1.0. Thanks,
30854Tim!
30855
30856* Fixed Doc/Makefile, Doc/README and various scripts there.
30857
30858* Added missing description of fdopen to Doc/libposix.tex.
30859
30860* Made cleanup() global, for the benefit of embedded applications.
30861
30862* Added parsing of addresses and dates to Lib/rfc822.py.
30863
30864* Small fixes to Lib/aifc.py, Lib/sunau.py, Lib/tzparse.py to make
30865them usable at all.
30866
30867* New module Lib/wave.py reads RIFF (*.wav) audio files.
30868
30869* Module Lib/filewin.py moved to Lib/stdwin/filewin.py where it
30870belongs.
30871
30872* New options and comments for Modules/makesetup (used by new
30873Extension mechanism).
30874
30875* Misc/HYPE contains text of announcement of 1.0.0 in comp.lang.misc
30876and elsewhere.
30877
30878* Fixed coredump in filter(None, 'abcdefg').
30879
30880
30881=======================================
30882==> Release 1.0.0 (26 January 1994) <==
30883=======================================
30884
30885As is traditional, so many things have changed that I can't pretend to
30886be complete in these release notes, but I'll try anyway :-)
30887
30888Note that the very last section is labeled "remaining bugs".
30889
30890
30891Source organization and build process
30892-------------------------------------
30893
30894* The sources have finally been split: instead of a single src
30895subdirectory there are now separate directories Include, Parser,
30896Grammar, Objects, Python and Modules. Other directories also start
30897with a capital letter: Misc, Doc, Lib, Demo.
30898
30899* A few extensions (notably Amoeba and X support) have been moved to a
30900separate subtree Extensions, which is no longer in the core
30901distribution, but separately ftp'able as extensions.tar.Z. (The
30902distribution contains a placeholder Ext-dummy with a description of
30903the Extensions subtree as well as the most recent versions of the
30904scripts used there.)
30905
30906* A few large specialized demos (SGI video and www) have been
30907moved to a separate subdirectory Demo2, which is no longer in the core
30908distribution, but separately ftp'able as demo2.tar.Z.
30909
30910* Parts of the standard library have been moved to subdirectories:
30911there are now standard subdirectories stdwin, test, sgi and sun4.
30912
30913* The configuration process has radically changed: I now use GNU
30914autoconf. This makes it much easier to build on new Unix flavors, as
30915well as fully supporting VPATH (if your Make has it). The scripts
30916Configure.py and Addmodule.sh are no longer needed. Many source files
30917have been adapted in order to work with the symbols that the configure
30918script generated by autoconf defines (or not); the resulting source is
30919much more portable to different C compilers and operating systems,
30920even non Unix systems (a Mac port was done in an afternoon). See the
30921toplevel README file for a description of the new build process.
30922
30923* GNU readline (a slightly newer version) is now a subdirectory of the
30924Python toplevel. It is still not automatically configured (being
30925totally autoconf-unaware :-). One problem has been solved: typing
30926Control-C to a readline prompt will now work. The distribution no
30927longer contains a "super-level" directory (above the python toplevel
30928directory), and dl, dl-dld and GNU dld are no longer part of the
30929Python distribution (you can still ftp them from
30930ftp.cwi.nl:/pub/dynload).
30931
30932* The DOS functions have been taken out of posixmodule.c and moved
30933into a separate file dosmodule.c.
30934
30935* There's now a separate file version.c which contains nothing but
30936the version number.
30937
30938* The actual main program is now contained in config.c (unless NO_MAIN
30939is defined); pythonmain.c now contains a function realmain() which is
30940called from config.c's main().
30941
30942* All files needed to use the built-in module md5 are now contained in
30943the distribution. The module has been cleaned up considerably.
30944
30945
30946Documentation
30947-------------
30948
30949* The library manual has been split into many more small latex files,
30950so it is easier to edit Doc/lib.tex file to create a custom library
30951manual, describing only those modules supported on your system. (This
30952is not automated though.)
30953
30954* A fourth manual has been added, titled "Extending and Embedding the
30955Python Interpreter" (Doc/ext.tex), which collects information about
30956the interpreter which was previously spread over several files in the
30957misc subdirectory.
30958
30959* The entire documentation is now also available on-line for those who
30960have a WWW browser (e.g. NCSA Mosaic). Point your browser to the URL
30961"http://www.cwi.nl/~guido/Python.html".
30962
30963
30964Syntax
30965------
30966
30967* Strings may now be enclosed in double quotes as well as in single
30968quotes. There is no difference in interpretation. The repr() of
30969string objects will use double quotes if the string contains a single
30970quote and no double quotes. Thanks to Amrit Prem for these changes!
30971
30972* There is a new keyword 'exec'. This replaces the exec() built-in
30973function. If a function contains an exec statement, local variable
30974optimization is not performed for that particular function, thus
30975making assignment to local variables in exec statements less
30976confusing. (As a consequence, os.exec and python.exec have been
30977renamed to execv.)
30978
30979* There is a new keyword 'lambda'. An expression of the form
30980
30981 lambda <parameters> : <expression>
30982
30983yields an anonymous function. This is really only syntactic sugar;
30984you can just as well define a local function using
30985
30986 def some_temporary_name(<parameters>): return <expression>
30987
30988Lambda expressions are particularly useful in combination with map(),
30989filter() and reduce(), described below. Thanks to Amrit Prem for
30990submitting this code (as well as map(), filter(), reduce() and
30991xrange())!
30992
30993
30994Built-in functions
30995------------------
30996
30997* The built-in module containing the built-in functions is called
30998__builtin__ instead of builtin.
30999
31000* New built-in functions map(), filter() and reduce() perform standard
31001functional programming operations (though not lazily):
31002
31003- map(f, seq) returns a new sequence whose items are the items from
31004seq with f() applied to them.
31005
31006- filter(f, seq) returns a subsequence of seq consisting of those
31007items for which f() is true.
31008
31009- reduce(f, seq, initial) returns a value computed as follows:
31010 acc = initial
31011 for item in seq: acc = f(acc, item)
31012 return acc
31013
31014* New function xrange() creates a "range object". Its arguments are
31015the same as those of range(), and when used in a for loop a range
31016objects also behaves identical. The advantage of xrange() over
31017range() is that its representation (if the range contains many
31018elements) is much more compact than that of range(). The disadvantage
31019is that the result cannot be used to initialize a list object or for
31020the "Python idiom" [RED, GREEN, BLUE] = range(3). On some modern
31021architectures, benchmarks have shown that "for i in range(...): ..."
31022actually executes *faster* than "for i in xrange(...): ...", but on
31023memory starved machines like PCs running DOS range(100000) may be just
31024too big to be represented at all...
31025
31026* Built-in function exec() has been replaced by the exec statement --
31027see above.
31028
31029
31030The interpreter
31031---------------
31032
31033* Syntax errors are now not printed to stderr by the parser, but
31034rather the offending line and other relevant information are packed up
31035in the SyntaxError exception argument. When the main loop catches a
31036SyntaxError exception it will print the error in the same format as
31037previously, but at the proper position in the stack traceback.
31038
31039* You can now set a maximum to the number of traceback entries
31040printed by assigning to sys.tracebacklimit. The default is 1000.
31041
31042* The version number in .pyc files has changed yet again.
31043
31044* It is now possible to have a .pyc file without a corresponding .py
31045file. (Warning: this may break existing installations if you have an
31046old .pyc file lingering around somewhere on your module search path
31047without a corresponding .py file, when there is a .py file for a
31048module of the same name further down the path -- the new interpreter
31049will find the first .pyc file and complain about it, while the old
31050interpreter would ignore it and use the .py file further down.)
31051
31052* The list sys.builtin_module_names is now sorted and also contains
31053the names of a few hardwired built-in modules (sys, __main__ and
31054__builtin__).
31055
31056* A module can now find its own name by accessing the global variable
31057__name__. Assigning to this variable essentially renames the module
31058(it should also be stored under a different key in sys.modules).
31059A neat hack follows from this: a module that wants to execute a main
31060program when called as a script no longer needs to compare
31061sys.argv[0]; it can simply do "if __name__ == '__main__': main()".
31062
31063* When an object is printed by the print statement, its implementation
31064of str() is used. This means that classes can define __str__(self) to
31065direct how their instances are printed. This is different from
31066__repr__(self), which should define an unambigous string
31067representation of the instance. (If __str__() is not defined, it
31068defaults to __repr__().)
31069
31070* Functions and code objects can now be compared meaningfully.
31071
31072* On systems supporting SunOS or SVR4 style shared libraries, dynamic
31073loading of modules using shared libraries is automatically configured.
31074Thanks to Bill Jansen and Denis Severson for contributing this change!
31075
31076
31077Built-in objects
31078----------------
31079
31080* File objects have acquired a new method writelines() which is the
31081reverse of readlines(). (It does not actually write lines, just a
31082list of strings, but the symmetry makes the choice of name OK.)
31083
31084
31085Built-in modules
31086----------------
31087
31088* Socket objects no longer support the avail() method. Use the select
31089module instead, or use this function to replace it:
31090
31091 def avail(f):
31092 import select
31093 return f in select.select([f], [], [], 0)[0]
31094
31095* Initialization of stdwin is done differently. It actually modifies
31096sys.argv (taking out the options the X version of stdwin recognizes)
31097the first time it is imported.
31098
31099* A new built-in module parser provides a rudimentary interface to the
31100python parser. Corresponding standard library modules token and symbol
31101defines the numeric values of tokens and non-terminal symbols.
31102
Martin Panter46f50722016-05-26 05:35:26 +000031103* The posix module has acquired new functions setuid(), setgid(),
Guido van Rossumaa253861994-10-06 17:18:57 +000031104execve(), and exec() has been renamed to execv().
31105
31106* The array module is extended with 8-byte object swaps, the 'i'
31107format character, and a reverse() method. The read() and write()
31108methods are renamed to fromfile() and tofile().
31109
31110* The rotor module has freed of portability bugs. This introduces a
31111backward compatibility problem: strings encoded with the old rotor
31112module can't be decoded by the new version.
31113
31114* For select.select(), a timeout (4th) argument of None means the same
31115as leaving the timeout argument out.
31116
Martin Panter46f50722016-05-26 05:35:26 +000031117* Module strop (and hence standard library module string) has acquired
Guido van Rossumaa253861994-10-06 17:18:57 +000031118a new function: rindex(). Thanks to Amrit Prem!
31119
31120* Module regex defines a new function symcomp() which uses an extended
31121regular expression syntax: parenthesized subexpressions may be labeled
31122using the form "\(<labelname>...\)", and the group() method can return
31123sub-expressions by name. Thanks to Tracy Tims for these changes!
31124
31125* Multiple threads are now supported on Solaris 2. Thanks to Sjoerd
31126Mullender!
31127
31128
31129Standard library modules
31130------------------------
31131
31132* The library is now split in several subdirectories: all stuff using
31133stdwin is in Lib/stdwin, all SGI specific (or SGI Indigo or GL) stuff
31134is in Lib/sgi, all Sun Sparc specific stuff is in Lib/sun4, and all
31135test modules are in Lib/test. The default module search path will
31136include all relevant subdirectories by default.
31137
31138* Module os now knows about trying to import dos. It defines
31139functions execl(), execle(), execlp() and execvp().
31140
31141* New module dospath (should be attacked by a DOS hacker though).
31142
31143* All modules defining classes now define __init__() constructors
31144instead of init() methods. THIS IS AN INCOMPATIBLE CHANGE!
31145
31146* Some minor changes and bugfixes module ftplib (mostly Steve
31147Majewski's suggestions); the debug() method is renamed to
31148set_debuglevel().
31149
31150* Some new test modules (not run automatically by testall though):
31151test_audioop, test_md5, test_rgbimg, test_select.
31152
31153* Module string now defines rindex() and rfind() in analogy of index()
31154and find(). It also defines atof() and atol() (and corresponding
31155exceptions) in analogy to atoi().
31156
31157* Added help() functions to modules profile and pdb.
31158
31159* The wdb debugger (now in Lib/stdwin) now shows class or instance
31160variables on a double click. Thanks to Sjoerd Mullender!
31161
31162* The (undocumented) module lambda has gone -- you couldn't import it
31163any more, and it was basically more a demo than a library module...
31164
31165
31166Multimedia extensions
31167---------------------
31168
31169* The optional built-in modules audioop and imageop are now standard
31170parts of the interpreter. Thanks to Sjoerd Mullender and Jack Jansen
31171for contributing this code!
31172
31173* There's a new operation in audioop: minmax().
31174
31175* There's a new built-in module called rgbimg which supports portable
31176efficient reading of SGI RCG image files. Thanks also to Paul
31177Haeberli for the original code! (Who will contribute a GIF reader?)
31178
31179* The module aifc is gone -- you should now always use aifc, which has
31180received a facelift.
31181
31182* There's a new module sunau., for reading Sun (and NeXT) audio files.
31183
31184* There's a new module audiodev which provides a uniform interface to
31185(SGI Indigo and Sun Sparc) audio hardware.
31186
31187* There's a new module sndhdr which recognizes various sound files by
31188looking in their header and checking for various magic words.
31189
31190
31191Optimizations
31192-------------
31193
31194* Most optimizations below can be configured by compile-time flags.
31195Thanks to Sjoerd Mullender for submitting these optimizations!
31196
31197* Small integers (default -1..99) are shared -- i.e. if two different
31198functions compute the same value it is possible (but not
31199guaranteed!!!) that they return the same *object*. Python programs
31200can detect this but should *never* rely on it.
31201
31202* Empty tuples (which all compare equal) are shared in the same
31203manner.
31204
31205* Tuples of size up to 20 (default) are put in separate free lists
31206when deallocated.
31207
31208* There is a compile-time option to cache a string's hash function,
31209but this appeared to have a negligeable effect, and as it costs 4
31210bytes per string it is disabled by default.
31211
31212
31213Embedding Python
31214----------------
31215
31216* The initialization interface has been simplified somewhat. You now
31217only call "initall()" to initialize the interpreter.
31218
31219* The previously announced renaming of externally visible identifiers
31220has not been carried out. It will happen in a later release. Sorry.
31221
31222
31223Miscellaneous bugs that have been fixed
31224---------------------------------------
31225
31226* All known portability bugs.
31227
31228* Version 0.9.9 dumped core in <listobject>.sort() which has been
31229fixed. Thanks to Jaap Vermeulen for fixing this and posting the fix
31230on the mailing list while I was away!
31231
31232* Core dump on a format string ending in '%', e.g. in the expression
31233'%' % None.
31234
31235* The array module yielded a bogus result for concatenation (a+b would
31236yield a+a).
31237
31238* Some serious memory leaks in strop.split() and strop.splitfields().
31239
31240* Several problems with the nis module.
31241
31242* Subtle problem when copying a class method from another class
31243through assignment (the method could not be called).
31244
31245
31246Remaining bugs
31247--------------
31248
31249* One problem with 64-bit machines remains -- since .pyc files are
31250portable and use only 4 bytes to represent an integer object, 64-bit
31251integer literals are silently truncated when written into a .pyc file.
31252Work-around: use eval('123456789101112').
31253
31254* The freeze script doesn't work any more. A new and more portable
31255one can probably be cooked up using tricks from Extensions/mkext.py.
31256
31257* The dos support hasn't been tested yet. (Really Soon Now we should
31258have a PC with a working C compiler!)
31259
31260
Guido van Rossuma7925f11994-01-26 10:20:16 +000031261===================================
31262==> Release 0.9.9 (29 Jul 1993) <==
31263===================================
31264
31265I *believe* these are the main user-visible changes in this release,
31266but there may be others. SGI users may scan the {src,lib}/ChangeLog
31267files for improvements of some SGI specific modules, e.g. aifc and
31268cl. Developers of extension modules should also read src/ChangeLog.
31269
31270
31271Naming of C symbols used by the Python interpreter
31272--------------------------------------------------
31273
31274* This is the last release using the current naming conventions. New
31275naming conventions are explained in the file misc/NAMING.
31276Summarizing, all externally visible symbols get (at least) a "Py"
31277prefix, and most functions are renamed to the standard form
31278PyModule_FunctionName.
31279
31280* Writers of extensions are urged to start using the new naming
31281conventions. The next release will use the new naming conventions
31282throughout (it will also have a different source directory
31283structure).
31284
31285* As a result of the preliminary work for the great renaming, many
31286functions that were accidentally global have been made static.
31287
31288
31289BETA X11 support
31290----------------
31291
31292* There are now modules interfacing to the X11 Toolkit Intrinsics, the
31293Athena widgets, and the Motif 1.1 widget set. These are not yet
31294documented except through the examples and README file in the demo/x11
31295directory. It is expected that this interface will be replaced by a
31296more powerful and correct one in the future, which may or may not be
31297backward compatible. In other words, this part of the code is at most
31298BETA level software! (Note: the rest of Python is rock solid as ever!)
31299
31300* I understand that the above may be a bit of a disappointment,
31301however my current schedule does not allow me to change this situation
31302before putting the release out of the door. By releasing it
31303undocumented and buggy, at least some of the (working!) demo programs,
31304like itr (my Internet Talk Radio browser) become available to a larger
31305audience.
31306
31307* There are also modules interfacing to SGI's "Glx" widget (a GL
31308window wrapped in a widget) and to NCSA's "HTML" widget (which can
31309format HyperText Markup Language, the document format used by the
31310World Wide Web).
31311
31312* I've experienced some problems when building the X11 support. In
31313particular, the Xm and Xaw widget sets don't go together, and it
31314appears that using X11R5 is better than using X11R4. Also the threads
31315module and its link time options may spoil things. My own strategy is
31316to build two Python binaries: one for use with X11 and one without
31317it, which can contain a richer set of built-in modules. Don't even
31318*think* of loading the X11 modules dynamically...
31319
31320
31321Environmental changes
31322---------------------
31323
31324* Compiled files (*.pyc files) created by this Python version are
31325incompatible with those created by the previous version. Both
31326versions detect this and silently create a correct version, but it
31327means that it is not a good idea to use the same library directory for
31328an old and a new interpreter, since they will start to "fight" over
31329the *.pyc files...
31330
31331* When a stack trace is printed, the exception is printed last instead
31332of first. This means that if the beginning of the stack trace
31333scrolled out of your window you can still see what exception caused
31334it.
31335
31336* Sometimes interrupting a Python operation does not work because it
31337hangs in a blocking system call. You can now kill the interpreter by
31338interrupting it three times. The second time you interrupt it, a
31339message will be printed telling you that the third interrupt will kill
31340the interpreter. The "sys.exitfunc" feature still makes limited
31341clean-up possible in this case.
31342
31343
31344Changes to the command line interface
31345-------------------------------------
31346
31347* The python usage message is now much more informative.
31348
31349* New option -i enters interactive mode after executing a script --
31350useful for debugging.
31351
31352* New option -k raises an exception when an expression statement
31353yields a value other than None.
31354
31355* For each option there is now also a corresponding environment
31356variable.
31357
31358
31359Using Python as an embedded language
31360------------------------------------
31361
31362* The distribution now contains (some) documentation on the use of
31363Python as an "embedded language" in other applications, as well as a
31364simple example. See the file misc/EMBEDDING and the directory embed/.
31365
31366
31367Speed improvements
31368------------------
31369
31370* Function local variables are now generally stored in an array and
31371accessed using an integer indexing operation, instead of through a
31372dictionary lookup. (This compensates the somewhat slower dictionary
31373lookup caused by the generalization of the dictionary module.)
31374
31375
31376Changes to the syntax
31377---------------------
31378
31379* Continuation lines can now *sometimes* be written without a
31380backslash: if the continuation is contained within nesting (), [] or
31381{} brackets the \ may be omitted. There's a much improved
31382python-mode.el in the misc directory which knows about this as well.
31383
31384* You can no longer use an empty set of parentheses to define a class
31385without base classes. That is, you no longer write this:
31386
31387 class Foo(): # syntax error
31388 ...
31389
31390You must write this instead:
31391
31392 class Foo:
31393 ...
31394
31395This was already the preferred syntax in release 0.9.8 but many
31396people seemed not to have picked it up. There's a Python script that
31397fixes old code: demo/scripts/classfix.py.
31398
31399* There's a new reserved word: "access". The syntax and semantics are
Georg Brandleeb575f2009-06-24 06:42:05 +000031400still subject of research and debate (as well as undocumented), but
Guido van Rossuma7925f11994-01-26 10:20:16 +000031401the parser knows about the keyword so you must not use it as a
31402variable, function, or attribute name.
31403
31404
31405Changes to the semantics of the language proper
31406-----------------------------------------------
31407
31408* The following compatibility hack is removed: if a function was
31409defined with two or more arguments, and called with a single argument
31410that was a tuple with just as many arguments, the items of this tuple
31411would be used as the arguments. This is no longer supported.
31412
31413
31414Changes to the semantics of classes and instances
31415-------------------------------------------------
31416
31417* Class variables are now also accessible as instance variables for
31418reading (assignment creates an instance variable which overrides the
31419class variable of the same name though).
31420
31421* If a class attribute is a user-defined function, a new kind of
31422object is returned: an "unbound method". This contains a pointer to
31423the class and can only be called with a first argument which is a
31424member of that class (or a derived class).
31425
31426* If a class defines a method __init__(self, arg1, ...) then this
31427method is called when a class instance is created by the classname()
31428construct. Arguments passed to classname() are passed to the
31429__init__() method. The __init__() methods of base classes are not
31430automatically called; the derived __init__() method must call these if
31431necessary (this was done so the derived __init__() method can choose
31432the call order and arguments for the base __init__() methods).
31433
31434* If a class defines a method __del__(self) then this method is called
31435when an instance of the class is about to be destroyed. This makes it
31436possible to implement clean-up of external resources attached to the
31437instance. As with __init__(), the __del__() methods of base classes
31438are not automatically called. If __del__ manages to store a reference
31439to the object somewhere, its destruction is postponed; when the object
31440is again about to be destroyed its __del__() method will be called
31441again.
31442
31443* Classes may define a method __hash__(self) to allow their instances
31444to be used as dictionary keys. This must return a 32-bit integer.
31445
31446
31447Minor improvements
31448------------------
31449
31450* Function and class objects now know their name (the name given in
31451the 'def' or 'class' statement that created them).
31452
31453* Class instances now know their class name.
31454
31455
31456Additions to built-in operations
31457--------------------------------
31458
31459* The % operator with a string left argument implements formatting
31460similar to sprintf() in C. The right argument is either a single
31461value or a tuple of values. All features of Standard C sprintf() are
31462supported except %p.
31463
31464* Dictionaries now support almost any key type, instead of just
31465strings. (The key type must be an immutable type or must be a class
31466instance where the class defines a method __hash__(), in order to
31467avoid losing track of keys whose value may change.)
31468
31469* Built-in methods are now compared properly: when comparing x.meth1
31470and y.meth2, if x is equal to y and the methods are defined by the
31471same function, x.meth1 compares equal to y.meth2.
31472
31473
31474Additions to built-in functions
31475-------------------------------
31476
31477* str(x) returns a string version of its argument. If the argument is
31478a string it is returned unchanged, otherwise it returns `x`.
31479
31480* repr(x) returns the same as `x`. (Some users found it easier to
31481have this as a function.)
31482
Serhiy Storchaka6a7b3a72016-04-17 08:32:47 +030031483* round(x) returns the floating point number x rounded to a whole
Guido van Rossuma7925f11994-01-26 10:20:16 +000031484number, represented as a floating point number. round(x, n) returns x
31485rounded to n digits.
31486
31487* hasattr(x, name) returns true when x has an attribute with the given
31488name.
31489
31490* hash(x) returns a hash code (32-bit integer) of an arbitrary
31491immutable object's value.
31492
31493* id(x) returns a unique identifier (32-bit integer) of an arbitrary
31494object.
31495
31496* compile() compiles a string to a Python code object.
31497
31498* exec() and eval() now support execution of code objects.
31499
31500
31501Changes to the documented part of the library (standard modules)
31502----------------------------------------------------------------
31503
31504* os.path.normpath() (a.k.a. posixpath.normpath()) has been fixed so
31505the border case '/foo/..' returns '/' instead of ''.
31506
31507* A new function string.find() is added with similar semantics to
31508string.index(); however when it does not find the given substring it
31509returns -1 instead of raising string.index_error.
31510
31511
31512Changes to built-in modules
31513---------------------------
31514
31515* New optional module 'array' implements operations on sequences of
31516integers or floating point numbers of a particular size. This is
31517useful to manipulate large numerical arrays or to read and write
31518binary files consisting of numerical data.
31519
31520* Regular expression objects created by module regex now support a new
31521method named group(), which returns one or more \(...\) groups by number.
31522The number of groups is increased from 10 to 100.
31523
31524* Function compile() in module regex now supports an optional mapping
31525argument; a variable casefold is added to the module which can be used
31526as a standard uppercase to lowercase mapping.
31527
31528* Module time now supports many routines that are defined in the
31529Standard C time interface (<time.h>): gmtime(), localtime(),
31530asctime(), ctime(), mktime(), as well as these variables (taken from
31531System V): timezone, altzone, daylight and tzname. (The corresponding
31532functions in the undocumented module calendar have been removed; the
31533undocumented and unfinished module tzparse is now obsolete and will
31534disappear in a future release.)
31535
31536* Module strop (the fast built-in version of standard module string)
31537now uses C's definition of whitespace instead of fixing it to space,
31538tab and newline; in practice this usually means that vertical tab,
31539form feed and return are now also considered whitespace. It exports
31540the string of characters that are considered whitespace as well as the
31541characters that are considered lowercase or uppercase.
31542
31543* Module sys now defines the variable builtin_module_names, a list of
31544names of modules built into the current interpreter (including not
31545yet imported, but excluding two special modules that always have to be
31546defined -- sys and builtin).
31547
31548* Objects created by module sunaudiodev now also support flush() and
31549close() methods.
31550
31551* Socket objects created by module socket now support an optional
31552flags argument for their methods sendto() and recvfrom().
31553
31554* Module marshal now supports dumping to and loading from strings,
31555through the functions dumps() and loads().
31556
31557* Module stdwin now supports some new functionality. You may have to
31558ftp the latest version: ftp.cwi.nl:/pub/stdwin/stdwinforviews.tar.Z.)
31559
31560
31561Bugs fixed
31562----------
31563
31564* Fixed comparison of negative long integers.
31565
31566* The tokenizer no longer botches input lines longer than BUFSIZ.
31567
31568* Fixed several severe memory leaks in module select.
31569
31570* Fixed memory leaks in modules socket and sv.
31571
31572* Fixed memory leak in divmod() for long integers.
31573
31574* Problems with definition of floatsleep() on Suns fixed.
31575
31576* Many portability bugs fixed (and undoubtedly new ones added :-).
31577
31578
31579Changes to the build procedure
31580------------------------------
31581
31582* The Makefile supports some new targets: "make default" and "make
31583all". Both are by normally equivalent to "make python".
31584
31585* The Makefile no longer uses $> since it's not supported by all
31586versions of Make.
31587
31588* The header files now all contain #ifdef constructs designed to make
31589it safe to include the same header file twice, as well as support for
31590inclusion from C++ programs (automatic extern "C" { ... } added).
31591
31592
31593Freezing Python scripts
31594-----------------------
31595
31596* There is now some support for "freezing" a Python script as a
31597stand-alone executable binary file. See the script
31598demo/scripts/freeze.py. It will require some site-specific tailoring
31599of the script to get this working, but is quite worthwhile if you write
31600Python code for other who may not have built and installed Python.
31601
31602
31603MS-DOS
31604------
31605
31606* A new MS-DOS port has been done, using MSC 6.0 (I believe). Thanks,
31607Marcel van der Peijl! This requires fewer compatibility hacks in
31608posixmodule.c. The executable is not yet available but will be soon
31609(check the mailing list).
31610
31611* The default PYTHONPATH has changed.
31612
31613
31614Changes for developers of extension modules
31615-------------------------------------------
31616
31617* Read src/ChangeLog for full details.
31618
31619
31620SGI specific changes
31621--------------------
31622
31623* Read src/ChangeLog for full details.
31624
Guido van Rossumaa253861994-10-06 17:18:57 +000031625
Guido van Rossuma7925f11994-01-26 10:20:16 +000031626==================================
31627==> Release 0.9.8 (9 Jan 1993) <==
31628==================================
31629
31630I claim no completeness here, but I've tried my best to scan the log
31631files throughout my source tree for interesting bits of news. A more
31632complete account of the changes is to be found in the various
31633ChangeLog files. See also "News for release 0.9.7beta" below if you're
31634still using release 0.9.6, and the file HISTORY if you have an even
31635older release.
31636
31637 --Guido
31638
31639
31640Changes to the language proper
31641------------------------------
31642
31643There's only one big change: the conformance checking for function
31644argument lists (of user-defined functions only) is stricter. Earlier,
31645you could get away with the following:
31646
31647 (a) define a function of one argument and call it with any
31648 number of arguments; if the actual argument count wasn't
31649 one, the function would receive a tuple containing the
Georg Brandleeb575f2009-06-24 06:42:05 +000031650 arguments (an empty tuple if there were none).
Guido van Rossuma7925f11994-01-26 10:20:16 +000031651
31652 (b) define a function of two arguments, and call it with more
31653 than two arguments; if there were more than two arguments,
31654 the second argument would be passed as a tuple containing
31655 the second and further actual arguments.
31656
31657(Note that an argument (formal or actual) that is a tuple is counted as
31658one; these rules don't apply inside such tuples, only at the top level
31659of the argument list.)
31660
31661Case (a) was needed to accommodate variable-length argument lists;
31662there is now an explicit "varargs" feature (precede the last argument
31663with a '*'). Case (b) was needed for compatibility with old class
31664definitions: up to release 0.9.4 a method with more than one argument
31665had to be declared as "def meth(self, (arg1, arg2, ...)): ...".
31666Version 0.9.6 provide better ways to handle both casees, bot provided
31667backward compatibility; version 0.9.8 retracts the compatibility hacks
31668since they also cause confusing behavior if a function is called with
31669the wrong number of arguments.
31670
31671There's a script that helps converting classes that still rely on (b),
31672provided their methods' first argument is called "self":
31673demo/scripts/methfix.py.
31674
31675If this change breaks lots of code you have developed locally, try
31676#defining COMPAT_HACKS in ceval.c.
31677
31678(There's a third compatibility hack, which is the reverse of (a): if a
31679function is defined with two or more arguments, and called with a
31680single argument that is a tuple with just as many arguments, the items
31681of this tuple will be used as the arguments. Although this can (and
31682should!) be done using the built-in function apply() instead, it isn't
31683withdrawn yet.)
31684
31685
31686One minor change: comparing instance methods works like expected, so
31687that if x is an instance of a user-defined class and has a method m,
31688then (x.m==x.m) yields 1.
31689
31690
31691The following was already present in 0.9.7beta, but not explicitly
31692mentioned in the NEWS file: user-defined classes can now define types
31693that behave in almost allrespects like numbers. See
31694demo/classes/Rat.py for a simple example.
31695
31696
31697Changes to the build process
31698----------------------------
31699
31700The Configure.py script and the Makefile has been made somewhat more
31701bullet-proof, after reports of (minor) trouble on certain platforms.
31702
31703There is now a script to patch Makefile and config.c to add a new
31704optional built-in module: Addmodule.sh. Read the script before using!
31705
Martin Panter0be894b2016-09-07 12:03:06 +000031706Using Addmodule.sh, all optional modules can now be configured at
Guido van Rossuma7925f11994-01-26 10:20:16 +000031707compile time using Configure.py, so there are no modules left that
31708require dynamic loading.
31709
31710The Makefile has been fixed to make it easier to use with the VPATH
31711feature of some Make versions (e.g. SunOS).
31712
31713
31714Changes affecting portability
31715-----------------------------
31716
31717Several minor portability problems have been solved, e.g. "malloc.h"
31718has been renamed to "mymalloc.h", "strdup.c" is no longer used, and
31719the system now tolerates malloc(0) returning 0.
31720
31721For dynamic loading on the SGI, Jack Jansen's dl 1.6 is now
31722distributed with Python. This solves several minor problems, in
31723particular scripts invoked using #! can now use dynamic loading.
31724
31725
31726Changes to the interpreter interface
31727------------------------------------
31728
31729On popular demand, there's finally a "profile" feature for interactive
31730use of the interpreter. If the environment variable $PYTHONSTARTUP is
31731set to the name of an existing file, Python statements in this file
31732are executed when the interpreter is started in interactive mode.
31733
31734There is a new clean-up mechanism, complementing try...finally: if you
31735assign a function object to sys.exitfunc, it will be called when
31736Python exits or receives a SIGTERM or SIGHUP signal.
31737
31738The interpreter is now generally assumed to live in
31739/usr/local/bin/python (as opposed to /usr/local/python). The script
31740demo/scripts/fixps.py will update old scripts in place (you can easily
31741modify it to do other similar changes).
31742
31743Most I/O that uses sys.stdin/stdout/stderr will now use any object
31744assigned to those names as long as the object supports readline() or
31745write() methods.
31746
31747The parser stack has been increased to 500 to accommodate more
31748complicated expressions (7 levels used to be the practical maximum,
31749it's now about 38).
31750
31751The limit on the size of the *run-time* stack has completely been
31752removed -- this means that tuple or list displays can contain any
31753number of elements (formerly more than 50 would crash the
Victor Stinner554fd082014-03-17 22:33:49 +010031754interpreter).
Guido van Rossuma7925f11994-01-26 10:20:16 +000031755
31756
31757Changes to existing built-in functions and methods
31758--------------------------------------------------
31759
31760The built-in functions int(), long(), float(), oct() and hex() now
31761also apply to class instalces that define corresponding methods
31762(__int__ etc.).
31763
31764
31765New built-in functions
31766----------------------
31767
31768The new functions str() and repr() convert any object to a string.
31769The function repr(x) is in all respects equivalent to `x` -- some
31770people prefer a function for this. The function str(x) does the same
31771except if x is already a string -- then it returns x unchanged
31772(repr(x) adds quotes and escapes "funny" characters as octal escapes).
31773
31774The new function cmp(x, y) returns -1 if x<y, 0 if x==y, 1 if x>y.
31775
31776
31777Changes to general built-in modules
31778-----------------------------------
31779
31780The time module's functions are more general: time() returns a
31781floating point number and sleep() accepts one. Their accuracies
31782depends on the precision of the system clock. Millisleep is no longer
31783needed (although it still exists for now), but millitimer is still
31784needed since on some systems wall clock time is only available with
31785seconds precision, while a source of more precise time exists that
31786isn't synchronized with the wall clock. (On UNIX systems that support
31787the BSD gettimeofday() function, time.time() is as time.millitimer().)
31788
31789The string representation of a file object now includes an address:
31790'<file 'filename', mode 'r' at #######>' where ###### is a hex number
31791(the object's address) to make it unique.
31792
31793New functions added to posix: nice(), setpgrp(), and if your system
31794supports them: setsid(), setpgid(), tcgetpgrp(), tcsetpgrp().
31795
31796Improvements to the socket module: socket objects have new methods
31797getpeername() and getsockname(), and the {get,set}sockopt methods can
31798now get/set any kind of option using strings built with the new struct
31799module. And there's a new function fromfd() which creates a socket
31800object given a file descriptor (useful for servers started by inetd,
31801which have a socket connected to stdin and stdout).
31802
31803
31804Changes to SGI-specific built-in modules
31805----------------------------------------
31806
31807The FORMS library interface (fl) now requires FORMS 2.1a. Some new
31808functions have been added and some bugs have been fixed.
31809
31810Additions to al (audio library interface): added getname(),
31811getdefault() and getminmax().
31812
31813The gl modules doesn't call "foreground()" when initialized (this
31814caused some problems) like it dit in 0.9.7beta (but not before).
31815There's a new gl function 'gversion() which returns a version string.
31816
31817The interface to sv (Indigo video interface) has totally changed.
31818(Sorry, still no documentation, but see the examples in
31819demo/sgi/{sv,video}.)
31820
31821
31822Changes to standard library modules
31823-----------------------------------
31824
31825Most functions in module string are now much faster: they're actually
31826implemented in C. The module containing the C versions is called
31827"strop" but you should still import "string" since strop doesn't
31828provide all the interfaces defined in string (and strop may be renamed
31829to string when it is complete in a future release).
31830
31831string.index() now accepts an optional third argument giving an index
31832where to start searching in the first argument, so you can find second
31833and further occurrences (this is similar to the regular expression
31834functions in regex).
31835
31836The definition of what string.splitfields(anything, '') should return
31837is changed for the last time: it returns a singleton list containing
31838its whole first argument unchanged. This is compatible with
31839regsub.split() which also ignores empty delimiter matches.
31840
31841posixpath, macpath: added dirname() and normpath() (and basename() to
31842macpath).
31843
31844The mainloop module (for use with stdwin) can now demultiplex input
31845from other sources, as long as they can be polled with select().
31846
31847
31848New built-in modules
31849--------------------
31850
31851Module struct defines functions to pack/unpack values to/from strings
31852representing binary values in native byte order.
31853
31854Module strop implements C versions of many functions from string (see
31855above).
31856
31857Optional module fcntl defines interfaces to fcntl() and ioctl() --
31858UNIX only. (Not yet properly documented -- see however src/fcntl.doc.)
31859
31860Optional module mpz defines an interface to an altaernative long
31861integer implementation, the GNU MPZ library.
31862
31863Optional module md5 uses the GNU MPZ library to calculate MD5
31864signatures of strings.
31865
31866There are also optional new modules specific to SGI machines: imageop
31867defines some simple operations to images represented as strings; sv
31868interfaces to the Indigo video board; cl interfaces to the (yet
31869unreleased) compression library.
31870
31871
31872New standard library modules
31873----------------------------
31874
31875(Unfortunately the following modules are not all documented; read the
31876sources to find out more about them!)
31877
31878autotest: run testall without showing any output unless it differs
31879from the expected output
31880
31881bisect: use bisection to insert or find an item in a sorted list
31882
31883colorsys: defines conversions between various color systems (e.g. RGB
31884<-> YUV)
31885
31886nntplib: a client interface to NNTP servers
31887
31888pipes: utility to construct pipeline from templates, e.g. for
31889conversion from one file format to another using several utilities.
31890
31891regsub: contains three functions that are more or less compatible with
31892awk functions of the same name: sub() and gsub() do string
31893substitution, split() splits a string using a regular expression to
31894define how separators are define.
31895
31896test_types: test operations on the built-in types of Python
31897
31898toaiff: convert various audio file formats to AIFF format
31899
31900tzparse: parse the TZ environment parameter (this may be less general
31901than it could be, let me know if you fix it).
31902
31903(Note that the obsolete module "path" no longer exists.)
31904
31905
31906New SGI-specific library modules
31907--------------------------------
31908
31909CL: constants for use with the built-in compression library interface (cl)
31910
31911Queue: a multi-producer, multi-consumer queue class implemented for
31912use with the built-in thread module
31913
31914SOCKET: constants for use with built-in module socket, e.g. to set/get
31915socket options. This is SGI-specific because the constants to be
31916passed are system-dependent. You can generate a version for your own
31917system by running the script demo/scripts/h2py.py with
31918/usr/include/sys/socket.h as input.
31919
Walter Dörwaldf0dfc7a2003-10-20 14:01:56 +000031920cddb: interface to the database used by the CD player
Guido van Rossuma7925f11994-01-26 10:20:16 +000031921
31922torgb: convert various image file types to rgb format (requires pbmplus)
31923
31924
31925New demos
31926---------
31927
31928There's an experimental interface to define Sun RPC clients and
31929servers in demo/rpc.
31930
31931There's a collection of interfaces to WWW, WAIS and Gopher (both
31932Python classes and program providing a user interface) in demo/www.
31933This includes a program texi2html.py which converts texinfo files to
31934HTML files (the format used hy WWW).
31935
31936The ibrowse demo has moved from demo/stdwin/ibrowse to demo/ibrowse.
31937
31938For SGI systems, there's a whole collection of programs and classes
31939that make use of the Indigo video board in demo/sgi/{sv,video}. This
31940represents a significant amount of work that we're giving away!
31941
31942There are demos "rsa" and "md5test" that exercise the mpz and md5
31943modules, respectively. The rsa demo is a complete implementation of
31944the RSA public-key cryptosystem!
31945
31946A bunch of games and examples submitted by Stoffel Erasmus have been
31947included in demo/stoffel.
31948
31949There are miscellaneous new files in some existing demo
31950subdirectories: classes/bitvec.py, scripts/{fixps,methfix}.py,
31951sgi/al/cmpaf.py, sockets/{mcast,gopher}.py.
31952
31953There are also many minor changes to existing files, but I'm too lazy
31954to run a diff and note the differences -- you can do this yourself if
31955you save the old distribution's demos. One highlight: the
31956stdwin/python.py demo is much improved!
31957
31958
31959Changes to the documentation
31960----------------------------
31961
31962The LaTeX source for the library uses different macros to enable it to
31963be converted to texinfo, and from there to INFO or HTML format so it
31964can be browsed as a hypertext. The net result is that you can now
31965read the Python library documentation in Emacs info mode!
31966
31967
31968Changes to the source code that affect C extension writers
31969----------------------------------------------------------
31970
31971The function strdup() no longer exists (it was used only in one places
Georg Brandleeb575f2009-06-24 06:42:05 +000031972and is somewhat of a portability problem since some systems have the
Guido van Rossuma7925f11994-01-26 10:20:16 +000031973same function in their C library.
31974
31975The functions NEW() and RENEW() allocate one spare byte to guard
31976against a NULL return from malloc(0) being taken for an error, but
31977this should not be relied upon.
31978
31979
31980=========================
31981==> Release 0.9.7beta <==
31982=========================
31983
31984
31985Changes to the language proper
31986------------------------------
31987
31988User-defined classes can now implement operations invoked through
31989special syntax, such as x[i] or `x` by defining methods named
31990__getitem__(self, i) or __repr__(self), etc.
31991
31992
31993Changes to the build process
31994----------------------------
31995
31996Instead of extensive manual editing of the Makefile to select
31997compile-time options, you can now run a Configure.py script.
31998The Makefile as distributed builds a minimal interpreter sufficient to
31999run Configure.py. See also misc/BUILD
32000
32001The Makefile now includes more "utility" targets, e.g. install and
32002tags/TAGS
32003
32004Using the provided strtod.c and strtol.c are now separate options, as
32005on the Sun the provided strtod.c dumps core :-(
32006
32007The regex module is now an option chosen by the Makefile, since some
32008(old) C compilers choke on regexpr.c
32009
32010
32011Changes affecting portability
32012-----------------------------
32013
32014You need STDWIN version 0.9.7 (released 30 June 1992) for the stdwin
32015interface
32016
32017Dynamic loading is now supported for Sun (and other non-COFF systems)
32018throug dld-3.2.3, as well as for SGI (a new version of Jack Jansen's
32019DL is out, 1.4)
32020
32021The system-dependent code for the use of the select() system call is
32022moved to one file: myselect.h
32023
32024Thanks to Jaap Vermeulen, the code should now port cleanly to the
32025SEQUENT
32026
32027
32028Changes to the interpreter interface
32029------------------------------------
32030
32031The interpretation of $PYTHONPATH in the environment is different: it
32032is inserted in front of the default path instead of overriding it
32033
32034
32035Changes to existing built-in functions and methods
32036--------------------------------------------------
32037
32038List objects now support an optional argument to their sort() method,
32039which is a comparison function similar to qsort(3) in C
32040
32041File objects now have a method fileno(), used by the new select module
32042(see below)
32043
32044
32045New built-in function
32046---------------------
32047
32048coerce(x, y): take two numbers and return a tuple containing them
32049both converted to a common type
32050
32051
32052Changes to built-in modules
32053---------------------------
32054
32055sys: fixed core dumps in settrace() and setprofile()
32056
32057socket: added socket methods setsockopt() and getsockopt(); and
32058fileno(), used by the new select module (see below)
32059
32060stdwin: added fileno() == connectionnumber(), in support of new module
32061select (see below)
32062
32063posix: added get{eg,eu,g,u}id(); waitpid() is now a separate function.
32064
32065gl: added qgetfd()
32066
32067fl: added several new functions, fixed several obscure bugs, adapted
32068to FORMS 2.1
32069
32070
32071Changes to standard modules
32072---------------------------
32073
32074posixpath: changed implementation of ismount()
32075
32076string: atoi() no longer mistakes leading zero for octal number
32077
32078...
32079
32080
32081New built-in modules
32082--------------------
32083
32084Modules marked "dynamic only" are not configured at compile time but
32085can be loaded dynamically. You need to turn on the DL or DLD option in
32086the Makefile for support dynamic loading of modules (this requires
32087external code).
32088
32089select: interfaces to the BSD select() system call
32090
32091dbm: interfaces to the (new) dbm library (dynamic only)
32092
32093nis: interfaces to some NIS functions (aka yellow pages)
32094
32095thread: limited form of multiple threads (sgi only)
32096
32097audioop: operations useful for audio programs, e.g. u-LAW and ADPCM
32098coding (dynamic only)
32099
32100cd: interface to Indigo SCSI CDROM player audio library (sgi only)
32101
32102jpeg: read files in JPEG format (dynamic only, sgi only; needs
32103external code)
32104
32105imgfile: read SGI image files (dynamic only, sgi only)
32106
32107sunaudiodev: interface to sun's /dev/audio (dynamic only, sun only)
32108
32109sv: interface to Indigo video library (sgi only)
32110
32111pc: a minimal set of MS-DOS interfaces (MS-DOS only)
32112
32113rotor: encryption, by Lance Ellinghouse (dynamic only)
32114
32115
32116New standard modules
32117--------------------
32118
32119Not all these modules are documented. Read the source:
32120lib/<modulename>.py. Sometimes a file lib/<modulename>.doc contains
32121additional documentation.
32122
32123imghdr: recognizes image file headers
32124
32125sndhdr: recognizes sound file headers
32126
32127profile: print run-time statistics of Python code
32128
32129readcd, cdplayer: companion modules for built-in module cd (sgi only)
32130
32131emacs: interface to Emacs using py-connect.el (see below).
32132
32133SOCKET: symbolic constant definitions for socket options
32134
32135SUNAUDIODEV: symbolic constant definitions for sunaudiodef (sun only)
32136
Martin Panter0be894b2016-09-07 12:03:06 +000032137SV: symbolic constant definitions for sv (sgi only)
Guido van Rossuma7925f11994-01-26 10:20:16 +000032138
Martin Panter0be894b2016-09-07 12:03:06 +000032139CD: symbolic constant definitions for cd (sgi only)
Guido van Rossuma7925f11994-01-26 10:20:16 +000032140
32141
32142New demos
32143---------
32144
32145scripts/pp.py: execute Python as a filter with a Perl-like command
32146line interface
32147
32148classes/: examples using the new class features
32149
32150threads/: examples using the new thread module
32151
32152sgi/cd/: examples using the new cd module
32153
32154
32155Changes to the documentation
32156----------------------------
32157
32158The last-minute syntax changes of release 0.9.6 are now reflected
32159everywhere in the manuals
32160
32161The reference manual has a new section (3.2) on implementing new kinds
32162of numbers, sequences or mappings with user classes
32163
32164Classes are now treated extensively in the tutorial (chapter 9)
32165
32166Slightly restructured the system-dependent chapters of the library
32167manual
32168
32169The file misc/EXTENDING incorporates documentation for mkvalue() and
32170a new section on error handling
32171
32172The files misc/CLASSES and misc/ERRORS are no longer necessary
32173
32174The doc/Makefile now creates PostScript files automatically
32175
32176
32177Miscellaneous changes
32178---------------------
32179
32180Incorporated Tim Peters' changes to python-mode.el, it's now version
321811.06
32182
32183A python/Emacs bridge (provided by Terrence M. Brannon) lets a Python
32184program running in an Emacs buffer execute Emacs lisp code. The
32185necessary Python code is in lib/emacs.py. The Emacs code is
32186misc/py-connect.el (it needs some external Emacs lisp code)
32187
32188
32189Changes to the source code that affect C extension writers
32190----------------------------------------------------------
32191
32192New service function mkvalue() to construct a Python object from C
32193values according to a "format" string a la getargs()
32194
32195Most functions from pythonmain.c moved to new pythonrun.c which is
32196in libpython.a. This should make embedded versions of Python easier
32197
32198ceval.h is split in eval.h (which needs compile.h and only declares
32199eval_code) and ceval.h (which doesn't need compile.hand declares the
32200rest)
32201
32202ceval.h defines macros BGN_SAVE / END_SAVE for use with threads (to
32203improve the parallellism of multi-threaded programs by letting other
32204Python code run when a blocking system call or something similar is
32205made)
32206
32207In structmember.[ch], new member types BYTE, CHAR and unsigned
32208variants have been added
32209
32210New file xxmodule.c is a template for new extension modules.
32211
Guido van Rossumaa253861994-10-06 17:18:57 +000032212
Guido van Rossuma7925f11994-01-26 10:20:16 +000032213==================================
Guido van Rossumf2eac992000-09-04 17:24:24 +000032214==> Release 0.9.6 (6 Apr 1992) <==
Guido van Rossuma7925f11994-01-26 10:20:16 +000032215==================================
32216
32217Misc news in 0.9.6:
32218- Restructured the misc subdirectory
32219- Reference manual completed, library manual much extended (with indexes!)
32220- the GNU Readline library is now distributed standard with Python
32221- the script "../demo/scripts/classfix.py" fixes Python modules using old
32222 class syntax
32223- Emacs python-mode.el (was python.el) vastly improved (thanks, Tim!)
32224- Because of the GNU copyleft business I am not using the GNU regular
32225 expression implementation but a free re-implementation by Tatu Ylonen
32226 that recently appeared in comp.sources.misc (Bravo, Tatu!)
32227
32228New features in 0.9.6:
32229- stricter try stmt syntax: cannot mix except and finally clauses on 1 try
32230- New module 'os' supplants modules 'mac' and 'posix' for most cases;
32231 module 'path' is replaced by 'os.path'
32232- os.path.split() return value differs from that of old path.split()
32233- sys.exc_type, sys.exc_value, sys.exc_traceback are set to the exception
32234 currently being handled
32235- sys.last_type, sys.last_value, sys.last_traceback remember last unhandled
32236 exception
32237- New function string.expandtabs() expands tabs in a string
32238- Added times() interface to posix (user & sys time of process & children)
32239- Added uname() interface to posix (returns OS type, hostname, etc.)
32240- New built-in function execfile() is like exec() but from a file
32241- Functions exec() and eval() are less picky about whitespace/newlines
32242- New built-in functions getattr() and setattr() access arbitrary attributes
32243- More generic argument handling in built-in functions (see "./EXTENDING")
32244- Dynamic loading of modules written in C or C++ (see "./DYNLOAD")
32245- Division and modulo for long and plain integers with negative operands
32246 have changed; a/b is now floor(float(a)/float(b)) and a%b is defined
32247 as a-(a/b)*b. So now the outcome of divmod(a,b) is the same as
32248 (a/b, a%b) for integers. For floats, % is also changed, but of course
32249 / is unchanged, and divmod(x,y) does not yield (x/y, x%y)...
32250- A function with explicit variable-length argument list can be declared
32251 like this: def f(*args): ...; or even like this: def f(a, b, *rest): ...
32252- Code tracing and profiling features have been added, and two source
32253 code debuggers are provided in the library (pdb.py, tty-oriented,
32254 and wdb, window-oriented); you can now step through Python programs!
32255 See sys.settrace() and sys.setprofile(), and "../lib/pdb.doc"
32256- '==' is now the only equality operator; "../demo/scripts/eqfix.py" is
32257 a script that fixes old Python modules
32258- Plain integer right shift now uses sign extension
32259- Long integer shift/mask operations now simulate 2's complement
32260 to give more useful results for negative operands
32261- Changed/added range checks for long/plain integer shifts
32262- Options found after "-c command" are now passed to the command in sys.argv
Martin Panter46f50722016-05-26 05:35:26 +000032263 (note subtle incompatibility with "python -c command -- -options"!)
Guido van Rossuma7925f11994-01-26 10:20:16 +000032264- Module stdwin is better protected against touching objects after they've
32265 been closed; menus can now also be closed explicitly
32266- Stdwin now uses its own exception (stdwin.error)
32267
32268New features in 0.9.5 (released as Macintosh application only, 2 Jan 1992):
32269- dictionary objects can now be compared properly; e.g., {}=={} is true
32270- new exception SystemExit causes termination if not caught;
32271 it is raised by sys.exit() so that 'finally' clauses can clean up,
32272 and it may even be caught. It does work interactively!
32273- new module "regex" implements GNU Emacs style regular expressions;
32274 module "regexp" is rewritten in Python for backward compatibility
32275- formal parameter lists may contain trailing commas
32276
32277Bugs fixed in 0.9.6:
32278- assigning to or deleting a list item with a negative index dumped core
32279- divmod(-10L,5L) returned (-3L, 5L) instead of (-2L, 0L)
32280
32281Bugs fixed in 0.9.5:
32282- masking operations involving negative long integers gave wrong results
32283
32284
32285===================================
Guido van Rossumf2eac992000-09-04 17:24:24 +000032286==> Release 0.9.4 (24 Dec 1991) <==
Guido van Rossuma7925f11994-01-26 10:20:16 +000032287===================================
32288
32289- new function argument handling (see below)
32290- built-in apply(func, args) means func(args[0], args[1], ...)
32291- new, more refined exceptions
32292- new exception string values (NameError = 'NameError' etc.)
32293- better checking for math exceptions
32294- for sequences (string/tuple/list), x[-i] is now equivalent to x[len(x)-i]
32295- fixed list assignment bug: "a[1:1] = a" now works correctly
32296- new class syntax, without extraneous parentheses
32297- new 'global' statement to assign global variables from within a function
32298
32299
32300New class syntax
32301----------------
32302
32303You can now declare a base class as follows:
32304
32305 class B: # Was: class B():
32306 def some_method(self): ...
32307 ...
32308
32309and a derived class thusly:
32310
32311 class D(B): # Was: class D() = B():
32312 def another_method(self, arg): ...
32313
32314Multiple inheritance looks like this:
32315
32316 class M(B, D): # Was: class M() = B(), D():
32317 def this_or_that_method(self, arg): ...
32318
32319The old syntax is still accepted by Python 0.9.4, but will disappear
32320in Python 1.0 (to be posted to comp.sources).
32321
32322
32323New 'global' statement
32324----------------------
32325
32326Every now and then you have a global variable in a module that you
32327want to change from within a function in that module -- say, a count
32328of calls to a function, or an option flag, etc. Until now this was
32329not directly possible. While several kludges are known that
32330circumvent the problem, and often the need for a global variable can
32331be avoided by rewriting the module as a class, this does not always
32332lead to clearer code.
32333
32334The 'global' statement solves this dilemma. Its occurrence in a
32335function body means that, for the duration of that function, the
32336names listed there refer to global variables. For instance:
32337
32338 total = 0.0
32339 count = 0
32340
32341 def add_to_total(amount):
32342 global total, count
32343 total = total + amount
32344 count = count + 1
32345
32346'global' must be repeated in each function where it is needed. The
32347names listed in a 'global' statement must not be used in the function
32348before the statement is reached.
32349
32350Remember that you don't need to use 'global' if you only want to *use*
32351a global variable in a function; nor do you need ot for assignments to
32352parts of global variables (e.g., list or dictionary items or
32353attributes of class instances). This has not changed; in fact
32354assignment to part of a global variable was the standard workaround.
32355
32356
32357New exceptions
32358--------------
32359
32360Several new exceptions have been defined, to distinguish more clearly
32361between different types of errors.
32362
32363name meaning was
32364
32365AttributeError reference to non-existing attribute NameError
32366IOError unexpected I/O error RuntimeError
32367ImportError import of non-existing module or name NameError
32368IndexError invalid string, tuple or list index RuntimeError
32369KeyError key not in dictionary RuntimeError
32370OverflowError numeric overflow RuntimeError
32371SyntaxError invalid syntax RuntimeError
32372ValueError invalid argument value RuntimeError
32373ZeroDivisionError division by zero RuntimeError
32374
32375The string value of each exception is now its name -- this makes it
32376easier to experimentally find out which operations raise which
32377exceptions; e.g.:
32378
32379 >>> KeyboardInterrupt
32380 'KeyboardInterrupt'
32381 >>>
32382
32383
32384New argument passing semantics
32385------------------------------
32386
32387Off-line discussions with Steve Majewski and Daniel LaLiberte have
32388convinced me that Python's parameter mechanism could be changed in a
32389way that made both of them happy (I hope), kept me happy, fixed a
32390number of outstanding problems, and, given some backward compatibility
32391provisions, would only break a very small amount of existing code --
32392probably all mine anyway. In fact I suspect that most Python users
32393will hardly notice the difference. And yet it has cost me at least
32394one sleepless night to decide to make the change...
32395
32396Philosophically, the change is quite radical (to me, anyway): a
32397function is no longer called with either zero or one argument, which
32398is a tuple if there appear to be more arguments. Every function now
32399has an argument list containing 0, 1 or more arguments. This list is
32400always implemented as a tuple, and it is a (run-time) error if a
32401function is called with a different number of arguments than expected.
32402
32403What's the difference? you may ask. The answer is, very little unless
32404you want to write variadic functions -- functions that may be called
32405with a variable number of arguments. Formerly, you could write a
32406function that accepted one or more arguments with little trouble, but
32407writing a function that could be called with either 0 or 1 argument
32408(or more) was next to impossible. This is now a piece of cake: you
32409can simply declare an argument that receives the entire argument
32410tuple, and check its length -- it will be of size 0 if there are no
32411arguments.
32412
32413Another anomaly of the old system was the way multi-argument methods
32414(in classes) had to be declared, e.g.:
32415
32416 class Point():
32417 def init(self, (x, y, color)): ...
32418 def setcolor(self, color): ...
32419 dev moveto(self, (x, y)): ...
32420 def draw(self): ...
32421
32422Using the new scheme there is no need to enclose the method arguments
32423in an extra set of parentheses, so the above class could become:
32424
32425 class Point:
32426 def init(self, x, y, color): ...
32427 def setcolor(self, color): ...
32428 dev moveto(self, x, y): ...
32429 def draw(self): ...
32430
32431That is, the equivalence rule between methods and functions has
32432changed so that now p.moveto(x,y) is equivalent to Point.moveto(p,x,y)
32433while formerly it was equivalent to Point.moveto(p,(x,y)).
32434
32435A special backward compatibility rule makes that the old version also
32436still works: whenever a function with exactly two arguments (at the top
32437level) is called with more than two arguments, the second and further
32438arguments are packed into a tuple and passed as the second argument.
32439This rule is invoked independently of whether the function is actually a
32440method, so there is a slight chance that some erroneous calls of
32441functions expecting two arguments with more than that number of
32442arguments go undetected at first -- when the function tries to use the
32443second argument it may find it is a tuple instead of what was expected.
32444Note that this rule will be removed from future versions of the
32445language; it is a backward compatibility provision *only*.
32446
32447Two other rules and a new built-in function handle conversion between
32448tuples and argument lists:
32449
32450Rule (a): when a function with more than one argument is called with a
32451single argument that is a tuple of the right size, the tuple's items
32452are used as arguments.
32453
32454Rule (b): when a function with exactly one argument receives no
32455arguments or more than one, that one argument will receive a tuple
32456containing the arguments (the tuple will be empty if there were no
32457arguments).
32458
32459
32460A new built-in function, apply(), was added to support functions that
32461need to call other functions with a constructed argument list. The call
32462
32463 apply(function, tuple)
32464
32465is equivalent to
32466
32467 function(tuple[0], tuple[1], ..., tuple[len(tuple)-1])
32468
32469
32470While no new argument syntax was added in this phase, it would now be
32471quite sensible to add explicit syntax to Python for default argument
32472values (as in C++ or Modula-3), or a "rest" argument to receive the
32473remaining arguments of a variable-length argument list.
32474
32475
32476========================================================
32477==> Release 0.9.3 (never made available outside CWI) <==
32478========================================================
32479
32480- string sys.version shows current version (also printed on interactive entry)
32481- more detailed exceptions, e.g., IOError, ZeroDivisionError, etc.
32482- 'global' statement to declare module-global variables assigned in functions.
32483- new class declaration syntax: class C(Base1, Base2, ...): suite
32484 (the old syntax is still accepted -- be sure to convert your classes now!)
32485- C shifting and masking operators: << >> ~ & ^ | (for ints and longs).
32486- C comparison operators: == != (the old = and <> remain valid).
32487- floating point numbers may now start with a period (e.g., .14).
32488- definition of integer division tightened (always truncates towards zero).
32489- new builtins hex(x), oct(x) return hex/octal string from (long) integer.
32490- new list method l.count(x) returns the number of occurrences of x in l.
32491- new SGI module: al (Indigo and 4D/35 audio library).
32492- the FORMS interface (modules fl and FL) now uses FORMS 2.0
32493- module gl: added lrect{read,write}, rectzoom and pixmode;
32494 added (non-GL) functions (un)packrect.
32495- new socket method: s.allowbroadcast(flag).
32496- many objects support __dict__, __methods__ or __members__.
32497- dir() lists anything that has __dict__.
32498- class attributes are no longer read-only.
32499- classes support __bases__, instances support __class__ (and __dict__).
32500- divmod() now also works for floats.
32501- fixed obscure bug in eval('1 ').
32502
32503
32504===================================
32505==> Release 0.9.2 (Autumn 1991) <==
32506===================================
32507
32508Highlights
32509----------
32510
32511- tutorial now (almost) complete; library reference reorganized
32512- new syntax: continue statement; semicolons; dictionary constructors;
32513 restrictions on blank lines in source files removed
32514- dramatically improved module load time through precompiled modules
32515- arbitrary precision integers: compute 2 to the power 1000 and more...
32516- arithmetic operators now accept mixed type operands, e.g., 3.14/4
32517- more operations on list: remove, index, reverse; repetition
32518- improved/new file operations: readlines, seek, tell, flush, ...
32519- process management added to the posix module: fork/exec/wait/kill etc.
32520- BSD socket operations (with example servers and clients!)
32521- many new STDWIN features (color, fonts, polygons, ...)
32522- new SGI modules: font manager and FORMS library interface
32523
32524
32525Extended list of changes in 0.9.2
32526---------------------------------
32527
32528Here is a summary of the most important user-visible changes in 0.9.2,
32529in somewhat arbitrary order. Changes in later versions are listed in
32530the "highlights" section above.
32531
32532
325331. Changes to the interpreter proper
32534
32535- Simple statements can now be separated by semicolons.
32536 If you write "if t: s1; s2", both s1 and s2 are executed
32537 conditionally.
32538- The 'continue' statement was added, with semantics as in C.
32539- Dictionary displays are now allowed on input: {key: value, ...}.
32540- Blank lines and lines bearing only a comment no longer need to
32541 be indented properly. (A completely empty line still ends a multi-
32542 line statement interactively.)
32543- Mixed arithmetic is supported, 1 compares equal to 1.0, etc.
32544- Option "-c command" to execute statements from the command line
32545- Compiled versions of modules are cached in ".pyc" files, giving a
32546 dramatic improvement of start-up time
32547- Other, smaller speed improvements, e.g., extracting characters from
32548 strings, looking up single-character keys, and looking up global
32549 variables
32550- Interrupting a print operation raises KeyboardInterrupt instead of
32551 only cancelling the print operation
32552- Fixed various portability problems (it now passes gcc with only
32553 warnings -- more Standard C compatibility will be provided in later
32554 versions)
32555- Source is prepared for porting to MS-DOS
32556- Numeric constants are now checked for overflow (this requires
32557 standard-conforming strtol() and strtod() functions; a correct
32558 strtol() implementation is provided, but the strtod() provided
32559 relies on atof() for everything, including error checking
32560
32561
325622. Changes to the built-in types, functions and modules
32563
32564- New module socket: interface to BSD socket primitives
32565- New modules pwd and grp: access the UNIX password and group databases
32566- (SGI only:) New module "fm" interfaces to the SGI IRIX Font Manager
32567- (SGI only:) New module "fl" interfaces to Mark Overmars' FORMS library
32568- New numeric type: long integer, for unlimited precision
32569 - integer constants suffixed with 'L' or 'l' are long integers
32570 - new built-in function long(x) converts int or float to long
32571 - int() and float() now also convert from long integers
32572- New built-in function:
32573 - pow(x, y) returns x to the power y
32574- New operation and methods for lists:
32575 - l*n returns a new list consisting of n concatenated copies of l
32576 - l.remove(x) removes the first occurrence of the value x from l
32577 - l.index(x) returns the index of the first occurrence of x in l
32578 - l.reverse() reverses l in place
32579- New operation for tuples:
32580 - t*n returns a tuple consisting of n concatenated copies of t
32581- Improved file handling:
32582 - f.readline() no longer restricts the line length, is faster,
32583 and isn't confused by null bytes; same for raw_input()
32584 - f.read() without arguments reads the entire (rest of the) file
32585 - mixing of print and sys.stdout.write() has different effect
32586- New methods for files:
32587 - f.readlines() returns a list containing the lines of the file,
32588 as read with f.readline()
32589 - f.flush(), f.tell(), f.seek() call their stdio counterparts
32590 - f.isatty() tests for "tty-ness"
32591- New posix functions:
32592 - _exit(), exec(), fork(), getpid(), getppid(), kill(), wait()
32593 - popen() returns a file object connected to a pipe
32594 - utime() replaces utimes() (the latter is not a POSIX name)
32595- New stdwin features, including:
32596 - font handling
32597 - color drawing
32598 - scroll bars made optional
32599 - polygons
32600 - filled and xor shapes
32601 - text editing objects now have a 'settext' method
32602
32603
326043. Changes to the standard library
32605
32606- Name change: the functions path.cat and macpath.cat are now called
32607 path.join and macpath.join
32608- Added new modules: formatter, mutex, persist, sched, mainloop
32609- Added some modules and functionality to the "widget set" (which is
32610 still under development, so please bear with me):
32611 DirList, FormSplit, TextEdit, WindowSched
32612- Fixed module testall to work non-interactively
32613- Module string:
32614 - added functions join() and joinfields()
32615 - fixed center() to work correct and make it "transitive"
32616- Obsolete modules were removed: util, minmax
32617- Some modules were moved to the demo directory
32618
32619
326204. Changes to the demonstration programs
32621
32622- Added new useful scipts: byteyears, eptags, fact, from, lfact,
32623 objgraph, pdeps, pi, primes, ptags, which
32624- Added a bunch of socket demos
32625- Doubled the speed of ptags
32626- Added new stdwin demos: microedit, miniedit
32627- Added a windowing interface to the Python interpreter: python (most
32628 useful on the Mac)
32629- Added a browser for Emacs info files: demo/stdwin/ibrowse
32630 (yes, I plan to put all STDWIN and Python documentation in texinfo
32631 form in the future)
32632
32633
326345. Other changes to the distribution
32635
32636- An Emacs Lisp file "python.el" is provided to facilitate editing
32637 Python programs in GNU Emacs (slightly improved since posted to
32638 gnu.emacs.sources)
32639- Some info on writing an extension in C is provided
32640- Some info on building Python on non-UNIX platforms is provided
32641
32642
32643=====================================
32644==> Release 0.9.1 (February 1991) <==
32645=====================================
32646
32647- Micro changes only
32648- Added file "patchlevel.h"
32649
32650
32651=====================================
32652==> Release 0.9.0 (February 1991) <==
32653=====================================
32654
32655Original posting to alt.sources.