I've been using Spyce 1.x on a production app for the past 2 years and
have really enjoyed it. Today I began playing around with Spyce 2 to
take advantage of some of the new features. I was able to get
everything installed and working, but I ran into something that I feel
is unintuitive about the installation/configuration of Spyce 2.
I did not want to change any default configuration variables, so I
simply `touch`ed an empty spyceconf.py file, pointed PythonOption
SPYCE_CONFIG to it, and started Apache/ModPython. When I visited my
test page I saw this:
Traceback (most recent call last):
File "/usr/share/spyce/spyceModpy.py", line 126, in spyceMain
result = spyce.spyceFileHandler(request, response, filename,
File "/usr/share/spyce/spyce.py", line 833, in spyceFileHandler
return _spyceCommonHandler(request, response, ('file', (filename,
sig)), args, kwargs, config)
File "/usr/share/spyce/spyce.py", line 840, in _spyceCommonHandler
return getServer(config).commonHandler(request, response,
spyceInfo, args, kwargs)
File "/usr/share/spyce/spyce.py", line 59, in getServer
File "/usr/share/spyce/spyce.py", line 96, in __init__
DEBUG_ERROR = self.config.debug
AttributeError: 'module' object has no attribute 'debug'
So, I added a 'debug = True' line to my empty spyceconf.py file,
restarted and got another traceback with the same message, different
attribute. The only way I was able to get this to work out of the box
was to copy the default spyceconf.py file from
http://spyce.sourceforge.net/docs/doc-runtime_common.html . In my
experience, most systems have built in defaults for these types of
variables, and the configuration file is only used to override the
defaults. After looking at the sample spyceconf.py, the only variable
that I would need to override is "root", so it seems a bit unnecessary
to have to define all those variables just to get my site working.
This would also affect users who upgrade Spyce after new configuration
variables have been added; their existing installations would be broken
until they added the new configuration options to their spyceconf.py
file. Providing built-in default values for configuration options
would prevent this.
Just my initial observation of 2.x, nice work!