Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core]: Avoid PyZipFile in code upload #179

Merged
merged 3 commits into from
Apr 20, 2023
Merged

Conversation

TomAugspurger
Copy link
Contributor

This reimplements code upload for directories to avoid PyZipFile.writepy. It (deliberately) uploads .pyc files, which imposes a strong constraint that the version of Python running submit on the client matches the version of Python running in the task.

Instead, we replicate PyZipFile.writepy's behavior, but we upload .py files rather than .pyc. The zip-based importer works with both .py and .pyc files.

Tom Augspurger added 2 commits April 17, 2023 15:54
This reimplements code upload for directories to avoid
PyZipFile.writepy. It (deliberately) uploads `.pyc` files, which imposes
a strong constraint that the version of Python running submit on the client
matches the version of Python running in the task.

Instead, we replicate PyZipFile.writepy's behavior, but we upload `.py`
files rather than `.pyc`. The zip-based importer works with both `.py`
and `.pyc` files.
@TomAugspurger
Copy link
Contributor Author

I've tested this out manually over on the sentinel-3 branch (where I'm using a different minor version of python to submit a directory of files) and things are working well. Merging.

@TomAugspurger TomAugspurger merged commit 16e666f into main Apr 20, 2023
@TomAugspurger TomAugspurger deleted the tom/fix/pyzipfile branch April 20, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant