[Python-ideas] Changing the name of __pycache__

Nick Coghlan ncoghlan at gmail.com
Thu Feb 10 13:04:35 CET 2011


On Thu, Feb 10, 2011 at 5:04 PM, Stephen J. Turnbull <stephen at xemacs.org> wrote:
> Greg Ewing writes:
>  > On 10/02/11 11:44, Nick Coghlan wrote:
>  >
>  > > Changing that will require a patch and advocacy from folks that are
>  > > actually *fans* of sourceless distribution, as opposed to merely
>  > > tolerating them as an arguably necessary evil.
>  >
>  > Labelling sourceless distributions as a "necessary evil" comes
>  > across to me as a political stance, not based on any technical
>  > argument. I don't think that this kind of ideological thinking
>  > should have any place in deciding what goes into Python.
>
> Note that Nick is *not* doing any labeling in that post (I don't know
> what his actual opinion is).  He is saying that the people doing the
> work don't want to do this, and it's up to those who want it to do
> that work, which at this point will include "not screwing up the
> existing proposal."

Yeah, I was just intending to relay the tone of the original
discussion (which definitely acquired an ideological flavour at
times). As I recall, I was one of those arguing that there are valid,
practical use cases for sourceless distribution. However, those use
cases were adequately met by the simple solution in the PEP (i.e.
retaining support for substituting a bytecode file in place of a
source file simply by changing the extension), so that compromise
satisfied all parties involved in the discussion at the time.

The best reference I found summarising the situation is here:
http://www.mail-archive.com/python-dev@python.org/msg45924.html

So apparently there was a fair bit of in person discussion at the
PyCon 2010 language summit as well. The flurry of PyCon related list
activity around that time would also explain why several developers
missed the discussion.

All that said, you could definitely extend the PEP 3147 idea in 3.3 to
allow sourceless imports into multiple Python interpreters in a single
directory, I'm just not sure I see the point.

The whole goal of PEP 3147 is to allow multiple interpreters to share
a single source file without fighting over a single cache location,
while still keeping the cached files near the original source files.
There's no such sharing benefit when it comes to sourceless
distributions, so why not simply have a separate directory hierarchy
per interpreter and use the basic file name? Is the desire to do this
really common enough to add yet-another-stat-call to the import
sequence?

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list