Python makes no guarantee about bytecode compatibility between versions. Don't rely on it.
In fact, a pyc file starts with a magic number that changes every time the marshalling code does, and python checks this number for compatibility. Since this code changes pretty much every version, so does the magic number. See Ned Batchelder's blog entry for details.
There are better ways of ensuring your files haven't been tampered with: checksums, for example.