Demian Brecht added the comment:
Attaching a file /with/ http.proto this time.
--
___
Python tracker
<http://bugs.python.org/issue23334>
___
___
Python-bugs-list m
Changes by Demian Brecht :
Added file: http://bugs.python.org/file37887/http_proto_1.patch
___
Python tracker
<http://bugs.python.org/issue23334>
___
___
Python-bug
Demian Brecht added the comment:
On 2015-01-27 7:34 PM, R. David Murray wrote:
> Quantifying "largely" will be important.
Understandably. In terms of the public API, all changes should be purely
additive and 100% backwards compatible. "largely" is referring to some
of t
Demian Brecht added the comment:
New patch removes unrelated changes.
--
Added file: http://bugs.python.org/file37892/issue13128_3.patch
___
Python tracker
<http://bugs.python.org/issue13
Demian Brecht added the comment:
On 2015-01-28 7:41 AM, R. David Murray wrote:
> Although they are private interfaces we may decide we need a deprecation
> release before dropping them. Sometimes what we do in cases like this is go
> ahead and make the changes, but also provid
Demian Brecht added the comment:
Ping for review/commit.
--
___
Python tracker
<http://bugs.python.org/issue22931>
___
___
Python-bugs-list mailing list
Unsub
Demian Brecht added the comment:
Digging into this more, I've opened up a can of worms that will result in
http.client not looking nearly at all like http.client. I'll work this into
httplib3 and will open this conversation back up if it gets any traction.
--
resolution: -
New submission from Demian Brecht:
Rather than summing the value of each element of a list or tuple to use as the
value of the content-length header, the length of the list or tuple is used.
--
files: list_content_length.patch
keywords: patch
messages: 235012
nosy: demian.brecht
Changes by Demian Brecht :
--
components: +Library (Lib)
type: -> behavior
versions: +Python 3.5
___
Python tracker
<http://bugs.python.org/issue23350>
___
_
Demian Brecht added the comment:
Updated patch based on review.
--
Added file: http://bugs.python.org/file37915/list_content_length_1.patch
___
Python tracker
<http://bugs.python.org/issue23
Demian Brecht added the comment:
On 2015-01-29 9:51 PM, Martin Panter wrote:
> The documentation currently says “Content-Length header should be explicitly
> provided when the body is an iterable”. See Lib/urllib/request.py:1133 for
> how it is done for urlopen(), using memoryview(),
Demian Brecht added the comment:
Thanks for the catch Martin, it definitely wasn't intended. I've added a patch
to fix the issue and add the extra description as suggested by Ethan.
--
Added file: http://bugs.python.org/file38068/issue21793_lo
Demian Brecht added the comment:
I’ve reverted the patch to use the old format. The main reason being that plain
ints can still be used in most cases as values for code, in which case logging
will be inconsistent with cases using the enum.
--
Added file: http://bugs.python.org
Demian Brecht added the comment:
My apologies for the delay, but I've now reviewed the proposed patch. With a
fresh outlook after taking a bit of time off, I'm not sure anymore that this is
the best way of going about solving this problem. The main reason being that we
now have
Demian Brecht added the comment:
@Mark: Sure, but not super high priority. Thanks for pointing it out.
--
___
Python tracker
<http://bugs.python.org/issue2
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue23434>
___
___
Python-bugs-list mailing list
Unsubscribe:
Demian Brecht added the comment:
> Thanks for helping with this Demian.
No worries. This textual white boarding exercise has also been greatly
valuable in getting my own head wrapped around various low frequency
socket level errors that can be encountered when using the client. The
downside
Demian Brecht added the comment:
Thanks for the catch Martin, the field should indeed be updated to be
plural. I'll try to get a patch for this later today unless someone else
beats me to it
--
___
Python tracker
<http://bugs.python.org/is
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue23448>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue23439>
___
___
Python-bugs-list mailing list
Unsubscribe:
Demian Brecht added the comment:
The only real question I have is: why? As far as I'm aware, these are
implementation details of the http.client module (there's even a comment in
HTTPMessage that it might make sense to move the class altogether).
As far as the constants go, they
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue10486>
___
___
Python-bugs-list mailing list
Unsubscribe:
Demian Brecht added the comment:
The attached patch fixes the name
--
keywords: +patch
Added file: http://bugs.python.org/file38112/issue23442.patch
___
Python tracker
<http://bugs.python.org/issue23
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue9698>
___
___
Python-bugs-list mailing list
Unsubscribe:
Demian Brecht added the comment:
Thanks for the test Berker, I'll put a patch together with the changes
later this afternoon.
On 2015-02-12 2:27 PM, Berker Peksag wrote:
>
> Berker Peksag added the comment:
>
> He
Demian Brecht added the comment:
I've attached a patch with fixes for both cases and the tests added by
Berker. Thanks guys.
--
Added file: http://bugs.python.org/file38122/issue23442_1.patch
___
Python tracker
<http://bugs.python.org/is
Demian Brecht added the comment:
> If we leave it as it is, it would be good to add comment in the source code
> explaining this decision.
I think that __all__ should be left as-is for the time being. Adding
some comments around that decision makes sense to me to avoid any future
con
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue22147>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue12455>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue17908>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue12849>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue8843>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue14301>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue22946>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue21557>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue22197>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue14044>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue14414>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue23043>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue23004>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue23448>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue23166>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue9698>
___
___
Python-bugs-list mailing list
Unsubscribe:
Demian Brecht added the comment:
Thanks for the clarification Martin. After giving this some further thought, I
think that the best way to go is to /only/ calculate and add the Content-Length
header if each element in the list or tuple is pre-encoded. If it's mixed or
only strings, then
Demian Brecht added the comment:
Thanks for the review Martin, I've addressed your comments.
> The length of an encoded Latin-1 string should equal the length of the
> unencoded text string, since it is a one-to-one character-to-byte encoding.
Once in a while, I want to stop wha
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue23410>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue23440>
___
___
Python-bugs-list mailing list
Unsubscribe:
Demian Brecht added the comment:
> LGTM.
+1
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue23418>
___
___
Python-bugs-list mai
Changes by Demian Brecht :
--
nosy: -demian.brecht
___
Python tracker
<http://bugs.python.org/issue17229>
___
___
Python-bugs-list mailing list
Unsubscribe:
Demian Brecht added the comment:
Here's a patch addressing the potential vulnerability as reported. The patch
should also bring the implementation up to date with the most recent standards
around header names and values.
> There could be potential for breaking compatibility if pe
Demian Brecht added the comment:
LGTM
--
versions: +Python 3.5
___
Python tracker
<http://bugs.python.org/issue23440>
___
___
Python-bugs-list mailing list
Unsub
Demian Brecht added the comment:
Minor comment in Rietveld, otherwise LGTM.
--
___
Python tracker
<http://bugs.python.org/issue23410>
___
___
Python-bugs-list m
Demian Brecht added the comment:
I think that keeping the public API as-is is the better way to go, at
least for the shorter term given it won't require users to have to make
code changes. Thanks for the catch on the docs though, will update
Demian Brecht added the comment:
Some refactoring that I'm working on for http.client could use this (currently
I have it as part of my patch set). I haven't run into any issues using it and
it's definitely useful. Would be nice to get this merged.
--
nosy:
Demian Brecht added the comment:
> Maybe join them with tabs rather than spaces then, since it was previously
> "\r\n\t". This way it is even closer to before.
After thinking about this a little more, I think I'd prefer to keep
spaces rather than tabs. The reason being is
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue5053>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue5054>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue21257>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Demian Brecht :
--
versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4
___
Python tracker
<http://bugs.python.org/issue22928>
___
___
Python-bug
Demian Brecht added the comment:
> But it is not natural to do things like this (based on headers sent by
> Firefox)
Good point.
> Otherwise, retaining the one_value.encode('latin-1') call is confusing when
> later on it rejects non-ASCII-encoded characters.
I’m a l
Demian Brecht added the comment:
LGTM
--
___
Python tracker
<http://bugs.python.org/issue23410>
___
___
Python-bugs-list mailing list
Unsubscribe:
Demian Brecht added the comment:
Added Library component as there are a few newly added tests as well though and
cosmetic changes were made to server.py.
--
components: +Library (Lib)
___
Python tracker
<http://bugs.python.org/issue23
Demian Brecht added the comment:
I’ve updated the patch to include the latin-1 charset in legal header values.
It still uses a space as delimiter, but all other comments should now be
addressed.
--
Added file: http://bugs.python.org/file38158/issue22928_2.patch
Demian Brecht added the comment:
> I will be interested to see those reasons.
+1. Something like what this PEP proposed would be beneficial in a few places
throughout the library (header and cookie implementations would definitely
benefit rather than having to deal with buggy normalizat
Demian Brecht added the comment:
The attached patch should cover the implementation/test aspects of this issue.
I'll work on the documentation next.
--
keywords: +patch
versions: +Python 3.5 -Python 3.2
Added file: http://bugs.python.org/file38170/issue2211.
Demian Brecht added the comment:
Never mind, Morsel /is/ documented (at least in Docs). I imagine that the OP
was after more detailed docstrings, but I don't believe they'd add much value.
The patch should be good to go as-is.
--
___
Pyth
Demian Brecht added the comment:
Left a super minor comment in Rietveld, but otherwise LGTM.
--
___
Python tracker
<http://bugs.python.org/issue21257>
___
___
Demian Brecht added the comment:
Ignore my previous comment. It was intended for #23439.
--
___
Python tracker
<http://bugs.python.org/issue21257>
___
___
Pytho
Demian Brecht added the comment:
Left a super minor comment in Rietveld, but otherwise LGTM.
--
___
Python tracker
<http://bugs.python.org/issue23439>
___
___
Demian Brecht added the comment:
And this really should likely now be closed as a duplicate of #23439.
--
___
Python tracker
<http://bugs.python.org/issue21
Demian Brecht added the comment:
Left a few minor comments in Rietveld.
My only opposition to the RemoteDisconnected error is now we have two
exceptions that effectively mean the same thing. It looks like asyncio.streams
has similar behaviour:
https://hg.python.org/cpython/file/041a27298cf3
Demian Brecht added the comment:
> On Feb 19, 2015, at 8:08 PM, Martin Panter wrote:
> I guess you saying RemoteDisconnected effectively means the same thing as
> ConnectionResetError.
Exactly.
> Would it help if it was derived from ConnectionResetError, instead of the
>
Demian Brecht added the comment:
> On Feb 20, 2015, at 3:10 AM, Berker Peksag wrote:
> This is a different issue than #23439. BaseHTTPRequestHandler.headers
> documentation mentions about parse_headers function, the function itself is
> not documented.
Not entirely sure what I
Changes by Demian Brecht :
Added file: http://bugs.python.org/file38190/issue22928_3.patch
___
Python tracker
<http://bugs.python.org/issue22928>
___
___
Python-bug
Demian Brecht added the comment:
The updated patch addresses comments which I’d somehow missed previously, but
keeps the log fix to the __str__ implementation of HTTPStatus (using
int.__str__ rather than format()).
> Does not changing __str__ to decimal representation (and in this c
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue23476>
___
___
Python-bugs-list mailing list
Unsubscribe:
Demian Brecht added the comment:
> On Feb 20, 2015, at 2:50 PM, Serhiy Storchaka wrote:
>
> if isinstance(code, HTTPStatus):
>code = '%d' % code
That’s what I’m intending on doing. It’s definitely not as contained as
changing the __str__ implementation of HT
Demian Brecht added the comment:
Latest patch should address all comments. It also fixes the same issue in error
logging which wasn’t previously accounted for. The test file has also been
updated with using HTTPStatus where possible rather than hard coded ints. This
is consistent with other
Demian Brecht added the comment:
Well, I’m not entirely sure how I came to the conclusion that errors were a
problem (other than not spending enough time walking through it) and of course
you’re right about the coercion handling it just fine. I’ve removed the
explicit conversion in the code
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue24363>
___
___
Python-bugs-list mailing list
Unsubscribe:
Demian Brecht added the comment:
Actually had a few free minutes so stuck a couple minor comments in Rietveld.
Will have another go as soon as possible.
--
___
Python tracker
<http://bugs.python.org/issue23
Demian Brecht added the comment:
Yeah, agreed that it should be opt-in, at least until a major release.
I've run into a couple cases where higher level libraries use http.client (or
httplib) directly, but don't expose the client directly (not that they should
anyways). Because of t
New submission from Demian Brecht:
Super minor annoyance that I've had over multiple projects is seeing either
hard coded strings being used (which is a bit of a no-no in terms of best
practices) or each project defining its own set of constants for http methods.
Why not just incl
Demian Brecht added the comment:
If nobody's opposed to the addition, I'll run through the unit tests and
replace the hard coded strings.
--
keywords: +patch
Added file: http://bugs.python.org/file41947/issue26380.diff
___
Python trac
Demian Brecht added the comment:
> I don't have a firm opinion at this point -- can you give a few examples of
> how this will help in code?
It'll help solely with consistency across projects. Generally, using constants
are generally favored over using hardcoded values.
Demian Brecht added the comment:
> I can see the advantage of using an enum over a plain string. But you only
> get an error at run time, not compile time, if you misspell it.
Sure, but at least you're giving static analysis utilities the chance to catch
it up front.
> And the
Demian Brecht added the comment:
> BTW I think it is actually OPTIONS; see review comment.
Well, don't I feel silly. Fixed.
--
Added file: http://bugs.python.org/file41962/issue26380_2.patch
___
Python tracker
<http://bugs.python.org
Demian Brecht added the comment:
> To me, your later throw-in comment about static analyzers might be the most
> persuasive point you made
Well, we're in agreement there :) As I'd mentioned, at best it's a minor
annoyance. I'm entirely on the fence about the use of t
Demian Brecht added the comment:
Pending review of the exceptions from another core dev, the patch looks good to
me. Thanks for sticking with it :)
--
___
Python tracker
<http://bugs.python.org/issue3
Changes by Demian Brecht :
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue23516>
___
___
Python-bugs-list mailing list
Unsubscribe:
Demian Brecht added the comment:
> Sounds like this might be in a third-party module
+1. urllib3.url_parse doesn't make use of the standard library.
> userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
This leads me to believe that using something like t
Demian Brecht added the comment:
> I can't tell how to label this bug report because I don't know where pip
> comes from: as far as I knew this is a bug in something called urllib3, which
> seemed to me that was related to Python itself, or maybe in the way pip is
> cal
Changes by Demian Brecht :
--
nosy: +Marcus.Smith, dstufft, ncoghlan, pmoore
___
Python tracker
<http://bugs.python.org/issue23516>
___
___
Python-bugs-list mailin
Demian Brecht added the comment:
FWIW, setting up a local authenticated (ncsa_auth) squid proxy, this breaks
using pip 0.6.8:
pip --proxy http://special:my?password@localhost:3128 install
While the percent-encoded version is successful:
pip --proxy http://special:my%3Fpassword@localhost
Changes by Demian Brecht :
--
status: pending -> open
title: pip: urllib3 does not encode userinfo section of requests: parse_url()
mishandles special characters when the URL specifies authentication credentials
-> pip: urllib3 does not encode userinfo section of UR
Demian Brecht added the comment:
Left a couple small nitpicks in Rietveld. Otherwise LGTM.
--
nosy: +demian.brecht
___
Python tracker
<http://bugs.python.org/issue23
Demian Brecht added the comment:
LGTM
--
nosy: +demian.brecht
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issue23387>
___
_
Demian Brecht added the comment:
> Oddly, memoryview accepts keyword arguments (for its one required value), and
> the name of the argument is "object", not "obj".
Positional parameters can also be treated as named arguments.
> I think it's plain daft hav
Changes by Demian Brecht :
--
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issue23526>
___
___
Python-bugs-list mai
Demian Brecht added the comment:
LGTM
--
nosy: +demian.brecht
stage: -> patch review
type: -> behavior
___
Python tracker
<http://bugs.python.org/i
201 - 300 of 434 matches
Mail list logo