Skip to content

Latest commit

Β 

History

History
2034 lines (1445 loc) Β· 69.9 KB

File metadata and controls

2034 lines (1445 loc) Β· 69.9 KB

An amble through some of Python's history

pointing out interesting landmarks as we go, because to do the whole thing would take too long...

amble to walk at an easy pace, with no particular destination in mind

By Tibs / Tony Ibbs, April 2017

Written using reStructuredText. Presented using hovercraft. Sources on github

Note

Python has been going since the early 1990s, and to talk about all of its history, and the history of computing that impinges on it, would clearly take much too long. So this is intended to be an open-ended (i.e., we don't expect to finish) talk.

This slideshow is available as a git repository at https://github.com/tibs/python-history

Other obviously related resources:


About this talk

I cover, at least briefly, the major releases of Python (and 1.5.2), and also things that were happening in the Python world around those times.

1991 to 2017 - that's 26 years...

Is it accurate?

Well, there's certainly a lot of information (and links in the notes), but there are also many places where I'm using my own memory of events, which is doubtless unreliable. So think of it as an informal history, at best.

Note

There is too much information in this slideset to present it all. What I intend to do is to skim over the slides that describe what is new in each Python release - they're mainly there to give an idea of scope, and to act as a reference (of some sort) when reading this later.

The dates given for a Python release are for the .0 release, but remember that most versions of Python go through several minor releases. The features described as new to that version may thus be from the first release or later minor releases.

Lots of the information is from the "What's New in Python x.y" series of documents, started by Andrew Kuchling in 1999 (for 2.0). He continued until 2.7 in 2010, by which time it was traditional/expected to have them.

I hope I've transcribed information correctly - any mistakes are mine. Similarly, I've not included all the information for each release, and what is omitted is detrermined by my own preferences (at the time of making this set of slides), so apologies to anyone if I've left out stuff they would have cared about.

By the way, Andrew Kuchling's slides for Why projects should have What's New documents are worth reading through.

General resources:


Where Python came from

  • Named after Monty Python, not the snakes
  • Inspired by ABC and Modula-3
  • Meant to be readable
  • Python 1.0 came out in 1994
    • Perl came out in 1987
    • Tcl came out in 1988, Tk round about the same time, although it was useful from about 1990
    • Java 1.0 came out in 1995

Note

http://faculty.cs.tamu.edu/yurttas/PL/SL/python/docs/core-python-programming/html/py-faq.htm#1.2

"""1.2. Why is it called Python?

Apart from being a computer scientist, I'm also a fan of "Monty Python's Flying Circus" (a BBC comedy series from the seventies, in the -- unlikely -- case you didn't know). It occurred to me one day that I needed a name that was short, unique, and slightly mysterious. And I happened to be reading some scripts from the series at the time... So then I decided to call my language Python. But Python is not a joke. And don't you associate it with dangerous reptiles either! (If you need an icon, use an image of the 16-ton weight from the TV series or of a can of SPAM :-) """

NB: significant indentation, not significant whitespace

History:

  • occam had significant indentation
  • haskell has two forms, but the significant indentation form is the only one used.
  • F# started out with only a colon delimited form, but someone introduced a significant indentation form, and that's now dominant (I was at a meeting when it was relatively new, and the people giving the talk about F# clearly believed it would never take off)

According to wikipedia, this is known as the off-side rule, a term which I hadn't previously known. The linked wikipedia article has a list of programming languages which use it. The idea seems to date from at least 1966.

In fact the whole page at https://docs.python.org/3/faq/design.html is worth reading, if you haven't.

Monty Python for pythonistas: https://www.youtube.com/watch?v=gJ4duC-V6Xw&feature=youtu.be (a video that gives some of the Python references, for those who didn't grow up with the show)


How I found Python

I don't remember exactly when I first found Python, but my first dated Python script is from 1994.

My background had been with BCPL, Fortran and C (and also Emacs and TeX/LaTeX, which will become relevant later on).

When I came across Python, I fell in love with it.

Note

Work had tasked me with looking for a programming language we could embed into our object oriented database. At that time, the obvious choices were things like Tcl and various small lisps or schemes. But I also found Python, and fell in love with it, in large part because it was what I already wrote down when writing pseudo-code (with the exception of the colons - more on them later too). It also had much of the feel I had liked from using VMS DCL (Digital Command Language - a relatively sophisticated Basic descendant, with close integration with the operating system).

As it happened, we didn't choose any of my found languages (we ended up with a simplified Pascal clone from Byte magazine), and I think at the time we would have thought Python was too much work to embed.


Why I like Python

  • runnable pseudo-code - especially the significant indentation
  • dictionaries all the way down - high level datastructures built in
  • exposes its innards - very unusually for a programming language, it allows itself to be modified - at least two implementations of goto (!) and Hy
  • "safe"/"sane" - a sensible language written and designed by sensible people

Note


-26..-24 πŸ”΅ Before 1994

Python 0.9.0 in 1991, followed by a flurry of other versions (not all released), leading up to 0.9.8 in 1993

Note

Slides with the blue circle πŸ”΅ represent a new year. Text in bold indicates a topic that will have its own slide, coming up shortly. The negative numbers on blue dot slides indicate how many years ago that slide represents - measured from year 2017 as year 0.

As I said at the start, this is probably the year I first found Python.


Before 1994: Feb 1991 Python 0.9.1p1

  • no __init__ method
  • no double quoted strings
  • else introduced for for loops

Before 1994: 1991 Python 0.9.2

Never properly released

  • Semicolons can be used to separate statements
  • continue
  • {key: value} to define a dictionary
  • blank and comment lines don't need to be correctly indented
  • 1 == 1.0
  • .pyc files; first pythonmode.el
  • arbitrary precision integers
  • tutorial nearly complete

Note

I love the fact that before 0.9.2 blank lines had to be correctly indented!


Before 1994: 1991 Python 0.9.3

Again, probably not very released

  • global statement
  • class B allowed, instead of class B(), and can do class B(D
  • C shifting and masking operators (<<, etc)
  • C comparison operators (== and !=) - the previous = and <> are still allowed
  • class attributes are no long read-only

Note

The biggest change here is probably being able to assign to class attributes, although really this is quite a significant (non) release.

Before 1994: Dec 1991 Python 0.9.4alpha

  • new exceptions

  • functions are called with 0..N arguments, not just 0 or 1.

    def init(self, (x, y)) becomes def init(self, x, y)

  • x[-1] is equivalent to x[len(x)-1]


Before 1994: Python 0.9.8

  • number of arguments to a function must match number declared
  • *args introduced to allow "varargs"
  • sys.exitfunc called on exit, SIGTERM or SIGHUP
  • I/O mostly accepts any object supporting readline() or write()
  • str() and repr()
  • cmp(x,y)
  • modules struct, fcntl, md5
  • and from 0.9.7beta, __getitem__ and __repr__

Note

http://legacy.python.org/search/hypermail/python-1993/0001.html

Much of it is concerned with changes to how Python is built - cross platform support in those days was much more complicated.


-23 πŸ”΅ 1994

  • Python 1.0
  • Python 1.1
  • comp.lang.python starts up

Note

  • the Usenet days - back when you could read all of comp.lang.python every day

1994 Jan Python 1.0

  • builds across many Unices without alteration, uses GNU autoconf
  • sources and standard library reorganised
  • double quotes allowed for strings
  • keyword exec, replacing built in function
  • keyword lambda, and new functions map, filter, reduce
  • xrange
  • __name__ and the if __name__ == '__main__': main() trick
  • printing an object now uses its __str__ method

Note

exec will become a function again in 3.0


1994 Oct Python 1.1

  • __getattr__ and friends
  • __call__
  • threads should work on most platforms
  • modules tkinter, signal, curses, urlparse

Usenet and comp.lang.python

  • The BDFL
  • Guido's tendency to release a new version of Python and immediately go on holiday
  • The PSA (who did exist) and the PSU (who definitely do not exist)
  • Guido's time machine
  • Python the role playing game
  • timbot, effbot, martellibot

Note

How many people in the audience remember/know of Usenet? (The wikipedia article referenced provides a good summary.)


-22 πŸ”΅ 1995

  • Python 1.2
  • Python 1.3
  • The development of Grail started
  • Numeric, the predecessor/ancestor of Numpy
  • Java 1.0
  • Ruby 0.95

Note

Python has always had WWW tools:

Grail was a free extensible multi-platform web browser written in the Python programming language. The project was started in August 1995, with its first public release in November of that year.[3] The 0.3 beta contained over 27,000 lines of Python.[3] The last official release was version 0.6 in 1999.

One of the major distinguishing features of Grail was the ability to run client-side Python code


1995 Apr Python 1.2

(actual release date unsure)

  • import a.b.c and from a.b.c import name supported, but no implementation
  • __import__ function
  • new modules: imp, pickle, shelve
  • docstrings
  • Mark Hammond's support for Windows NT
  • exceptions can be classes

Note

  • import a.b.c and from a.b.c import name are supported, but not yet implemented. The __import__ function and imp module expose import functionality.

  • docstrings are introduced for modules, classes and functions (which includes methods). They are stored in the (new) __doc__ attribute of those objects. Their implementation takes advantage of the fact that a string literal can occur as a lone statement (as can any Python object, come to that), so a string literal occuring at the very start of a module, or immediately after a class or def statement's : is "hijacked" as being a docstring.

    It will take quite a long while before everything in the standard library has doc strings - essentially until Python 1.5

  • exceptions can be classes, but all built in exceptions are still strings


1995 Oct Python 1.3

(actual release date unsure)

  • keyword arguments (a whole new chapter in the tutorial)
  • htmllib rewritten, incompatibly
  • globals() and locals()
  • the ni module

Note

  • Keyword arguments are introduced for the first time. They get a whole new chapter in the tutorial.
  • globals() and locals() are, of course, used to get the global and local variables

The "ni" module

The "ni" module supports importing modules with hierarchical names. So, for instance:

import ni
ni.ni()
from a.b.c import name

Note

Named, of course, after The Knights Who Say "Ni!".

This is clearly felt to be a hack (albeit with a cool name), but it's another good example of new ideas being tried out, with an actual implementation, before they become "proper" parts of Python


-21 πŸ”΅ 1996

Python 1.4


1996 Oct Python 1.4

  • library reference now maintained in Framemaker
  • name mangling to provide a simple form of class private variables: __spam
  • access is no longer a reserved word
  • lstrip and rstrip, third argument to split
  • "The PC build procedure now really works"
  • ... (Ellipses) provided for use by Numerical Python
  • x**y (same as pow(x,y))
  • complex numbers

-20 πŸ”΅ 1997

  • Python 1.5
  • Christian Tismer starts up the Starship Python
  • JPython started

Note

Christian Tismer:

JPython/Jython (JPython became Jython in 2000):

(At work a few years later, I was one of the team providing Java support in our object oriented database. I felt that being able to run up Jython and code in Python was a good demonstration of our success.)


1997 Dec Python 1.5

  • #!/usr/bin/env python recommended, instead of #!/usr/local/bin/python
  • -O produces .pyo files
  • private variables starting __ are now a permanent feature
  • raise SomeClass, some_value
  • thread safe sys.exc_info()
  • string interning
  • int(), long() and float() can now take string arguments
  • the "Don Beaudry hook" for metaclasses
  • new, experimental re.py regular expression module
  • pprint.py
  • Python builds as a single library file
  • os.path.join (and friends) take more than two arguments
  • issubclass and isinstance
  • dict.get()
  • import spam.ham.eggs supported directly, ni declared obsolete
  • all standard exceptions are now classes (by default)
  • OS/2 support (!)

PythonWin and other associated Windows support is still released separately by Mark Hammond.

Note

Some of those deserve a little more explanation:

  • #!/usr/bin/env python recommended, instead of #!/usr/local/bin/python - different systems may put Python in different places (I might even have installed it into my own home directories), so it's better to say "use the Python on the PATH" than to bind in an assumption of where Python lives. This is still the recommendation today. This is contentious with some people, who worry that it is a security hole to rely on the PATH being safe - if it matters, then indeed bind in the location of Python for the scripts that need to worry about this (i.e., system scripts).
  • -O produces .pyo files instead of .pyc files. This basically removes SET_LINENO instructions and assert statements
  • raise SomeClass, some_value where some_value is not an instance of SomeClass raises SomeClass(some_value).
  • The new, experimental re.py regular expression module was introduced, and then almost immediately replaced by an even newer one based on Philip Hazel's pcre. The old regex module is officially obsolete, but still there.
  • Python builds as a single library file, libpython1.5.a
  • import spam.ham.eggs supported directly, ni declared obsolete, an __init__.py file is required to identify a directory as a package

-19 πŸ”΅ 1998

Stackless Python started

Zope released as free software


Stackless Python

Stackless Python, by Christian Tismer, was a set of modifications for CPython to provide true continuations, replaced later on with tasklets.

It eventually led to the greenlets module, and is an important precursor to PyPy.

Note

Stackless Python

  • https://en.wikipedia.org/wiki/Stackless_Python

  • video: http://pyvideo.org/europython-2012/the-story-of-stackless-python.html (video, 54 minutes)

    """This talk gives a good overview of the status of Stackless Python: Its history from the beginning, its current status and its future development to be expected. A discussion and comparison with similar approaches like Greenlet, Eventlet and how they relate is also included. Stackless Python 1.0 was started in 1998 as an implementation of true continuations, with all implied complications. In 2002, Stackless 2.0 was born, a complete rewrite. Continuations were abandoned in favor of the much easier to comprehend tasklets - one-shot continuations that could resume their current state just once, like Coroutines. In 2004, Stackless 3.0 was created, which merged the 2.0 features with a new concept: so-called β€œSoft-Switching”, which made the Pickling of Program State” possible. As a consequence, a few recent application make solely use of Program State Pickling, which changes the purpose of Stackless Python quite a bit. One example of this is the β€œNagare Web Framework” which will be shown in examples. In the light of the popularity of a Stackless spin-off, called β€œGreenlet”, the concept of a new Stackless branch will be depicted: Stackless, written as a pure extension module on top of Greenlets, which includes State Pickling - a feature that seemed to be impossible to implement without changing CPython. But the impossible and ways to get around it was always a major topic in this project, which is going to augment what Stackless on PyPy already can do. Christian Tismer, creator of Stackless Python Perhaps with Armin Rigo as a guest, talking about Stackless status in PyPy. Otherwise, I will insert this myself. cheers – Chris"""


Zope

Zope was the killer Python app that never quite became so. But it's important in various ways:

  • it's the origin of structuredText, the predecessor to reStructuredText
  • it was (one of) the first companies to open source its product as a result of commercial advice
  • it was an early non-relational database (ZODB persists Python objects)
  • the Zope web interface is to Python objects
  • it's still around - Pylons, Zope 2, Blue Bream (aka Zope 3)

Note

  • Guido worked for Digital Creations for a while

  • wikipedia says:

    """"A Zope website is usually composed of objects in a Zope Object Database, not files on a file system, as is usual with most web servers. This allows users to harness the advantages of object technologies, such as encapsulation. Zope maps URLs to objects using the containment hierarchy of such objects; methods are considered to be contained in their objects as well. Data can be stored in other databases as well, or on the file system, but ZODB is the most common solution."""

There is lots of information out there on Digital Creations, the Zope foundation and Zope itself. Some useful links may be:

StructuredText 4.1.0 is available on PyPi, dating from 2014, and there is a StructuredText github repository. To get a flavour of it, read the Introduction to Structured Text. StructuredTextNG ("next generation") was intended to be a replacement. Back in the day, I wrote a document which tried to define StructuredTextNG more formally than its own documentaiton, as part of the work to work out a replacement.

The following links looked interesting, but last time I tried, appeared to be broken:


-18 πŸ”΅ 1999

  • Python 1.5.2
  • Zen of Python

Note

Why single out 1.5.2? Well, it was the last release before 1.6 and/or 2.0, and at the time it certainly felt like a significant thing. Indeed, I vaguely recall people having serious discussions about upgrading from 1.3 to 1.5.2, and then again from 1.5.2 to 2.n.

The Zen of Python was written, more or less as a throw-away, by Tim Peters in a post on comp.lang.python, 4 June 1999:

https://mail.python.org/pipermail/python-list/1999-June/001951.html)

The import this Easter Egg was introduced in 2001:

https://www.wefearchange.org/2010/06/import-this-and-zen-of-python.html

and it became a PEP in 2004:

https://www.python.org/dev/peps/pep-0020

1999 Apr Python 1.5.2

  • docs separated out
  • IDLE introduced
  • bare raise re-raises
  • quit and exit at the Python prompt tell you how to exit
  • list pop method, experimentally
  • new module ndiff

Note

More details:

  • docs separated out into a separate distributable
  • IDLE introduced
  • bare raise re-raises
  • """Added a hack so that when you type 'quit' or 'exit' at the interpreter, you get a friendly explanation of how to press Ctrl-D (or Ctrl-Z) to exit."""
  • list pop method, experimentally
  • ndiff.py - Tim Peter's text diffing tool

There's a lot of argument behind how quit and exit at the Python prompt behave! They can't just exit because the Python prompt doesn't treat things (much) more specially than Python itself, and they aren't function calls, they're just objects. So the compromise is to change their representation to give the information the user needs. But of course many people are still unhappy.


-17 πŸ”΅ 2000

  • Python 1.6, the penultimate CNRI version
  • Python 1.6.1, the same with a GPL compatible license
  • Python 2.0, the first non-CNRI version, with a modern Python license
  • development now on sourceforge, opened up
  • PEPs
  • reStructuredText
  • Alex Martelli coins "duck typing"
  • Design of Perl 6 began

Note

https://opensource.org/licenses/Python-2.0 - Python 2.0 license


2000 Sep Python 1.6, 1.6.1

  • Python 1.6, the penultimate CNRI version
  • Python 1.6.1, the same with a GPL compatible license

Note

The "What's New" notes for Python 2.0 say:

"""Python 1.6 can be thought of as the Contractual Obligations Python release. After the core development team left CNRI in May 2000, CNRI requested that a 1.6 release be created, containing all the work on Python that had been performed at CNRI. Python 1.6 therefore represents the state of the CVS tree as of May 2000, with the most significant new feature being Unicode support. Development continued after May, of course, so the 1.6 tree received a few fixes to ensure that it’s forward-compatible with Python 2.0. 1.6 is therefore part of Python’s evolution, and not a side branch.

So, should you take much interest in Python 1.6? Probably not. The 1.6final and 2.0beta1 releases were made on the same day (September 5, 2000), the plan being to finalize Python 2.0 within a month or so. If you have applications to maintain, there seems little point in breaking things by moving to 1.6, fixing them, and then having another round of breakage within a month by moving to 2.0; you’re better off just going straight to 2.0. Most of the really interesting features described in this document are only in 2.0, because a lot of work was done between May and September."""


2000 Oct Python 2.0

The first non-CNRI version

  • modern Python license
  • now on sourceforge, development process opened up
  • PEPs introduced as the way to introduce changes
  • unicode added
  • list comprehensions [x**2 for x in range(10)]
  • string methods (",".join([1,2,3])
  • garbage collections copes with reference cycles
  • Augmented assignment (+= and so on).
  • def f(*args, **kwargs)
  • print >> file, "Hello"
  • import module as name
  • "%r" to print the representation of an object
  • zip
  • dictionary setdefault (an "odd new method")
  • distutils introduced

-16 πŸ”΅ 2001

  • First release of reStructuredText
  • Python 2.1
  • Python 2.2
  • eff-bot's favourite lambda refactoring rule
  • Tim Peters doctest
  • IPython started
  • Numarray
  • SciPy
  • Parrot April Fool joke
  • Plone released

Note

As stated in the notes for an earlier slide, the first formal release of reStructuredText was in June 2001.

Python 2.1 introduced Tim Peters doctest:

IPython started:

Numarry and Scipy are discussed in Travis E. Oliphant's slides at https://www.slideshare.net/shoheihido/sci-pyhistory, which gives dates for Matrix Object, Numeric, Numarray and NumPy (1994, 1995, 2001 and 2005 respectively) on slide 9

He says they announced the intent to create (what became) SciPy in 1999

The Parrot April Fool joke (joint development of Perl 6 and Python on the same interpreter, producing a new language to be called Parrot) is at http://www.perl.com/pub/2001/04/01/parrot.htm, and the story behind it is told at http://archive.oreilly.com/pub/a/oreilly//news/parrotstory_0401.html

Of course, this gave the name to the actual VM that was intended to run both Perl and Python (although not to provide a merged language).

Plone (https://plone.org/) is described by wikipedia at https://en.wikipedia.org/wiki/Plone_(software):

"""Plone is a free and open source content management system built on top of the Zope application server. Plone is positioned as an "Enterprise CMS" and is most commonly used for intranets and as part of the web presence of large organizations."""

eff-bot's favourite lambda refactoring rule

1) write a lambda function
2) write a comment explaining what the heck that lambda does
3) study the comment for a while, and think of a name that captures
   the essence of the comment
4) convert the lambda to a def statement, using that name
5) remove the comment

2001 Apr Python 2.1

License now "Python Software Foundation License"

  • PSF "owns" Python
  • Nested scopes (off by default)
  • __future__
  • rich comparisons
  • weak references
  • new modules: doctest, inspect, pydoc, unittest
  • __all__

Note

Slightly expanded:

  • PSF "owns" Python
  • Nested scopes (off by default)
  • __future__ directives introduced
  • rich comparisons (__lt__ and friends)
  • weak references
  • Ka Ping Yee's inspect.py and pydoc.py
  • Tim Peter's doctest.py
  • PyUnit introduces unit testing with the unittest module, inspired by Java
  • modules can define __all__ to control what is visible to from module import *

2001 Dec Python 2.2

...followed in Oct 2002 by Python 2.2.2

  • license definitely GPL compatible
  • old- and new-style classes
  • descriptors
  • the diamond rule for multiple inheritance
  • __getattribute__ and __slots__
  • iterators and __iter__
  • from __future__ import generators and yield
  • from __future__ import division and //
  • nested scopes on by default
  • help() at the Python prompt
  • True and False

Note

Slightly expanded:

  • 2.2 license definitely GPL compatible
  • old- and new-style classes
  • descriptors
  • the diamond rule for multiple inheritance
  • __getattribute__ and __slots__
  • iterators and __iter__
  • simple generators - from __future__ import generators and yield
  • from __future__ import division and //
  • nested scopes on by default
  • help() at the Python prompt
  • I think True and False appeared in Python 2.2.1

-15 πŸ”΅ 2002

  • First EuroPython
  • Docutils 1.0
  • Pyrex announced by Greg Ewing
  • timsort
  • Pypi (aka The Cheese Shop) was launched
  • Armin Rigo starts Psyco

Note


-14 πŸ”΅ 2003

  • Python 2.3
  • First PyCon in the USA (Washington DC)
  • PyPy project starts

Note


2003 2.3 Python 2.3

  • Set class in the sets module
  • generators are always present, yield is always a keyword
  • source code encodings: # -*- coding: UTF-8 -*-
  • importing from zip files
  • unicode filenames on Windows NT
  • Universal newline support
  • enumerate` function
  • bool type appears, True and False are now type bool
  • extended slices, e.g., a[::2]
  • raising a string based exception is now an error.
  • method resolution order was changed
  • "ab" in "abcd" now works
  • basestrings type added
  • new modules: itertools, optparse, datetime, csv, logging

-13 πŸ”΅ 2004

  • Python 2.4
  • "Pie-thon" challenge - can Parrot run Python faster than Python itself?

Note

Parrot was a VM that was conceived to run Perl, Python and other languages in common. It started as a joke.

Dan Sugalski made a bet with Guido van Rossum that Parrot would be faster (at executing a pure python benchmark of some sort (to be determined)) with the challenge details announced at OSCON 2003 and the results tried at OSCON 2004. This didn't actually come to pass, and as a result, Dan Sugalski got a custard-pie in the face (actually, twice, the second time to raise money for charity).


2004 Nov Python 2.4

  • set and frozenset built-in types
  • generator expressions - for instance links = (link for link in get_all_links() if not link.followed)
  • string.Template
  • @decorator notation for function decorators
  • sorted and reversed functions
  • multi-line imports (using parentheses)
  • sort gains key and reverse mechanisms/arguments
  • -m command line switch finds the named module and runs it as a script
  • None becomes a constant
  • re module gained simple conditionals: (?(group)A|B)
  • new modules: collections, subprocess, decimal

Note

The decimal module introduces the Decimal type


-12 πŸ”΅ 2005

  • IronPython started
  • Django released
  • Numpy produced, by combining Numeric and Numarray

Note


-11 πŸ”΅ 2006

  • Python 2.5

2006 Sep Python 2.5

  • developers now using subversion instead of cvs
  • from __future__ import with_statement and the with statement
  • from __future__ import absolute_import
  • x = true_thing if condition else false_thing, after much discussion, and a BDFL ruling
  • try, except and finally allowed together
  • yield is now an expression: val = (yield i)
  • exceptions can be new style classes
  • startswith and endswith now accept tuples as an argument
  • any and all
  • it's now legal to do class C(): pass, specifying no base classes
  • collections.defaultdict
  • new modules: uuid, ctypes, sqlite3, functools, contextlib
  • regex and regsub modules are finally gone

Note

Python 2.5 provided a lot of stuff, quite a lot of it significant.

The with statement is arguably the most important, and it is certainly one of my favourite things about modern Python. In Python 2.5 it's still only experimental, but many people would be enabling it.

The introduction of the "3 way if" clause finally settled one of the long standing debates about "things missing from Python", arguably in a way that made no-one particularly happy (so perhaps that serves them right!). In practise, I actually quite like it, and think if was a good solution to an impossible problem.

Allowing try, except and finally together closed a long-standing niggle in how to use Python - it was never very obvious why that didn't work.

It's not entirely clear when class C(): became illegal, but it may have been with Python 0.9.3, so that's quite a while back.


-10 πŸ”΅ 2007

  • Cython officially launched
  • PyPy 1.0
  • First PyConUK
  • First CamPUG meeting

Note

  • Cython was launched in July 2007, as a fork of Pyrex.
  • PyPy 1.0 ("the first release of PyPy") was in mid 2007
  • The first PyConUK was in September 2007 - see the next slide
  • The first CamPUG meeting was in October 2007, as a direct consequence

PyConUK

The UK Python conferences were started by John Pinner and the West Midlands Python group in 2007.

  • PyConUK 2007 and 2008: September, Birmingham Conservatoire
  • EuroPython 2009 and 2010: June/July, Birmingham Conservatoire
  • PyConUK 2011 to 2015 were in the TechnoCenter, Coventry
  • PyConUK 2016 moved to Cardiff
  • PyConUK 2017 will be in Cardiff again, in October

Note

From 2002 to 2006, there were Python tracks at the annual ACCU conference. In 2006, Guido van Rossum was a keynote speaker.

  • ACCU Apr 2002: Heritage Motor Centre, Gaydon "including the Python UK Conference"
  • ACCU Apr 2003
  • ACCU Apr 2004: Oxford, with a 2 day Python track
  • ACCU Apr 2005
  • ACCU Apr 2006: Oxford, 2 day Python track, Guido van Rossum as keynote speaker

I know I was at the first of those, because I remember the venue and specific items on the program. I'm fairly sure of the last, because of Guido being a keynote speaker. I think the middle one is the right year, I know I wasn't at 2003, and I don't think I got to 2005.

ACCU is relatively cheap for a "professional" conference, but still quite expensive in real terms. This meant that many people (myself included) could only go for a couple of days.

The low cost of PyConUK is undoubtedly a reaction to this, and the same sort of thinking has led to the conferences attitude to making itself inclusive and a friendly space.

My boss and I gave talks at PyConUK 2010 - my first talk at a PyConUK. Quoting https://metaljoe.wordpress.com/2010/07/24/europython-2010/

"""To round off the day, I attended two talks by Richard Watts and Tony Ibbs of Kynesim who presented Muddle, their open source build system which looks very cool, and KBUS which is an elegant and lightweight messaging system implemented as a Linux kernel extension."""

In the EuroPython years, people still wanted a "something" in the latter part of the year, hence:

  • Python Unconference: one day, September 2010, Birmingham
  • Floss UK: one day only, October 2010, Birmingham BMI

(The FlossUK event was also an unconference - I requested an item on using Bacula, and in the way of such things ended up "running" it!)

2014 was John Pinner's last PyConUK. He will be missed.

At the first PyConUK, Zeth ran a session about starting up local Python User Groups, and made people go and form clusters by where they came from, and then promise to go home and start a group. Somehow, Cambridge ended up with two groups on opposite sides of the room, but we found each other before the first meeting, so all ended well.


-9 πŸ”΅ 2008

  • Python 2.6
  • Python 3.0

Note

Moving from Python 2 to Python 3:


2008 Oct Python 2.6

Preparing the migration path to Python 3. Development cycle for Python 2.6 and 3.0 was synchronised. Some of the new stuff in 3.0 is also in 2.6.

  • documentation now in reStructuredText using Sphinx
  • new issue tracker (Roundup)
  • -3 command line switch
  • with now a keyword
  • string .format
  • from __future__ import print_function
  • from __future__ import unicode_literals
  • now must write except TypeError as exc
  • abstract base classes
  • octal may be 0o123 as well as 0123
  • class decorators
  • next(iterator, [default])
  • @property and its friends
  • new modules: ast, json, fractions, io, multiprocessing, abc

Note

More details on some things:

  • documentation now in reStructuredText using Sphinx - see below
  • new issue tracker (Roundup)
  • -3 command line switch, to warn about features that will be removed in Python 3.0
  • with statement now always enabled, with is a keyword, more things support context management
  • string formatting with .format
  • from __future__ import print_function
  • now must write except TypeError as exc
  • from __future__ import unicode_literals
  • abstract base classes
  • octal may be 0o123 as well as 0123
  • class decorators
  • next(iterator, [default])
  • @property and its friends
  • new modules: ast, json, fractions, io, multiprocessing, abc

Documentation was moved to reStrucutedText and Sphinx.

As I remember it:

The Python documentation was written in LaTeX, and people were very aware that this was seen as a big barrier, stopping contributions. But is was also thought to be too big a job to convert it something else.

Georg Brandl thought differently, and suddenly one day (that's how I remember it!) he put up an alternative Python documentation website, using reStructuredText for the documentation. This meant he'd converted all the LaTeX to reStructuredText, and also written a framework to produce the website - two large tasks. That framework was originally called py-rest-doc, and of course became Sphinx. As I remember it, this was fairly instantly adopted as the new way to do Python documentation.


2008 Dec Python 3.0

So much stuff. This is only a sample:

  • everything applicable from 2.6
  • strings are unicode, bytes are not strings
  • print is a function
  • 0123 is not valid, 0o123 is octal (and 0b1010 is binary)
  • some things return views instead of lists
  • 1/2 is 0.5, 1//2 is 0.
  • repr of a long int no longer has a trailing L
  • function argument and return value annotations
  • nonlocal
  • a, *rest, b = range(5)
  • {k: v for k, v in stuff}
  • {1, 2}
  • lots of library reorganisation
  • "unbound methods" as a concept has gone
  • more intelligent super
  • input is now what was raw_input
  • dict.has_key() has gone
  • callable() has gone
  • lots of other stuff

Note

More details for some things

  • obviously, everything applicable from 2.6
  • strings are unicode, bytes are not strings
  • print is a function
  • 0123 is not valid, 0o123 is octal (and 0b1010 is binary)
  • some things return views instead of lists
  • 1/2 is 0.5, 1//2 is 0.
  • repr of a long int no longer has a trailing L, because all ints are of the same type
  • function argument and return value annotations are introduced, but with no semantics
  • nonlocal
  • extended iterable unpacking - e.g., a, *rest, b = range(5)
  • dictionary comprehensions: {k: v for k, v in stuff}
  • set literals: {1, 2}
  • lots of library reorganisation
  • "unbound methods" as a concept has gone
  • more intelligent super, doesn't normally need any arguments
  • input is now what was raw_input
  • dict.has_key() has gone - just use in
  • callable() has gone
  • lots of other stuff

-8 πŸ”΅ 2009

  • Python 3.1
  • PEP 3003: Python Language Moratorium
  • Announcement of proposed move to Mercurial

Note

  • Proposed move to Mercurial:

  • PEP 3003

    """This PEP proposes a temporary moratorium (suspension) of all changes to the Python language syntax, semantics, and built-ins for a period of at least two years from the release of Python 3.1. In particular, the moratorium would include Python 3.2 (to be released 18-24 months after 3.1) but allow Python 3.3 (assuming it is not released prematurely) to once again include language changes.

    This suspension of features is designed to allow non-CPython implementations to "catch up" to the core implementation of the language, help ease adoption of Python 3.x, and provide a more stable base for the community."""


2009 Jun Python 3.1

  • collections.OrderedDict
  • fields in format() don't need to be numbered
  • multiple context managers in one statement: with this() as a, that() as b:
  • more intelligent floating point representation - e.g., repr(1.1) is now 1.1, not 1.1000000000000001
  • collections.Counter
  • logging.NullHandler
  • various useful improvements to unittest
  • importlib module
  • speed improvements in various places

-7 πŸ”΅ 2010

  • Python 2.7
  • Last release of Pyrex (0.9.9)
  • Nuitka starts
  • Read the Docs

Note


2010 Jul Python 2.7

2.7 will be supported until 2020

Mostly backportings from 3.1

  • set literals
  • dictionary and set comprehensions
  • multiple context managers in one with
  • collections.OrderedDict
  • argparse
  • fields in format() don't need to be numbered
  • collections.Counter
  • unittest greatly enhanced - becomes what was the external unittest2
  • ensurepip appears in 2.7.9

Note

2.7 will be supported until 2020 (originally, it was only until 2010)

See https://pythonclock.org/

Mostly backportings from 3.1 - I don't plan to dwell on 2.7


-6 πŸ”΅ 2011

  • Python 3.2
  • Python actually starts using Mercurial
  • IPython Notebook added to IPython

2011 Feb Python 3.2

  • minimal stable ABI available to extension modules
  • argparse introduced, optparse still available but not recommended
  • concurrent.futures module
  • pyc repository directories
  • hasattr now calls getattr
  • callable() comes back
  • lots of new stuff in existing library modules

Note

  • pyc repository directories - all .pyc files stored in a __pycache__ directory, named according to the Python version
  • hasattr now calls getattr and checks for an exception
  • callable went away in Python 3.0

-5 πŸ”΅ 2012

  • Python 3.3

2012 Sep Python 3.3

  • yield from
  • u"unicode" is back, to be friendlier to ex-Python 2 code
  • __init__.py now optional, multi-directory packages
  • string representation depends on the string
  • new launcher mechanism for .py files on Windows
  • reorganised OS and IO exception hierarchy
  • __qualname__
  • new modules include: importlib, ipaddress, lzma, unittest.mock, venv
  • hash randomisation on by default
  • no more support for OS/2 or VMS

Note

More details:

  • yield from
  • u"unicode" is back, to be friendlier to ex-Python 2 code
  • new modules include: ipaddress, lzma, unittest.mock, venv (virtual environment support built-in)
  • packages don't necessarily require __init__.py, and can span multiple locations
  • internally, string representation changes according to the string
  • new launcher mechanism for .py files on Windows
  • reorganised OS and IO exception hierarchy
  • __qualname__ represents the full path from module to functions and classes - e.g., "Class.method"
  • more work on import, new importlib
  • hash randomisation on by default
  • no more support for OS/2 or VMS

-4 πŸ”΅ 2013

The MicroPython kickstarter

Note

Damien George ran a Kickstarter campaign to fund the writing of MicroPython, and development of an initial board to run it on. It was wildly successful. This was the first time someone had managed to make a Python to run on microcomputers, and it wasn't just a subset of Python, but basically the whole language - and Python 3 as well.


-3 πŸ”΅ 2014

  • Python 3.4
  • Jupyter announced

Note

http://blog.jupyter.org/2015/04/15/the-big-split/ - the actual split into two projects

"""Project Jupyter is an open source project was born out of the IPython Project in 2014 as it evolved to support interactive data science and scientific computing across all programming languages""" - from http://jupyter.org/about.html


2014 Mar Python 3.4

No new syntax features

  • codecs.encode() and codesc.decode() improved
  • unittest gains subTest() and assertLogs()
  • new modules: ensurepip, enum, pathlib
  • asyncio module, with a provisional API
  • new command line option -I

Note

More details:

  • ensurepip module provides simpler bootstrapping of pip
  • codecs.encode() and codesc.decode() (introduced in 2.4) now properly documented, and have been improved.
  • asyncio module, with a provisional API
  • enum module
  • pathlib module
  • unittest TestCase has new method subTest()
  • unittest provides new context manager assertLogs()
  • new command line option -I, isolated mode - recommended for use when running system scripts.

-2 πŸ”΅ 2015

  • Python 3.5

2015 Sep Python 3.5

  • async and await
  • @ infix operator for matrix multiplication
  • more unpacking generalisations, e.g., [*range(4), 4] is [0, 1, 2, 3, 4]
  • bytes and bytearray support % formatting
  • typing module is provisional support for type hints, aimed (for instance) at mypy
  • os.scandir()
  • math.isclose()
  • .pyo files have gone

Note

  • coroutines with async and await
  • @ infix operator for matrix multiplication, supported by NumPy 1.10
  • more unpacking generalisations - e.g., [*range(4), 4] is [0, 1, 2, 3, 4] (and it works for ** for dictionaries as well)
  • bytes and bytearray support % formatting
  • typing module is provisional support for type hints, aimed (for instance) at mypy
  • os.scandir - a better and faster directory iterator
  • math.isclose() - approximate equality
  • .pyo files have gone (optimised files have a slightly different name, but the same extension)

-1 πŸ”΅ 2016

  • Python 3.6
  • Linux kernel documentation now in reStructuredText, using Sphinx

Note


2016 Dec Python 3.6

  • formatted string literals
  • syntax for variable (type) annotations
  • underscores in numeric literals
  • await and result = [i async for i in aiter() if i % 2]
  • __init_subclass__
  • os.PathLike and __fspath()__
  • fold() - local time disambiguation when clocks change
  • Windows filesystem encoding is now UTF-8
  • class attribute and keyword argument definition orders are preserved
  • secrets module
  • asyncio module is no longer provisional
  • typing module is still provisional
  • use of async and await will become keywords in 3.7

Note

  • formatted string literals: f"This module is called {__name__}."
  • syntax for variable (type) annotations
  • underscores allowed (ignored) in numeric literals: 123_111_112, 0b_1100_0011.
  • asynchronous generators await
  • asynchronous comprehensions result = [i async for i in aiter() if i % 2]
  • __init_subclass__ classmethod will be called on the base class when a new subclass is created - allows customisiing subclass creation without a metaclass
  • os.PathLike and the __fspath()__ "magic" method for file system paths and their ilk
  • local time disambiguation - support in datetime for when local clocks move back, the new fold attribute
  • Windows filesystem encoding is now UTF-8
  • class attribute definition order is preserved, as is keyword argument order. This brings with it a change in dictionary implementation - key order is now preserved (first tried out in PyPy, and dictionaries are smaller). This is, however, an implementation detail - the order of dictionary keys is still not defined (although this might change in the future)
  • secrets module - obvious way to reliably generate cryptographically strong pseudo-random values suitable for managing secrets
  • asyncio module is no longer provisional
  • typing module is still provisional
  • use of async and await as variable, class, function or module names will generate a DeprecationWarning. They will become keywords in 3.7

0 πŸ”΅ 2017

CPython source moved to github


+1 πŸ”΅ 2018

Python 3.7 is currently expected to be released in June 2018


Fin

That's all folks

Written using reStructuredText.

Presented using hovercraft.

Sources at https://github.com/tibs/python-history

Note

Other stuff, not used in the talk: