[Python-Dev] PEP 3147: PYC Repository Directories

Ben Finney ben+python at benfinney.id.au
Sun Feb 7 03:04:45 CET 2010


Nick Coghlan <ncoghlan at gmail.com> writes:

> The more decoupled they are, the harder it is to manually find the
> bytecode file.

Okay. So it's not so much about “predictable”, but rather about
“predictable by a human without too much cognitive effort”.

I can see value in that, though it's best to be explicit that this is a
goal (to be clear that “a program can tell you where they live” isn't a
solution).

> It's a fairly significant increase in mental overhead. It gets much
> worse if the location of the shadow hierarchy root is configurable in
> any way (e.g. based on sys.path contents or an environment variable).
>
> Restricting the caching mechanism to the folder containing the source
> file keeps things a lot simpler.

Simpler for the human working on the source code; not for the human
trying to fit this scheme in with an OS package management system.
(Again, I'm just clarifying and making the contrast explicit, not
judging relative values.)

This makes it clearer to me that there is a glaring incompatibility
between this desire for “keep the compiled bytecode files close to the
source files” versus “decouple the locations so the OS package manager
can do its job of managing installed files”.

I recognise after earlier discussion in this thread that's not an issue
being addressed by PEP 3147.

-- 
 \             “Those are my principles. If you don't like them I have |
  `\                                            others.” —Groucho Marx |
_o__)                                                                  |
Ben Finney



More information about the Python-Dev mailing list