* atexit is ignored by uWSGI and the worker thread can not exit
* queue API and naming is not final
Gunicorn ignores an error on shutdown:
Exception SystemExit: 0 in <module 'threading' from
'/usr/lib64/python2.7/threading.pyc'> ignored
* add a wrapper around `sqlite3` to enable connection pooling across
multiple threads.
Most tests now use a in-memory database which speeds things (slightly)
up. The database wrapper is now uncoupled from the actual database
connection.
* split cache framework from core.Mixin into a separate package
`isso.cache`. The dependency on `werkzeug.contrib` has been removed to
ease a possible transition to a different web framework later.
The default cache uses SQLite3 now (unless Isso is run from uWSGI).
While it may sound like a Bad Idea (tm), it's much more efficient than
per-process python datastructures. The SQLite3 cache is SMP-capable
and fast for read-heavy sites.
SQLite3 may fail due to a corrupt database for concurrent read access
from multiple processes. The database is actually not corrupted, but
the connection is stale. As a workaround, limit process number to your
CPU count or wait until a "real" backend such as PostgreSQL is
available.
* use a single default configuration, share/isso.conf
* try to use config.new in some tests which are decoupled
A few tests now depend on `isso.dist` to show that they (or the used
objects) have too much dependencies and need to be rewritten.
Uses keyword arguments to use multiprocessing or uwsgi mixin. This
fixes an issue on exotic *BSDs such as NetBSD where Python comes not
with inter-process semaphores (issue 3307):
mod_wsgi (pid=14365): Target WSGI script '/var/www/vhosts/my.hostname.org/htdocs/isso.wsgi' cannot be loaded as Python module.
mod_wsgi (pid=14365): Exception occurred processing WSGI script '/var/www/vhosts/my.hostname.org/htdocs/isso.wsgi'.
Traceback (most recent call last):
File "/var/www/vhosts/my.hostname.org/htdocs/isso.wsgi", line 8, in <module>
application = make_app(Config.load("/var/www/vhosts/my.hostname.org/htdocs/isso.cfg"))
File "/usr/pkg/lib/python2.7/site-packages/isso/__init__.py", line 155, in make_app
isso = App(conf)
File "/usr/pkg/lib/python2.7/site-packages/isso/__init__.py", line 91, in __init__
super(Isso, self).__init__(conf)
File "/usr/pkg/lib/python2.7/site-packages/isso/core.py", line 223, in __init__
self.lock = multiprocessing.Lock()
File "/usr/pkg/lib/python2.7/multiprocessing/__init__.py", line 175, in Lock
from multiprocessing.synchronize import Lock
File "/usr/pkg/lib/python2.7/multiprocessing/synchronize.py", line 59, in <module>
" function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.
When using Gunicorn or uWSGI to run `isso.dispatch` it would
automatically initialize and a default Isso instance (and cause
several logging messages), although never used.
If you use uWSGI or Gunicorn, you have to change the module from
`isso` to `isso.run`.