It is part of the standard library now, but it looks like it wasn't introduced until 2.7 and 3.3. I should note that I recall seeing mock in a recent PR regarding Qt4 keys.