Movatterモバイル変換
[0]ホーム
[Python-Dev] PEP 394 request for pronouncement (python2 symlink in *nix systems)
Nick Coghlanncoghlan at gmail.com
Tue Feb 14 03:38:38 CET 2012
On Tue, Feb 14, 2012 at 8:08 AM, Barry Warsaw <barry at python.org> wrote:> On Feb 13, 2012, at 12:31 PM, Nick Coghlan wrote:>>>I think Antoine makes a good point about ease of introspection when>>you have multiple versions in the same series installed, so I'd be>>fine with:>>- updating the PEP recommendation to say that either form of link is>>fine (with hard links marginally faster, but harder to introspect)>>- noting that python.org releases will consistently use symlinks for>>easier introspection via "ls -l">>- updating Makefile.pre.in to ensure that we really do consistently use symlinks>> +1, and +1 for the PEP to be accepted.>>>This does mean that launching Python may involve a slightly longer>>symlink chain in some cases (python -> python2 -> python2.7), but the>>impact of that is always going to be utterly dwarfed by other startup>>costs.>> Agreed about startup times. However, does the symlink chain have to go in> this order? Couldn't python -> python2.7 and python2 -> python2.7? OTOH, I> seriously doubt removing one level of symlink chasing will have any noticeable> effect on startup times.I considered that, but thought it would be odd to make peopledouble-key a manual default version change within a series. It seemedmore logical to have "python" as a binary "python2/3" switch and thenhave the python2/3 symlinks choose which version is the default forthat series. (I'll add that rationale to the PEP, though)> One other thing I'd like to see the PEP address is a possible migration> strategy to python->python3. Even if that strategy is "don't do it, man!".> IOW, can a distribution change the 'python' symlink once it's pointed to> python2? What is the criteria for that? Is it up to a distribution? Will> the PEP get updated when our collective wisdom says its time to change the> default? etc.I have no idea, and I'm not going to open that can of worms for thisPEP. We need to say something about the executable aliases so thatpeople can eventually write cross-platform python2 shebang lines, buthow particular distros actually manage the transition is going todepend more on their infrastructure and community than it is anythingto do with us.> Also, if Python 2.7 is being changed to add this feature, why can't Python 3.2> also be changed? (And if there's a good reason for not doing it there, that> should be added to the PEP.)Because Python 3.2 already installs itself as python3 and doesn'ttouch the python symlink. Aside from potentially cleaning up thechoice of symlinks vs hardlinks in a couple of cases, the PEP reallydoesn't alter Python 3 deployment at all.Cheers,Nick.-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Devmailing list
[8]ページ先頭