[Python-Dev] Re: Unification of the Mac builds?

2021-01-14 Thread Chris Barker via Python-Dev
Ned, Thanks -- I'll take further discussion to the python-mac list. Ronald: That’s a feature of the framework build. The unix build is exactly the same > as a unix build on other platform. Adding the same feature to the unix > build should be possible, but would complicate the build. I have

[Python-Dev] Re: PyGC and PyObject_Malloc introspection

2021-01-14 Thread Tim Peters
[Julien Danjou] > ... > Supposedly PyObject_Malloc() returns some memory space to store a > PyObject. If that was true all the time, that would allow anyone to > introspect the allocated memory and understand why it's being used. > > Unfortunately, this is not the case. Objects whose types are

[Python-Dev] Re: Should python installation modify /etc/paths.d on Mac OS X?

2021-01-14 Thread Ned Deily
On Jan 14, 2021, at 09:22, Peng Yu wrote: > The /etc/paths.d directory on Mac OS X contains the following > directory. Some packages have their PATH variables set there. > > For Python, I have to set the PATH manually in my ~/.bashrc. Should > the Python developers consider setting PATH in

[Python-Dev] Re: PyGC and PyObject_Malloc introspection

2021-01-14 Thread Pablo Galindo Salgado
Hi Julien, Isn't this a similar problem that you have with regular malloc? When you call malloc() with some size, malloc actually will reserve more than that for alignment purposes and for bookkeeping and apart from some platform-specific APIs like malloc_usable_size() you cannot query that

[Python-Dev] Should python installation modify /etc/paths.d on Mac OS X?

2021-01-14 Thread Peng Yu
Hi, The /etc/paths.d directory on Mac OS X contains the following directory. Some packages have their PATH variables set there. For Python, I have to set the PATH manually in my ~/.bashrc. Should the Python developers consider setting PATH in /etc/paths.d as well? ==> /etc/paths.d/100-rvictl

[Python-Dev] PyGC and PyObject_Malloc introspection

2021-01-14 Thread Julien Danjou
Hi there, I've spent quite some time on memory profiling for Python now. I'm struggling to get more information from the allocated memory right now for what looks like a sad reason. :( Supposedly PyObject_Malloc() returns some memory space to store a PyObject. If that was true all the time, that

[Python-Dev] Re: 3.10 change (?) for __bool__

2021-01-14 Thread Paul Sokolovsky
Hello, On Thu, 14 Jan 2021 22:05:37 +1100 Steven D'Aprano wrote: > On Wed, Jan 13, 2021 at 08:17:26PM +0300, Paul Sokolovsky wrote: > > > > Besides, we probably don't want to prohibit side-effects in > > > `__bool__`. That would prohibit useful tricks such as putting > > > logging calls into a

[Python-Dev] Re: 3.10 change (?) for __bool__

2021-01-14 Thread Steven D'Aprano
On Wed, Jan 13, 2021 at 08:17:26PM +0300, Paul Sokolovsky wrote: > > Besides, we probably don't want to prohibit side-effects in > > `__bool__`. That would prohibit useful tricks such as putting logging > > calls into a method you are trying to debug. > > Surely, if we do that, we wouldn't use

[Python-Dev] Re: 3.10 change (?) for __bool__

2021-01-14 Thread Paul Sokolovsky
Hello, On Thu, 14 Jan 2021 23:00:06 +1300 Greg Ewing wrote: > On 14/01/21 3:32 pm, Terry Reedy wrote: > > I say 'yes', because the purpose of logging is to document what > > happens, and if nothing happens, there is nothing to document. > > Wrapping a .__bool__ in a logging decorator might be

[Python-Dev] Re: 3.10 change (?) for __bool__

2021-01-14 Thread Greg Ewing
On 14/01/21 3:32 pm, Terry Reedy wrote: I say 'yes', because the purpose of logging is to document what happens, and if nothing happens, there is nothing to document.  Wrapping a .__bool__ in a logging decorator might be part of testing it. Or it might be something else. It would be fine to