[issue17229] unable to discover preferred HTTPConnection class

2015-02-13 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue17229> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23418] Keep http.server.__all__ up to date

2015-02-13 Thread Demian Brecht
Demian Brecht added the comment: > LGTM. +1 -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue23418> ___ ___ Python-bugs-list mai

[issue23440] Extend http.server.SimpleHTTPRequestHandler testing

2015-02-13 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue23440> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23410] Document more BaseHTTPRequestHandler attributes

2015-02-13 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue23410> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23350] Content-length is incorrect when request body is a list or tuple

2015-02-13 Thread Demian Brecht
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

[issue23350] Content-length is incorrect when request body is a list or tuple

2015-02-12 Thread Demian Brecht
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

[issue9698] When reusing an handler, urllib(2)'s digest authentication fails after multiple regative replies

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue9698> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23448] urllib2 needs to remove scope from IPv6 address when creating Host header

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue23448> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23166] urllib2 ignores opener configuration under certain circumstances

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue23166> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23004] mock_open() should allow reading binary data

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue23004> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22197] Allow better verbosity / output control in test cases

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue22197> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue14044> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23043] doctest ignores "from __future__ import print_function"

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue23043> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21557] os.popen & os.system lack shell-related security warnings

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue21557> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14414] xmlrpclib leaves connection in broken state if server returns error without content-length

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue14414> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22946] urllib gives incorrect url after open when using HTTPS

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue22946> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14301] xmlrpc client transport and threading problem

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue14301> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8843] urllib2 Digest Authorization uri must match request URI

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue8843> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12849] Cannot override 'connection: close' in urllib2 headers

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue12849> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17908] Unittest runner needs an option to call gc.collect() after each test

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue17908> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22147] PosixPath() constructor should not accept strings with embedded NUL bytes

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue22147> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12455] urllib2 forces title() on header names, breaking some requests

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: -demian.brecht ___ Python tracker <http://bugs.python.org/issue12455> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23439] Fixed http.client.__all__ and added a test

2015-02-12 Thread Demian Brecht
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

[issue23442] http.client.REQUEST_HEADER_FIELDS_TOO_LARGE renamed in 3.5

2015-02-12 Thread Demian Brecht
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

[issue23442] http.client.REQUEST_HEADER_FIELDS_TOO_LARGE renamed in 3.5

2015-02-12 Thread Demian Brecht
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

[issue9698] When reusing an handler, urllib(2)'s digest authentication fails after multiple regative replies

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue9698> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23442] http.client.REQUEST_HEADER_FIELDS_TOO_LARGE renamed in 3.5

2015-02-12 Thread Demian Brecht
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

[issue10486] http.server doesn't set all CGI environment variables

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue10486> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23439] Fixed http.client.__all__ and added a test

2015-02-11 Thread Demian Brecht
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

[issue23439] Fixed http.client.__all__ and added a test

2015-02-11 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue23439> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23448] urllib2 needs to remove scope from IPv6 address when creating Host header

2015-02-11 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue23448> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23442] http.client.REQUEST_HEADER_FIELDS_TOO_LARGE renamed in 3.5

2015-02-11 Thread Demian Brecht
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

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-02-11 Thread Demian Brecht
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

[issue23434] RFC6266 support

2015-02-10 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue23434> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2211] Cookie.Morsel interface needs update

2015-02-10 Thread Demian Brecht
Demian Brecht added the comment: @Mark: Sure, but not super high priority. Thanks for pointing it out. -- ___ Python tracker <http://bugs.python.org/issue2

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-02-10 Thread Demian Brecht
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

[issue21793] httplib client/server status refactor

2015-02-10 Thread Demian Brecht
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

[issue21793] httplib client/server status refactor

2015-02-09 Thread Demian Brecht
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

[issue23350] Content-length is incorrect when request body is a list or tuple

2015-01-30 Thread Demian Brecht
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(),

[issue23350] Content-length is incorrect when request body is a list or tuple

2015-01-29 Thread Demian Brecht
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

[issue23350] Content-length is incorrect when request body is a list or tuple

2015-01-29 Thread Demian Brecht
Changes by Demian Brecht : -- components: +Library (Lib) type: -> behavior versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issue23350> ___ _

[issue23350] Content-length is incorrect when request body is a list or tuple

2015-01-29 Thread Demian Brecht
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

[issue23334] http.client refactor

2015-01-29 Thread Demian Brecht
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: -

[issue22931] cookies with square brackets in value

2015-01-28 Thread Demian Brecht
Demian Brecht added the comment: Ping for review/commit. -- ___ Python tracker <http://bugs.python.org/issue22931> ___ ___ Python-bugs-list mailing list Unsub

[issue23334] http.client refactor

2015-01-28 Thread Demian Brecht
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

[issue13128] httplib debuglevel on CONNECT doesn't print response headers

2015-01-28 Thread Demian Brecht
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

[issue23334] http.client refactor

2015-01-28 Thread Demian Brecht
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

[issue23334] http.client refactor

2015-01-27 Thread Demian Brecht
Changes by Demian Brecht : Added file: http://bugs.python.org/file37887/http_proto_1.patch ___ Python tracker <http://bugs.python.org/issue23334> ___ ___ Python-bug

[issue23334] http.client refactor

2015-01-27 Thread Demian Brecht
Demian Brecht added the comment: Attaching a file /with/ http.proto this time. -- ___ Python tracker <http://bugs.python.org/issue23334> ___ ___ Python-bugs-list m

[issue23334] http.client refactor

2015-01-27 Thread Demian Brecht
Demian Brecht added the comment: Note that this patch also depends on Antoine's TransformDict patch in #18986. -- ___ Python tracker <http://bugs.python.org/is

[issue23334] http.client refactor

2015-01-27 Thread Demian Brecht
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

[issue13128] httplib debuglevel on CONNECT doesn't print response headers

2015-01-27 Thread Demian Brecht
Demian Brecht added the comment: Sure, I should have some time later today to do so. Should such changes not be made as they're encountered in order to clean up the older code that isn't up to spec? Or should they only be made as the code is modified? On 2015-01-27 2:58 PM, Berker Pe

[issue13128] httplib debuglevel on CONNECT doesn't print response headers

2015-01-27 Thread Demian Brecht
Demian Brecht added the comment: Ping. -- ___ Python tracker <http://bugs.python.org/issue13128> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-26 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the extra effort on this to satisfy multiple people's opinions. It's never an easy thing, especially when dealing with a decentralized group. My following comments are largely based on the public API. I haven't done a full review of t

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-26 Thread Demian Brecht
Demian Brecht added the comment: > now I’m thinking that should be up to the higher level user +1. A closed connection is a closed connection, whether it's persistent or not. The higher level code should be responsible for the context, not the connectio

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-24 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the patch Martin (as well as catching a couple issues that I'd run into recently as well). I've left a couple comments up on Rietveld. -- ___ Python tracker <http://bugs.python.

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Demian Brecht
Demian Brecht added the comment: > @demian: If you don't mind, could you please elaborate a bit more on > `_resolve_path()` you mentioned in the review/comment? Sure. In your patch, you have redirect_browser (or redirect if you renamed it), which sounds like it's allowing fo

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the work! I'm not sure why the last patch doesn't appear on Rietveld, so (unfortunately) here's the result of my review. I've only covered functional aspects in this run at it: +base_files = ['index.html', 'in

[issue23300] httplib is using a method that doesn't exist

2015-01-23 Thread Demian Brecht
Demian Brecht added the comment: Other than Berker's comments, LGTM. -- ___ Python tracker <http://bugs.python.org/issue23300> ___ ___ Python-bugs-list m

[issue23302] Small fixes around the use of TCP MSS in http.client

2015-01-22 Thread Demian Brecht
Demian Brecht added the comment: I've attached a new patch disabling Nagle by default, but doing so in connect() as to allow users to override it if they really want to. I've also removed the use of mss in HTTPConnection. This is a backwards incompatible change in two ways: 1. Re

[issue23302] Small fixes around the use of TCP MSS in http.client

2015-01-22 Thread Demian Brecht
Demian Brecht added the comment: I'm not opposed to that either. The only downside really (at least as far as I'm aware) is the potential substantial influx of packets should an iterable comprised of small chunks of data be passed in as the body, although I would consider that quite

[issue23300] httplib is using a method that doesn't exist

2015-01-22 Thread Demian Brecht
Demian Brecht added the comment: @Senthil: If you're fixing this today, can you also correct the typo here: https://hg.python.org/cpython/rev/568041fd8090/#l1.27 (s/HTML/HTTP)? Just caught my eye going through the review that Mark linked. -- nosy: +demian.b

[issue23302] Small fixes around the use of TCP MSS in http.client

2015-01-22 Thread Demian Brecht
Changes by Demian Brecht : -- components: +Library (Lib) keywords: +patch versions: +Python 3.5 Added file: http://bugs.python.org/file37822/issue23302.patch ___ Python tracker <http://bugs.python.org/issue23

[issue23302] Small fixes around the use of TCP MSS in http.client

2015-01-22 Thread Demian Brecht
New submission from Demian Brecht: There are a couple of small issues with the determination of whether or not a request can fit in a single TCP/IP packet in http.client. 1. The MSS is hardcoded 2. The TCP data size is calculated as only the message body. This is incorrect as the size of the

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-20 Thread Demian Brecht
Demian Brecht added the comment: (Admittedly, I may also have been doing something entirely invalid in previous experiments as well) -- ___ Python tracker <http://bugs.python.org/issue3

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-20 Thread Demian Brecht
Demian Brecht added the comment: Now I think I'd like to take my foot out of my mouth. Previous quick experiments that I had done were at the socket level, circumventing some of the logic in the HTTPResponse, mainly the calls to readline() rather than simple socket.recv(). I've

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-20 Thread Demian Brecht
Demian Brecht added the comment: TL;DR: Because HTTP is an application-level protocol, it's nearly impossible to gauge how a server will behave given a set of conditions. Because of that, any time that assumptions can be avoided, they should be. @R. David Murray: > That is

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: > Calling self.wfile.write(b"") should be equivalent to not calling write() at > all, as far as I understand. Right (or at least, as I understand it as well). Really, this boils down to a philosophical debate: Should the standard libr

[issue20898] Missing 507 response description

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: No worries, thanks for taking care of merging it Berker. -- ___ Python tracker <http://bugs.python.org/issue20898> ___ ___ Pytho

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-19 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue23255> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: Sorry Martin, I should really not dig into issues like this first thing in the morning ;) My concern about the proposed change isn't whether or not it isn't valid HTTP behaviour, it is. My concern (albeit a small one) is that the change implies an

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: > I'm not sure whether or not this was your intention, but your example > demonstrates a misbehaving client, one that seems to expect a persistent > connection from a non-persistent server. TCPServer will only serve a single > request and

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: Hi Martin, Thanks for the example code. I'm not sure whether or not this was your intention, but your example demonstrates a misbehaving client, one that seems to expect a persistent connection from a non-persistent server. TCPServer will only serve a s

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-15 Thread Demian Brecht
Demian Brecht added the comment: Trying to reproduce this on my own in 3.5, 2.7 and 2.5 yields a ConnectionResetError (ECONNRESET), which seems to be correct. That said, this could be due to varying TCP implementations on the server so might still be valid. It could also be due to an older

[issue8450] httplib: false BadStatusLine() raised

2015-01-15 Thread Demian Brecht
Demian Brecht added the comment: This should likely be closed as a duplicate of #3566, which has additional detail. -- ___ Python tracker <http://bugs.python.org/issue8

[issue20898] Missing 507 response description

2015-01-15 Thread Demian Brecht
Demian Brecht added the comment: Ping. Would be nice to get this change in before 3.5.0a1. -- ___ Python tracker <http://bugs.python.org/issue20898> ___ ___ Pytho

[issue8450] httplib: false BadStatusLine() raised

2015-01-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue8450> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23166] urllib2 ignores opener configuration under certain circumstances

2015-01-09 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue23166> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22992] Adding a git developer's guide to Mercurial to devguide

2015-01-09 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the response Brett and no worries, the delay is totally understandable. -- ___ Python tracker <http://bugs.python.org/issue22

[issue13128] httplib debuglevel on CONNECT doesn't print response headers

2015-01-06 Thread Demian Brecht
Demian Brecht added the comment: Just happened to come across this now. Updated patch with test. -- Added file: http://bugs.python.org/file37621/issue13128_2.patch ___ Python tracker <http://bugs.python.org/issue13

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2015-01-05 Thread Demian Brecht
Demian Brecht added the comment: I withdraw my patch as (I just discovered), it is already possible to effect changes to the underlying connection. What /should/ be done is: transport = Transport() con = transport.make_connection([host]) con.timeout = 2 proxy = ServerProxy([url], transport

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2015-01-05 Thread Demian Brecht
Changes by Demian Brecht : Removed file: http://bugs.python.org/file37481/issue14134.patch ___ Python tracker <http://bugs.python.org/issue14134> ___ ___ Python-bug

[issue20898] Missing 507 response description

2015-01-05 Thread Demian Brecht
Demian Brecht added the comment: The attached patch is a rework of the http.HTTPStatus docs to include links to the RFCs. While working through this, I noticed that I may have been a little overzealous in inclusion of some of the status codes. Some non-standard codes have been deprecated or

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2015-01-03 Thread Demian Brecht
Demian Brecht added the comment: utf-8 encoding is only one step in IRI encoding. Correct IRI encoding is non trivial and doesn't fall into the support policy for 2.7 (bug/security fixes). I think that the best that can be done for 2.7 is to enhance the documentation around HTTPConne

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2015-01-02 Thread Demian Brecht
Demian Brecht added the comment: A few notes: 1. Unicode hosts are not automatically IDNA-encoded (which they /could/ be rather than relying on the programmer to be aware of this), but this really has no bearing on this specific issue 2. Unicode paths are not automatically IRI-encoded (see

[issue20898] Missing 507 response description

2014-12-31 Thread Demian Brecht
Demian Brecht added the comment: @Berker: Good point, although I think that the status code table in http.client.rst should be merged with the one in http.rst as to avoid redundancy (newly added status codes should also have links added). The table in http.client.rst should likely be replaced

[issue22992] Adding a git developer's guide to Mercurial to devguide

2014-12-31 Thread Demian Brecht
Demian Brecht added the comment: Ping -- ___ Python tracker <http://bugs.python.org/issue22992> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23004] mock_open() should allow reading binary data

2014-12-31 Thread Demian Brecht
Demian Brecht added the comment: A few more comments were left in Rietveld for you, likely hidden by spam filters. -- ___ Python tracker <http://bugs.python.org/issue23

[issue20898] Missing 507 response description

2014-12-31 Thread Demian Brecht
Demian Brecht added the comment: The patch in #21793 has been merged, resolving this issue as well. This should now be closed. -- ___ Python tracker <http://bugs.python.org/issue20

[issue23043] doctest ignores "from __future__ import print_function"

2014-12-23 Thread Demian Brecht
Demian Brecht added the comment: > it's been resolved in 3.5 Sorry, that statement can be a little misleading, possibly indicating that something may have changed in the doctest globals handling. It was resolved in 3.5 because print is no longer a statement so this ambiguous b

[issue23043] doctest ignores "from __future__ import print_function"

2014-12-23 Thread Demian Brecht
Demian Brecht added the comment: @Julien.Palard: There's a subtle difference between your test and the issue as written. Your test lives within a module and therefore executes testmodule (see https://hg.python.org/cpython/file/9f60d024e586/Lib/doctest.py#l1819) whereas the issue reported

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-16 Thread Demian Brecht
Demian Brecht added the comment: I've attached a test-less patch with my suggested approach. If there's no opposition to this change, I'll put some work into getting tests done for it as well. -- Added file: http://bugs.python.org/file37481/i

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-16 Thread Demian Brecht
Demian Brecht added the comment: On another note, running a simple test with against a non-routable IP yields that OSX's default timeout is 75 seconds and not 7500 seconds as the developer docs lead me to believe. -- ___ Python tracker

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-16 Thread Demian Brecht
Demian Brecht added the comment: I think we've started to venture into system-level territory that the standard library itself shouldn't have to account for. If TCP on systems are configured by default to allow for infinite timeouts, then it should likely be an issue for those

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-16 Thread Demian Brecht
Demian Brecht added the comment: > in GNU/Linux "system timeout has been reached" -- means that system timeout > will *never* reached. That's quite likely because the system limits may be very large. For example, on my OSX box: --- ~ » sysctl

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-15 Thread Demian Brecht
Demian Brecht added the comment: > socket.setdefaulttimeout([timeout]) -- it is bad practice I'm not really arguing this. It solves the problem, but definitely not in the best of ways. My point in referencing setdefaulttimeout is that if /all/ you care about is the timeout an

[issue23004] mock_open() should allow reading binary data

2014-12-15 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the updated patch, looks good to me. If you haven't already read it, the patch workflow is here: https://docs.python.org/devguide/patch.html and is the only workflow currently available. -- ___ P

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-15 Thread Demian Brecht
Demian Brecht added the comment: + loewis as he's listed as the xmlrpc expert If you're worried about the number of lines, turn the function into a lambda: proxy = ServerProxy('http://example.com/gateway/', transport=Transport( connection_factory=lambda h: HTTPC

[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2014-12-14 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker <http://bugs.python.org/issue22928> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-14 Thread Demian Brecht
Demian Brecht added the comment: I'm a -1 to adding the timeout parameter to the ServerProxy implementation for pretty much the same reasons Jeff mentioned, but mainly because of the ambiguity that is introduced between the timeout and transport parameters (who should win in the case

<    1   2   3   4   5   >