domenkozar / almir

Bacula web administration written in Pyramid
Other
38 stars 13 forks source link

Sqlalchemy 9.0 compatibility #61

Open brodul opened 10 years ago

brodul commented 10 years ago

Hi,

there is a new version of Sqlalchemy. I installed almir from pypi and I got the following error

(test)brodul@moon:~/test$ pserve production.ini 
Traceback (most recent call last):
  File "/home/brodul/test/bin/pserve", line 9, in <module>
    load_entry_point('pyramid==1.5a3', 'console_scripts', 'pserve')()
  File "/home/brodul/test/lib/python2.6/site-packages/pyramid/scripts/pserve.py", line 51, in main
    return command.run()
  File "/home/brodul/test/lib/python2.6/site-packages/pyramid/scripts/pserve.py", line 316, in run
    global_conf=vars)
  File "/home/brodul/test/lib/python2.6/site-packages/pyramid/scripts/pserve.py", line 340, in loadapp
    return loadapp(app_spec, name=name, relative_to=relative_to, **kw)
  File "/home/brodul/test/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/home/brodul/test/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
    global_conf=global_conf)
  File "/home/brodul/test/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
    global_conf=global_conf)
  File "/home/brodul/test/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/home/brodul/test/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 454, in get_context
    section)
  File "/home/brodul/test/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 476, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "/home/brodul/test/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 406, in get_context
    global_conf=global_conf)
  File "/home/brodul/test/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
    global_conf=global_conf)
  File "/home/brodul/test/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/home/brodul/test/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 620, in get_context
    object_type, name=name)
  File "/home/brodul/test/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 646, in find_egg_entry_point
    possible.append((entry.load(), protocol, entry.name))
  File "/home/brodul/test/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 1948, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/home/brodul/test/lib/python2.6/site-packages/almir/__init__.py", line 13, in <module>
    from almir.meta import initialize_sql
  File "/home/brodul/test/lib/python2.6/site-packages/almir/meta.py", line 18, in <module>
    from almir.lib.sqlalchemy_declarative_reflection import DeclarativeReflectedBase
  File "/home/brodul/test/lib/python2.6/site-packages/almir/lib/sqlalchemy_declarative_reflection.py", line 4, in <module>
    from sqlalchemy.orm.util import _is_mapped_class
ImportError: cannot import name _is_mapped_class

The _is_mapped_class has been removed from the code.

I recommend others to use the script install or manual install as described in docs.