[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread STINNER Victor
STINNER Victor added the comment: The commit message contains much more information than the NEWS and What's New entries. Maybe the What's New entry can be completed, I don't know. In the meanwhile, I close the issue :-) Nir: Feel free to create a new PR if you want

[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread STINNER Victor
STINNER Victor added the comment: Thank you Nir Soffer for this nice enhancement. Sadly, since it's a new feature, it cannot be backport to Python 3.6 nor 2.7, since it's a new feature. -- ___ Python tracker

[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset ad455cd9243319b896c86074ffeb3bf78a82f4ec by Victor Stinner (Nir Soffer) in branch 'master': bpo-31945: Configurable blocksize in HTTP(S)Connection (#4279)

[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread STINNER Victor
Change by STINNER Victor : -- type: -> enhancement versions: -Python 2.7, Python 3.6, Python 3.8 ___ Python tracker ___

[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread Nir Soffer
Nir Soffer added the comment: When using highlevel request() api, users can control the block size by wrapping the file object with an iterator: class FileIter: def __init__(self, file, blocksize): self.file = file self.blocksize =

[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-04 Thread Nir Soffer
Change by Nir Soffer : -- keywords: +patch pull_requests: +4241 stage: -> patch review ___ Python tracker ___

[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-04 Thread Nir Soffer
New submission from Nir Soffer : blocksize is hardcoded to 8192 in send() and _read_readable(), preventing efficient upload when using file-like body. Users of the module that are not interested in chunked encoding can rewrite the copy loop using HTTPConnection.send():