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

MultipartEncoder Block Size #368

Open
StefanGreve opened this issue Jul 17, 2023 · 2 comments
Open

MultipartEncoder Block Size #368

StefanGreve opened this issue Jul 17, 2023 · 2 comments
Labels
Documentation Low Hanging Fruit Pull Request Welcome Project would be willing to review a pr to fix this

Comments

@StefanGreve
Copy link

StefanGreve commented Jul 17, 2023

The current documentation links to an issue that has been already closed:

https://toolbelt.readthedocs.io/en/latest/uploading-data.html

As mentioned by another commentator, this notice is outdated since Python 3.7+ allows override this default (c.f. docs).

I am not sure if it is already possible to increase the block size in MultipartEncoder. It would be great if somebody could shed some light on the current situation. A lot of information you find on StackOverflow or Google is outdated.

@sigmavirus24
Copy link
Collaborator

This library does not create the HTTPConnection object and thus cannot control the blocksize. That warning is there as people complained about speed of writes when the large part of the issue is inefficient reads. To access that configuration, you will need to work with urllib3 to make that configurable in their integration with httplib in a way that can be passed through requests and thus avoid this issue.

Ostensibly, if urllib3 supports specifying that for a pool of connections, then it could be turned into an Adapter here that could be used in combination with the encoder

@sigmavirus24 sigmavirus24 added Low Hanging Fruit Documentation Pull Request Welcome Project would be willing to review a pr to fix this labels Apr 11, 2024
@sigmavirus24
Copy link
Collaborator

There's no change to the library, just documentation. Any desire to make the read size configurable needs to be addressed with urllib3. #3066 already raised the default for urllib3 so if further customization is desirable, it should be addressed there. If someone wants to fix the docs, I'll happily merge that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Low Hanging Fruit Pull Request Welcome Project would be willing to review a pr to fix this
Projects
None yet
Development

No branches or pull requests

2 participants