Re: [Python-Dev] 2.x vs 3.x survey results

2014-01-04 Thread Dan Stromberg
On Sat, Jan 4, 2014 at 8:20 PM, John Yeuk Hon Wong wrote: > I think it helps Luca and many others (including myself) if there is a > reference of the difference between 2.7 and Python 3.3+. > There are PEPs and books, but is there any such long list of references? > > If not, should we start inve

Re: [Python-Dev] 2.x vs 3.x survey results

2014-01-04 Thread John Yeuk Hon Wong
On 1/4/14 10:42 PM, Ben Finney wrote: Luca Sbardella writes: you are my heroes but this survey is quite useless, can you include more people? The survey cohort was self-selected from those who read the forums where it was posted. I wasn't aware of it so many thousands of python users. That

Re: [Python-Dev] 2.x vs 3.x survey results

2014-01-04 Thread Ben Finney
Luca Sbardella writes: > you are my heroes but this survey is quite useless, can you include more > people? The survey cohort was self-selected from those who read the forums where it was posted. > I wasn't aware of it so many thousands of python users. That statement confuses me. Were you awa

Re: [Python-Dev] 2.x vs 3.x survey results

2014-01-04 Thread Luca Sbardella
On 4 January 2014 19:21, Scott Dial wrote: > On 2014-01-02 17:54, Dan Stromberg wrote: > > I put it at https://wiki.python.org/moin/2.x-vs-3.x-survey > > It would've been nice to see some crosstabs. Pretty much any question > after Q3 is incomprehensible without splitting the respondents into > s

Re: [Python-Dev] [Python-checkins] cpython: Issue #19976: Argument Clinic METH_NOARGS functions now always

2014-01-04 Thread Stefan Krah
Stefan Behnel wrote: > """ > #ifndef CYTHON_UNUSED > # if defined(__GNUC__) > # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && > __GNUC_MINOR__ >= 4)) > # define CYTHON_UNUSED __attribute__ ((__unused__)) > # else > # define CYTHON_UNUSED > # endif > # elif defined(

Re: [Python-Dev] [Python-checkins] cpython: Issue #19976: Argument Clinic METH_NOARGS functions now always

2014-01-04 Thread Stefan Behnel
Stefan Krah, 04.01.2014 21:00: > Probably Rietveld did not send mail, so I mention my review comments again: > > larry.hastings wrote: >> +#ifdef __GNUC__ >> +#define Py_UNUSED(name) _unused_ ## name __attribute__((unused)) >> +#else >> +#define Py_UNUSED(name) _unused_ ## name >> +#endif >> + >

Re: [Python-Dev] Bug? http.client assumes iso-8859-1 encoding of HTTP headers

2014-01-04 Thread martin
Quoting Chris Angelico : I'm pretty sure that server is in violation of the spec, so all bets are off as to what any other server will do. If you know you're dealing with this one server, you can probably hack around this, but I don't think it belongs in core code. Unless, of course, I'm comple

Re: [Python-Dev] [Python-checkins] cpython: Issue #19976: Argument Clinic METH_NOARGS functions now always

2014-01-04 Thread Stefan Krah
Probably Rietveld did not send mail, so I mention my review comments again: larry.hastings wrote: > +#ifdef __GNUC__ > +#define Py_UNUSED(name) _unused_ ## name __attribute__((unused)) > +#else > +#define Py_UNUSED(name) _unused_ ## name > +#endif > + The Intel compiler defines __GNUC__ but chok

Re: [Python-Dev] 2.x vs 3.x survey results

2014-01-04 Thread Scott Dial
On 2014-01-02 17:54, Dan Stromberg wrote: > I put it at https://wiki.python.org/moin/2.x-vs-3.x-survey It would've been nice to see some crosstabs. Pretty much any question after Q3 is incomprehensible without splitting the respondents into sub-groups first. Of the 2.49% of people who said they'v

Re: [Python-Dev] Bug? http.client assumes iso-8859-1 encoding of HTTP headers

2014-01-04 Thread Xavier Morel
On 2014-01-04, at 17:24 , Chris Angelico wrote: > On Sun, Jan 5, 2014 at 2:36 AM, Hugo G. Fierro wrote: >> I am trying to download an HTML document. I get an HTTP 301 (Moved >> Permanently) with a UTF-8 encoded Location header and http.client decodes it >> as iso-8859-1. When there's a non-ASCI

Re: [Python-Dev] Bug? http.client assumes iso-8859-1 encoding of HTTP headers

2014-01-04 Thread Chris Angelico
On Sun, Jan 5, 2014 at 2:36 AM, Hugo G. Fierro wrote: > I am trying to download an HTML document. I get an HTTP 301 (Moved > Permanently) with a UTF-8 encoded Location header and http.client decodes it > as iso-8859-1. When there's a non-ASCII character in the redirect URL then I > can't download

[Python-Dev] Bug? http.client assumes iso-8859-1 encoding of HTTP headers

2014-01-04 Thread Hugo G. Fierro
Hi Python devs, I am trying to download an HTML document. I get an HTTP 301 (Moved Permanently) with a UTF-8 encoded Location header and http.client decodes it as iso-8859-1. When there's a non-ASCII character in the redirect URL then I can't download the document. In client.py def parse_headers(

[Python-Dev] Subclasses vs. special methods

2014-01-04 Thread Serhiy Storchaka
Should implicit converting an instance of int, float, complex, str, bytes, etc subclasses to call appropriate special method __int__ (or __index__), __float__, __complex__, __str__, __bytes__, etc? Currently explicit converting calls these methods, but implicit converting doesn't. class I(int

Re: [Python-Dev] cpython: threading.RLock._acquire_restore() now raises a TypeError instead of a

2014-01-04 Thread Armin Rigo
Hi Serhiy, On Fri, Jan 3, 2014 at 8:59 AM, Serhiy Storchaka wrote: >> +if (!PyArg_ParseTuple(args, "(kl):_acquire_restore", &count, &owner)) > > Please don't use "(...)" in PyArg_ParseTuple, it is dangerous (see issue6083 I think that in this case it is fine, because the "k" and "l" are retu