[New-bugs-announce] [issue23334] http.client refactor

Demian Brecht report at bugs.python.org
Wed Jan 28 03:04:56 CET 2015


New submission from Demian Brecht:

This is an attempt to bring a little more sanity to the http.client module through improvements to the architecture. The overarching intention of the patch is to modularize the HTTP versions, providing the following benefits:

* Make each protocol easier to work on independent of one another
* Make integrating future versions easier. This is intended as a stepping stone to integrating support for HTTP 2
* Separation of concerns between connection and application protocol

Immediate issues that this solves:
* Content-Length when a list is passed in. Currently the content length is set to the size of the list rather than the sum of the elements of the list
* Provides a little more user-friendly errors when invalid objects are passed in as header values


Note: This is still in a WIP progress state but shouldn't take much longer to get into a commit-able state. There's some work to be done on deserialization and it's entirely documentation. However, tests are passing so I figured now would be a good time to get initial feedback on the work. In hindsight, a PEP would likely have been best (it was initially intended to be put into httplib3, but I thought I might as well try it as a patch submission given it's largely backwards compatible).

----------
components: Library (Lib)
files: http_proto.patch
keywords: patch
messages: 234866
nosy: demian.brecht
priority: normal
severity: normal
status: open
title: http.client refactor
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file37886/http_proto.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23334>
_______________________________________


More information about the New-bugs-announce mailing list