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

Fix runtime vendoring bytecode compilation races. #1099

Merged
merged 3 commits into from
Nov 6, 2020

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Nov 6, 2020

Fixes #1098

@jsirois
Copy link
Member Author

jsirois commented Nov 6, 2020

The remaining os.walks in Pex are in:

  1. pex/vendor/__main__.py: Not a production component.
  2. pex/pex_builder.py: The use here is safe since the walk is always over a distribution (zipped or installed wheel), and the action is a copy into a different location - the PEXBuilder chroot. As such executions (and thus buytecode compilations) occur in a different place from the source distribution file(s).
  3. pex/bin/pex.py: Only used to gather --sources-directory and --resources-directory. The distinction there has never been relevant and should be removed and, as such, we cannot filter out pyc which could be valid resources.

@jsirois jsirois merged commit 4704774 into pex-tool:master Nov 6, 2020
@jsirois jsirois deleted the issues/1098 branch November 6, 2020 18:11
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.

"FileNotFoundError: [Errno 2] No such file or directory" in pex
2 participants