[Python-Dev] PEP 250, site-python, site-packages

Jeff Epler jepler@mail.inetnebr.com
Tue, 3 Jul 2001 07:38:00 -0500


On Tue, Jul 03, 2001 at 02:09:51PM +0200, Gregor Hoffleit wrote:
> Due to Python's good tradition of compatibility, this is the vast
> majority of packages; only packages with binary modules necessarily need
> to be recompiled anyway for each major new <version>.

Aren't there bytecode changes in 1.6, 2.0, and 2.1, compared to 1.5.2?  If
so, this either means that each version of Python does need a separate copy
(for the .pyc/.pyo file), or if all versions are compatible with 1.5.2
bytecodes (and I don't know that they are) then all packages would need to
be bytecompiled with 1.5.2.

For instance, it appears that between 1.5.2 and 2.1, the UNPACK_LIST
and UNPACK_TUPLE bytecode instructions were removed and replaced with
a single UNPACK_SEQUENCE opcode.

Information gathered by executing:
	python -c 'import dis
	for name in dis.opname:
	    if name[0] != "<": print name' | sort -u > opcodes-1.5.2
and similarly for python2.

Jeff