[Python-Dev] PEP 3147, pycache directories and umask (original) (raw)

Ben Finney ben+python at benfinney.id.au
Wed Mar 24 00:16:30 CET 2010


Antoine Pitrou <solipsis at pitrou.net> writes:

Steven D'Aprano <steve at pearwood.info> writes:

On Wed, 24 Mar 2010 12:35:43 am Ben Finney wrote: > > On 23.03.2010 02:28, Ben Finney wrote: > > > <URL:http://www.debian.org/doc/packaging-manuals/fhs/fhs-2.3.html_ _> > >#VARCACHEAPPLICATIONCACHEDATA> > > > > > > This would suggest that Python could start using > > > ‘/var/cache/python/’ for its cached bytecode tree on systems > > > that implement the FHS. > […] There's no implication that data-which-happens-to-be-code is > unsuitable for storage in ‘/var/cache/foo/’. Easily-regenerated > Python byte code for caching meets the description quite well, > AFAICT.

While I strongly approve of the concept of a central cache directory for many things, I don't think that .pyc files fit the bill. Since there is no privileged python user that runs all Python code, and since any unprivileged user needs to be able to write .pyc files,

Hold up; my understanding is that, as Antoine Pitrou says:

The main point of the pycache proposal is to solve the needs of Ubuntu/Debian packagers. If you are developing (rather than deploying or building packages), you shouldn't have these needs AFAICT.

So, the packaging system will, by definition, have access to write to FHS directories and those directories don't need to be world-writable.

-- \ “Pinky, are you pondering what I'm pondering?” “I think so, | `\ Brain, but how will we get a pair of Abe Vigoda's pants?” | o) —_Pinky and The Brain | Ben Finney



More information about the Python-Dev mailing list