This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Rotkraut
Recipients Rotkraut, demian.brecht, harobed, orsenthil, petri.lehtinen, piotr.dobrogost, pitrou, whitemice
Date 2014-08-28.08:45:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'd like to support the request.  I have a use case where I definitely need this feature: I maintain a Python client for a scientific metadata catalogue, see [1] for details.  The client also features the upload of the data files.  The files may come in as a data stream from another process, so my client takes a file like object as input.  The files may be large (several GB), so buffering them is not an option, they must get streamed to the server as they come in.  Therefore, there is have no way to know the Content-length of the upload beforehand.

I implemented chunked transfer encoding in a custom module that monkey patches the library, see the attached file.  This works fine, but of course it's an awkward hack as I must meddle deeply into the internals of urllib and http.client to get this working.  This module is tested to work with Python 2.7, 3.1, 3.2, 3.3, and 3.4 (for Python 3 you need to pass it through 2to3 first).  I really would like to see this feature in the standard library in order to get rid of this hack in my package.  I would happy to transform my module into a patch to the library if such a patch would have a chance to get accepted.

Date User Action Args
2014-08-28 08:45:48Rotkrautsetrecipients: + Rotkraut, orsenthil, pitrou, harobed, petri.lehtinen, piotr.dobrogost, demian.brecht, whitemice
2014-08-28 08:45:48Rotkrautsetmessageid: <>
2014-08-28 08:45:48Rotkrautlinkissue12319 messages
2014-08-28 08:45:48Rotkrautcreate