Your message dated Sat, 15 Sep 2007 18:32:08 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#415909: fixed in turbogears 1.0.3.2-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: python-turbogears
Version: 1.0.1-1
Severity: normal

Hello,

I do tg-admin quickstart, tell it to use 'identity' and get a model with
these classes:

  $ grep ^class model.py
  class Visit(SQLObject):
  class VisitIdentity(SQLObject):
  class Group(SQLObject):
  class User(SQLObject):
  class Permission(SQLObject):

so far so good, but after customizing them a bit[1], I noticed weird
behaviours in the toolbox.  It turns out that the toolbox has a
different, very personal idea of those tables:

  $ grep ^class turbogears/identity/soprovider.py
  class TG_VisitIdentity(SQLObject):
  class TG_Group(InheritableSQLObject):
  class TG_User(InheritableSQLObject):
  class TG_Permission(InheritableSQLObject):

This causes all sorts of funny misbehaviours when using the toolbox and
the application: tables created by the toolbox won't work with the
application (they'd miss the extra custom fields), but the toolbox won't
be able to edit the user tables created by the application (trying to
add a user gives me "An error occurred: global name 'identity' is
not defined").

Plus, there's no obvious way to recreate the database tables as 
"tg-admin sql create" will create broken user tables.  Here's a
work-around script for that:

#!/usr/bin/python

from os.path import *
import sys, inspect

import pkg_resources
pkg_resources.require("TurboGears")

import turbogears

# first look on the command line for a desired config file,
# if it's not on the command line, then
# look for setup.py in this directory. If it's not there, this script is
# probably installed
if len(sys.argv) > 1:
    turbogears.update_config(configfile=sys.argv[1],
        modulename="pec.config")
elif exists(join(dirname(__file__), "setup.py")):
    turbogears.update_config(configfile="dev.cfg",
        modulename="pec.config")
else:
    turbogears.update_config(configfile="prod.cfg",
        modulename="pec.config")

import MYNAMESPACE.model as pm
import sqlobject 
from sqlobject.inheritance import InheritableSQLObject

for item in pm.__dict__.values():
    if inspect.isclass(item) and issubclass(item, sqlobject.SQLObject) \
       and item != sqlobject.SQLObject and item != InheritableSQLObject:
        print "Recreating", item
        item.createTable(ifNotExists=True)


Ciao,

Enrico


[1]
I'm supposed to be able to do it.  It even says it in the User class
comment:
class User(SQLObject):
    """
    Reasonably basic User definition. Probably would want additional attributes.
    """
-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20.1enrico
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)

Versions of packages python-turbogears depends on:
ii  python                        2.4.4-2    An interactive high-level object-o
ii  python-celementtree           1.0.5-8    Light-weight toolkit for XML proce
ii  python-cheetah                2.0~rc7-1  text-based template engine and Pyt
ii  python-cherrypy               2.2.1-3    Python web development framework
ii  python-configobj              4.3.2-2    a simple but powerful config file 
ii  python-dispatch               0.5adev-5  Rule-based Dispatching and Generic
ii  python-elementtree            1.2.6-10   Light-weight toolkit for XML proce
ii  python-formencode             0.7-1      validation and form generation pyt
ii  python-kid                    0.9.5-1    simple Pythonic template language 
ii  python-nose                   0.9.0-2    test discovery and running for Pyt
ii  python-paste                  1.0.1-1    Tools for using a Web Server Gatew
ii  python-pastedeploy            1.0-1      Load, configure, and compose WSGI 
ii  python-pastescript            1.0-1      serving web applications, creating
ii  python-setuptools             0.6c5-2    Python Distutils Enhancements
ii  python-simplejson             1.7-1      Simple, fast, extensible JSON enco
ii  python-sqlalchemy             0.3.1-2    SQL toolkit and Object Relational 
ii  python-sqlobject              0.8.1-1    python module for SQLObject
ii  python-support                0.5.6      automated rebuilding support for p
ii  python-turbojson              0.9.5-1    TurboGears template plugin that su
ii  python-turbokid               0.9.9-1    TurboGears template plugin that su

Versions of packages python-turbogears recommends:
ii  python-pysqlite2              2.3.2-2    python interface to SQLite 3

-- no debconf information


--- End Message ---
--- Begin Message ---
Source: turbogears
Source-Version: 1.0.3.2-1

We believe that the bug you reported is fixed in the latest version of
turbogears, which is due to be installed in the Debian FTP archive:

python-turbogears_1.0.3.2-1_all.deb
  to pool/main/t/turbogears/python-turbogears_1.0.3.2-1_all.deb
turbogears_1.0.3.2-1.diff.gz
  to pool/main/t/turbogears/turbogears_1.0.3.2-1.diff.gz
turbogears_1.0.3.2-1.dsc
  to pool/main/t/turbogears/turbogears_1.0.3.2-1.dsc
turbogears_1.0.3.2.orig.tar.gz
  to pool/main/t/turbogears/turbogears_1.0.3.2.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gustavo Noronha Silva <[EMAIL PROTECTED]> (supplier of updated turbogears 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 15 Sep 2007 15:01:20 -0300
Source: turbogears
Binary: python-turbogears
Architecture: source all
Version: 1.0.3.2-1
Distribution: unstable
Urgency: low
Maintainer: Gustavo Noronha Silva <[EMAIL PROTECTED]>
Changed-By: Gustavo Noronha Silva <[EMAIL PROTECTED]>
Description: 
 python-turbogears - Python-based web framework
Closes: 415909 433192 434443 439370
Changes: 
 turbogears (1.0.3.2-1) unstable; urgency=low
 .
   * New upstream release (Closes: #439370, #434443)
   - includes the xml.etree patch (Closes: #433192)
   - includes fix for the mismatch between the identity model classes and
     the tables used by toolbox (Closes: #415909)
   * 01_disable_requirements.diff,
     02_sqlalchemy_default_if_no_correct_sqlobject.diff,
     03_sqlalchemy_identity_toolbox_fixup.diff:
   - updated to match new version
   * debian/patches/05_xml_etree.diff:
   - removed; no longer needed, since it has been applied upstream
   * debian/patches/04_keep_using_pyprotocols.diff, debian/control:
   - removed; now we're able to use the newest python-decoratortools package;
   - also depend on the new package, thus
Files: 
 e1be90bfbf915e2f076b902f1733cfbc 839 python optional turbogears_1.0.3.2-1.dsc
 75471c1767af970479ca2d4788a30323 762552 python optional 
turbogears_1.0.3.2.orig.tar.gz
 31b6509e764cf56a395d9e2e2f8ebb6f 8221 python optional 
turbogears_1.0.3.2-1.diff.gz
 67abfa05328a44a3a136d7a370313965 1082264 python optional 
python-turbogears_1.0.3.2-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG7CJIt1anjIgqbEsRAutRAKDT6QhRHAFTarKc9aSF96aVdBTPRACfZZrl
PEFXyf9ch5ewAYZznBFFfIc=
=KfEo
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to