[albatross-users] New release?
Dave Cole
djc at object-craft.com.au
Sun Sep 21 12:55:42 EST 2003
>>>>> "Tim" == Tim Churches <tchur at optushome.com.au> writes:
Tim> On Sun, 2003-09-21 at 07:52, Matt Goodall wrote:
>> On Sat, 2003-09-20 at 22:14, Tim Churches wrote: > I agree. There
>> is now a sufficiently large installed base of Albatross > apps that
>> serious consideration needs to be given to backwards >
>> compatibility. If new features are introduced, they need to have
>> new > names, and the old ones need to be retained with their
>> original names - > possibly marked as deprecated, but still
>> retained so that existing apps > don't break. Just like Python,
>> which has achieved a remarkable level of > backwards compatibility
>> (not perfect, but very good, with excellent > signposting of future
>> breakage).
>>
>> I completely agree but, just to clarify, we're not talking about a
>> new feature here.
>>
>> I found a potentially serious problem with the page module loader
>> where entries in sys.modules can get overwritten. As you can
>> imagine, that causes some seriously strange problems ;-). See
>> http://www.object-craft.com.au/pipermail/albatross-users/2003-August/000826.html.
>>
Tim> Yup. Thanks to your subsequent post, both Sheila and I now better
Tim> understand what you are talking about, and we are much more
Tim> relaxed about the proposed change/fix. --
Maybe I should back out the new page module loader and leave it
unchanged for the next release. There are enough small fixes over
1.10 to warrant a new release without the new page module loader.
I think that even with the pickling problems introduced by the new
page module loader, it is a better way to go. The new loader does not
pollute sys.modules.
One huge benefit of the new page module loader is that with a small
modification page modules can be made completely invisible to the
Python importer. Since execfile() takes a filename argument it is
possible to give the page modules an extension that is invisible to
Python.
djc at rat:~$ cat > some_page.apy
print "hello"
djc at rat:~$ python
Python 2.3+ (#2, Aug 10 2003, 11:33:47)
[GCC 3.3.1 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> execfile('some_page.apy')
hello
>>> import some_page
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named some_page
I think that this would be big step forward. Currently Matt's new
loader appends '.py' to the page name to determine the name of the
page module file. I am all for making that extension something else.
Having said all of that, I think I will remove the loader for the next
release.
Oh, on the subject of installing albatross in a way that does not
disrupt the previous version; all you have to do is this:
$ python setup.py install --install-lib ~/myproj --install-scripts ~/myproj
$ ls -l ~/myproj/
total 20
-rwxr-xr-x 1 djc staff 1111 Sep 21 12:53 al-httpd
-rwxr-xr-x 1 djc staff 8414 Sep 21 12:53 al-session-daemon
drwxr-sr-x 2 djc staff 4096 Sep 21 12:56 albatross
This gives you the ability to have a project specific version of
Albatross.
- Dave
--
http://www.object-craft.com.au
More information about the Albatross-users
mailing list