Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #42251
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.047 |
| X-Spam-Evidence | '*H*': 0.91; '*S*': 0.00; 'problem:': 0.07; '"if': 0.09; 'method,': 0.09; 'yeah,': 0.09; 'bug': 0.12; 'attribute,': 0.16; 'file-like': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'iterable,': 0.16; 'send()': 0.16; 'wrote:': 0.18; 'header:In-Reply-To:1': 0.27; 'raise': 0.29; 'message-id:@mail.gmail.com': 0.30; 'that.': 0.31; 'block,': 0.31; 'purely': 0.31; 'fri,': 0.33; "i'd": 0.34; 'problem': 0.35; 'received:209.85': 0.35; 'received:google.com': 0.35; 'method': 0.36; 'should': 0.36; 'received:209': 0.37; 'somebody': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; 'real': 0.63; 'mar': 0.68; 'removal': 0.74; 'discovered': 0.83; 'investigated': 0.84; 'subject:skip:H 10': 0.84; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=xjNx0YDs2q9XKUT747orCCmsQ3tp1rbZzxPFM2cz5Rs=; b=TjmZXRT596DcyNLs9b0jCOvKd283pHXLhDxwZtt0+FJ4gFm7CIPNoJpOxHC9aLN3uu BeYEePK6+Svlj2Pu62WxRichymRsEGpgsC43Qvlzle38dK7HqAzciGF21/gV2Q9SgGL0 SSenFKf3wCdrT6JszRJwMtE9HzPdc01MjnxzCpRg6FzeNLo8mjdnbqM0+x2/RbJlzIdi LHXOGUnsfJ5+LBjcWFgFYveiAHtTU2Vibon49XyyhhMUldD9A6aVlcifcTIkiW+kv4Gr OXKSx6fn/MrOZReQsmC9Sryx2rXQa7zv2r4Hut21oBzMNPDnVSztJl8L5M0ewxj6CYXu kOTw== |
| MIME-Version | 1.0 |
| X-Received | by 10.220.231.199 with SMTP id jr7mr1936639vcb.70.1364569108259; Fri, 29 Mar 2013 07:58:28 -0700 (PDT) |
| In-Reply-To | <64ae9389-ef1b-4852-94a9-7cc5c228238c@googlegroups.com> |
| References | <64ae9389-ef1b-4852-94a9-7cc5c228238c@googlegroups.com> |
| Date | Sat, 30 Mar 2013 01:58:28 +1100 |
| Subject | Re: HTTPConnection.send |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3952.1364569116.2939.python-list@python.org> (permalink) |
| Lines | 15 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1364569116 news.xs4all.nl 6865 [2001:888:2000:d::a6]:59006 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:42251 |
Show key headers only | View raw
On Fri, Mar 29, 2013 at 11:27 PM, <dspublic@freemail.hu> wrote: > I have a problem with HTTPConnection object send() method (pyver3.3.1). I want to send data from file-like object with HTTPConnection.send( f ), and I get a "data should be a bytes-like object or an iterable, ..." exception. I have investigated a send method, and discovered a problem: if data has a read attribute, send it , and try send it again with self.sock.sendall(data). My opinion is need an "else" after the "if hasattr(data, "read")" > > Please, somebody help me. Does it a real BUG or my mistake? Yeah, I think you may be right on that. Changeset 67046 added the try block, and removed the else. I'd raise this on the tracker; I'd say the removal of else was purely accidental. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
HTTPConnection.send dspublic@freemail.hu - 2013-03-29 05:27 -0700 Re: HTTPConnection.send dspublic@freemail.hu - 2013-03-29 06:40 -0700 Re: HTTPConnection.send Peter Otten <__peter__@web.de> - 2013-03-29 15:49 +0100 Re: HTTPConnection.send Chris Angelico <rosuav@gmail.com> - 2013-03-30 01:58 +1100 Re: HTTPConnection.send dspublic@freemail.hu - 2013-03-29 09:32 -0700
csiph-web