Download Python 2.5 beta 1
Python is an object-oriented programming language that can be used to develop simple to complex platform-independent applications. For a guide aimed at beginners you can visit this page justly. This language is used by many companies including: Industrial Light & Magic, google and NASA. The developers have released the first beta version of Python 2.5. The list of customizations looks like this:
What’s New in Python 2.5 beta 1?
Core and built-ins
- Patch #1507676: Error messages returned by invalid abstract object operations (such as iterating over an integer) have been improved and now include the type of the offending object to help with debugging.
- Bug #992017: A classic class that defined a __coerce__() method that returned its arguments swapped would infinitely recurse and segfault the interpreter.
- Fix the socket tests so they can be run concurrently.
- Removed 5 integers from C frame objects (PyFrameObject). f_nlocals, f_ncells, f_nfreevars, f_stack_size, f_restricted.
- Bug #532646: object.__call__() will continue looking for the __call__ attribute on objects until one without one is found. This leads to recursion when you take a class and set its __call__ attribute to an instance of the class. Originally fixed for classic classes, but this fix is for new-style. Removes the infinite_rec_3 crasher.
- The string and unicode methods startswith() and endswith() now accept a tuple of prefixes/suffixes to look for. Implements RFE #1491485.
- Buffer objects, at the C level, never used the char buffer implementation even when the char buffer for the wrapped object was explicitly requested (originally returned the read or write buffer). Now a TypeError is raised if the char buffer is not present but is requested.
- Patch #1346214: Statements like “if 0: suite” are now again optimized away like they were in Python 2.4.
- Builtin exceptions are now full-blown new-style classes instead of instances pretending to be classes, which speeds up exception handling by about 80% in comparison to 2.5a2.
- Patch #1494554: Update unicodedata.numeric and unicode.isnumeric to Unicode 4.1.
- Patch #921466: sys.path_importer_cache is now used to cache valid and invalid file paths for the built-in import machinery which leads to fewer open calls on startup.
- Patch #1442927: “long(str, base)“ is now up to 6x faster for non-power-of-2 bases. The largest speedup is for inputs with about 1000 decimal digits. Conversion from non-power-of-2 bases remains quadratic-time in the number of input digits (it was and remains linear-time for bases 2, 4, 8, 16 and 32).
- Bug #1334662: “int(string, base)“ could deliver a wrong answer when “base“ was not 2, 4, 8, 10, 16 or 32, and “string“ represented an integer close to “sys.maxint“. This was repaired by patch #1335972, which also gives a nice speedup.
- Patch #1337051: reduced size of frame objects.
- PyErr_NewException now accepts a tuple of base classes as its “base” parameter.
- Patch #876206: function call speedup by retaining allocated frame objects.
- Bug #1462152: file() now checks more thoroughly for invalid mode strings and removes a possible “U” before passing the mode to the C library function.
- Patch #1488312, Fix memory alignment problem on SPARC in unicode
- Bug #1487966: Fix SystemError with conditional expression in assignment
- WindowsError now has two error code attributes: errno, which carries the error values from errno.h, and winerror, which carries the error values from winerror.h. Previous versions put the winerror.h values (from GetLastError()) into the errno attribute.
- Patch #1475845: Raise IndentationError for unexpected indent.
- Patch #1479181: split open() and file() from being aliases for each other.
- Patch #1497053 & bug #1275608: Exceptions occurring in “__eq__()“ methods were always silently ignored by dictionaries when comparing keys. They are now passed through (except when using the C API function “PyDict_GetItem()“, whose semantics did not change).
- Bug #1456209: In some obscure cases it was possible for a class with a custom “__eq__()“ method to confuse dict internals when class instances were used as a dict’s keys and the “__eq__()“ method mutated the dict. No, you don’t have any code that did this 😉
Extension Modules
- Change binascii.hexlify to accept a read-only buffer instead of only a char buffer and actually follow its documentation.
- Fixed a potentially invalid memory access of CJKCodecs’ shift-jis decoder.
- Patch #1478788 (modified version): The functional extension module has been renamed to _functools and a functools Python wrapper module added. This provides a home for additional function related utilities that are not specifically about functional programming. See PEP 309.
- Patch #1493701: performance enhancements for struct module.
- Patch #1490224: time.altzone is now set correctly on Cygwin.
- Patch #1435422: zlib’s compress and decompress objects now have a copy() method.
- Patch #1454481: thread stack size is now tunable at runtime for thread enabled builds on Windows and systems with Posix threads support.
- On Win32, os.listdir now supports arbitrarily-long Unicode path names (up to the system limit of 32K characters).
- Use Win32 API to implement os. {access,chdir,chmod,mkdir,remove,rename,rmdir,utime}. As a result, these functions now raise WindowsError instead of OSError.
- “time.clock()“ on Win64 should use the high-performance Windows “QueryPerformanceCounter()“ now (as was already the case on 32-bit Windows platforms).
- Calling Tk_Init twice is refused if the first call failed as that may deadlock.
- bsddb: added the DB_ARCH_REMOVE flag and fixed db.DBEnv.log_archive() to accept it without potentially using an uninitialized pointer.
- bsddb: added support for the DBEnv.log_stat() and DBEnv.lsn_reset() methods assuming BerkeleyDB >= 4.0 and 4.4 respectively. [pybsddb project SF patch numbers 1494885 and 1494902]
- bsddb: added an interface for the BerkeleyDB >= 4.3 DBSequence class. [pybsddb project SF patch number 1466734]
- bsddb: fix DBCursor.pget() bug with keyword argument names when no data parameter is supplied. [SF pybsddb bug #1477863]
- bsddb: the __len__ method of a DB object has been fixed to return correct results. It could previously incorrectly return 0 in some cases. Fixes SF bug 1493322 (pybsddb bug 1184012).
- bsddb: the bsddb.dbtables Modify method now raises the proper error and aborts the db transaction safely when a modifier callback fails. Fixes SF python patch/bug #1408584.
- bsddb: multithreaded DB access using the simple bsddb module interface now works reliably. It has been updated to use automatic BerkeleyDB deadlock detection and the bsddb.dbutils.DeadlockWrap wrapper to retry database calls that would previously deadlock. [SF python bug #775414]
- Patch #1446489: add support for the ZIP64 extensions to zipfile.
- Patch #1506645: add Python wrappers for the curses functions is_term_resized, resize_term and resizeterm.
Library
- Patch #815924: Restore ability to pass type= and icon= in tkMessageBox functions.
- Patch #812986: Update turtle output even if not tracing.
- Patch #1494750: Destroy master after deleting children in Tkinter.BaseWidget.
- Patch #1096231: Add “default“ argument to Tkinter.Wm.wm_iconbitmap.
- Patch #763580: Add name and value arguments to Tkinter variable classes.
- Bug #1117556: SimpleHTTPServer now tries to find and use the system’s mime.types file for determining MIME types.
- Bug #1339007: Shelf objects now don’t raise an exception in their __del__ method when initialization failed.
- Patch #1455898: The MBCS codec now supports the incremental mode for double-byte encodings.
- “difflib“’s “SequenceMatcher.get_matching_blocks()“ was changed to guarantee that adjacent triples in the return list always describe non-adjacent blocks. Previously, a pair of matching blocks could end up being described by multiple adjacent triples that formed a partition of the matching pair.
- Bug #1498146: fix optparse to handle Unicode strings in option help, description, and epilog.
- Bug #1366250: minor optparse documentation error.
- Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately; clarify docs.
- The wsgiref package has been added to the standard library.
- The functions update_wrapper() and wraps() have been added to the functools module. These make it easier to copy relevant metadata from the original function when writing wrapper functions.
- The optional “isprivate“ argument to “doctest.testmod()“, and the “doctest.is_private()“ function, both deprecated in 2.4, were removed.
- Patch #1359618: Speed up charmap encoder by using a trie structure for lookup.
- The functions in the “pprint“ module now sort dictionaries by key before computing the display. Before 2.5, “pprint“ sorted a dictionary if and only if its display required more than one line, although that wasn’t documented. The new behavior increases predictability; eg, using “pprint.pprint(a_dict)“ in a doctest is now reliable.
- Patch #1497027: try HTTP digest auth before basic auth in urllib2 (thanks for JJ Lee).
- Patch #1496206: improve urllib2 handling of passwords with respect to default HTTP and HTTPS ports.
- Patch #1080727: add “encoding” parameter to doctest.DocFileSuite.
- Patch #1281707: speed up gzip.readline.
- Patch #1180296: Two new functions were added to the locale module: format_string() to get the effect of “format % items” but locale-aware, and currency() to format a monetary number with currency sign.
- Patch #1486962: Several bugs in the turtle Tk demo module were fixed and several features added, such as speed and geometry control.
- Patch #1488881: add support for external file objects in bz2 compressed tarfiles.
- Patch #721464: pdb.Pdb instances can now be given explicit stdin and stdout arguments, making it possible to redirect input and output for remote debugging.
- Patch #1484695: Update the tarfile module to version 0.8. This fixes a couple of issues, notably handling of long file names using the GNU LONGNAME extension.
- Patch#1478292. “doctest.register_optionflag(name)“ shouldn’t create a new flag when “name“ is already the name of an option flag.
- Bug #1385040: don’t allow “def foo(a=1, b): pass” in the compiler package.
- Patch #1472854: make the rlcompleter.Completer class usable on non-UNIX platforms.
- Patch #1470846: fix urllib2 ProxyBasicAuthHandler.
- Bug #1472827: correctly escape newlines and tabs in attribute values in the saxutils.XMLGenerator class.
build
- Bug #1502728: Correctly link against librt library on HP-UX.
- OpenBSD 3.9 is supported now.
- Patch #1492356: Port to Windows CE.
- Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
- Patch #1471883: Add –enable-universalsdk.
Version number | 2.5 beta 1 |
Operating systems | Windows 9x, Windows NT, Windows 2000, Linux, BSD, Windows XP, macOS, Solaris, UNIX, Windows Server 2003, Windows XP x64, Windows XP IA-64, Windows Server 2003 x64, Windows Server 2003 IA-64 |
Website | Python |
Download | |
License type | Conditions (GNU/BSD/etc.) |