[Python-3000] [Python-ideas] Namespaces are one honking great idea -- let's do more of those!

Mike Meyer mwm at mired.org
Tue Feb 5 00:56:42 CET 2008


On Mon, 4 Feb 2008 15:34:56 -0800 (PST) "Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com> wrote:
> As Python developers you have to realize that for many people Python is
> "just" a core around which they build much bigger applications. If the
> success of Python is to continue, you have to give your large user
> base a clear path to working with two co-existing Python versions,
> so that installing a Python 3 application doesn't break all Python 2
> applications (some of which may never be converted since the original
> developers have moved on). For example, I really need to be able
> to use wxPython based on Python 2 and wxPython based on Python 3
> simultaneously on my Windows machine. I'm thinking this is only
> possible if Python 3 uses a new file extension.

I think the key word here is "Windows". I have no trouble doing all of
this on a Unix system without changing the extensions, but it's a lot
less dependent on file extensions.

> Ideally, I'd even want to have both Python 2 and Python 3 scripts in
> the same directory, while incrementally converting our applications.
> I'd want to cp script.py script.py3, then edit the .py3 version
> until it works, while still being able to run the old version during
> the migration period. Of course, I could also start a new Python 3
> specific directory structure, but then I'd have to jump back and
> forth between two complex trees all the time, which is very annoying
> and time consuming; and I may have to copy many non-Python files that
> I wouldn't have to maintain in two copies otherwise.

Now, let me throw in my requirements. Most modern packaging systems
can handle the upgrade from 2.x to 2.y; they'll automatically upgrade
all the packages that depend on python, meaning you'll get versions
installed for 2.y after the upgrade process is done, and anything that
uses only packages from the packaging system will keep on working.

I don't want the solution for 3.0 to break the ability to do 2.x
upgrades that way. Further, I want the same solution to work for 3.0
to 3.1.

> I think it will be essential to give the Python 3 interpreter a new
> name and the scripts a new extension. I suggest using "py3" for both.

I really, really hate this idea. But if it's the only workable
solution on Windows, then it's the only workable solution.

Question: how many of the editor packages for editing python files
will work properly on both python and python 3.0 files?

     <mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the Python-3000 mailing list