<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><span>On Jul 11, 2025, at 05:48, Bjarne D Mathiesen via wrote:</span><br><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Den 11.07.2025 kl. 11.51 skrev Ryan Carsten Schmidt:</span><br></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>I believe I read somewhere that the python community recommends that "python" always be python 2.x, never python 3.x. Programs that want to use python 3.x should use the program name "python3". If "port select python" currently allows versions of python 3.x to be selected, we may want to change that.</span><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>We did do a concerted effort in getting rid of python27 in macports some</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>time back. If I remember correctly, I had a major part in updating a lot</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>of stuff to at least python35 at that time.</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Python27 is offically dead. It was only being kept around in a comatose</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>state because of a lot of stuff not having been upgraded to python3.x</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>None of that contradicts what I wrote. Any program running "python" expects it to be python 2.x. Don't make "python" be python 3.x or you will break those programs.</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>At least, that was the wisdom I gleaned last time I looked this up some years ago. If the position of the python community has changed since then, please provide a citation.</span><br></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>So, I used https://www.perplexity.ai/ with the following questions:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Q1 : what is the recommend default version of python on linux</span><br></blockquote><span></span><br><span>The AI has answered what version of the Python language one should use by default. I don't disagree that when you have the choice you probably want to use a recent supported version of the language.</span></div><div dir="ltr"><span><br></span></div><div dir="ltr"><span>But that wasn't the question I brought up in this thread. I questioned whether the "python" command or symlink should ever be version 3.x. I said that if you want Python 3.x you should be using the "python3" command or symlink, leaving "python" to continue to be version 2.x so as not to break old software.</span></div><div dir="ltr"><span><br></span></div><div dir="ltr"><span>I don't remember where I read that or how many years ago it was, but it might have been this:</span></div><div dir="ltr"><span><br></span></div><div dir="ltr"><a href="https://peps.python.org/pep-0394/">https://peps.python.org/pep-0394/</a></div><div dir="ltr"><br></div><div dir="ltr">That PEP currently says that the decision of whether "python" should be 2.x or 3.x is left up to the distribution. We could therefore take our cue from Apple. In all versions of macOS that have "python", it is version 2.x. In all versions of macOS that have version 3.x, it is available as "python3" not "python". If you are writing scripts to share with other macOS users, following that example makes sense. It would make sense for the MacPorts "port select" system to follow that example as well. </div><div dir="ltr"><br></div><div dir="ltr">The PEP also has a historical note that it used to recommend "python" always be 2.x but that this has been relaxed now that 2.x is EOL. However it also still contains the rationale for why this is still a good idea. </div><div dir="ltr"><span><br></span></div></body></html>