[Python-modules-commits] r1642 - in
/packages/turbogears/trunk/debian: NEWS.Debian README.Debian
changelog
kov at users.alioth.debian.org
kov at users.alioth.debian.org
Fri Jan 5 20:41:21 CET 2007
Author: kov
Date: Fri Jan 5 20:41:21 2007
New Revision: 1642
URL: http://svn.debian.org/wsvn/python-modules/?sc=1&rev=1642
Log:
- document changes and important information concerning upgrade
from the preview releases to the 1.0 stable release
Added:
packages/turbogears/trunk/debian/NEWS.Debian
Modified:
packages/turbogears/trunk/debian/README.Debian
packages/turbogears/trunk/debian/changelog
Added: packages/turbogears/trunk/debian/NEWS.Debian
URL: http://svn.debian.org/wsvn/python-modules/packages/turbogears/trunk/debian/NEWS.Debian?rev=1642&op=file
==============================================================================
--- packages/turbogears/trunk/debian/NEWS.Debian (added)
+++ packages/turbogears/trunk/debian/NEWS.Debian Fri Jan 5 20:41:21 2007
@@ -1,0 +1,12 @@
+python-turbogears (1.0-1) unstable; urgency=low
+
+ This is the first stable release of TurboGears. Those who have been
+ using the preview versions will probably have already quickstarted
+ their applications using an earlier version. If you did so before
+ the 1.0b2 version (any Debian package version, in summary) and use
+ SQLObject with the Identity framework you will hit a problem when
+ starting your applications. See the "Upgrading from Preview versions"
+ section of the README.Debian file for information on how to modify
+ your application to make it work.
+
+ -- Gustavo Noronha Silva <kov at debian.org> Fri, 5 Jan 2007 16:21:16 -0200
Modified: packages/turbogears/trunk/debian/README.Debian
URL: http://svn.debian.org/wsvn/python-modules/packages/turbogears/trunk/debian/README.Debian?rev=1642&op=diff
==============================================================================
--- packages/turbogears/trunk/debian/README.Debian (original)
+++ packages/turbogears/trunk/debian/README.Debian Fri Jan 5 20:41:21 2007
@@ -27,4 +27,93 @@
ModelDesigner. Yeah, I know. You can take advantage of those tools by
installing and using SQLObject.
- -- Gustavo Noronha Silva <kov at debian.org>, Mon, 13 Nov 2006 22:24:03 -0200
+4. Upgrading from Preview versions
+
+4.1. Visit framework model change
+
+This is the first stable release of TurboGears. Those who have been
+using the preview versions will probably have already quickstarted
+their applications using an earlier version. If you did so before
+the 1.0b2 version (any Debian package version, in summary) and use
+SQLObject with the Identity framework you will hit the following
+problem when starting your applications under this release:
+
+-- code starts here --
+ [...]
+ File "turbogears/visit/api.py", line 144, in before_main
+ visit= _manager.new_visit_with_key( visit_key )
+ File "turbogears/visit/sovisit.py", line 44, in new_visit_with_key
+ visit= visit_class( visit_key=visit_key,
+ expiry=datetime.now() + self.timeout )
+ File "sqlobject/declarative.py", line 94, in _wrapper
+ return fn(self, *args, **kwargs)
+ File "sqlobject/main.py", line 1214, in __init__
+ self._create(id, **kw)
+ File "sqlobject/main.py", line 1235, in _create
+ raise TypeError, "%s() did not get expected keyword argument %s" % \
+ (self.__class__.__name__, column.name)
+ TypeError: VisitIdentity() did not get expected keyword argument user_id
+-- code ends here --
+
+This is because the Visit framework model has been modified in the
+1.0b2 version, which eventually evolved into 1.0 proper. You will have
+to edit your model.py file manually. The VisitIdentity class became
+Visit, and has the following definition:
+
+-- code starts here --
+ class Visit(SQLObject):
+ class sqlmeta:
+ table = "visit"
+
+ visit_key = StringCol(length=40, alternateID=True,
+ alternateMethodName="by_visit_key")
+ created = DateTimeCol(default=datetime.now)
+ expiry = DateTimeCol()
+
+ def lookup_visit(cls, visit_key):
+ try:
+ return cls.by_visit_key(visit_key)
+ except SQLObjectNotFound:
+ return None
+ lookup_visit = classmethod(lookup_visit)
+-- code ends here --
+
+After adding that to your model.py go to the
+<application>/config/app.cfg configuration file and change the
+visit.soprovider.model setting to point to <application>.model.Visit.
+Don't forget to run `tg-admin sql create' after you do all that
+to have the new table created in your database.
+
+This information has been gathered from Christopher Arndt's blog:
+http://paddyland.serveblog.net/article/14. Thanks! This information
+will probably show up afterwards at:
+
+ http://www.turbogears.org/download/upgrade.html
+
+4.2. Problems viewing kid templates
+
+You may also hit the following problem:
+
+-- code starts here --
+ [...]
+ File "/var/lib/python-support/python2.4/kid/filter.py", line 28, in apply_matches
+ item = stream.expand()
+ File "/var/lib/python-support/python2.4/kid/parser.py", line 103, in expand
+ for ev, item in self._iter:
+ File "/var/lib/python-support/python2.4/kid/parser.py", line 174, in _track
+ for p in stream:
+ File "/var/lib/python-support/python2.4/kid/parser.py", line 218, in _coalesce
+ for ev, item in stream:
+ File "/home/kov/src/application/application/templates/mytemplate.py", line 37, in _pull
+ TypeError: generate_content() takes exactly 1 argument (2 given)
+-- code ends here --
+
+This happens simply because your 'compiled' templates are incompatible
+with a newer kid version; all you need to do is remove all the .pyc
+files from the templates directory:
+
+ $ rm <aplication>/templates/*pyc
+
+This should make it work again.
+
+ -- Gustavo Noronha Silva <kov at debian.org>, Fri, 5 Jan 2007 17:38:18 -0200
Modified: packages/turbogears/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/python-modules/packages/turbogears/trunk/debian/changelog?rev=1642&op=diff
==============================================================================
--- packages/turbogears/trunk/debian/changelog (original)
+++ packages/turbogears/trunk/debian/changelog Fri Jan 5 20:41:21 2007
@@ -6,10 +6,13 @@
- updated to match the new version
* debian/patches/04_sqlalchemy_fix_identity_relations.diff:
- removed; applied upstream
+ * debian/NEWS.Debian, debian/README.Debian:
+ - document changes and important information concerning upgrade
+ from the preview releases to the 1.0 stable release
* urgency set to medium since this is basically the 1.0~b series
with bug fixes
- -- Gustavo Noronha Silva <kov at debian.org> Fri, 5 Jan 2007 16:21:16 -0200
+ -- Gustavo Noronha Silva <kov at debian.org> Fri, 5 Jan 2007 17:41:19 -0200
turbogears (1.0~b1-4) UNRELEASED; urgency=low
More information about the Python-modules-commits
mailing list