[Python-Dev] Is there any remaining reason why weakref callbacks shouldn't be able to access the referenced object?

2016-10-21 Thread Nathaniel Smith
Hi all, It's an old feature of the weakref API that you can define an arbitrary callback to be invoked when the referenced object dies, and that when this callback is invoked, it gets handed the weakref wrapper object -- BUT, only after it's been cleared, so that the callback can't access the orig

Re: [Python-Dev] Have I got my hg dependencies correct?

2016-10-21 Thread Brett Cannon
On Thu, 20 Oct 2016 at 04:48 Skip Montanaro wrote: > I've recently run into a problem building the math and cmath modules > for 2.7. (I don't rebuild very often, so this problem might have been > around for awhile.) My hg repos look like this: > > * My cpython repo pulls from https://hg.python.or

[Python-Dev] Summary of Python tracker Issues

2016-10-21 Thread Python tracker
ACTIVITY SUMMARY (2016-10-14 - 2016-10-21) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open5524 ( -3) closed 34728 (+55) total 40252 (+52) Open issues wit

Re: [Python-Dev] Have I got my hg dependencies correct?

2016-10-21 Thread Skip Montanaro
On Fri, Oct 21, 2016 at 1:12 PM, Brett Cannon wrote: >> in first cpython, then 2.7 repos I should be up-to-date, correct? > > > Nope, you need to execute the same steps in your 2.7 checkout "repos" == "checkout" in my message. So the hg up -C solved my problem, but I'm still a bit confused (noth

Re: [Python-Dev] Adding bytes.frombuffer() constructor to PEP 467 (was: [Python-ideas] Adding bytes.frombuffer() constructor

2016-10-21 Thread Chris Barker
On Thu, Oct 20, 2016 at 11:48 PM, Nick Coghlan wrote: > > len(get_builtin_methods()) > >>230 > > > > So what? No one looks in all the methods of builtins at once. > > Yes, Python implementation developers do, which is why it's a useful > part of defining the overall "size" of Python and h

Re: [Python-Dev] Have I got my hg dependencies correct?

2016-10-21 Thread Terry Reedy
On 10/21/2016 2:12 PM, Brett Cannon wrote: On Thu, 20 Oct 2016 at 04:48 Skip Montanaro mailto:skip.montan...@gmail.com>> wrote: I've recently run into a problem building the math and cmath modules for 2.7. (I don't rebuild very often, so this problem might have been around for awhi

Re: [Python-Dev] Benchmarking Python and micro-optimizations

2016-10-21 Thread Nick Coghlan
On 20 October 2016 at 20:56, Victor Stinner wrote: > Hi, > > Last months, I worked a lot on benchmarks. I ran benchmarks, analyzed > results in depth (up to the hardware and kernel drivers!), I wrote new > tools and enhanced existing tools. Thanks Victor, very cool work! Cheers, Nick. -- Nick

Re: [Python-Dev] Is there any remaining reason why weakref callbacks shouldn't be able to access the referenced object?

2016-10-21 Thread Nick Coghlan
On 21 October 2016 at 17:09, Nathaniel Smith wrote: > But that was 2.4. In the mean time, of course, PEP 442 fixed it so > that finalizers and weakrefs mix just fine. In fact, weakref callbacks > are now run *before* __del__ methods [2], so clearly it's now okay for > arbitrary code to touch the o

Re: [Python-Dev] Is there any remaining reason why weakref callbacks shouldn't be able to access the referenced object?

2016-10-21 Thread Nathaniel Smith
On Fri, Oct 21, 2016 at 8:32 PM, Nick Coghlan wrote: > On 21 October 2016 at 17:09, Nathaniel Smith wrote: >> But that was 2.4. In the mean time, of course, PEP 442 fixed it so >> that finalizers and weakrefs mix just fine. In fact, weakref callbacks >> are now run *before* __del__ methods [2], s

Re: [Python-Dev] Benchmarking Python and micro-optimizations

2016-10-21 Thread Victor Stinner
Hi, I removed all old benchmarks results and I started to run manually benchmarks. The timeline view is interesting to investigate performance regression: https://speed.python.org/timeline/#/?exe=3&ben=grid&env=1&revs=50&equid=off&quarts=on&extr=on For example, it seems like call_method became sl