juxj / sqlautocode

Automatically exported from code.google.com/p/sqlautocode
Other
0 stars 0 forks source link

Dependency pb on SQLAlchemy? #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm installing from source (after having the same issue with a pip install).

It seems that there is an incompatibility issue with SQLAlchemy 0.6.

SFs-macbook% python setup.py test
running test
running egg_info
creating sqlautocode.egg-info
writing requirements to sqlautocode.egg-info/requires.txt
writing sqlautocode.egg-info/PKG-INFO
writing top-level names to sqlautocode.egg-info/top_level.txt
writing dependency_links to sqlautocode.egg-info/dependency_links.txt
writing entry points to sqlautocode.egg-info/entry_points.txt
writing manifest file 'sqlautocode.egg-info/SOURCES.txt'
reading manifest file 'sqlautocode.egg-info/SOURCES.txt'
writing manifest file 'sqlautocode.egg-info/SOURCES.txt'
running build_ext
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/nose/config.py:232: RuntimeWarning: Option 'with-doctest' in config 
file 'setup.cfg' 
ignored: excluded by runtime environment
  warn(msg, RuntimeWarning)
Failure: ImportError (cannot import name _deferred_relation) ... ERROR

============================================================
==========
ERROR: Failure: ImportError (cannot import name _deferred_relation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/nose/loader.py", line 379, in loadTestsFromName
    addr.filename, addr.module)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/Users/fermigier/hg/sqlautocode/sqlautocode/tests/test_declarative.py", line 3, in 
<module>
    from sqlautocode.declarative import ModelFactory
  File "/Users/fermigier/hg/sqlautocode/sqlautocode/declarative.py", line 11, in <module>
    from sqlalchemy.ext.declarative import declarative_base, _deferred_relation
ImportError: cannot import name _deferred_relation

----------------------------------------------------------------------
Ran 1 test in 0.059s

FAILED (errors=1)
SFs-macbook% 

Original issue reported on code.google.com by sfermig...@gmail.com on 8 May 2010 at 1:05

GoogleCodeExporter commented 9 years ago
For sqlautocode-0.5.7 (the latest yet) path the declarative.py file with this 
to fix it. Basically the renaming of Relation to Relationship (and its 
associated methods) in SA is the cause. The Relation() function remains but 
functions like _deferred_relation become _deferred_relationship and so on.

Original comment by a10n3.s7r1k3r@gmail.com on 29 Oct 2010 at 4:08

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by spamsch@gmail.com on 30 Oct 2010 at 1:43