What if I build an application (GDB for example) statically linked with the latest Python (e.g.: libpython3.11.so) and run it on different environments that have installed the latest Python or above (e.g. 3.6)? (Of course, PYTHONHOME and PYTHONPATH are set to Python 3.6 before execution)
I already read that Python has backward compatibility and all scripts that worked with prior versions still work with the newest Python.
But may that approach be harmful to the Python installation that will be used in PYTHONHOME? Maybe the newest Python (3.11) may generate a bytecode that ruins execution via “donor” Python(3.6)? I’m not experienced in Python internals much…