8000 Allow `URLPath` files to be missing when cleaning up inputs by mattt · Pull Request #1763 · replicate/cog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allow URLPath files to be missing when cleaning up inputs #1763

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

Merged
merged 2 commits into from
Jun 25, 2024
Merged

Conversation

mattt
Copy link
Contributor
@mattt mattt commented Jun 24, 2024

Resolves #1736

This PR updates the cleanup method in BaseInput to specify missing_ok=True when unlinking URLPath values.

This PR also follows a suggestion in a code comment to use the native missing_ok parameter of pathlib.Path.unlink, which was added in Python 3.8 (and which, as of #1582 is the minimum supported Python version.

@mattt mattt requested a review from nickstenning June 24, 2024 16:56
@mattt mattt merged commit 4426c97 into main Jun 25, 2024
13 checks passed
@mattt mattt deleted the mattt/missing-ok branch June 25, 2024 16:40
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.

Don't crash if a model removes its own inputs
1 participant
0