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

docs: Use with to open files in multipart examples #3478

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

bcyran
Copy link
Contributor

@bcyran bcyran commented Jan 17, 2025

Summary

While reading the docs for multipart file uploads, I wrongly assumed httpx will take care of closing the uploaded files because it was not done manually in the examples. Of course, I understand that the docs never stated this and closing files is usually a caller's responsibility, but I think it's still a good idea to make the examples more practical and less prone to confusion.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

@tomchristie tomchristie merged commit 10b7295 into encode:master Jan 17, 2025
6 checks passed
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.

3 participants