Upload .py source instead of .pyc bytecode for Python version robustness - #108
Merged
Conversation
szachovy
force-pushed
the
fix/41-python-version-guard
branch
2 times, most recently
from
April 9, 2026 09:07
15cfc84 to
1dbedb8
Compare
Replace the hardcoded Python 3.10 .pyc magic number and bytecode compilation with plain .py source upload. The remote node's Python compiles at runtime, decoupling the host Python version from the container Python version. - Remove compile()/marshal/.pyc header from run_python_container_command, upload .py source and execute via python3 - Remove unused marshal import from remote.py - Add minimum version guard (>= 3.10) in initialize.py - Update README to require Python >= 3.10 on the host - Update ARCHITECTURE.md to reflect source execution model Closes #38 Closes #41 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
szachovy
force-pushed
the
fix/41-python-version-guard
branch
from
April 9, 2026 10:08
1dbedb8 to
51499b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the hardcoded Python 3.10
.pycmagic number and bytecode compilation with plain.pysource upload. The remote node's Python compiles at runtime, decoupling the host Python version from the container Python version.Changes
src/remote.py: Removecompile()/marshal/.pycheader fromrun_python_container_command(), upload.pysource and execute viapython3; remove unusedmarshalimportsrc/initialize.py: Add minimum version guard (>= 3.10) with clear error message at startupREADME.md: Update host Python requirement from exactv3.10.12to>= 3.10docs/ARCHITECTURE.md: Update remote execution model description from bytecode to sourceCHANGELOG.md: Add entryWhy not a version guard?
A strict
== 3.10guard artificially limits the project to a single Python version. The root cause was the hardcoded.pycmagic number — by uploading.pysource instead, the container Python handles compilation at runtime (<100ms overhead), and any Python >= 3.10 works on the host.Closes #38
Closes #41