Latest in branch 2.6
2.6.9
Released 29 Oct 2013
(12 years ago)
SoftwarePython
Version2.6
Status
End of life
Initial release2.6
01 Oct 2008
(17 years ago)
Latest release2.6.9
29 Oct 2013
(12 years ago)
End of life29 Oct 2013
(Ended 12 years, 7 months ago)
Source codehttps://github.com/python/cpython/tree/v2.6.9
Documentationhttps://docs.python.org/release/2.6.9/
Downloadhttps://www.python.org/downloads/release/python-269/
Python 2.6 ReleasesView full list

What Is New in Python 2.6

Python 2.6 was released on October 1, 2008, as a transition release designed to ease migration to Python 3. It backported many Python 3.0 features while maintaining backward compatibility with Python 2.5 code. Key additions include the multiprocessing module, the str.format() method, the with statement available without a future import, class decorators, and improved I/O.

Category Change Notes
New Modules multiprocessing -- process-based parallelism bypassing the GIL PEP 371
Standard Library str.format() -- new string formatting method PEP 3101
Syntax Class decorators (@decorator before class) PEP 3129
Syntax with statement available without from __future__ import with_statement --
Standard Library fractions module -- rational number arithmetic PEP 3141
Standard Library io module -- new buffered I/O framework PEP 3116
Standard Library abc module -- Abstract Base Classes PEP 3119
Numerics Octal literal syntax: 0o777 (alongside old 0777) PEP 3127
Numerics Binary literals: 0b101010 PEP 3127
Standard Library json module -- JSON encoding/decoding in stdlib --

How Did Python 2.6 Bridge the Gap to Python 3?

multiprocessing -- True Parallelism (PEP 371)

The multiprocessing module provided process-based parallelism -- bypassing the GIL entirely by spawning separate Python processes that share data via pipes, queues, and shared memory. This was the first practical solution to CPU-bound parallelism in CPython.

from multiprocessing import Pool

def compute(n):
    return sum(range(n))

with Pool(processes=4) as pool:
    results = pool.map(compute, [10**6, 10**6, 10**6, 10**6])
print(results)

str.format() -- Modern String Formatting (PEP 3101)

str.format() replaced the % operator as the recommended way to format strings. It supports positional and keyword arguments, format specs, and nested field names.

"Hello, {name}!".format(name="Alice")
"{0:.2f} {1}".format(3.14159, "pi")
"{data[key]}".format(data={"key": "value"})

Abstract Base Classes (PEP 3119)

The abc module allows defining interfaces that enforce method implementations. Subclasses that don't implement abstract methods raise TypeError at instantiation time.

from abc import ABC, abstractmethod

class Shape(ABC):
    @abstractmethod
    def area(self):
        pass

class Circle(Shape):
    def __init__(self, r): self.r = r
    def area(self): return 3.14159 * self.r ** 2

json Module in stdlib

The json module (based on simplejson) landed in the stdlib, eliminating a near-universal external dependency for web and API code.

import json
data = json.loads('{"key": "value", "num": 42}')
print(json.dumps(data, indent=2))

FAQ

Why was Python 2.6 called a transition release?
It was explicitly designed to let developers write code that works on both Python 2.6 and Python 3.0. It added Python 3 features under from __future__ imports (like print_function, unicode_literals, division) and warned about code that would break in Python 3. The intent was a dual-version runway for library authors.

Is multiprocessing in Python 2.6 the same as in Python 3?
The API is largely compatible, but Python 3 versions have fixed various pickling edge cases, improved the start methods (spawn, fork, forkserver), and added shared memory support in 3.8. For new code, identical patterns work in Python 3 with fewer gotchas around pickling and process teardown.

When did the with statement require a future import?
In Python 2.5, you had to write from __future__ import with_statement to use with. Python 2.6 made it available without the import. Python 3.0 never required it.

Is str.format() still preferred over f-strings?
Not in Python 3.6+ codebases. F-strings are faster, more readable, and support the same format specifications. Use str.format() when you need a reusable template string that is filled in later (template = "{name} logged in"; template.format(name=user)), or when targeting Python versions before 3.6.

What replaced old-style octal literals like 0777?
Python 3.0 (and Python 2.6+ in forward-compatibility mode) requires the 0o prefix: 0o777. The old 0777 form is a SyntaxError in Python 3. Python 2.6 supports both forms for migration.

Releases In Branch 2.6

VersionRelease date
2.6.929 Oct 2013
(12 years ago)
2.6.9rc101 Oct 2013
(12 years ago)
2.6.810 Apr 2012
(14 years ago)
2.6.8rc217 Mar 2012
(14 years ago)
2.6.8rc123 Feb 2012
(14 years ago)
2.6.704 Jun 2011
(15 years ago)
2.6.623 Aug 2010
(15 years ago)
2.6.6rc216 Aug 2010
(15 years ago)
2.6.6rc103 Aug 2010
(15 years ago)
2.6.518 Mar 2010
(16 years ago)
2.6.5rc209 Mar 2010
(16 years ago)
2.6.5rc101 Mar 2010
(16 years ago)
2.6.426 Oct 2009
(16 years ago)
2.6.4rc218 Oct 2009
(16 years ago)
2.6.4rc106 Oct 2009
(16 years ago)
2.6.301 Oct 2009
(16 years ago)
2.6.3rc129 Sep 2009
(16 years ago)
2.6.214 Apr 2009
(17 years ago)
2.6.2c107 Apr 2009
(17 years ago)
2.6.104 Dec 2008
(17 years ago)
2.601 Oct 2008
(17 years ago)
2.6rc218 Sep 2008
(17 years ago)
2.6rc112 Sep 2008
(17 years ago)
2.6b321 Aug 2008
(17 years ago)
2.6b218 Jul 2008
(17 years ago)
2.6b119 Jun 2008
(17 years ago)
2.6a308 May 2008
(18 years ago)
2.6a203 Apr 2008
(18 years ago)
2.6a101 Mar 2008
(18 years ago)