[Python-Dev] Wg: Re: [Python-checkins] cpython (3.4): Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integer

2015-03-01 Thread s.krah


 == == == == == == Weitergeleitete Nachricht == == == == == == 
Absender : Stefan Krah
Empfänger : "Victor Stinner"
Datum : So, 01 Mrz 2015 18:58:43 +
Betreff : Re: [Python-Dev] [Python-checkins] cpython (3.4): Issue #23446: Use 
PyMem_New instead of PyMem_Malloc to avoid possible integer
 == == == == == == Weitergeleitete Nachricht == == == == == == 

On Mon, Feb 16, 2015 at 10:14:59PM +0100, Victor Stinner wrote: 
> 2015-02-16 17:34 GMT+01:00 Stefan Krah : 
> > 
> > On Mon, Feb 16, 2015 at 11:35:52AM +, serhiy.storchaka wrote: 
> >> diff --git a/Modules/_testbuffer.c b/Modules/_testbuffer.c 
> >> --- a/Modules/_testbuffer.c 
> >> +++ b/Modules/_testbuffer.c 
> >> @@ -850,7 +850,7 @@ 
> >> Py_ssize_t *dest; 
> >> Py_ssize_t x, i; 
> >> 
> >> - dest = PyMem_Malloc(len * (sizeof *dest)); 
> >> + dest = PyMem_New(Py_ssize_t, len); 
> >> if (dest == NULL) { 
> >> PyErr_NoMemory(); 
> >> return NULL; 
> > 
> > This, too, was already protected by len == ndim <= 64. 
> 
> I don't understand why you don't want to use PyMem_New() even if it 
> cannot overflow. PyMem_New() is more readable no? 
 
It's readable, but I don't see a reason to change code that already has an 
overflow analysis, especially in 3.4. 
 
As I wrote in http://bugs.python.org/issue23446#msg235770 , people need to 
see that one *can* make certain assumptions about PEP-3118 buffers (otherwise 
one would go insane with overflow checks when doing arithmetic on the buffers. 
 
 
So, in a sense, this commit removes information for the reader. I would 
prefer an "assert(len <= 64)" for documentation purposes while keeping the 
multiplication. 
 
 
 
Stefan Krah 
 
 




___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PEP 493: Redistributor guidance for Python 2.7 HTTPS

2015-07-07 Thread s.krah


Erik Bray  wrote:

> On Mon, Jul 6, 2015 at 6:21 AM, Antoine Pitrou  
wrote: 
>> On Mon, 6 Jul 2015 14:22:46 +1000 
>> Nick Coghlan  wrote: 
>>> 
>>> The main change from the last version discussed on python-ideas 
>> 
>> Was it discussed there? That list has become totally useless, I've 
>> stopped following it. 
 
> Considering that a useful discussion of a useful PEP occurred there 
> (not to mention other occasionally useful discussions) I'd say that 
> such a value judgment is not only unnecessary but also inaccurate. 
> That's fine if it's uninteresting to you and you don't want to follow 
> it, but let's please avoid judgments on entire mailing lists and, by 
> extension, the people holding conversations there. 

In an informal setting, exaggeration is used widely in continental Europe.
I found the remark funny and was glad to hear that I'm not the only one
who has problems with python-ideas.


Stefan Krah


___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PEP 493: Redistributor guidance for Python 2.7 HTTPS

2015-07-07 Thread s.krah


Nick Coghlan  wrote:

> It's OK if folks aren't interested in participating in the noisy early 
> stages of that process - that's why the activity was long since moved 
> out to a dedicated list. It's not OK to make the jump from "I don't 
> consider participating in that to be the best possible use of my own 
> time" to "it isn't worth doing".

Well yes, to me it was an exaggeration which a German or French person
would interpret as "not the best possible use of one's time". ;)


Leaving phrasing and timing aside (Antoine has already explained himself),
how are people who don't go to Pycons supposed to know the opinion of
other core-devs if no one ever voices a complaint on a mailing list?


Stefan Krah








 



___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] How far to go with user-friendliness

2015-07-18 Thread s.krah


 Ein Sa, 18 Jul 2015 04:34:19 + Stephen J. Turnbull 
 hat geschrieben  

Antoine Pitrou writes: 
 > [...] is amongst the reasons why I'm stopping contributing to 
 > CPython. 
 
> We'll miss your code. But you're only one committer, even if you've 
> contributed more than the average amount. On the other hand, Python 
> needs to *grow* the committer group beyond its current size, and 
> *some* such discussion is necessary for new committers' advancement to 
> "benevolent dictator for one PEP" level, which is also a pain point 
> IMHO.

I don't think growing committer numbers is CPython's #1 problem. CPython
needs *relevant*contributions:  Hypothetically speaking, I'd wager that
someone writing an industrial strength concurrent garbage collector is
*far more likely* to share Antoine's attitude.

ALL developer's who fall into that category are being put off by the
current climate on python-dev and python-ideas, and there's no
shortage of other languages to contribute to.

Likewise, I don't think PEPs are the problem either: Python already has
too many features (recently I found myself thinking that C++ is a really
nice small language :).


Stefan Krah


___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] How far to go with user-friendliness

2015-07-18 Thread s.krah


Stephen J. Turnbull  wrote:

 >> Hypothetically speaking, I'd wager that someone writing an 
 >> industrial strength concurrent garbage collector is *far more 
 >> likely* to share Antoine's attitude. 
 
> I hope not. It's one thing to wish that one can be surrounded by 
> peers with compatible workflows. It's another to address those who 
> aren't one's peers with words like "keep up the good work, it's people 
> like you that make this a repulsive place to be." (That may not be an 
> exact quote but it's in the same spirit.) 

Sorry, that amounts to twisting my words. An attitude is a general way of
approaching things and I meant it in a positive way.

I haven't read the flame you're alluding to, but an occasional flame is NOT
the defining characteristic of a person.

On the contrary, on the bug-tracker Antoine has been most helpful,
responsive and welcoming towards newcomers.


It would be a great loss if he really stops and I hope he'll reconsider.


Stefan Krah






___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] How far to go with user-friendliness

2015-07-19 Thread s.krah


 Ein Sa, 18 Jul 2015 15:35:05 + Stephen J. Turnbull 
<step...@xemacs.org> hat geschrieben ---- 

s.krah writes: 
 
 >> Sorry, that amounts to twisting my words. 
 
> Let's not play the dozens here. That just extends the thread to no 
point.

Indeed.  I'll just filter you from now on.


Stefan Krah 
 



___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com