#817: Upgrading past SVN 1081 breaks external modules' datababse connectivity.
---------------------------------+------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  anonymous
     Type:  defect               |      Status:  new      
 Priority:  high                 |   Milestone:           
Component:  SQLObject            |     Version:  0.9a5    
 Severity:  major                |    Keywords:           
---------------------------------+------------------------------------------
 There was some change around 1081 (as reported by Matthew Bevan in
 
[http://groups.google.com/group/turbogears/browse_thread/thread/8e6863219e25672/95f7823b1b88beb1
 this post]) that now causes a class (in an external module configured
 using TG's startup/shutdown notification entry point) inheriting from an
 InheritableSQLObject to throw the following traceback:

 {{{
 Traceback (most recent call last):
   File "/usr/bin/tg-admin", line 7, in ?
     sys.exit(
   File "/usr/lib/python2.4/site-packages/setuptools-0.6a11-
 py2.4.egg/pkg_resources.py", line 236, in load_entry_point
     return get_distribution(dist).load_entry_point(group, name)
   File "/usr/lib/python2.4/site-packages/setuptools-0.6a11-
 py2.4.egg/pkg_resources.py", line 2097, in load_entry_point
     return ep.load()
   File "/usr/lib/python2.4/site-packages/setuptools-0.6a11-
 py2.4.egg/pkg_resources.py", line 1830, in load
     entry = __import__(self.module_name, globals(),globals(),
 ['__name__'])
   File "/home/mbevan/Projects/turbogears/turbogears/__init__.py", line
 18, in ?
     ext = entrypoint.load()
   File "/usr/lib/python2.4/site-packages/setuptools-0.6a11-
 py2.4.egg/pkg_resources.py", line 1830, in load
     entry = __import__(self.module_name, globals(),globals(),
 ['__name__'])
   File "/home/mbevan/Projects/TG-Content/content/__init__.py", line 23,
 in ?
     from content import controllers, model, widgets
   File "/home/mbevan/Projects/TG-Content/content/model.py", line 16, in ?
     class Bob(Test):
   File
 
"/home/mbevan/Projects/turbogears/thirdparty/sqlobject/sqlobject/declarative.py",
 line 108, in __new__
     cls.__classinit__(cls, new_attrs)
   File
 "/home/mbevan/Projects/turbogears/thirdparty/sqlobject/sqlobject/main.py",
 line 748, in __classinit__
     if not connection and not getattr(cls, '_connection', None):
   File "/home/mbevan/Projects/turbogears/turbogears/database.py", line
 148, in __get__
     self.set_hub()
   File "/home/mbevan/Projects/turbogears/turbogears/database.py", line
 166, in set_hub
     raise KeyError, "No database configuration found!"
 KeyError: 'No database configuration found!'
 }}}

 The above is thrown during TG initialization - applications no longer
 start up, and the tg-admin tool can no longer run.

 I have been able to reproduce this error with a very simple (~60 lines of
 code including setup.py) set-up, and this error would even work as a
 system-wide DOS attack against the current version of TG.  This is a show-
 stopping problem for the project Matthew and I are working on.

 The simple case is attached.  To reproduce:

  1. Extract the contents of the attached file (`SimpleTest-1.0.0.tar.bz2`)
 into a temporary directory.
  1. Enter the `SimpleTest` directory.
  1. Run `sudo ./setup.py develop` to install.
  1. Attempt to run `tg-admin` or any TurboGears application.

  - Alice !McGregor

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/817>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to