On Mon, 6 Apr 2020, 06:30 Brandt Bucher, <brandtbuc...@gmail.com> wrote:

> > The best way to look at this is to consider how long a .pyc file is
> valid. They're currently named something like
> __pycache__/modulename.cpython-38.pyc which is a fairly clear indication
> that the cached compiled module should be valid for any CPython 3.8.x
> release.
>
> Perhaps an even better indicator is the “magic number” that invalidates
> the cached bytecode.


Probably the best indicator is PEP 6, which explicitly states bytecode
compatibility is a requirement:

"All .pyc and .pyo files must work (no regeneration needed) with all bugfix
releases forked off from a major release."

https://www.python.org/dev/peps/pep-0006/#prohibitions

--
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/ZPU4IR2O2C6GU3N3F3WKLSPWV7D7STP4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to