Re: [Python-Dev] API for the new sysconfig module

2010-12-12 Thread Tarek Ziadé
On Sun, Dec 12, 2010 at 3:05 PM, Barry Warsaw wrote: > On Dec 12, 2010, at 02:42 PM, Antoine Pitrou wrote: > >>On Sun, 12 Dec 2010 13:01:42 +0100 >>Łukasz Langa wrote: >> >>> Wiadomość napisana przez Raymond Hettinger w dniu 2010-12-11, o godz. 22:18: >>> >>> >> *(I sometimes lose track of which

Re: [Python-Dev] API for the new sysconfig module

2010-12-12 Thread Stefan Krah
Lukasz Langa wrote: > Wiadomość napisana przez Raymond Hettinger w dniu 2010-12-11, o godz. 22:18: > > Right. I missed that it was already in 2.7. > So, now we're stuck with it, forever. > > Why not deprecate it for 3.2 (easy since it's probably not yet used anywhere > anyway, even in 2

Re: [Python-Dev] API for the new sysconfig module

2010-12-12 Thread Nick Coghlan
On Sun, Dec 12, 2010 at 11:42 PM, Antoine Pitrou wrote: >> I really like that much better than Java-like accessor functions. > > Do you actually use sysconfig yourself? It's quite a specialized > module, and I don't think API elegance arguments have a great weight > here. I would also like those

Re: [Python-Dev] API for the new sysconfig module

2010-12-12 Thread Barry Warsaw
On Dec 12, 2010, at 02:42 PM, Antoine Pitrou wrote: >On Sun, 12 Dec 2010 13:01:42 +0100 >Łukasz Langa wrote: > >> Wiadomość napisana przez Raymond Hettinger w dniu 2010-12-11, o godz. 22:18: >> >> >> *(I sometimes lose track of which changes were made in both branches >> >> pre-2.7, which ones w

Re: [Python-Dev] API for the new sysconfig module

2010-12-12 Thread Antoine Pitrou
On Sun, 12 Dec 2010 13:01:42 +0100 Łukasz Langa wrote: > Wiadomość napisana przez Raymond Hettinger w dniu 2010-12-11, o godz. 22:18: > > >> *(I sometimes lose track of which changes were made in both branches > >> pre-2.7, which ones were mode post-2.7 release, and which ones went in > >> pre-2

Re: [Python-Dev] API for the new sysconfig module

2010-12-12 Thread Łukasz Langa
Wiadomość napisana przez Raymond Hettinger w dniu 2010-12-11, o godz. 22:18: >> *(I sometimes lose track of which changes were made in both branches >> pre-2.7, which ones were mode post-2.7 release, and which ones went in >> pre-2.7, but were 3.x only regardless) > > Right. I missed that it was

Re: [Python-Dev] API for the new sysconfig module

2010-12-11 Thread Raymond Hettinger
On Dec 11, 2010, at 9:21 AM, Nick Coghlan wrote: > On Sun, Dec 12, 2010 at 12:17 AM, Antoine Pitrou wrote: >> On Sat, 11 Dec 2010 12:55:25 +1000 >> Nick Coghlan wrote: >> >>> On Sat, Dec 11, 2010 at 12:44 PM, Terry Reedy wrote: On 12/10/2010 4:59 PM, R. David Murray wrote: > Li

Re: [Python-Dev] API for the new sysconfig module

2010-12-11 Thread Nick Coghlan
On Sun, Dec 12, 2010 at 12:17 AM, Antoine Pitrou wrote: > On Sat, 11 Dec 2010 12:55:25 +1000 > Nick Coghlan wrote: > >> On Sat, Dec 11, 2010 at 12:44 PM, Terry Reedy wrote: >> > On 12/10/2010 4:59 PM, R. David Murray wrote: >> > >> >> Like Éric, I'm not sure what the implications of the existing

Re: [Python-Dev] API for the new sysconfig module

2010-12-11 Thread Antoine Pitrou
On Sat, 11 Dec 2010 12:55:25 +1000 Nick Coghlan wrote: > On Sat, Dec 11, 2010 at 12:44 PM, Terry Reedy wrote: > > On 12/10/2010 4:59 PM, R. David Murray wrote: > > > >> Like Éric, I'm not sure what the implications of the existing module > >> having been released in 2.7 and 3.2 beta are in terms

Re: [Python-Dev] API for the new sysconfig module

2010-12-11 Thread Tarek Ziadé
Sorry to get late in the discussion I am travelling. Nick resumes well the motivations behind sysconfig. I'll emphase that this module could hold more functions in the future that could be useful to other python implementations to abstract what is a python installation. E.g. more than paths and v

Re: [Python-Dev] API for the new sysconfig module

2010-12-10 Thread Nick Coghlan
On Sat, Dec 11, 2010 at 12:44 PM, Terry Reedy wrote: > On 12/10/2010 4:59 PM, R. David Murray wrote: > >> Like Éric, I'm not sure what the implications of the existing module >> having been released in 2.7 and 3.2 beta are in terms of making such an >> API change. > > I am with Raymond on this: th

Re: [Python-Dev] API for the new sysconfig module

2010-12-10 Thread Nick Coghlan
On Sat, Dec 11, 2010 at 7:59 AM, R. David Murray wrote: > On Thu, 09 Dec 2010 16:18:14 -0800, Raymond Hettinger > wrote: >> ISTM it mostly could have been reduced to single call returning a nested >> dictionary. > > If what was returned was, as you suggested on IRC, a set of named tuples, > it

Re: [Python-Dev] API for the new sysconfig module

2010-12-10 Thread Terry Reedy
On 12/10/2010 4:59 PM, R. David Murray wrote: Like Éric, I'm not sure what the implications of the existing module having been released in 2.7 and 3.2 beta are in terms of making such an API change. I am with Raymond on this: the purpose of betas is so we can test *and* make changes. No one s

Re: [Python-Dev] API for the new sysconfig module

2010-12-10 Thread R. David Murray
On Thu, 09 Dec 2010 16:18:14 -0800, Raymond Hettinger wrote: > Does anyone know why this needed a separate module and so many accessor > functions? Originally sysconfig was moved *out* of distutils, and distutils was changed to use it. But that proved to be as fragile as many other distutils c

Re: [Python-Dev] API for the new sysconfig module

2010-12-10 Thread Raymond Hettinger
On Dec 10, 2010, at 12:56 PM, Antoine Pitrou wrote: > On Fri, 10 Dec 2010 12:27:26 -0800 > Raymond Hettinger wrote: >> >> IMO, sysconfig did not warrant a whole module. > > Where would you put it? A single function in the sys module. > >> Rather than using two levels of dictionary, it's als

Re: [Python-Dev] API for the new sysconfig module

2010-12-10 Thread Antoine Pitrou
On Fri, 10 Dec 2010 12:27:26 -0800 Raymond Hettinger wrote: > > IMO, sysconfig did not warrant a whole module. Where would you put it? > Rather than using two levels of dictionary, it's also possible > to use a named tuple if you think that is more clean looking: > >>>> c = sys.sysconfig()

Re: [Python-Dev] API for the new sysconfig module

2010-12-10 Thread Raymond Hettinger
On Dec 10, 2010, at 6:20 AM, Éric Araujo wrote: > Final note: with 3.2 being in beta, I don’t know how much can be changed > now. Part of the purpose of a beta, and in our case, two betas is to give people a chance to exercise new APIs and fix them before they become set in stone two months later

Re: [Python-Dev] API for the new sysconfig module

2010-12-10 Thread Éric Araujo
Hi, Original discussion for the sysconfig module was short: http://mail.python.org/pipermail/python-dev/2009-May/089520.html Tarek will reply better, but I think the issue to solve was to move sysconfig out of distutils, improving its API a bit in the process but not overhauling it completely. A

Re: [Python-Dev] API for the new sysconfig module

2010-12-09 Thread Nick Coghlan
On Fri, Dec 10, 2010 at 10:18 AM, Raymond Hettinger wrote: > Does anyone know why this needed a separate module and so many accessor > functions? > ISTM it mostly could have been reduced to single call returning a nested > dictionary. Tarek will likely answer for himself, but I believe it is a

[Python-Dev] API for the new sysconfig module

2010-12-09 Thread Raymond Hettinger
Does anyone know why this needed a separate module and so many accessor functions? ISTM it mostly could have been reduced to single call returning a nested dictionary. Raymond from sysconfig import * import json def sysconf(): return dict(paths = get_paths(), config_vars