Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-13 Thread Tarek Ziadé
On Thu, Aug 12, 2010 at 11:48 PM, Nick Coghlan ncogh...@gmail.com wrote: 2010/8/12 Éric Araujo mer...@netwok.org: Choosing an arbitrary location we think is good on every system is fine and non risky I think, as long as Python let the various distribution change those paths though

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-13 Thread Barry Warsaw
On Aug 12, 2010, at 09:10 AM, Fred Drake wrote: Perhaps user configuration belongs in ~/.local/, or ~/.local/python/ (with attendant Windows Mac OS noises); I don't really care where it lands, because right now we just have a mess. Getting it right with respect to Window's roaming notion and

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-13 Thread Fred Drake
On Fri, Aug 13, 2010 at 11:57 AM, Barry Warsaw ba...@python.org wrote: I've missed most of this discussion while on vacation, but if ~/.local is supposed to mirror /usr/local, then wouldn't a logical place for per-user configuration files be ~/.local/etc/whatever.cfg? Maybe it is; I'd hope so.

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-13 Thread Antoine Pitrou
On Fri, 13 Aug 2010 11:57:57 -0400 Barry Warsaw ba...@python.org wrote: On Aug 12, 2010, at 09:10 AM, Fred Drake wrote: Perhaps user configuration belongs in ~/.local/, or ~/.local/python/ (with attendant Windows Mac OS noises); I don't really care where it lands, because right now we just

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-13 Thread Michael Foord
On 13/08/2010 06:39, Stephen J. Turnbull wrote: Michael Foord writes: How is ~/python not memorable or consistent? (And cross-platform memorability and consistency is valuable too.) But what does ~ mean on Windows? There is a user directory in Windows directly analagous to ~, and this

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-13 Thread Tim Golden
On 13/08/2010 10:02 PM, Michael Foord wrote: On 13/08/2010 06:39, Stephen J. Turnbull wrote: Michael Foord writes: How is ~/python not memorable or consistent? (And cross-platform memorability and consistency is valuable too.) But what does ~ mean on Windows? There is a user

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Tarek Ziadé
On Thu, Aug 12, 2010 at 7:00 AM, Russell E. Owen ro...@uw.edu wrote: ... If the files are shared among all users then /usr/local/something seems more reasonable. I also think whatever you choose for linux is also the best choice for Mac OS X (my preferred platform). While there are other

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Tim Golden
On 11/08/2010 16:22, Éric Araujo wrote: It would be nice to define one standard location for config files used by stdlib modules, and maybe also by third-party programs related closely to Python development (testing tools, static code checkers and the like), in a way that doesn’t clutter the

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Steve Holden
On 8/12/2010 5:50 AM, Tim Golden wrote: On 11/08/2010 16:22, Éric Araujo wrote: It would be nice to define one standard location for config files used by stdlib modules, and maybe also by third-party programs related closely to Python development (testing tools, static code checkers and the

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Tim Golden
On 12/08/2010 11:18, Steve Holden wrote: On 8/12/2010 5:50 AM, Tim Golden wrote: [... snip explanation of standard non-standard locations ...] Didn't we have this discussion when per-user libraries came up? Shouldn't we be using a subdirectory of that location? Yes we should. My

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Tim Golden
On 12/08/2010 10:50, Tim Golden wrote: Unfortunately, the canonical place is not always the place most used. Especially since the convention under *nix is to place dotfile or dotdirs under $HOME. Windows doesn't, by default, have a $HOME so various locations are considered $HOME, including (but

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Michael Foord
On 12/08/2010 11:18, Steve Holden wrote: On 8/12/2010 5:50 AM, Tim Golden wrote: On 11/08/2010 16:22, Éric Araujo wrote: It would be nice to define one standard location for config files used by stdlib modules, and maybe also by third-party programs related closely to Python

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Tim Golden
On 12/08/2010 11:40, Michael Foord wrote: User editable configuration files are very different from libraries. The per user site-packages folder *should* be hidden somewhere out of the way where you can get at them if you want them but won't stumble across them all the time. e.g. AppData on

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Michael Foord
On 12/08/2010 11:54, Tim Golden wrote: On 12/08/2010 11:40, Michael Foord wrote: User editable configuration files are very different from libraries. The per user site-packages folder *should* be hidden somewhere out of the way where you can get at them if you want them but won't stumble across

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Tim Golden
On 12/08/2010 12:17, Michael Foord wrote: How is ~/python not memorable or consistent? (And cross-platform memorability and consistency is valuable too.) I was thinking outside Python rather than inside it (where ~ has no meaning on Windows) but you make a good point here. If we were just

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Éric Araujo
If the files are shared among all users then /usr/local/something seems more reasonable. Oh, right, I forgot to think about system-wide config files. They have to be supported by another function in site. A lot of programs have similar-looking code to get a list of filenames and then process

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Éric Araujo
Le 12/08/2010 12:18, Steve Holden a écrit : Didn't we have this discussion when per-user libraries came up? Shouldn't we be using a subdirectory of that location? As pointed out by Antoine, Georg, Michael and I, the PEP 370 directory for user site-packages is not the right place to put config

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Paul Moore
On 12 August 2010 12:59, Tim Golden m...@timgolden.me.uk wrote: re: using the Registry: To be honest, I was answering the literal question posed by Eric: where to put config files? Not the wider question: how should config data be stored? Where the answer to the latter question might be: the

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Fred Drake
On Thu, Aug 12, 2010 at 6:18 AM, Steve Holden st...@holdenweb.com wrote: Didn't we have this discussion when per-user libraries came up? Shouldn't we be using a subdirectory of that location? We ruin the risk of Python becoming distributed so finely it becomes impossible to change things, what

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Michael Foord
On 12/08/2010 08:26, Tarek Ziadé wrote: [snip...] Choosing an arbitrary location we think is good on every system is fine and non risky I think, as long as Python let the various distribution change those paths though configuration. In fact, that's one of the future goal of the sysconfig module

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Nick Coghlan
2010/8/12 Éric Araujo mer...@netwok.org: Choosing an arbitrary location we think is good on every system is fine and non risky I think, as long as Python let the various distribution change those paths though configuration. Don’t you have a bootstrapping problem? How do you know where to look

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Glyph Lefkowitz
On Aug 12, 2010, at 6:30 AM, Tim Golden wrote: I don't care how many stats we're doing You might not, but I certainly do. And I can guarantee you that the authors of command-line tools that have to start up in under ten seconds, for example 'bzr', care too.

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Antoine Pitrou
On Thu, 12 Aug 2010 18:14:44 -0400 Glyph Lefkowitz gl...@twistedmatrix.com wrote: On Aug 12, 2010, at 6:30 AM, Tim Golden wrote: I don't care how many stats we're doing You might not, but I certainly do. And I can guarantee you that the authors of command-line tools that have to start

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Steven D'Aprano
On Thu, 12 Aug 2010 08:18:27 pm Steve Holden wrote: One might make a case that all configuration data should be stored in a single SQLite database (with a suitable API to hide the relational nature of the store). -1 Please don't even *consider* such a thing. Haven't we learned from Firefox?

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Toshio Kuratomi
On Fri, Aug 13, 2010 at 07:48:22AM +1000, Nick Coghlan wrote: 2010/8/12 Éric Araujo mer...@netwok.org: Choosing an arbitrary location we think is good on every system is fine and non risky I think, as long as Python let the various distribution change those paths though configuration.

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Éric Araujo
A good alternative would be to make the config file overridable. That way you can have sysconfig.cfg next to sysconfig.py or in a known config directory relative to the python stdlib install but also let the distributions and individual sites override the defaults by making changes to

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread David Cournapeau
On Fri, Aug 13, 2010 at 7:29 AM, Antoine Pitrou solip...@pitrou.net wrote: On Thu, 12 Aug 2010 18:14:44 -0400 Glyph Lefkowitz gl...@twistedmatrix.com wrote: On Aug 12, 2010, at 6:30 AM, Tim Golden wrote: I don't care how many stats we're doing You might not, but I certainly do.  And I can

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Stephen J. Turnbull
Michael Foord writes: How is ~/python not memorable or consistent? (And cross-platform memorability and consistency is valuable too.) But what does ~ mean on Windows? Inside of Python you can have a consistent definition, but that doesn't help people whose installer gets mixed signals so

[Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-11 Thread Éric Araujo
Hello list Tarek opened a distutils bugs in http://bugs.python.org/issue7175 that evolved into a discussion about the proper location to use for config files. Distutils uses [.]pydistutils.cfg and .pypirc, and now unittest2 has a config file too. It would be nice to define one standard location

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-11 Thread Michael Foord
On 11/08/2010 16:22, Éric Araujo wrote: Hello list Tarek opened a distutils bugs in http://bugs.python.org/issue7175 that evolved into a discussion about the proper location to use for config files. Distutils uses [.]pydistutils.cfg and .pypirc, and now unittest2 has a config file too.

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-11 Thread Fred Drake
On Wed, Aug 11, 2010 at 11:22 AM, Éric Araujo mer...@netwok.org wrote: Tarek, Antoine, RDM, MAL were +1 on using ~/.python (whether to use .pythonx.y or .python/x.y is a subissue to discuss after general agreement). +0.5 I'd like to see a more complete proposal, including: - what to do with

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-11 Thread Adal Chiriliuc
Hello, Fred Drake fdrake at acm.org wrote: +0.5 I'd like to see a more complete proposal, including: - what to do with Windows, Mac OS X PEP 370 already specifies a directory for Python config files: user data directory Usually the parent directory of the user site directory. It's

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-11 Thread Éric Araujo
I'd like to see a more complete proposal, including: Fair enough. tl;dr: Locating config files is hard. I have looked at http://github.com/ActiveState/appdirs (MIT) for OS-specific bits of knowledge. (Note that the directories it uses for free OSes are not compliant with the freedesktop.org

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-11 Thread Éric Araujo
PEP 370 already specifies a directory for Python config files: user data directory Usually the parent directory of the user site directory. It's meant for Python version specific data like config files, docs, images and translations. Thanks for pointing that. However, I have

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-11 Thread Fred Drake
On Wed, Aug 11, 2010 at 10:58 PM, Éric Araujo mer...@netwok.org wrote: Considering the FHS or the XDG Base Directory specifications, there is a precedent in distinguishing user config (edited by the user through a text editor or settings graphical window), program data (state) and cache (files

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-11 Thread Russell E. Owen
In article 4c62c01d.6000...@netwok.org, Éric Araujo mer...@netwok.org wrote: Hello list Tarek opened a distutils bugs in http://bugs.python.org/issue7175 that evolved into a discussion about the proper location to use for config files. Distutils uses [.]pydistutils.cfg and .pypirc, and