[Pythonmac-SIG] The versioning question...
eric.nieuwland at xs4all.nl
Mon Dec 27 22:30:32 CET 2004
On 27 dec 2004, at 19:27, Chris Barker wrote:
> Robin has added versioning to the latest wxPython, and I. for one am
> ecstatic. It works great for me. I am generally using 2.5.3, but have
> 2.4.2 installed, and a number of my apps depend on it (on Linux
> anyway, it's pretty useless on OS-X)
> It's great to be able to put:
> import wxversion
> At the top of my apps, and know that they'll use the version of
> wxPython I tested against.
Would it be an idea to submit a PEP for extending the 'import' keyword?
I can imagine it to be like:
import spam version 1
import foo version 2, 4
import bar version 7, 1, 6
with version numbers consisting of some fixed maximum of parts and the
version number parts not given might be wildcards.
We could then have a per module version system like:
... [version 1.0.1 stuff in here]
... [version 1.5.7 stuff in here]
there should be nothing else in the module directory, except for a
mechanism to further support versioning.
Default behaviour of 'import spam' would be to select the most recent
version. We might want to override that by pointing to some other
version. This might be achieved using a symbolic link/alias/shortcut to
the directory of that version (spam/current -> spam/1.0.1).
More like the directory/module method would be to allow for a
__version__.py file in 'spam'. Content of this file is to be
determined, but I think it should at least something like __current__
or __version__ to act as the pointer to the current version.
More information about the Pythonmac-SIG