Python 2.5.0
Python 2.5 was released on September 19th 2006. There’s a bunch of places you can look for more information on what’s new in this release — see the «What’s New» section further down this page.
This is a final release, and should be suitable for production use.
PEP 356 includes the schedule and will be updated as the schedule evolves. At this point, any testing you can do would be greatly, greatly appreciated.
Extension authors should note that changes to improve Python’s support for 64 bit systems mean that some C extension modules may very well break. This post has some pointers to more information for C extension authors.
Please see the separate bugs page for known issues and the bug reporting procedure.
Download the release
Starting with the Python 2.4 releases the Windows Python installer is being distributed as a Microsoft Installer (.msi) file. To use this, the Windows system must support Microsoft Installer 2.0. Just save the installer file, Python-2.5.msi, to your local machine, then double-click python-2.5.msi to find out if your machine supports MSI. If it doesn’t, you’ll need to install Microsoft Installer first. Many other packages (such as Word and Office) also include MSI, so you may already have it on your system. If not, you can download it freely from Microsoft for Windows 95, 98 and Me and for Windows NT 4.0 and 2000. Windows XP and later already have MSI; many older machines will already have MSI installed.
The new format installer allows for automated installation and many other shiny new features. There are also separate installers for Win64-Itanium users (on XP/2003 64-bit Itanium Edition) — Python-2.5.ia64.msi and for Win64 users on AMD64 machines (on XP/2003/Vista x64 Edition) — Python-2.5.amd64.msi.
Windows users may also be interested in Mark Hammond’s pywin32 package, available from Sourceforge. pywin32 adds a number of Windows-specific extensions to Python, including COM support and the Pythonwin IDE.
Users of Mac OS X 10.3 and later can install a universal binary (suitable for both PowerPC and Intel machines) from python-2.5-macosx.dmg . Download to the desktop and open the .dmg file to install.
All others should download either python-2.5.tgz or python-2.5.tar.bz2, the source archive. The tar.bz2 is considerably smaller, so get that one if your system has the appropriate tools to deal with it. Unpack it with tar -zxvf Python-2.5.tgz (or bzcat Python-2.5.tar.bz2 | tar -xf -). Change to the Python-2.5 directory and run the «./configure», «make», «make install» commands to compile and install Python.
Since this is a new version of Python, you may want to use the «make altinstall» command instead of «make install» — this will install a «python2.5» binary without touching the existing «python» binary.
The source archive is also suitable for Windows users who feel the need to build their own version.
What’s New?
- See some of the highlights of the Python 2.5 release.
- Andrew Kuchling’s What’s New in Python 2.5 describes the most visible changes since Python 2.4 in more detail.
- PEP 356 has information on a bunch of the new features added in 2.5, as well as pointers to the relevant PEPs.
- A detailed list of the changes in Python 2.5 can be found in the release notes, or the Misc/NEWS file in the source distribution.
- IDLE has its own release notes, or see the Lib/idlelib/NEWS.txt file in the source distribution.
- For the full list of changes, you can poke around in Subversion.
Documentation
The documentation has also been updated:
- Browse HTML on-line
- Download using HTTP.
- Documentation is available in Windows Help (.chm) format — Python25.chm.
Files, MD5 checksums, signatures and sizes
bc1b74f90a472a6c0a85481aaeb43f95 Python-2.5.tgz (11019675 bytes, signature)
ddb7401e711354ca83b7842b733825a3 Python-2.5.tar.bz2 (9357099 bytes, signature)
33fffe927e4a84aa728d7a47165b2059 python-2.5.msi (10695680 bytes, signature)
c9ebc47dfab4fdc78d895ed6ab715db0 python-2.5.amd64.msi (10889216 bytes, signature)
dec95012739692625939e3ec6572fa5f python-2.5.ia64.msi (12986368 bytes, signature)
9ea85494251357970d83a023658fddc7 python-2.5-macosx.dmg (18749464 bytes, signature)
d8bfc10c7fd6505271ef5c755999c7cc Python25.chm (4160038 bytes, signature)
The signatures above were generated with GnuPG using release manager Anthony Baxter’s public key which has a key id of 6A45C816.
Files
Version | Operating System | Description | MD5 Sum | File Size | GPG |
---|---|---|---|---|---|
bzip2 compressed source tarball | Source release | ddb7401e711354ca83b7842b733825a3 | 9357099 | SIG | |
Gzipped source tarball | Source release | 2598e447f648a59dd1e8b359fd05dbb2 | 46612480 | SIG | |
Mac OS X installer | macOS | 9ea85494251357970d83a023658fddc7 | 18749464 | SIG | |
Windows help file | Windows | d8bfc10c7fd6505271ef5c755999c7cc | 4160038 | SIG | |
Windows x86-64 MSI installer | Windows | for AMD64/EM64T/x64 | c9ebc47dfab4fdc78d895ed6ab715db0 | 10889216 | SIG |
Windows x86 MSI installer | Windows | 33fffe927e4a84aa728d7a47165b2059 | 10695680 | SIG |
- About
- Applications
- Quotes
- Getting Started
- Help
- Python Brochure
- All releases
- Source code
- Windows
- macOS
- Other Platforms
- License
- Alternative Implementations
- Docs
- Audio/Visual Talks
- Beginner’s Guide
- Developer’s Guide
- FAQ
- Non-English Docs
- PEP Index
- Python Books
- Python Essays
- Diversity
- Mailing Lists
- IRC
- Forums
- PSF Annual Impact Report
- Python Conferences
- Special Interest Groups
- Python Logo
- Python Wiki
- Code of Conduct
- Community Awards
- Get Involved
- Shared Stories
- Arts
- Business
- Education
- Engineering
- Government
- Scientific
- Software Development
- Python News
- PSF Newsletter
- PSF News
- PyCon US News
- News from the Community
- Python Events
- User Group Events
- Python Events Archive
- User Group Events Archive
- Submit an Event
- Developer’s Guide
- Issue Tracker
- python-dev list
- Core Mentorship
- Report a Security Issue
- Help & General Contact
- Diversity Initiatives
- Submit Website Bug
- Status
More Reliable
Python now uses the Buildbot tool for continuous testing on a wide range of platforms. This allows us to spot problems faster during development, and resulted in a much more robust release.
Andrew Kuchling determined that there were over 350 patches and over 450 bugs fixed since Python 2.4.
Faster
A number of optimizations came out of the NeedForSpeed sprint in Iceland. There were major speedups in exception handling and string operations, as well as a number of other changes to improve performance.
New language features
Internally, the Python compiler now converts the source code to an abstract syntax tree (AST) before producing the bytecode.
The ‘with’ operator replaces a common try/finally idiom that results in much cleaner and safer code.
Generators gained send, throw and close methods. Values passed to send will be returned by the yield statement when the generator is resumed. throw takes an exception and causes the yield statement to raise the passed exception in the generator. close is used to terminate a generator. This turns generators into a form of coroutine and makes them even more powerful.
Conditional expressions of the form (TrueValue if Condition else FalseValue) were added.
import can use both relative and absolute imports when inside packages.
Try/except/finally were changed so that it’s now possible to have both except blocks and a finally block for the same try block.
Exceptions have become new-style classes, and the exception hierarchy has been rearranged a bit.
Internally, Python was changed to use the Py_ssize_t type — this means that many structures that were limited to 2^32 objects can now hold up to 2^64 instead.
New or upgraded built-ins
partition and rpartition methods were added to str and unicode. This greatly simplifies the process of searching and splitting strings.
New builtins any and all evaluate whether an iterator contains any or all True values, respectively.
min and max gained a key keyword parameter, analogous to sort.
New or upgraded modules and packages
In keeping with the theme of adding tried and true packages to the standard library, in 2.5 we’ve added ctypes, ElementTree, hashlib, sqlite3 and wsgiref to the standard library that ships with Python.
Google’s summer of code resulted in a new cProfile profiling module. This is a much more efficient version of the venerable profile.py module that’s shipped with Python for many many years. GSoC also gave us a rewritten mailbox module that can both read and write mailboxes in a variety of formats.
The struct module was updated to support a new Struct object. These are similar to the re module’s compiled form of regular expressions.
Some other smaller modules added to the standard library include uuid, msilib and spwd.
The PSF
The Python Software Foundation is the organization behind Python. Become a member of the PSF and help advance the software and our mission.
- About
- Applications
- Quotes
- Getting Started
- Help
- Python Brochure
- All releases
- Source code
- Windows
- macOS
- Other Platforms
- License
- Alternative Implementations
- Docs
- Audio/Visual Talks
- Beginner’s Guide
- Developer’s Guide
- FAQ
- Non-English Docs
- PEP Index
- Python Books
- Python Essays
- Diversity
- Mailing Lists
- IRC
- Forums
- PSF Annual Impact Report
- Python Conferences
- Special Interest Groups
- Python Logo
- Python Wiki
- Code of Conduct
- Community Awards
- Get Involved
- Shared Stories
- Arts
- Business
- Education
- Engineering
- Government
- Scientific
- Software Development
- Python News
- PSF Newsletter
- PSF News
- PyCon US News
- News from the Community
- Python Events
- User Group Events
- Python Events Archive
- User Group Events Archive
- Submit an Event
- Developer’s Guide
- Issue Tracker
- python-dev list
- Core Mentorship
- Report a Security Issue
- Help & General Contact
- Diversity Initiatives
- Submit Website Bug
- Status
При подготовке материала использовались источники:
https://www.python.org/downloads/release/python-250/
https://www.python.org/download/releases/2.5/highlights/