Author: phd
Date: 2005-11-10 09:53:52 +0000 (Thu, 10 Nov 2005)
New Revision: 1237
Added:
home/phd/SQLObject/paramstyles/sqlobject/util/csvimport.py
Modified:
home/phd/SQLObject/paramstyles/sqlobject/events.py
home/phd/SQLObject/paramstyles/sqlobject/manager/command.py
Log:
Merged patches from the revisions 1232:1236 from the trunk
Modified: home/phd/SQLObject/paramstyles/sqlobject/events.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/events.py 2005-11-10 05:37:21 UTC (rev 1236)
+++ home/phd/SQLObject/paramstyles/sqlobject/events.py 2005-11-10 09:53:52 UTC (rev 1237)
@@ -103,10 +103,6 @@
The arguments are ``(instance, kwargs)``. ``kwargs`` can be
modified. This is run *before* the instance is updated; if you
want to look at the current values, simply look at ``instance``.
-
- @@: Should this also catch single-column updates? Should this
- only be run before updates go to the server? Should this be
- called RowUpdateSignal?
"""
class AddColumnSignal(Signal):
Modified: home/phd/SQLObject/paramstyles/sqlobject/manager/command.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/manager/command.py 2005-11-10 05:37:21 UTC (rev 1236)
+++ home/phd/SQLObject/paramstyles/sqlobject/manager/command.py 2005-11-10 09:53:52 UTC (rev 1237)
@@ -6,13 +6,11 @@
import sys
import textwrap
import warnings
+import time
try:
- from paste import pyconfig
- from paste import CONFIG
-except ImportError, e:
- pyconfig = None
- CONFIG = {}
-import time
+ from paste.deploy import appconfig
+except ImportError:
+ appconfig = None
import sqlobject
from sqlobject import col
@@ -320,13 +318,15 @@
def config(self):
if not getattr(self.options, 'config_file', None):
return None
- if pyconfig and self.options.config_fn.endswith('.conf'):
- config = pyconfig.Config(with_default=True)
- config.load(self.options.config_file)
- CONFIG.push_process_config(config)
- return config
+ config_file = self.options.config_file
+ if appconfig:
+ if (not config_file.startswith('egg:')
+ and not config_file.startswith('config:')):
+ config_file = 'config:' + config_file
+ return appconfig(config_file,
+ relative_to=os.getcwd())
else:
- return self.ini_config(self.options.config_file)
+ return self.ini_config(config_file)
def ini_config(self, conf_fn):
conf_section = 'main'
Copied: home/phd/SQLObject/paramstyles/sqlobject/util/csvimport.py (from rev 1236, SQLObject/trunk/sqlobject/util/csvimport.py)
|